AtCoder Regular Contest 131
C
Zero XOR
AtCoder
⌀ 1162
原题
← BD →
翻译中…

Problem Statement

翻译中…

There are $N$ cookies on a desk. Each cookie has a positive integer on its surface: $A_1, A_2, \dots, A_N$, which are all different.

翻译中…

Let us play a game with two players using these cookies. In this game, the players alternately do the following action.

翻译中…

Choose a cookie on the desk and eat it. Then, if the $\mathrm{XOR}$ of the integers written on the remaining cookies on the desk becomes $0$, the player wins, and the game ends.

翻译中…

You have asked the boy E869120 to play this game with you. You go first, and E869120 goes second. Are you going to win if both players play optimally?

翻译中…

What is $\mathrm{XOR}$? The bitwise $\mathrm{XOR}$ of integers $A$ and $B$, $A\ \mathrm{XOR}\ B$, is defined as follows: When $A\ \mathrm{XOR}\ B$ is written in base two, the digit in the $2^k$'s place ($k \geq 0$) is $1$ if exactly one of $A$ and $B$ is $1$, and $0$ otherwise. For example, we have $3\ \mathrm{XOR}\ 5 = 6$ (in base two: $011\ \mathrm{XOR}\ 101 = 110$). Generally, the bitwise $\mathrm{XOR}$ of $k$ integers $p_1, p_2, p_3, \dots, p_k$ is defined as $(\dots ((p_1\ \mathrm{XOR}\ p_2)\ \mathrm{XOR}\ p_3)\ \mathrm{XOR}\ \dots\ \mathrm{XOR}\ p_k)$. We can prove that this value does not depend on the order of $p_1, p_2, p_3, \dots p_k$. Particularly, when $k = 0$, the $\mathrm{XOR}$ is $0$.

翻译中…

Constraints

翻译中…
  • $1 \leq N \leq 400000$
  • $1 \leq A_i \leq 10^9 \ (1 \leq i \leq N)$
  • $A_1, A_2, \dots, A_N$ are all different.
  • The $\mathrm{XOR}$ of $A_1, A_2, \dots, A_N$ is not $0$.
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N
A_1 A_2 \cdots A_N

翻译中…

Output

翻译中…

If you are going to win if both players play optimally, print Win; if you are going to lose, print Lose.

翻译中…

样例

Input #1
6
9 14 11 3 5 8
Output #1
Lose
In this case, regardless of what choices you make, you will lose if E869120 keeps playing optimally. For example, let us say you first eat the cookie with $11$ written on it. Then, E869120 will eat the cookie with $9$ so that the $\mathrm{XOR}$ of the numbers written on the remaining cookies, $14, 3, 5, 8$, is $0$, making him win. Even if you make other choices, E869120 will win eventually.
Input #2
1
131
Output #2
Win
In this case, your only choice in your first turn is to eat the cookie with $131$. Then, there is no more cookie on the desk, making the $\mathrm{XOR}$ of the numbers written on the remaining cookies $0$. Therefore, before E869120 gets to do anything, you win.
Input #3
8
12 23 34 45 56 78 89 98
Output #3
Win
题目信息
题号
arc131_c
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。