题目描述
"Don't Drink and Drive, but when you do, Better Call Saul."
Once Jesse and Walter were fighting over extra cash, and Saul decided to settle it with a game of stone piles whose winner gets the extra money. The game is described as follows :
There are N$N$ piles of stones with A$A$1$1$,$,$ A$A$2$2$,$,$ ...$...$ A$A$N$N$ stones in each pile.
Jesse and Walter move alternately, and in one move, they remove one pile entirely.
After a total of X$X$ moves, if the Sum of all the remaining piles is odd, Walter wins the game and gets the extra cash, else Jesse is the winner.
Walter moves first.
Determine the winner of the game if both of them play optimally.
-----Input:-----
- The first line will contain T$T$, number of testcases. T$T$ testcases follow :
- The first line of each testcase contains two space-separated integers N,X$N, X$.
- The second line of each testcase contains N$N$ space-separated integers A$A$1$1$,$,$ A$A$2$2$,$,$ ...,$...,$A$A$N$N$.
-----Output:-----
For each test case, print a single line containing the string "Jesse" (without quotes), if Jesse wins the game or "Walter" (without quotes) if Walter wins.
-----Constraints-----
- 1≤T≤104$1 \leq T \leq 10^4$
- 2≤N≤105$2 \leq N \leq 10^5$
- 1≤X≤N−1$1 \leq X \leq N-1$
- 1≤A$1 \leq A$i$i$ ≤100$\leq 100$
- The sum of N$N$ over all test cases does not exceed 106$10^6$
-----Sample Input:-----
2
5 3
4 4 4 3 4
7 4
3 3 1 1 1 2 4
-----Sample Output:-----
Jesse
Walter
-----EXPLANATION:-----
For Test Case 1 : Playing optimally, Walter removes 4. Jesse removes 3 and then Walter removes 4. Jesse wins as 4+4=8$4 + 4 = 8$ is even.
For Test Case 2 : Playing optimally, Walter removes 4, Jesse removes 3, Walter removes 2 and Jesse removes 1. Walter wins as 3+3+1=7$3 + 3 + 1 = 7$ is odd.
输入格式
见题面
输出格式
见题面