dafaq's blog

By dafaq, history, 4 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


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 ?

Read more »

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