practice_has's blog

By practice_has, history, 4 months ago, In English

Can someone tell me what is the difference in logic between the two solutions?

The first solution is accepted by the CSES

Code 1

The second solution is giving TLE

Code 2

The only difference in code is the order of nested for loop

Someone please help!

Full text and comments »

  • Vote: I like it
  • -6
  • Vote: I do not like it