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

Автор Rahul3006, история, 17 месяцев назад, По-английски

Problem Link

using vector to solve the problem lands me to TLE but the same logic used by the array got accepted. WHY?

SOLN (by vector): (https://codeforces.com/problemset/submission/1747/184215576). SOLN (by array): (https://codeforces.com/problemset/submission/1747/184217645)

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

»
17 месяцев назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Your debug define seems to be wrong. It uses ifndef. So now on the judge you are debugging the vector each time. I don't know why that is so slow, but at least it's not what you intended.