Comment

avatar username

Can someone, roughly, explain the time complexity of my code for D?

This is the "optimal" one: https://codeforces.com/contest/2164/submission/356135976 And this is the non-optimal one: https://codeforces.com/contest/2164/submission/356135935

I'm not sure why both of them passed, as it seems like K * N to me(the final loop).

I wrote the optimal one first, and it passed, so I decided to check if the l and r were necessary, somehow got the same runtime, so I resubmitted, and it worked a little bit faster

The actual rating of this user is 1537.

Original comment.

Statistics