Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: A Coin Game
Description Harry and Sally have recently got addicted to a coin game. The game goes as follows. The games uses a After a sweet winning streak, Harry says to Sally, “Let’s have a bet! I’ll play first, and I’ll put heads in some squares and tails in some others of the board. You can decide whether the rest of coins shows heads or tails. I dare say you can’t beat me no matter how you put them.” Given the squares in which Harry puts heads and those in which he puts tails, can you help Sally decide on the rest of coins so that she will win to teach the arrogant Harry a lesson? Assume that both Harry and Sally play optimally in the game. Input The input contains multiple test cases. Each test cases begins with a line containing two integers Output For each test case, if Sally can win the game, print “ Sample Input 0 4 1 1 1 2 2 1 2 2 1 1 1 1 2 2 Sample Output Yes T T T T Yes T Hint
Source POJ Monthly--2007.06.03, Yao, Jinyu |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator