QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#309669#4295. Check Markersezteam1#AC ✓8ms5236kbC++14804b2024-01-20 19:45:472024-01-20 19:45:47

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3684kb

input:

3
3
1 2 1
2 1 1
2
1 1
2 2
4
1 1 1 1
2 1 2 1

output:

YES
NO
YES

result:

ok 3 token(s): yes count is 2, no count is 1

Test #2:

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

input:

100
4
1 4 1 5
4 1 4 1
4
3 3 2 5
1 2 3 1
4
0 1 1 4
3 1 3 5
4
1 0 1 5
5 5 5 3
4
0 4 4 0
4 3 1 0
4
2 3 5 4
0 3 4 4
4
5 5 4 0
4 1 2 0
4
5 2 0 2
4 5 1 1
4
5 0 3 3
1 1 3 1
4
2 4 5 5
4 5 3 1
4
0 3 0 2
1 3 5 3
4
4 2 2 1
0 2 5 3
4
4 0 2 2
4 2 5 3
4
4 2 4 3
1 4 1 5
4
2 3 3 3
5 3 0 4
4
3 4 1 0
4 0 4 2
4
4 1 0 ...

output:

YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
Y...

result:

ok 100 token(s): yes count is 83, no count is 17

Test #3:

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

input:

100
5
4 5 4 0 2
0 0 0 3 2
5
1 1 2 1 2
5 0 0 4 4
5
3 4 4 0 4
5 0 0 4 0
5
5 5 0 5 4
1 3 5 5 3
5
1 0 1 0 4
0 2 4 0 0
5
0 3 3 0 3
5 4 5 3 3
5
5 3 0 5 1
5 0 3 1 0
5
4 4 2 2 0
3 4 2 4 2
5
0 3 2 3 4
4 3 1 1 5
5
5 5 2 1 5
0 0 5 2 2
5
0 3 1 3 0
2 1 4 0 3
5
5 2 4 5 5
5 4 1 0 5
5
0 1 1 1 5
1 0 5 4 5
5
4 3 1 4 ...

output:

YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
NO
NO
YES
NO
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
...

result:

ok 100 token(s): yes count is 79, no count is 21

Test #4:

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

input:

100
4
0 6 3 7
10 10 3 6
4
9 6 1 4
7 5 6 3
4
8 7 3 2
2 9 3 0
4
10 8 2 2
9 10 2 7
4
2 4 7 7
10 5 4 0
4
2 4 9 2
0 2 0 3
4
6 10 10 4
6 9 1 1
4
0 8 2 8
3 7 9 7
4
10 5 0 7
0 6 4 5
4
6 10 8 4
0 5 9 10
4
5 2 5 9
9 8 1 2
4
8 4 1 3
7 7 10 8
4
8 10 7 10
6 4 6 6
4
8 6 7 0
5 0 7 7
4
6 4 8 2
4 6 10 5
4
3 9 6 5
7 ...

output:

NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO...

result:

ok 100 token(s): yes count is 86, no count is 14

Test #5:

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

input:

100
5
0 2 6 7 7
6 6 10 2 6
5
10 10 6 6 5
7 2 5 3 3
5
1 6 6 1 5
8 2 8 10 10
5
5 1 7 10 7
4 0 4 9 9
5
2 4 9 4 0
5 10 2 9 7
5
8 8 8 5 0
5 2 8 5 7
5
0 7 5 0 1
1 10 7 0 1
5
4 2 8 0 2
8 8 1 7 8
5
1 9 0 4 9
8 9 1 2 8
5
5 2 2 5 8
10 10 2 1 5
5
6 5 6 5 4
9 6 10 7 5
5
6 0 5 5 0
0 1 9 9 4
5
10 2 10 6 9
0 7 1 3...

output:

YES
YES
NO
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES...

result:

ok 100 token(s): yes count is 87, no count is 13

Test #6:

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

input:

100
10
1 1 1 3 0 2 3 3 1 1
2 2 0 3 3 1 2 3 3 1
10
2 0 1 0 0 3 0 3 3 0
3 0 2 0 0 2 3 2 3 2
10
0 0 3 2 3 1 0 0 3 3
1 2 2 2 1 3 1 1 3 1
10
3 0 3 1 0 1 1 0 3 1
2 1 2 2 3 0 3 2 0 0
10
0 1 0 0 1 0 3 2 0 1
3 3 3 3 0 3 1 0 2 1
10
1 1 3 2 3 2 2 1 1 3
0 1 0 1 1 2 1 0 2 0
10
3 2 1 1 2 1 3 1 3 1
2 0 3 3 2 0 3 0...

output:

NO
NO
YES
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
NO
YES
YES
Y...

result:

ok 100 token(s): yes count is 77, no count is 23

Test #7:

score: 0
Accepted
time: 8ms
memory: 3612kb

input:

83521
2
4 13
0 12
2
9 15
0 13
2
8 2
1 10
2
16 7
2 8
2
13 9
15 10
2
3 9
14 4
2
8 16
11 10
2
8 15
1 9
2
11 12
15 5
2
3 10
11 1
2
11 0
15 10
2
13 10
0 9
2
7 0
5 13
2
1 5
13 1
2
15 10
13 8
2
0 5
3 15
2
11 15
2 11
2
8 14
16 0
2
12 0
5 10
2
2 16
13 6
2
10 12
0 2
2
6 2
6 8
2
4 5
1 1
2
14 7
3 4
2
4 13
1 8
2...

output:

YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
NO
YES
NO
YES
NO
YES
YE...

result:

ok 83521 token(s): yes count is 65025, no count is 18496

Test #8:

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

input:

46656
3
0 5 2
1 4 2
3
4 4 5
3 1 1
3
4 3 0
1 0 4
3
1 3 2
2 3 0
3
3 2 3
0 0 0
3
2 5 4
5 2 4
3
4 2 0
4 1 4
3
3 5 1
2 1 4
3
1 5 2
2 5 2
3
0 3 4
2 0 2
3
2 3 5
1 3 0
3
5 4 1
1 0 0
3
0 0 0
4 0 2
3
1 2 2
2 5 0
3
2 3 0
4 3 2
3
5 1 4
1 0 5
3
5 0 4
2 0 5
3
0 3 1
1 1 0
3
4 1 3
2 0 0
3
4 0 5
3 1 0
3
4 1 4
5 3 5
...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
YES
YES
YES
YES
NO
YE...

result:

ok 46656 token(s): yes count is 39537, no count is 7119

Test #9:

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

input:

6561
4
0 1 2 2
2 2 2 1
4
1 2 1 2
0 0 0 0
4
0 0 0 2
0 0 2 1
4
1 2 0 1
1 0 1 0
4
0 0 0 2
2 0 1 0
4
2 1 0 0
2 0 2 0
4
0 2 2 0
1 1 0 0
4
0 0 1 0
0 1 1 0
4
2 0 1 2
2 2 2 1
4
1 0 1 1
2 1 2 2
4
2 2 0 2
0 2 2 0
4
0 0 1 2
0 2 1 1
4
0 2 1 2
0 0 1 0
4
2 0 2 2
2 2 2 1
4
0 1 1 0
0 1 0 0
4
2 0 2 2
1 2 0 2
4
2 2 0...

output:

YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
...

result:

ok 6561 token(s): yes count is 5560, no count is 1001

Test #10:

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

input:

1024
5
0 0 0 0 1
1 0 1 0 0
5
0 0 1 0 0
1 0 1 1 0
5
1 0 0 1 1
1 1 1 0 1
5
1 1 1 1 1
1 1 1 0 1
5
0 0 1 1 0
0 0 1 0 1
5
1 1 0 1 0
0 1 0 1 0
5
1 0 0 0 0
1 0 0 0 0
5
0 1 1 1 1
0 1 0 0 0
5
1 0 1 1 0
1 1 0 1 0
5
1 0 1 0 1
1 0 1 0 0
5
1 1 1 0 0
0 1 1 0 1
5
1 1 1 1 0
1 0 0 1 1
5
0 1 1 1 1
0 1 0 1 1
5
1 1 0 0...

output:

YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YE...

result:

ok 1024 token(s): yes count is 848, no count is 176

Test #11:

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

input:

4096
6
1 1 1 0 1 1
1 1 1 0 0 1
6
1 0 1 0 0 1
1 0 1 0 0 1
6
0 1 1 0 1 0
1 0 0 1 0 1
6
0 0 0 0 1 1
0 0 0 0 0 0
6
0 1 0 0 1 1
0 0 0 0 0 0
6
1 0 0 1 1 1
1 1 0 1 1 1
6
0 0 0 0 1 1
1 0 0 0 0 1
6
0 1 0 0 1 1
0 1 0 1 1 1
6
0 1 0 0 0 1
1 1 1 0 0 1
6
0 1 1 1 1 0
0 0 0 1 1 0
6
0 1 0 0 1 1
0 0 1 1 1 0
6
1 0 1 0...

output:

YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
NO
NO
NO
YES
YES
YES
NO
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
NO
...

result:

ok 4096 token(s): yes count is 3302, no count is 794

Test #12:

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

input:

100
2
931650290 434331180
752635746 456751397
2
951274581 335272760
303002756 726510212
2
222187131 227937695
498879642 702611092
2
594722520 211601816
719408611 907802003
2
48128195 393732190
467724336 998575289
2
660878497 340970866
150579260 114648228
2
404965667 842726938
66605240 703626793
2
14...

output:

YES
YES
NO
NO
NO
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
NO
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
NO
YES
NO
NO
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
Y...

result:

ok 100 token(s): yes count is 71, no count is 29

Test #13:

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

input:

100
3
399200346 418177982 608782504
653719089 550106965 60649913
3
700303210 142914740 81882187
739679903 711559736 926617652
3
428713168 438317216 496171043
77074168 42164990 189686423
3
585955751 350213435 567085801
69415112 857193048 701123529
3
192380794 773622228 984349367
428068213 778366563 3...

output:

YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
Y...

result:

ok 100 token(s): yes count is 90, no count is 10

Test #14:

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

input:

100
10
463450166 22271467 490927644 988529802 58264116 947459829 773643074 507145873 599638377 23474031
101664962 838319917 196472227 493042091 179608422 81804929 194237643 52851992 3704258 123013388
10
239856047 561170837 70761073 830724366 797755915 89525074 25326047 374422385 369728099 395885058
...

output:

YES
NO
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
NO
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
YES
YES
YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
NO
YES
YES
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
NO
YES
YES
NO
Y...

result:

ok 100 token(s): yes count is 76, no count is 24

Test #15:

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

input:

100
100
2 17 14 9 7 4 10 3 4 11 13 8 11 12 4 20 9 19 9 6 12 16 11 5 1 19 10 19 17 10 16 3 18 15 9 12 1 16 16 2 7 17 6 4 10 19 14 2 3 12 16 1 8 17 12 0 4 4 1 11 5 3 14 7 5 11 20 20 14 16 3 9 4 13 2 10 3 17 3 18 20 10 10 7 4 0 7 16 18 15 0 2 18 7 18 16 15 11 4 3
13 5 8 16 9 19 8 5 12 1 20 16 0 10 8 3 ...

output:

NO
NO
YES
NO
NO
YES
NO
YES
NO
YES
NO
YES
NO
NO
YES
YES
YES
YES
YES
NO
NO
YES
NO
YES
NO
YES
NO
NO
YES
YES
YES
NO
NO
NO
YES
NO
YES
YES
YES
NO
NO
NO
YES
NO
YES
YES
YES
NO
YES
YES
NO
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
YES
NO
NO
YES
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
NO
YES
YES
Y...

result:

ok 100 token(s): yes count is 61, no count is 39

Test #16:

score: 0
Accepted
time: 4ms
memory: 3532kb

input:

100
1000
15 10 3 20 8 1 6 9 11 7 0 18 0 19 17 4 10 15 5 2 7 2 7 0 10 13 12 9 13 11 14 17 13 2 19 17 16 9 10 14 14 16 20 13 12 13 14 9 0 2 19 4 15 9 3 0 7 9 12 7 20 1 0 10 12 12 0 14 15 20 4 12 5 7 12 7 8 18 3 16 0 9 12 16 6 0 10 11 20 1 2 1 12 8 6 1 12 2 0 20 3 9 5 19 14 8 20 14 15 18 3 13 5 11 18 2...

output:

YES
NO
YES
NO
YES
NO
YES
NO
YES
NO
YES
YES
NO
NO
NO
NO
NO
YES
NO
NO
NO
YES
YES
YES
YES
NO
NO
YES
YES
YES
NO
NO
YES
NO
YES
NO
NO
YES
NO
YES
YES
NO
NO
YES
YES
YES
YES
NO
YES
YES
NO
YES
YES
YES
NO
NO
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
YES
NO
YES
NO
YES
YES
YES
YES
NO
YES
...

result:

ok 100 token(s): yes count is 60, no count is 40

Test #17:

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

input:

20
10000
1 5 16 12 14 2 18 1 6 19 6 20 0 17 16 15 6 10 12 10 19 2 6 13 9 15 0 14 18 13 3 11 4 2 18 3 0 11 13 10 5 2 6 8 13 14 19 9 2 7 14 7 6 7 16 19 11 18 5 2 5 5 7 16 9 0 13 11 17 13 7 20 9 7 11 12 4 3 4 20 11 18 7 17 9 13 13 2 13 3 6 2 16 20 13 14 19 14 0 7 15 2 18 7 3 15 8 11 17 14 16 3 7 8 9 14...

output:

YES
NO
YES
NO
NO
YES
YES
YES
YES
NO
YES
NO
NO
YES
YES
NO
YES
NO
NO
YES

result:

ok 20 token(s): yes count is 11, no count is 9

Test #18:

score: 0
Accepted
time: 7ms
memory: 4348kb

input:

2
100000
0 0 4 19 5 14 7 5 5 13 15 3 10 20 7 15 16 3 18 3 3 1 11 14 13 4 8 1 2 11 7 15 12 19 8 10 17 10 12 14 12 15 2 14 7 1 19 8 9 10 17 20 20 8 4 11 8 3 16 11 8 1 18 8 1 14 14 14 14 19 15 15 5 9 0 12 13 19 16 7 18 11 15 20 6 20 14 1 9 0 0 1 6 7 18 0 3 0 3 12 8 3 10 5 1 18 5 8 1 19 17 1 9 17 13 8 4...

output:

YES
NO

result:

ok 2 token(s): yes count is 1, no count is 1

Test #19:

score: 0
Accepted
time: 7ms
memory: 5236kb

input:

1
200000
8 7 4 0 7 3 3 2 10 8 3 16 8 7 3 8 15 6 20 18 2 9 4 8 9 18 7 11 6 11 15 2 0 5 18 5 10 20 11 14 2 18 10 11 20 18 16 7 4 18 1 18 4 20 3 4 16 18 0 16 1 9 15 1 17 0 7 10 17 18 15 14 18 0 0 15 3 5 9 9 11 4 19 17 8 6 4 2 14 13 7 8 19 10 9 19 6 15 6 13 2 13 11 15 16 10 13 5 11 15 13 10 9 15 17 7 5 ...

output:

YES

result:

ok YES

Test #20:

score: 0
Accepted
time: 4ms
memory: 5144kb

input:

1
200000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

YES

result:

ok YES

Test #21:

score: 0
Accepted
time: 5ms
memory: 5168kb

input:

1
200000
0 1 1 1 1 0 0 0 0 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0 1 0 1 0 0 1 1 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 1 0 0 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 0 0 1 1 1 0 0 0 1 0...

output:

YES

result:

ok YES

Test #22:

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

input:

1
200000
2 1 2 0 1 1 2 2 0 0 2 2 0 2 0 0 1 0 2 0 2 0 0 1 2 0 1 1 0 2 0 2 0 0 1 0 2 0 0 0 2 1 0 0 0 2 0 1 0 1 1 1 2 1 0 0 1 0 0 1 1 2 0 1 1 0 1 0 0 2 0 0 0 2 2 0 2 2 0 1 0 2 0 0 1 2 1 1 0 1 0 1 2 2 0 0 0 0 1 2 2 2 2 0 1 1 0 1 2 2 0 0 0 1 1 2 0 1 1 2 1 0 2 1 2 2 0 2 2 0 0 0 1 1 0 1 2 1 2 1 1 1 2 0 0 1...

output:

NO

result:

ok NO

Test #23:

score: 0
Accepted
time: 5ms
memory: 5156kb

input:

1
200000
1 1 1 1 2 3 3 0 1 1 1 0 1 0 2 3 2 3 2 2 1 2 1 3 2 2 2 2 0 0 2 3 2 0 2 3 3 1 2 2 3 3 2 2 3 2 3 3 3 3 0 2 1 2 0 2 1 0 2 3 3 1 1 0 0 1 3 1 3 2 2 3 3 3 0 2 3 2 3 2 2 3 2 3 2 0 1 0 0 0 1 3 2 3 3 0 1 3 1 3 2 0 0 1 0 1 2 1 0 2 0 3 0 3 3 0 0 1 3 0 1 3 3 1 2 0 2 2 2 3 1 3 2 2 3 1 0 2 0 0 3 0 3 3 1 3...

output:

NO

result:

ok NO