[BOJ 15402] Cunning Friends

View as PDF

Submit solution

Points: 4
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

Anthony and his friends Ben and Chris decided to play a game. They have N piles of stones such that the i th-pile contains Ai stones. In one move a player chooses one pile and may take any non-zero number of stones from it. The players take turns. Anthony goes first then Ben and then Chris. If some player cannot make a move (no more stones exist) he loses. Ben colluded with Chris so their goal is to make Anthony lose. But Anthony doesn't want to lose. You have to find out if Anthony can avoid defeat if all players play optimally

입력 형식

The first line contains one integer N (1 ≤ N ≤ 105).</p>

The next line contains N integers Ai (1 ≤ Ai ≤ 109).

출력 형식

Print "Lose" if Anthony will lose in this game and "Win" otherwise.

예제 입력 1

3
2 2 1

예제 출력 1

Win

예제 입력 2

2
4 7

예제 출력 2

Lose

Comments

There are no comments at the moment.