QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#709167#6109. Similarity GraphGuanYunchangAC ✓8ms4076kbC++111.9kb2024-11-04 12:29:522024-11-04 12:29:53

详细

Test #1:

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

input:

4
0 1 0 1
1 0 0 0
0 0 0 1
1 0 1 0

output:

YES
3 1 4 2
4 3 2 1

result:

ok ok

Test #2:

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

input:

6
0 1 0 1 0 1
1 0 0 0 1 0
0 0 0 1 1 1
1 0 1 0 0 0
0 1 1 0 0 0
1 0 1 0 0 0

output:

NO

result:

ok ok

Test #3:

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

input:

1
0

output:

YES
1
1

result:

ok ok

Test #4:

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

input:

2
0 0
0 0

output:

YES
1 2
2 1

result:

ok ok

Test #5:

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

input:

2
0 1
1 0

output:

YES
2 1
2 1

result:

ok ok

Test #6:

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

input:

3
0 0 0
0 0 0
0 0 0

output:

YES
1 2 3
3 2 1

result:

ok ok

Test #7:

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

input:

3
0 0 0
0 0 1
0 1 0

output:

YES
1 3 2
3 2 1

result:

ok ok

Test #8:

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

input:

3
0 0 1
0 0 0
1 0 0

output:

YES
3 1 2
2 3 1

result:

ok ok

Test #9:

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

input:

3
0 0 1
0 0 1
1 1 0

output:

YES
2 3 1
3 2 1

result:

ok ok

Test #10:

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

input:

3
0 1 0
1 0 0
0 0 0

output:

YES
2 1 3
3 2 1

result:

ok ok

Test #11:

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

input:

3
0 1 0
1 0 1
0 1 0

output:

YES
1 3 2
2 3 1

result:

ok ok

Test #12:

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

input:

3
0 1 1
1 0 0
1 0 0

output:

YES
3 1 2
3 2 1

result:

ok ok

Test #13:

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

input:

3
0 1 1
1 0 1
1 1 0

output:

YES
3 2 1
3 2 1

result:

ok ok

Test #14:

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

input:

4
0 0 1 0
0 0 1 0
1 1 0 0
0 0 0 0

output:

YES
2 3 1 4
4 3 2 1

result:

ok ok

Test #15:

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

input:

4
0 1 1 1
1 0 0 0
1 0 0 0
1 0 0 0

output:

YES
4 1 2 3
4 3 2 1

result:

ok ok

Test #16:

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

input:

4
0 1 0 1
1 0 1 0
0 1 0 0
1 0 0 0

output:

YES
2 3 1 4
1 4 3 2

result:

ok ok

Test #17:

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

input:

4
0 1 0 0
1 0 0 0
0 0 0 1
0 0 1 0

output:

YES
2 1 4 3
4 3 2 1

result:

ok ok

Test #18:

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

input:

4
0 0 0 0
0 0 0 0
0 0 0 1
0 0 1 0

output:

YES
1 2 4 3
4 3 2 1

result:

ok ok

Test #19:

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

input:

5
0 0 1 0 1
0 0 1 1 1
1 1 0 1 1
0 1 1 0 0
1 1 1 0 0

output:

YES
4 3 5 1 2
2 4 5 3 1

result:

ok ok

Test #20:

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

input:

5
0 0 1 0 1
0 0 1 0 1
1 1 0 0 0
0 0 0 0 1
1 1 0 1 0

output:

YES
3 4 1 5 2
5 4 3 2 1

result:

ok ok

Test #21:

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

input:

5
0 1 0 1 0
1 0 1 0 1
0 1 0 1 1
1 0 1 0 0
0 1 1 0 0

output:

YES
3 2 5 1 4
5 1 4 3 2

result:

ok ok

Test #22:

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

input:

5
0 1 0 1 0
1 0 1 1 1
0 1 0 1 0
1 1 1 0 1
0 1 0 1 0

output:

YES
1 5 2 4 3
3 5 2 4 1

result:

ok ok

Test #23:

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

input:

5
0 1 0 0 1
1 0 1 1 0
0 1 0 0 0
0 1 0 0 0
1 0 0 0 0

output:

YES
3 4 1 2 5
1 5 4 3 2

result:

ok ok

Test #24:

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

input:

6
0 0 1 0 0 1
0 0 0 1 1 1
1 0 0 1 1 0
0 1 1 0 1 1
0 1 1 1 0 1
1 1 0 1 1 0

output:

YES
3 4 1 6 5 2
6 2 3 5 4 1

result:

ok ok

Test #25:

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

input:

6
0 0 1 0 1 0
0 0 0 1 1 1
1 0 0 0 1 0
0 1 0 0 0 0
1 1 1 0 0 1
0 1 0 0 1 0

output:

YES
6 4 5 1 2 3
3 6 2 5 1 4

result:

ok ok

Test #26:

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

input:

6
0 0 1 0 1 1
0 0 1 1 0 0
1 1 0 1 0 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 0 1 0 0

output:

YES
6 2 1 5 3 4
4 5 3 6 2 1

result:

ok ok

Test #27:

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

input:

6
0 1 0 1 0 0
1 0 0 0 0 0
0 0 0 0 0 1
1 0 0 0 1 1
0 0 0 1 0 0
0 0 1 1 0 0

output:

YES
1 2 6 5 3 4
4 6 2 5 3 1

result:

ok ok

Test #28:

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

input:

6
0 0 0 0 0 1
0 0 1 0 1 1
0 1 0 0 1 1
0 0 0 0 1 1
0 1 1 1 0 0
1 1 1 1 0 0

output:

YES
6 4 3 5 1 2
2 6 5 4 3 1

result:

ok ok

Test #29:

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

input:

7
0 1 0 1 1 0 1
1 0 1 0 1 1 1
0 1 0 0 0 0 0
1 0 0 0 0 0 0
1 1 0 0 0 0 1
0 1 0 0 0 0 1
1 1 0 0 1 1 0

output:

YES
5 2 7 1 4 6 3
7 1 2 6 5 4 3

result:

ok ok

Test #30:

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

input:

7
0 0 1 0 0 1 0
0 0 1 0 1 1 0
1 1 0 0 0 1 1
0 0 0 0 0 1 0
0 1 0 0 0 1 0
1 1 1 1 1 0 1
0 0 1 0 0 1 0

output:

YES
4 2 6 1 3 7 5
2 3 4 6 5 7 1

result:

ok ok

Test #31:

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

input:

7
0 0 1 0 0 0 1
0 0 0 1 0 1 0
1 0 0 0 0 0 1
0 1 0 0 0 0 1
0 0 0 0 0 1 1
0 1 0 0 1 0 0
1 0 1 1 1 0 0

output:

NO

result:

ok ok

Test #32:

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

input:

7
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 0 0 0 0 1 0
0 1 0 0 0 1 0
1 0 0 0 0 1 0
0 1 1 1 1 0 0
1 1 0 0 0 0 0

output:

NO

result:

ok ok

Test #33:

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

input:

7
0 1 0 1 1 1 0
1 0 0 0 0 0 0
0 0 0 1 0 1 0
1 0 1 0 1 1 1
1 0 0 1 0 0 0
1 0 1 1 0 0 1
0 0 0 1 0 1 0

output:

YES
1 2 4 7 3 6 5
3 7 2 6 5 4 1

result:

ok ok

Test #34:

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

input:

8
0 0 0 0 0 0 0 0
0 0 1 1 1 0 1 0
0 1 0 1 0 1 1 1
0 1 1 0 1 1 1 0
0 1 0 1 0 1 0 1
0 0 1 1 1 0 1 0
0 1 1 1 0 1 0 1
0 0 1 0 1 0 1 0

output:

YES
1 2 8 4 6 3 7 5
8 3 6 4 7 2 5 1

result:

ok ok

Test #35:

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

input:

12
0 1 0 1 0 0 1 1 0 1 0 0
1 0 0 0 1 0 1 1 1 0 1 1
0 0 0 0 1 1 1 1 0 1 0 0
1 0 0 0 1 0 1 1 1 0 0 0
0 1 1 1 0 1 0 0 0 1 0 0
0 0 1 0 1 0 1 1 0 1 0 0
1 1 1 1 0 1 0 0 0 1 0 0
1 1 1 1 0 1 0 0 0 1 1 0
0 1 0 1 0 0 0 0 0 0 1 1
1 0 1 0 1 1 1 1 0 0 0 0
0 1 0 0 0 0 0 1 1 0 0 0
0 1 0 0 0 0 0 0 1 0 0 0

output:

YES
7 5 3 4 6 2 8 10 12 1 9 11
7 1 9 4 12 8 11 10 5 6 3 2

result:

ok ok

Test #36:

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

input:

13
0 0 1 0 1 1 0 0 0 1 1 1 0
0 0 1 1 1 0 0 0 0 1 1 1 0
1 1 0 0 0 1 1 1 1 1 0 1 1
0 1 0 0 0 0 1 0 1 1 1 0 0
1 1 0 0 0 1 1 1 1 1 0 1 1
1 0 1 0 1 0 0 0 0 1 1 1 1
0 0 1 1 1 0 0 0 0 1 1 0 0
0 0 1 0 1 0 0 0 0 1 1 1 0
0 0 1 1 1 0 0 0 0 1 1 0 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 0 1
1 1 1 0 1 1...

output:

YES
6 3 11 4 12 8 1 5 2 13 9 10 7
2 5 10 11 9 3 8 4 7 13 12 6 1

result:

ok ok

Test #37:

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

input:

17
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 1
1 1 0 1 0 0 0 1 0 1 0 1 0 1 1 0 1
1 1 1 0 1 0 0 0 0 1 0 0 1 0 1 0 0
1 0 0 1 0 0 0 1 0 1 0 0 1 1 0 0 1
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
1 1 1 0 1 0 0 0 0 1 1 0 1 1 1 0 1
1 1 0 0 0 0 0 0 0 0 0 0 0...

output:

YES
17 13 11 7 14 3 1 10 4 6 16 5 15 9 12 2 8
17 15 10 6 7 14 16 4 11 2 5 8 9 3 12 13 1

result:

ok ok

Test #38:

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

input:

24
0 1 1 0 1 1 1 1 1 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1
1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 0 1
1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 1
0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0
1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0
1 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0
1 0 0 1 1...

output:

YES
22 13 11 5 7 15 4 14 3 6 23 16 12 10 20 1 21 19 24 18 9 17 2 8
21 12 15 23 18 4 17 3 6 22 5 2 8 14 24 1 9 20 10 11 19 13 16 7

result:

ok ok

Test #39:

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

input:

27
0 1 1 1 0 1 1 0 0 0 1 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 0
1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1
1 1 0 1 1 1 0 0 0 1 1 1 1 0 0 1 0 1 0 1 0 0 1 1 0 1 1
1 0 1 0 1 1 0 1 0 1 1 1 1 1 0 1 0 1 0 1 1 1 1 1 1 1 1
0 1 1 1 0 0 1 0 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 1 1 0 1
1 1 1 1 0 0 1 0 1 0 0 1 1 1...

output:

YES
10 25 24 27 12 6 17 5 9 11 7 18 20 19 3 15 1 8 21 16 22 13 2 26 14 4 23
9 22 14 21 1 7 23 17 25 5 4 8 12 19 27 13 26 10 24 11 15 18 2 16 20 3 6

result:

ok ok

Test #40:

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

input:

31
0 1 1 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1
1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0
1 1 0 1 0 1 0 1 1 1 1 0 1 1 0 1 0 0 1 0 0 0 1 0 1 1 1 0 0 0 1
1 0 1 0 1 1 1 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1
0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1...

output:

YES
17 4 16 8 29 9 21 15 14 2 10 20 3 1 18 12 31 24 7 23 25 19 5 28 13 22 6 30 26 27 11
30 19 29 1 26 27 6 8 18 11 7 21 28 4 24 20 15 23 25 13 16 17 22 10 3 31 14 9 12 5 2

result:

ok ok

Test #41:

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

input:

39
0 1 0 0 0 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 1
1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0
0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0
0 1 0 0 1 1 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 0 0 1 1 1 0 0 1 0 0 0...

output:

YES
22 33 12 21 3 34 11 25 17 8 26 9 30 23 18 29 1 39 19 32 13 16 10 4 28 37 7 6 24 5 2 15 35 14 20 36 31 38 27
3 9 39 5 4 16 33 28 13 32 18 36 17 26 35 2 15 34 27 31 6 12 14 1 23 24 19 25 10 30 11 20 7 38 8 29 22 37 21

result:

ok ok

Test #42:

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

input:

48
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 1
1 0 0 0 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 1 1 0 0 1 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1
0 0 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 0 0 1 1 0 0 1 0 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0
0 0 0 0 0...

output:

YES
34 41 11 28 10 29 8 3 26 31 2 32 15 27 18 21 4 43 47 5 42 36 44 48 38 30 7 39 12 14 20 45 9 22 37 13 16 6 23 25 40 35 17 24 19 46 1 33
8 20 42 24 38 10 45 29 28 41 19 46 16 17 11 7 12 39 33 37 43 15 31 48 21 44 6 40 9 22 30 26 32 1 47 18 13 3 5 25 34 14 23 27 4 36 35 2

result:

ok ok

Test #43:

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

input:

53
0 1 1 0 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0
1 0 1 0 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 1 1
1 1 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 1 0 0 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1...

output:

YES
45 31 39 9 22 5 47 52 53 30 27 46 28 23 2 19 16 8 17 18 24 21 25 43 29 48 15 3 38 41 34 6 49 36 14 7 50 40 32 11 33 26 37 42 1 20 12 13 44 10 35 4 51
45 8 16 53 15 17 40 25 36 3 43 34 26 24 30 9 11 10 44 32 2 46 50 51 7 52 20 29 33 13 49 47 14 12 27 22 4 37 19 23 48 38 6 31 28 5 41 35 21 42 18 1...

result:

ok ok

Test #44:

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

input:

59
0 1 1 1 0 0 1 1 1 0 0 0 1 1 0 1 1 1 0 1 0 0 0 0 0 1 1 0 1 1 0 1 0 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 0 0 0 0 0 1 0 1 1 1 0
1 0 1 0 0 0 0 1 1 1 0 0 1 1 0 1 1 1 0 1 0 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 0 0 0 1 0 1 1 1 0
1 1 0 1 1 0 1 1 0 1 1 0 0 1 0 0 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1...

output:

YES
37 39 17 43 32 16 38 58 19 34 57 11 1 56 8 36 3 46 6 10 9 4 55 49 33 41 31 27 53 45 40 21 5 35 25 50 26 51 12 7 2 28 13 59 18 52 54 44 14 22 30 15 24 23 29 48 20 47 42
21 27 9 26 59 36 49 50 6 22 19 32 17 34 41 3 7 35 54 20 30 46 4 11 24 38 10 58 33 52 13 5 25 47 43 37 57 51 31 8 15 16 53 39 18 ...

result:

ok ok

Test #45:

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

input:

65
0 0 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 1 0 1 1 0 1 1 0 0 0
0 0 0 0 0 1 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0 0 1 0 1 1 1 1 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 1 0 0 0 0 0 1 1 0
1 0 0 0 0 1 0 1 0 0 0 1 1 1 1 0 0 0 0...

output:

YES
20 33 10 39 3 51 40 25 61 55 29 46 16 1 34 12 65 47 7 38 2 31 58 15 62 37 53 54 18 17 24 43 28 13 35 26 6 60 42 36 50 23 48 8 27 5 52 9 63 49 41 59 56 21 45 11 64 32 14 19 4 30 57 44 22
57 4 37 3 44 58 25 38 35 30 28 50 39 26 55 22 16 19 43 42 51 10 17 14 11 60 7 6 9 41 20 36 59 65 8 18 49 40 1 ...

result:

ok ok

Test #46:

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

input:

72
0 1 0 1 0 0 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 1 0 0 0 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 0 1
1 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 1 0 0 0 1 0 0 1 1 1 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0
0 0 0 0 0...

output:

YES
35 9 59 54 11 3 25 65 43 6 12 14 37 72 24 70 67 26 27 58 39 36 49 46 64 22 61 33 44 50 38 10 53 7 2 5 47 68 56 1 18 32 19 69 21 30 16 31 63 45 41 29 51 55 60 34 57 62 23 52 48 8 4 40 71 28 20 13 42 66 15 17
25 23 19 61 38 44 27 47 13 69 68 35 60 32 7 40 26 57 16 2 10 34 36 5 18 59 67 65 54 29 49...

result:

ok ok

Test #47:

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

input:

77
0 0 0 0 1 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 0 1 0 0 0
0 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 0 1 1 1 0 0 0 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 1 0 1 1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 1...

output:

YES
20 70 1 26 64 56 52 27 5 31 71 18 13 3 76 69 43 4 68 36 30 38 25 75 40 57 32 66 8 14 34 49 48 62 77 6 24 59 72 51 74 10 46 15 44 47 17 63 42 19 9 33 29 58 45 53 41 67 55 16 7 35 61 73 22 39 54 2 28 21 11 60 12 50 65 23 37
52 51 69 33 62 48 17 68 5 73 57 71 34 39 45 29 74 24 6 54 49 23 31 44 56 5...

result:

ok ok

Test #48:

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

input:

82
0 0 1 0 0 0 1 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 1 0 1 1 0 0 1 1 0 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0
0 0 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 0 1 0 1...

output:

YES
15 57 1 64 81 17 10 53 36 44 22 5 12 77 24 30 9 69 48 59 19 2 31 33 74 58 70 20 63 55 45 61 37 7 50 28 73 46 18 26 6 32 41 25 29 82 67 27 75 21 16 52 56 43 66 80 11 14 4 79 34 54 62 51 78 72 49 13 60 47 3 68 8 76 42 40 35 71 23 38 65 39
55 17 39 33 16 38 40 7 58 56 28 35 26 50 4 36 65 74 10 2 45...

result:

ok ok

Test #49:

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

input:

86
0 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 0 1 0 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1
1 0 1 0 1 0 0 0 1 1 0 0 1 0 1 0 1 0 1 1 0 0 1 1 0 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 0 1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 1 0 0 0 0...

output:

YES
12 33 61 50 2 8 35 17 3 23 13 85 22 18 16 60 77 74 6 20 79 78 28 19 30 26 39 64 24 71 10 1 29 11 5 15 72 56 65 40 86 70 27 7 59 69 54 14 68 46 42 9 32 82 76 34 4 67 58 38 62 52 43 63 53 31 55 84 21 48 36 25 47 41 51 44 73 66 57 45 81 80 83 49 75 37
45 59 75 41 5 78 50 66 54 27 77 39 26 65 7 17 6...

result:

ok ok

Test #50:

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

input:

90
0 0 0 1 0 1 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 1 1 0 1 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0
0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 1 1...

output:

YES
72 31 4 57 56 89 82 84 40 7 79 11 41 34 16 70 90 65 2 55 76 68 46 44 19 60 63 1 86 52 78 85 20 48 18 32 33 69 37 15 80 27 81 66 17 49 23 59 38 77 25 64 42 87 35 75 43 6 13 29 9 74 71 26 5 58 67 61 10 53 39 62 88 12 47 21 3 73 45 54 22 36 30 28 24 14 50 8 83 51
23 87 61 12 90 73 62 1 75 67 83 51 ...

result:

ok ok

Test #51:

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

input:

91
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 1 1 1 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 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 0 1 1 1 1 1 1 1 1
1 0 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 1 1 0 0 0 0 1 0 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0...

output:

YES
4 18 43 25 42 76 37 51 52 35 84 39 1 71 49 72 33 66 63 26 14 46 2 44 38 41 90 88 53 40 15 54 56 83 61 11 8 9 21 32 55 12 30 86 31 62 74 16 29 59 23 58 67 20 19 81 60 17 22 78 5 13 79 80 73 64 10 65 57 75 6 69 70 91 48 34 47 85 7 82 27 36 3 77 45 68 87 28 50 24 89
2 24 52 70 33 34 4 31 25 15 29 2...

result:

ok ok

Test #52:

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

input:

92
0 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 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 1 0 1 0 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 0 1 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 0 1 1 0 1 1 1 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 1 1 1 1 1 1 0 1 0 1 0 0 0 0 0 1 1...

output:

YES
88 51 9 53 14 29 24 3 1 34 67 12 46 4 82 37 47 6 33 76 18 73 23 71 92 68 7 56 26 72 66 5 77 16 79 87 70 45 30 84 43 41 21 10 19 64 55 32 85 36 28 78 91 75 40 27 25 8 50 52 59 69 13 90 38 89 63 48 62 61 80 17 49 20 35 74 31 2 44 83 15 39 11 60 58 57 81 65 22 86 54 42
84 51 44 53 5 76 37 72 70 62 ...

result:

ok ok

Test #53:

score: 0
Accepted
time: 6ms
memory: 3888kb

input:

93
0 0 1 1 0 1 1 1 0 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 1 0 0 1 1 0 0 1 1 0 1 1 1 0 0 1 1 1 1 1 1
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 0...

output:

YES
79 10 65 27 61 54 59 60 93 78 81 24 72 47 18 41 64 88 66 86 20 75 45 51 44 15 21 84 67 70 85 29 5 62 34 80 19 33 2 40 35 22 32 52 53 3 31 76 87 57 48 16 28 8 4 30 77 17 74 73 91 13 25 6 46 7 37 50 58 9 55 39 71 82 90 42 56 83 43 49 63 92 14 1 26 11 68 23 89 36 12 38 69
81 85 33 22 92 71 6 26 41 ...

result:

ok ok

Test #54:

score: 0
Accepted
time: 6ms
memory: 4020kb

input:

94
0 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 0 1 0 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 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1
1 0 1 1 0 0 1 0 1 1 1 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1...

output:

YES
94 54 78 87 26 7 70 34 69 46 62 12 89 74 83 17 29 67 61 90 91 60 36 5 6 44 22 18 15 92 40 33 25 84 71 65 86 76 57 13 9 63 21 28 80 45 8 16 53 35 81 55 68 19 75 56 88 73 1 79 48 58 30 93 51 2 47 66 38 11 82 3 32 14 49 50 37 59 52 27 64 10 77 39 41 20 23 31 4 85 72 24 43 42
84 15 18 92 27 30 63 50...

result:

ok ok

Test #55:

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

input:

95
0 1 0 1 0 0 1 0 0 0 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 1 0 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 0 1 0 0 1 0 0 0 1 1 1 1 1 0 1 1 0 1 0 0 0 1 0 0 0 0 1 0 1 1 0 1 1 1 1 0 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0...

output:

YES
51 71 4 72 65 45 78 42 47 5 29 68 22 91 61 34 75 19 62 74 24 35 89 86 41 16 1 36 87 10 90 80 57 30 67 76 2 8 83 32 58 70 55 12 26 93 14 84 85 73 33 95 82 17 40 23 49 66 39 25 21 77 64 94 11 59 27 46 3 37 60 20 7 53 52 9 81 50 13 38 31 56 69 48 18 44 15 28 6 54 43 63 88 92 79
21 61 78 26 17 65 31...

result:

ok ok

Test #56:

score: 0
Accepted
time: 6ms
memory: 4032kb

input:

96
0 0 0 0 0 0 0 0 0 1 0 1 1 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1
0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 1 1 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 0 1 1 0 1 0 0...

output:

YES
84 51 15 45 12 37 10 32 34 85 92 4 68 94 52 78 83 48 5 69 23 81 95 59 55 62 43 17 71 22 7 36 72 47 58 91 2 46 19 38 96 88 89 82 41 13 56 53 77 16 30 29 93 31 67 33 1 75 76 18 87 80 44 74 61 70 60 79 11 8 9 25 42 63 50 90 49 39 64 40 20 14 54 26 66 6 35 21 3 73 24 27 57 65 86 28
16 56 60 18 82 52...

result:

ok ok

Test #57:

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

input:

97
0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 1 0
0 0 0 1 0 0 1 1 1 0 1 0 0 0 0 1 0 1 0 1 1 1 1 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 0 0...

output:

YES
10 63 78 7 90 55 30 24 35 33 28 68 5 82 42 40 88 4 93 57 72 1 22 2 12 19 65 11 89 60 43 50 92 44 25 75 61 36 97 77 27 58 80 54 32 48 56 95 67 87 41 31 46 81 26 45 62 79 86 66 37 52 16 51 74 14 83 76 73 91 94 21 18 20 47 6 49 69 34 23 13 84 70 53 38 17 64 3 29 9 8 85 39 71 15 96 59
83 63 45 37 51...

result:

ok ok

Test #58:

score: 0
Accepted
time: 6ms
memory: 4032kb

input:

98
0 0 1 1 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0
0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 0 1 0 1 1 0...

output:

YES
43 25 29 5 36 71 15 50 63 65 41 90 93 35 91 33 81 75 88 27 69 72 47 20 13 98 89 37 61 48 68 78 66 7 9 38 11 80 53 87 82 95 58 60 84 79 52 45 21 24 76 28 10 67 22 4 73 3 12 23 64 44 40 31 62 8 49 51 39 74 2 46 85 19 86 26 57 32 55 1 56 83 59 16 30 6 54 96 42 70 17 18 14 97 94 77 92 34
47 85 40 44...

result:

ok ok

Test #59:

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

input:

99
0 1 1 0 0 1 1 1 1 0 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 1 1 1 1 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 1 1 1
1 0 1 0 1 1 0 0 1 0 0 0 0 1 1 0 1 1 1 1 0 1 1 1 0 1 0 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 1 1...

output:

YES
61 80 54 87 19 74 63 81 70 27 84 85 94 65 17 98 15 41 35 71 3 53 79 24 91 16 62 46 56 67 31 86 4 1 58 6 52 5 14 90 36 11 37 68 12 8 40 47 43 60 32 99 23 78 64 20 66 33 77 89 10 83 34 26 49 30 9 51 88 42 21 22 25 73 96 50 48 93 13 57 7 2 76 69 95 18 44 38 39 45 72 55 28 59 75 92 82 97 29
29 86 24...

result:

ok ok

Test #60:

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

input:

100
0 0 1 0 0 1 0 0 1 0 0 0 1 1 0 0 1 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 1 1 0 0 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 1 0 0 0
0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 1 ...

output:

NO

result:

ok ok

Test #61:

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

input:

100
0 0 1 1 0 1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 0 1 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 0 1 1 0 1 0 0 1 0 1 0 1 0 0 0 0 1 0 0 1 1 0 0 0 1 1 0 1 0 0 0 1 0 0 1 0 0 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0
0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 1 1 0 1 1 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 ...

output:

NO

result:

ok ok

Test #62:

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

input:

100
0 0 0 1 1 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 0 1 0 0 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1
0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 0 1 0 0 1 1 1 0 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 0 1 1 0 0 1 1 0 1 1 ...

output:

NO

result:

ok ok

Test #63:

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

input:

100
0 1 0 1 1 1 0 0 1 1 0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 0 0 1 1 0 0 1 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1
1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 0 1 1 1 1 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 1 0 0 0 0 0 ...

output:

NO

result:

ok ok

Test #64:

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

input:

100
0 0 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 1 0 1 1 1 0 0 0 0 0 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 0 1 1 0 0 0 1 1 1 1 1 1 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 1 1 0 0 0 1 1 0
0 0 1 0 1 1 1 1 1 1 0 1 1 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 1 1 1 0 ...

output:

YES
1 10 14 8 84 3 97 70 43 68 2 17 92 24 6 40 52 16 71 83 57 67 38 7 30 27 48 51 50 98 44 96 80 42 60 87 75 81 91 77 100 64 28 72 26 61 36 34 33 47 82 79 37 88 66 15 85 13 4 90 73 21 25 86 46 95 23 12 11 94 93 29 41 78 65 19 63 58 35 20 69 62 18 9 49 55 74 45 54 89 31 53 99 32 76 56 39 22 59 5
44 2...

result:

ok ok

Test #65:

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

input:

100
0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 0 1 0 1 1 1 0 0 0 0 1 1 0 1 1 1 0 1 0 0 1 0 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 1 1
0 0 1 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 0 ...

output:

YES
21 74 51 69 62 84 32 49 36 63 19 100 61 31 42 92 38 34 72 46 56 98 83 53 45 73 52 2 12 88 82 94 55 37 78 80 43 77 22 1 79 29 24 76 5 85 64 23 30 96 16 71 17 6 97 91 87 50 41 47 3 81 15 65 26 86 8 9 58 28 18 67 59 75 99 7 13 89 66 10 70 93 95 27 40 39 20 60 4 48 35 68 33 25 90 57 44 11 54 14
32 5...

result:

ok ok

Test #66:

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

input:

100
0 0 1 0 0 1 1 0 0 0 1 0 0 0 0 1 0 0 1 1 0 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0 1 1 1 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 1 1 0 0 1 1 1 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0
0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 0 0 1 0 0 1 1 ...

output:

YES
93 23 51 79 95 88 97 89 52 36 21 82 30 45 41 60 40 92 94 31 62 29 55 25 66 83 65 28 68 49 100 37 59 85 48 44 77 76 80 61 3 63 24 12 16 70 8 2 35 47 19 46 64 5 71 99 43 1 32 86 20 57 15 74 38 67 98 96 42 9 18 56 91 78 10 69 58 34 13 17 14 27 26 54 53 87 75 33 73 72 11 6 50 7 81 22 84 90 4 39
44 4...

result:

ok ok

Test #67:

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

input:

100
0 1 0 1 1 1 0 1 0 0 1 0 1 1 1 1 1 1 1 0 1 0 1 0 1 1 0 1 1 1 1 1 0 1 1 1 1 1 1 1 0 1 0 0 1 0 0 0 1 1 0 1 0 1 1 1 1 1 1 0 1 1 1 1 0 1 0 1 1 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0 1 1 1 1 1 0 1 0 1 1 1 0 0 0 0
1 0 0 0 1 1 0 0 0 1 0 1 0 0 0 1 0 1 0 0 0 0 0 1 0 0 1 0 0 1 1 0 1 1 1 0 0 0 0 1 1 0 1 0 0 0 1 0 ...

output:

YES
9 78 86 77 85 91 81 65 83 49 70 47 32 60 30 15 33 55 28 79 87 95 18 19 43 64 20 23 16 96 38 25 56 94 90 14 48 36 66 6 12 51 54 4 72 7 73 2 80 59 10 5 31 71 82 24 100 68 62 52 93 34 35 42 13 27 41 97 26 44 84 89 17 53 21 88 63 11 46 8 76 75 69 98 74 39 61 29 22 58 1 99 40 67 37 45 3 50 92 57
29 4...

result:

ok ok

Test #68:

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

input:

100
0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 0 1 1 0 1 1 0 1 1 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 1 0 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1
1 0 1 1 1 1 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 ...

output:

YES
45 85 46 50 41 3 65 66 5 82 16 78 83 31 36 67 92 27 97 2 90 11 48 91 8 25 55 28 73 63 70 40 60 24 7 18 96 20 32 80 57 6 86 12 13 38 23 69 47 30 39 49 10 74 19 71 98 14 34 76 22 42 9 37 15 62 54 77 1 61 81 99 75 29 93 53 89 84 51 58 43 68 79 26 88 87 56 64 21 95 100 35 52 72 59 17 94 4 44 33
57 7...

result:

ok ok

Test #69:

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

input:

100
0 1 0 1 1 0 0 1 1 0 1 0 1 1 0 1 0 1 1 1 0 0 1 0 0 0 1 0 1 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 1 1 1 0 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 0 1 0 0 1 1
1 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 1 1 0 1 0 1 0 0 0 0 1 0 0 1 ...

output:

YES
62 86 35 63 79 52 30 82 16 44 25 83 65 24 21 50 41 98 90 75 10 4 91 2 29 32 95 42 26 89 64 49 11 53 73 55 68 58 37 1 69 20 13 5 71 87 34 100 77 19 18 59 60 81 33 6 22 8 80 99 40 76 93 47 23 12 72 45 15 84 36 85 51 78 97 48 43 67 56 3 94 70 14 17 7 54 27 28 31 66 88 38 92 74 39 46 61 9 96 57
19 3...

result:

ok ok

Test #70:

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

input:

100
0 1 0 0 1 0 1 0 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 1 0 0 1 0 1 1 1 1 1 0 1 1 1 1 0 1 0 1 0 0 0 0 1 0 0 0 1 1 1 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 1 0 0 1 0
1 0 1 1 1 1 0 0 0 1 1 1 0 1 1 0 1 1 0 0 1 1 0 1 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 1 0 1 0 0 1 1 0 1 ...

output:

YES
57 59 36 54 20 4 85 92 95 42 68 37 60 19 30 88 75 58 23 97 39 14 40 65 79 46 64 96 11 16 24 100 35 51 73 86 61 80 22 29 76 18 48 69 5 27 99 8 28 21 94 31 34 17 84 26 33 67 1 90 15 78 71 77 44 53 89 93 9 82 49 62 45 25 83 55 7 87 6 63 12 70 2 13 74 81 10 41 91 50 47 66 38 43 32 98 52 3 72 56
37 8...

result:

ok ok

Test #71:

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

input:

100
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 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 0 1 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 ...

output:

YES
6 58 83 32 79 63 43 61 75 51 93 27 10 86 88 29 37 26 16 94 68 67 80 31 59 64 47 22 20 24 36 12 82 73 55 13 39 7 87 100 41 52 60 66 18 96 57 30 49 34 14 11 21 4 17 81 99 90 23 85 8 45 5 15 44 2 40 25 50 71 9 46 65 91 70 97 19 1 53 95 84 28 56 78 35 42 54 92 3 77 98 62 72 76 48 33 89 69 38 74
100 ...

result:

ok ok

Test #72:

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

input:

100
0 1 0 1 0 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 0 0 1 1 0 1 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 0 1 0 1 1 0 0 1 0 0 0 1 1 0 1
1 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 1 0 0 1 0 0 1 ...

output:

YES
67 38 79 14 76 37 64 83 1 62 12 2 18 86 77 27 36 70 52 57 19 63 87 82 23 42 89 59 60 48 100 71 58 72 74 88 39 80 47 33 93 40 24 28 73 16 75 10 84 26 15 9 35 29 51 3 7 5 44 66 81 56 46 90 8 11 31 65 54 25 30 55 92 91 50 13 20 94 43 41 53 32 99 98 6 21 17 78 22 61 95 97 49 68 96 85 34 45 69 4
86 4...

result:

ok ok

Test #73:

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

input:

100
0 1 0 1 1 0 1 1 0 0 0 0 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 0 0 1 1 0 0 1 0 0 1 1 1 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 1 1 0 1 1 0 0 1 1 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 1 1 0 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1 0
1 0 0 1 1 0 0 1 0 0 1 0 1 1 0 0 0 1 1 1 1 1 1 0 0 1 1 0 0 0 1 1 0 0 0 0 1 0 1 1 0 1 0 1 1 1 0 0 ...

output:

YES
61 38 100 23 28 99 35 48 95 37 39 25 53 78 1 81 89 50 47 76 72 68 66 45 16 55 86 2 62 27 49 57 31 51 6 20 80 58 79 91 36 41 26 40 42 59 13 24 44 21 85 7 46 84 75 19 94 4 64 71 60 17 98 97 82 15 96 14 18 54 22 92 11 3 70 63 43 32 90 87 67 52 73 8 56 65 83 12 9 5 74 69 34 10 30 93 77 33 88 29
48 2...

result:

ok ok

Test #74:

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

input:

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

output:

YES
8 9 7 3 6 5 4 2 1
9 8 7 4 6 5 3 2 1

result:

ok ok

Test #75:

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

input:

54
0 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 0
1 0 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 0 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...

output:

YES
1 54 53 52 51 50 49 48 47 46 45 44 43 41 42 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 3 14 13 12 11 10 9 8 7 6 5 4 2
2 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 4 14 13 12 11 10 9 8 ...

result:

ok ok

Test #76:

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

input:

100
0 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 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 0 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 ...

output:

YES
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
100 ...

result:

ok ok

Test #77:

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

input:

100
0 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 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 0 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 ...

output:

YES
100 99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 68 79 78 77 76 75 74 73 72 71 70 69 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 33 47 46 45 44 43 42 41 40 39 38 37 36 35 14 34 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 13 12 11 10 9 8 7 6 5 4 3 2 1
100 ...

result:

ok ok

Test #78:

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

input:

100
0 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 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 0 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 ...

output:

YES
100 99 98 97 96 15 95 94 93 92 91 90 89 88 63 87 86 75 85 84 83 82 81 80 79 78 40 77 76 74 73 72 71 70 69 68 67 66 65 64 62 61 60 59 58 57 56 55 54 53 52 51 42 50 49 48 47 35 46 3 45 44 43 41 39 38 37 36 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 6 18 17 16 14 13 12 11 10 9 8 5 7 4 2 1
100 ...

result:

ok ok

Test #79:

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

input:

4
0 1 0 1
1 0 0 0
0 0 0 0
1 0 0 0

output:

YES
4 2 1 3
3 2 4 1

result:

ok ok

Test #80:

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

input:

89
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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 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 1
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 1 0 0 0 0 0 0 0...

output:

NO

result:

ok ok

Test #81:

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

input:

100
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 0 0 ...

output:

YES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
100 ...

result:

ok ok

Test #82:

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

input:

100
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 0 0 ...

output:

YES
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 51 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
100 ...

result:

ok ok

Test #83:

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

input:

100
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 0 0 ...

output:

YES
1 2 3 4 5 6 7 55 8 9 10 79 11 12 82 85 13 14 15 16 17 36 18 35 94 19 20 21 57 22 23 24 25 38 26 27 28 29 30 31 32 64 33 34 37 39 40 41 42 53 43 44 45 46 47 48 49 50 51 52 54 87 56 58 59 60 61 62 63 65 84 66 67 80 68 69 70 71 72 73 74 77 75 76 78 81 83 86 88 89 90 91 92 93 95 96 97 98 99 100
100 ...

result:

ok ok