Блог пользователя ASawe2.6Main

Автор ASawe2.6Main, история, 2 года назад, По-английски

Hello, I've been attempting to solve this question: https://mirror.codeforces.com/contest/1666/problem/D

So far, I've deduced that it is possible to simulate the question to construct an answer, which will be compared with the second string. However, I'm unsure on what case or cases will cause my code to fail, but I'm assuming it has something to do with the .remove() function.

Any help would be appreciated.

Thanks!

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

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

remove function in lists raise error when the list can't find the element to be deleted , so use exception handling when you use remove function.
I modified your code but instead of RTE it gives WA on test 4.