sunrise321's blog

By sunrise321, history, 5 years ago, In English

Link to my source code https://ideone.com/q83VDg. I am getting TLE in test case 14 but my complexity if O(N*200). Please take a look and tell me if I am wrong.Link to the problem http://mirror.codeforces.com/contest/1335/problem/E2

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Map operations are not constant, they are logarithmic. It may not seem as significant, but N*200*lgN will surely get TLE.