Lazy_Tym's blog

By Lazy_Tym, 10 years ago, In English

problem C — Watto and Mechanism.... can anyone explain why i am getting TLE? my code is given below: 9867828.i think my code execute worst query in 3.6*10^11.can anyone tell me how can reduce this operation number?

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

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

your second for and your fourth for both use j i think the fourth fors j exceeded the 2nd fors limitation so you got stuck in an infinite loop