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

Автор prat945, история, 3 года назад, По-английски

Hello everyone, please help me debug this code (https://codeforces.com/contest/1539/submission/123994140). I have implemented this using two pointer method, and I believe that the logic is correct. I have also used a random test case generator and compared my solution with an accepted one , but to no avail. Any help/suggestion/support on this is greatly appreciated. Any general debugging tips are also appreciated. Thanks!

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

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

Try changing pair<int, int> to pair<long long, long long> in the comparator.

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

Oh! I feel so stupid right now. Anyway , thanks a lot I got AC.