dafaq's blog

By dafaq, history, 8 years ago, In English

I was trying to solve this problem, 283A - Cows and Sequence So, I submitted my segment tree solution which timed out on test 9. Then, i tried using BIT and that timed out as well. Considering the problem constraints, I believe, O(nlogn) should not have timed out.

Then i read the editorial and submitted the O(n) solution, and that timed out on the same test too.

My submissions are

O(n):23896371

Segment Tree :23889799

BIT : 23889647

Probably I'm doing some very trivial mistake, or there seems to be an issue with I/O/judge times ?

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

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

I believe there's something to do with cin/cout. http://codeforces.net/contest/283/submission/23897753