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
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.
thank you!
No problem.
:)
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.me/contest/1671/problem/A You can check its solution below. https://codeforces.me/contest/1671/submission/155234854#