72 - ZOJ Monthly, November 2008 - B
There are three piles of beans. TT and DD pick any number of beans from any pile or the same number from any two piles by turns. Who get the last bean will win. TT and DD are very clever.
Each test case contains of a single line containing 3 integers a b c, indicating the numbers of beans of these piles. It is assumed that 0 <= a,b,c <= 300 and a + b + c > 0.
For each test case, output 1 if TT will win, ouput 0 if DD will win.
1 0 0 1 1 1 2 3 6
1 0 0
Author: JIANG, Guangran