This problem looks simple, and the coding was not so complex, but getting WA..
Re-read the problem description few times, but I think my interpretation of the game rule is correct..
Is there a tricky test case ?
Thanks in advance.
----
Rio
11325 - This Means War!
Moderator: Board moderators
The most tricky thing is the end condition:
Normally, when a war is started, the current and the next 3 cards of each player are discarded into the center.
Note that war can't be started with the very last card.
Otherwise if a war is started with the last i card i>=2, then the next min(i-2,3) cards are discarded.
Other than that, I just used backtracking with some greedy stuff.
Normally, when a war is started, the current and the next 3 cards of each player are discarded into the center.
Note that war can't be started with the very last card.
Otherwise if a war is started with the last i card i>=2, then the next min(i-2,3) cards are discarded.
Other than that, I just used backtracking with some greedy stuff.
-
- New poster
- Posts: 48
- Joined: Sun Jun 22, 2014 6:14 am
Re: 11325 - This Means War!
The judge I/O is incomplete. For example, for input
my Accepted program outputs "no", but uvatoolkit yields "yes".
Code: Select all
1
3S 7H KD 4S 6S AD 7D 4C AS JD 2H 3C 4H 2C 7C AH 5S 2D 6C 8S AC 5C 7S KS QC TD