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

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

Hi,

I am trying to solve this problem on codeforces: 126B - Password

However, my submitted code got RE on string with repeated characters like aaaa, www, ss, ... You could check the submission here: 97046351.

I don't know why the error arise. This is the first time I've encountered this kind of RE. Please help me with this.

Thanks in advance.

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

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

Just check if size of s2, s3 is greater than zero before accessing the last element, i submitted your code with changes but it TLE'd on test 59. see this

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

    So the problem is with the set. I thought it was something about the input. Thanks a lot.