original constraints

In July challenge I’m not getting marks for the subtask 2 in which it is written original constraints.Please can anybody tell me how to overcome this problem and please tell what does original constraints means.

1 Like

original contraints are the contraints which written written on the top subtask section and below output section.

if you getting a tle in subtask 2 you need to optimize the solution so that it fits in the time constraints

even i have the same issue i dont know what the subtask means

You’ll get full score if your solution is optimized and has optimal complexity, If not you’ll get partial score.

Constraint are the input against which your program will be test. in subtask 1 constraints are small so you are getting AC.while in case of original constraints input size increases which also increase the execution time and results in Tle.
you should learn time complexity of a algorithm (in case you don’t know).

1 Like

i cannot find the original constraints where u are suggesting to find them. Please help.

They are provided in the question, right below the input & output formats and look like this. If you write a code keeping in mind that it will be tested even for these huge input constraints, you won’t get TLE. Try optimizing your code accordingly.


  • 1≤T≤10
  • 2≤N≤10^5
  • 1≤Ai≤10^9 for each valid i
1 Like

thanks… now starting to learn this complexity… O(1) is luv haha