Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

BALLSREM - Remove the Balls

There are n boxes with mi balls in box i. Two players by turns must take away from a single box an arbitrary number of balls but at least one. You as one of the players start removing balls. If you take the last ball you lose.

Input

In the first line the number T of test cases (T<=100).
Then T lines with n (3<=n<=21) numbers mi (0<mi<100).

Output

For each test case win if you could win the game otherwise lose.

Example

Input:
3
1 1 1
1 1 2
1 1 1 1 Output: lose
win
win

Added by:HWK
Date:2011-05-21
Time limit:6.533s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: SCM qobi

hide comments
2011-05-31 11:42:05 Jander
D'oh - I should have spotted that one! You know how it is, you get stuck on one track and don't see the other way :-)

Last edit: 2011-05-31 11:43:09
2011-05-31 11:29:43 HWK
If your answer means that you're interested in a hint here it is:
Look for a Perl function beginning with an 'e'. :-)
2011-05-30 19:53:41 Jander
@HWK: Oh, go on, I'll go for a hint :-)
2011-05-30 18:54:52 HWK
Do you want a hint?
2011-05-30 17:23:08 Jander
@HWK: Hmm, this one's proving elusive as to what other way of performing the tests there is. Still, the challenge of 49 has made me squeeze 7 more out so far :)
2011-05-30 10:58:36 HWK
A different implementation.
2011-05-29 16:01:13 Jander
@HWK: Hmm, now for me to work out that other track then :-)

Out of interest (assuming it's not too much of a hint) is that a different algorithm, or different implementation of the same algorithm ?

Last edit: 2011-05-29 17:53:28
2011-05-29 14:23:56 HWK
My track is different ;-)
2011-05-29 13:31:10 Jander
49! OK only 6 more to remove :-) Now to work out what 6 to take out - assuming I'm going down the right track at the moment.
2011-05-29 13:12:20 HWK
@Jander: I shortened my solution to 49 bytes. (Without help by yours.)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.