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 ?
I believe there's something to do with cin/cout. http://codeforces.me/contest/283/submission/23897753
yeah looks like it, thanks !!