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

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

Can anyone tell me , why I am getting runtime error on test 1 itself ?? Problem link->http://codeforces.com/problemset/problem/387/B Code link->http://pastebin.com/N3JKSVPj

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

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

Run it through valgrind and you'll see a bunch of invalid read errors. You need to advance the iterator before you erase the element from the set. You can use the return value from set.erase() like this.