pedrovictor48's blog

By pedrovictor48, history, 3 years ago, In English

Firstly i came up with this solution: https://mirror.codeforces.com/contest/1542/submission/121218884 I think it's O(n) in worst cases, and i got TLE. But shouldn't O(n) be sufficient for these constraints?

After the contest I also updated a O(logn) solution, and its similar to others that i saw submitted, but its getting TLE too: https://mirror.codeforces.com/contest/1542/submission/121269280

What am I missing here?

Full text and comments »

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