QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#322862#7863. Parity Gameucup-team162AC ✓3ms4292kbC++142.9kb2024-02-07 21:27:012024-02-07 21:27:01

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3660kb

input:

4 1
0 1 0 1
1 *
1

output:

Alice
1 +
1 +

result:

ok The player wins!

Test #2:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

4 0
1 0 1 0
1 +
1

output:

Alice
1 *
1 *

result:

ok The player wins!

Test #3:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

5 1
1 1 1 0 0
4 +
1 +
1

output:

Bob
1 +
1 *

result:

ok The player wins!

Test #4:

score: 0
Accepted
time: 1ms
memory: 3536kb

input:

3 0
1 1 1
1 +
1

output:

Bob
1 +

result:

ok The player wins!

Test #5:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

3 1
1 0 1
1 *
1

output:

Bob
1 *

result:

ok The player wins!

Test #6:

score: 0
Accepted
time: 1ms
memory: 3564kb

input:

3 0
1 0 1
1 *
1

output:

Bob
1 +

result:

ok The player wins!

Test #7:

score: 0
Accepted
time: 0ms
memory: 3564kb

input:

2 1
0 1
1

output:

Alice
1 +

result:

ok The player wins!

Test #8:

score: 0
Accepted
time: 0ms
memory: 4000kb

input:

499 0
0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 0 ...

output:

Alice
2 +
2 +
2 +
2 *
2 +
2 *
2 +
2 *
2 *
2 +
2 *
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 +
2 *
2 *
2 *
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 *
2 +
2 *
2 +
2 +
2 +
2 *
2 *
2 ...

result:

ok The player wins!

Test #9:

score: 0
Accepted
time: 2ms
memory: 4052kb

input:

499 0
1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 ...

output:

Bob
1 +
3 +
3 +
3 +
5 +
7 +
7 +
9 +
11 +
13 +
13 +
15 +
15 +
19 +
19 +
19 +
19 +
19 +
21 +
23 +
25 +
25 +
25 +
27 +
27 +
31 +
33 +
35 +
35 +
35 +
35 +
37 +
39 +
45 +
47 +
49 +
49 +
51 +
51 +
53 +
53 +
55 +
59 +
61 +
61 +
63 +
65 +
65 +
67 +
67 +
71 +
71 +
73 +
75 +
77 +
77 +
79 +
79 +
85 +
87 +
87 +...

result:

ok The player wins!

Test #10:

score: 0
Accepted
time: 2ms
memory: 3992kb

input:

500 0
0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1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+
1 +
1 +
1 *
1 +
1 +
1 *
1 +
1 +
1 *
1 +
1 +
1 +
1 *
1 +
1 +
1 *
1 +
1 +
1 +
1 *
1 +
1 *
1 *
1 *
1 +
...

result:

ok The player wins!

Test #12:

score: 0
Accepted
time: 3ms
memory: 3936kb

input:

499 1
1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 ...

output:

Bob
2 *
2 +
2 +
2 *
2 +
2 *
2 +
2 +
2 *
2 *
2 +
2 *
2 +
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 *
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 *
2 +
2 +
2 *
2 +
2 +
2 *
2 *
2 +
2 +
2 *
2 *
2 +
2 +
2 +
2 *
2 +
...

result:

ok The player wins!

Test #13:

score: 0
Accepted
time: 0ms
memory: 4292kb

input:

500 1
0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 0 ...

output:

Alice
1 +
1 +
1 +
3 +
3 +
3 +
3 +
3 +
5 +
5 +
7 +
13 +
13 +
15 +
15 +
15 +
17 +
17 +
17 +
21 +
23 +
23 +
25 +
25 +
27 +
27 +
27 +
29 +
29 +
29 +
35 +
37 +
37 +
37 +
39 +
39 +
41 +
43 +
43 +
45 +
47 +
47 +
47 +
47 +
51 +
53 +
53 +
59 +
59 +
61 +
63 +
65 +
67 +
73 +
73 +
75 +
75 +
75 +
77 +
79 +
79 +
...

result:

ok The player wins!

Test #14:

score: 0
Accepted
time: 2ms
memory: 4216kb

input:

500 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...

output:

Alice
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 ...

result:

ok The player wins!

Test #15:

score: 0
Accepted
time: 3ms
memory: 3892k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1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
...

result:

ok The player wins!

Test #17:

score: 0
Accepted
time: 3ms
memory: 4004kb

input:

500 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...

output:

Alice
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 ...

result:

ok The player wins!

Test #18:

score: 0
Accepted
time: 3ms
memory: 4012kb

input:

499 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0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 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
...

result:

ok The player wins!

Test #20:

score: 0
Accepted
time: 3ms
memory: 4236kb

input:

500 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...

output:

Alice
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 ...

result:

ok The player wins!

Test #21:

score: 0
Accepted
time: 0ms
memory: 3964kb

input:

500 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 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+
1 *
1 +
1 +
1 +
1 +
1 *
1 +
1 *
1 +
1 +
1 ...

result:

ok The player wins!

Test #23:

score: 0
Accepted
time: 0ms
memory: 3928kb

input:

500 1
1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 ...

output:

Alice
499 +
1 +
3 +
3 +
5 +
5 +
5 +
5 +
7 +
7 +
7 +
13 +
15 +
15 +
15 +
17 +
17 +
17 +
19 +
21 +
23 +
25 +
25 +
27 +
27 +
27 +
29 +
29 +
29 +
29 +
37 +
37 +
37 +
39 +
39 +
41 +
41 +
43 +
45 +
45 +
47 +
49 +
49 +
49 +
51 +
55 +
55 +
61 +
61 +
63 +
63 +
67 +
67 +
73 +
73 +
75 +
75 +
77 +
79 +
81 +
81 ...

result:

ok The player wins!

Test #24:

score: 0
Accepted
time: 3ms
memory: 4000kb

input:

500 0
1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 ...

output:

Alice
263 *
261 *
259 +
257 +
255 *
253 *
251 +
249 *
247 +
245 *
243 *
241 *
239 +
237 *
235 *
233 *
231 *
229 *
227 *
225 *
223 *
221 *
219 *
217 *
215 *
213 +
211 *
209 *
207 +
205 +
203 *
201 *
199 *
197 *
195 *
193 *
191 +
189 *
187 *
185 *
183 *
181 *
179 *
177 *
175 *
173 *
171 +
169 +
167 +
...

result:

ok The player wins!

Test #25:

score: 0
Accepted
time: 3ms
memory: 3928kb

input:

500 1
1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 ...

output:

Alice
251 +
5 +
7 +
13 +
29 +
39 +
43 +
47 +
55 +
63 +
67 +
69 +
93 +
109 +
111 +
113 +
115 +
117 +
121 +
127 +
135 +
137 +
141 +
157 +
157 +
181 +
187 +
203 +
223 +
237 +
245 +
249 +
271 +
271 +
277 +
279 +
291 +
319 +
329 +
343 +
345 +
349 +
359 +
361 +
371 +
371 +
375 +
383 +
389 +
393 +
393 +
1 ...

result:

ok The player wins!

Test #26:

score: 0
Accepted
time: 3ms
memory: 4036kb

input:

500 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...

output:

Alice
99 *
97 *
95 *
93 *
91 *
89 *
87 *
85 *
83 *
81 *
79 *
77 *
75 *
73 *
71 *
69 *
67 *
65 *
63 *
61 *
59 *
57 *
55 *
53 *
51 *
49 *
47 *
45 *
43 *
41 *
39 *
37 *
35 *
33 *
31 *
29 *
27 *
25 *
23 *
21 *
19 *
17 *
15 *
13 *
11 *
9 *
7 *
5 *
3 *
1 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2...

result:

ok The player wins!

Test #27:

score: 0
Accepted
time: 3ms
memory: 4248kb

input:

500 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ...

output:

Alice
99 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1...

result:

ok The player wins!

Test #28:

score: 0
Accepted
time: 2ms
memory: 4224kb

input:

500 0
1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 ...

output:

Alice
331 +
329 *
327 +
325 *
323 *
321 *
319 *
317 *
315 +
313 *
311 +
309 +
307 +
305 *
303 *
301 +
299 *
297 *
295 +
293 *
291 *
289 *
287 *
285 *
283 *
281 *
279 *
277 +
275 *
273 +
271 *
269 *
267 +
265 +
263 +
261 *
259 +
257 *
255 *
253 +
251 +
249 *
247 *
245 +
243 *
241 *
239 +
237 *
235 *
...

result:

ok The player wins!

Test #29:

score: 0
Accepted
time: 3ms
memory: 4048kb

input:

500 1
1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 ...

output:

Alice
323 +
7 +
15 +
17 +
19 +
19 +
23 +
23 +
23 +
23 +
25 +
27 +
27 +
33 +
37 +
39 +
41 +
47 +
49 +
51 +
53 +
57 +
61 +
79 +
79 +
81 +
83 +
83 +
85 +
87 +
95 +
95 +
97 +
101 +
107 +
113 +
113 +
113 +
115 +
121 +
127 +
127 +
131 +
137 +
137 +
137 +
141 +
151 +
155 +
161 +
163 +
163 +
167 +
171 +
171...

result:

ok The player wins!

Test #30:

score: 0
Accepted
time: 2ms
memory: 3884kb

input:

350 0
1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 ...

output:

Alice
175 *
173 +
171 *
169 +
167 +
165 *
163 +
161 +
159 +
157 *
155 +
153 +
151 +
149 *
147 +
145 +
143 +
141 +
139 +
137 *
135 +
133 +
131 +
129 +
127 +
125 *
123 *
121 +
119 +
117 *
115 +
113 *
111 +
109 +
107 *
105 +
103 *
101 +
99 *
97 +
95 +
93 *
91 +
89 +
87 +
85 +
83 *
81 +
79 +
77 +
75 +
7...

result:

ok The player wins!

Test #31:

score: 0
Accepted
time: 2ms
memory: 3852kb

input:

350 1
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

output:

Alice
181 +
1 +
1 +
3 +
3 +
3 +
3 +
3 +
3 +
3 +
5 +
5 +
7 +
7 +
7 +
7 +
9 +
9 +
11 +
11 +
11 +
11 +
13 +
13 +
13 +
13 +
13 +
15 +
15 +
15 +
17 +
17 +
17 +
17 +
19 +
19 +
21 +
21 +
23 +
23 +
25 +
27 +
27 +
29 +
29 +
31 +
33 +
35 +
35 +
37 +
37 +
37 +
37 +
37 +
37 +
37 +
39 +
39 +
39 +
43 +
45 +
47 +
...

result:

ok The player wins!

Test #32:

score: 0
Accepted
time: 0ms
memory: 3892kb

input:

500 0
1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 0 0 0 1 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 1 0 0 ...

output:

Alice
3 +
1 *
2 *
2 *
2 *
2 +
2 *
2 *
2 *
2 +
2 +
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 *
2 *
2 +
2 *
2 +
2 *
2 *
2 +
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 +
2 +
2 *
2 *
2 +
2 *
2 *
2 +
2 *
2 *
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 +
2 +
2 +
2 *
2 *
2 *
2 +
2 *
2 *
2 ...

result:

ok The player wins!

Test #33:

score: 0
Accepted
time: 3ms
memory: 3940kb

input:

500 1
1 0 1 0 0 0 1 1 1 1 0 0 0 1 0 0 0 1 0 1 1 1 0 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 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*
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 +
2 *
2 *
2 *
2 *
2 +
2 *
2 *
2 *
2 *
2 *
2 *
2 ...

result:

ok The player wins!

Test #35:

score: 0
Accepted
time: 3ms
memory: 4236kb

input:

500 1
0 1 1 0 1 0 0 0 0 0 0 1 1 0 1 0 0 0 0 1 0 0 1 1 0 0 1 0 0 0 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0 1 ...

output:

Bob
2 +
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 +
2 *
2 *
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 *
2 *
2 *
2 *
2 *
2 *
2 +
2 *
2 +
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 +
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
2 *
...

result:

ok The player wins!

Test #36:

score: 0
Accepted
time: 2ms
memory: 4016kb

input:

500 0
1 0 1 1 1 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 0 0 1 1 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1 1 1 1 1 0 0 1 1 0 1 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 1 1 1 0 1 1 1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

ok The player wins!

Test #38:

score: 0
Accepted
time: 3ms
memory: 4000kb

input:

500 0
1 1 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 0 1 1 0 1 1 1 1 1 ...

output:

Alice
3 +
1 +
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 +
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 *
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 *
2 *
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 +
2 +
2 +
2 +
2 +
2 *
2 +
2 *
2 *
2 +
2 *
2 +
2 +
2 +
2 *
2 +
2 *
2 +
2 *
2 +
2 +
2 ...

result:

ok The player wins!

Test #39:

score: 0
Accepted
time: 1ms
memory: 4004kb

input:

500 1
1 1 1 1 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 1 1 ...

output:

Bob
7 +
5 *
3 +
1 +
2 +
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 *
2 *
2 *
2 +
2 *
2 *
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 +
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 *
2 *
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 *
...

result:

ok The player wins!

Test #40:

score: 0
Accepted
time: 2ms
memory: 4000kb

input:

500 0
1 1 1 1 1 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 0 1 0 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 1 1 1 1 0 0 1 1 0 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 1 0 ...

output:

Alice
5 +
3 +
1 +
2 *
2 *
2 *
2 +
2 *
2 *
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 *
2 *
2 *
2 *
2 +
2 +
2 +
2 *
2 *
2 +
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 *
2 +
2 *
2 *
2 +
2 *
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 +
2 +
2 +
2 *
2 *
2 +
2 *
2 ...

result:

ok The player wins!

Test #41:

score: 0
Accepted
time: 3ms
memory: 4016kb

input:

500 1
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 1 0 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 1 0 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 1 0 1 1 1 1 ...

output:

Bob
19 +
17 +
15 +
13 +
11 +
9 +
7 +
5 *
3 +
1 +
2 *
2 +
2 *
2 *
2 *
2 *
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 +
2 *
2 *
2 +
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 +
2 *
2 *
2 +
2 +
2 *
2 +
2 +
2 +
2 *
2 +
2 +
2 *
2 +
2 +
2 +
2 +
2 +
2 *
2 *
2 *
2 +
2 *
2 *
2 *
2 *
2 +
2 *
2 +
2 +...

result:

ok The player wins!

Test #42:

score: 0
Accepted
time: 1ms
memory: 3556kb

input:

39 0
1 0 1 1 1 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 1 1 1 0 1 0 1 1 1 0 1 1 1 0 1
3 +
5 +
5 +
7 +
9 +
9 +
9 +
11 +
15 +
17 +
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1 *
1

output:

Bob
3 +
5 +
5 +
7 +
9 +
9 +
9 +
11 +
15 +
17 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +
1 +

result:

ok The player wins!

Test #43:

score: 0
Accepted
time: 1ms
memory: 3572kb

input:

9 0
1 0 1 1 1 1 1 1 1
3 +
3 +
3 +
1 *
1

output:

Bob
3 +
3 +
3 +
1 +

result:

ok The player wins!

Extra Test:

score: 0
Extra Test Passed