Блог пользователя Hepic_Antony_Skarlatos

Автор Hepic_Antony_Skarlatos, история, 9 лет назад, По-английски

I submited in the D problem a O(n^3) logic because of 4 seconds,but it took TLE. Here it is: http://codeforces.com/contest/552/submission/11650074

In the comments I saw a source similar to me: http://codeforces.com/contest/552/submission/11648192 that passed.

What is wrong with mine?

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

you have a problem with your REP. check it again :))

»
9 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

If you do the math O(n ^ 3) will be arround 10^9 which is a lot (codeforces' servers allow arround 10^8 per second). And If you care about learning seek for something better.
Hint: check the given constrains and try to reduce your time complexity :D