Pansage's blog

By Pansage, history, 8 months ago, In English

codeforces round 1085 2207C - Where's My Water?, the submission 365892826 should've given TLE in worst test case

where T = 1, N = 1, H = 10^9, A[i] = {1, if i odd, else H} here it passed with like 1200ms, idk why

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
8 months ago, hide # |
← Rev. 2  
Vote: I like it 0 Vote: I do not like it

your code complexity is O(m^2*n) ig runtime is closer to 1.2*10^9 which matches 1200ms which is passed if constraints where little higher like n=5000 it would definitely give TLE