Mavericks fight again

Link: https://www.nowcoder.com/acm/contest/75/F
Source: Niuke.com

Topic description

There are N piles of stones. The number of stones in each pile is known. Two people take turns to take stones. Each time, they can only choose one pile of N piles of stones to take a certain number of stones (at least one). After taking the stones, you can The remaining stones in the pile are randomly selected and placed on any other pile or piles. When a person cannot take a piece, it means that person has lost the game. Note: After a pile of stones has no seeds, you can no longer put stones here.

Assuming that the calf takes the stones first every time, and both sides of the game are absolutely smart, now give you the number of piles of stones and the number of stones in each pile, please judge whether the calf can win.

Enter description:

There may be multiple sets of test data (the number of test data sets does not exceed 1000)
The first line of each set of test data is an integer representing N (1<=N<=10)
The second line is N integers representing the number of stones in the pile of stones respectively. (No more than 100 stones per pile)
When the input N is 0, it means the input is over

Output description:

For each set of test data, the output of Win means that the Mavericks can win, and the output of Lose means that the Mavericks will inevitably lose.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325524742&siteId=291194637
Recommended