Can't understand why I am getting a TLE with O(n) in Q265C.

Правка en1, от kilimanjaro2, 2016-07-18 07:33:46

Hi,

I have written a solution which runs in O(n) with n being 1e6. I am unable to understand why it gives a TLE. Any help would be much appreciated.

Link to question: http://codeforces.me/problemset/problem/265/C

Link to my code: http://hastebin.com/vususidufi.vala

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский kilimanjaro2 2016-07-18 07:34:47 0 (published)
en1 Английский kilimanjaro2 2016-07-18 07:33:46 334 Initial revision (saved to drafts)