lynsrz's blog

By lynsrz, history, 8 years ago, In English

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

  • Vote: I like it
  • -4
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it

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.

»
3 years ago, # |
  Vote: I like it +5 Vote: I do not like it

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.net/contest/1671/problem/A You can check its solution below. https://codeforces.net/contest/1671/submission/155234854#