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

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

I been trying problem 546C - Soldier and Cards , but it shows me wrong answer. While when I put those test cases on my pc compiler they seems to give right answer. I have tried many times but seems i cant figure out where the problem is . Please check where is the error. 27770721

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

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

Try this : code

The problem is that when a deque is empty and you take the first value in it, it gives a random value but your compiler seems to take zero as a default value.

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

I got wrong answer on the 38th test case but on all other compilers my code is running correct for the same. You can check the problem below. https://codeforces.com/contest/1671/problem/A You can check its solution below. https://codeforces.com/contest/1671/submission/155234854#