QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#175221#5665. AA Country and King Dreamoonucup-team607#AC ✓271ms51948kbC++172.4kb2023-09-10 16:51:132023-09-10 16:51:14

详细

Test #1:

score: 100
Accepted
time: 4ms
memory: 15668kb

input:

9
5
1 2 3 2 0 2 1 5 1
5
1 2 3 0 0 2 1 5 1
5
1 2 0 0 0 2 1 5 1
5
1 2 0 0 0 0 1 5 1
5
1 0 0 0 0 0 1 5 1
5
1 0 0 0 0 0 0 5 1
5
1 0 0 0 0 0 0 0 1
5
1 0 0 0 0 0 0 0 0
5
0 0 0 0 0 0 0 0 0

output:

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

result:

ok 9 lines

Test #2:

score: 0
Accepted
time: 132ms
memory: 14892kb

input:

28668
2
0 2 1
2
0 0 1
2
0 0 0
2
1 0 1
2
1 0 0
2
1 2 0
3
0 2 1 3 1
3
0 0 1 3 1
3
0 0 0 3 1
3
0 0 0 0 1
3
0 0 0 0 0
3
1 0 1 3 1
3
1 0 0 3 1
3
1 0 0 0 1
3
1 0 0 0 0
3
1 2 0 3 1
3
1 2 0 0 1
3
1 2 0 0 0
3
1 2 1 0 1
3
1 2 1 0 0
3
1 2 1 3 0
3
0 2 3 2 1
3
0 0 3 2 1
3
0 0 0 2 1
3
1 0 3 2 1
3
1 0 0 2 1
3
1 2 ...

output:

1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 1 3 1
1 2 3 2 1
1 2 3 2 1
1 2 3 2 1
1 2 3 2 1
1 2 3 2 1
1 2 3 2 1
1 2 3 2 1
1 2 3 2 1
1 2 3 2 1
1 3 1 2 1
1 3 1 2 1
1 3 ...

result:

ok 28668 lines

Test #3:

score: 0
Accepted
time: 108ms
memory: 15412kb

input:

27273
6
1 2 5 3 5 4 0 0 5 2 1
6
1 2 5 3 5 4 5 0 5 2 1
6
1 2 5 3 5 4 5 6 0 2 1
6
1 2 5 3 5 4 5 6 0 0 1
6
1 2 5 3 5 4 5 6 0 0 0
6
1 2 5 3 5 4 5 6 5 0 1
6
1 2 5 3 5 4 5 6 5 0 0
6
1 2 5 3 5 4 5 6 5 2 0
6
0 2 5 3 5 4 6 4 5 2 1
6
0 0 5 3 5 4 6 4 5 2 1
6
0 0 0 3 5 4 6 4 5 2 1
6
1 0 5 3 5 4 6 4 5 2 1
6
1 0 ...

output:

1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 5 6 5 2 1
1 2 5 3 5 4 6 4 5 2 1
1 2 5 3 5 4 6 4 5 2 1
1 2 5 3 5 4 6 4 5 2 1
1 2 5 3 5 4 6 4 5 2 1
1 2 5 3 5 4 6 4 5 2 1
1 2 5 3 5 4 6 ...

result:

ok 27273 lines

Test #4:

score: 0
Accepted
time: 79ms
memory: 14856kb

input:

27273
6
1 3 5 4 2 6 2 0 0 3 1
6
1 3 5 4 2 6 2 0 0 0 1
6
1 3 5 4 2 6 2 0 0 0 0
6
1 3 5 4 2 6 2 4 0 3 1
6
1 3 5 4 2 6 2 4 0 0 1
6
1 3 5 4 2 6 2 4 0 0 0
6
1 3 5 4 2 6 2 4 5 0 1
6
1 3 5 4 2 6 2 4 5 0 0
6
1 3 5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4 2 3 5 3 2 4 1
1 4 6 4 2 3 5 ...

result:

ok 27273 lines

Test #6:

score: 0
Accepted
time: 110ms
memory: 14780kb

input:

26757
6
0 0 0 4 2 4 3 4 6 5 1
6
0 0 0 0 2 4 3 4 6 5 1
6
1 0 6 4 2 4 3 4 6 5 1
6
1 0 0 4 2 4 3 4 6 5 1
6
1 0 0 0 2 4 3 4 6 5 1
6
1 5 0 4 2 4 3 4 6 5 1
6
1 5 0 0 2 4 3 4 6 5 1
6
1 5 6 0 2 4 3 4 6 5 1
6
1 5 6 4 0 4 3 4 6 5 1
6
1 5 6 4 0 0 3 4 6 5 1
6
1 5 6 4 0 0 0 4 6 5 1
6
1 5 6 4 2 0 3 4 6 5 1
6
1 5 ...

output:

1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 3 2 4 6 5 1
1 5 6 4 2 4 3 4 6 5 1
1 5 6 4 2 3 2 4 6 5 1
1 5 6 4 2 4 3 ...

result:

ok 26757 lines

Test #7:

score: 0
Accepted
time: 86ms
memory: 16180kb

input:

23077
7
1 0 0 0 0 0 0 0 0 4 1 5 1
7
1 2 0 3 1 4 6 4 7 4 1 5 1
7
1 2 0 0 1 4 6 4 7 4 1 5 1
7
1 2 0 0 0 4 6 4 7 4 1 5 1
7
1 2 0 0 0 0 6 4 7 4 1 5 1
7
1 2 0 0 0 0 0 4 7 4 1 5 1
7
1 2 0 0 0 0 0 0 7 4 1 5 1
7
1 2 0 0 0 0 0 0 0 4 1 5 1
7
1 2 1 0 1 4 6 4 7 4 1 5 1
7
1 2 1 0 0 4 6 4 7 4 1 5 1
7
1 2 1 0 0 0 ...

output:

1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 4 7 4 1 5 1
1 2 1 3 1 4 6 ...

result:

ok 23077 lines

Test #8:

score: 0
Accepted
time: 80ms
memory: 15392kb

input:

23077
7
1 2 0 0 0 0 5 4 7 4 5 3 1
7
1 2 1 0 5 6 5 4 7 4 5 3 1
7
1 2 1 0 0 6 5 4 7 4 5 3 1
7
1 2 1 0 0 0 5 4 7 4 5 3 1
7
1 2 1 3 0 6 5 4 7 4 5 3 1
7
1 2 1 3 0 0 5 4 7 4 5 3 1
7
1 2 1 3 5 0 5 4 7 4 5 3 1
7
1 2 1 3 5 6 0 4 7 4 5 3 1
7
1 2 1 3 5 6 0 0 7 4 5 3 1
7
1 2 1 3 5 6 0 0 0 4 5 3 1
7
1 2 1 3 5 6 ...

output:

1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 4 7 4 5 3 1
1 2 1 3 5 6 5 ...

result:

ok 23077 lines

Test #9:

score: 0
Accepted
time: 94ms
memory: 14524kb

input:

23077
7
1 0 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
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 4 1 3 1 6 1
1 2 1 4 7 4 5 ...

result:

ok 23077 lines

Test #11:

score: 0
Accepted
time: 90ms
memory: 15220kb

input:

23077
7
1 2 1 5 4 5 0 5 1 3 7 3 1
7
1 2 1 5 4 5 6 0 1 3 7 3 1
7
1 2 1 5 4 5 6 0 0 3 7 3 1
7
1 2 1 5 4 5 6 0 0 0 7 3 1
7
1 2 1 5 4 5 6 0 0 0 0 3 1
7
1 2 1 5 4 5 6 5 0 3 7 3 1
7
1 2 1 5 4 5 6 5 0 0 7 3 1
7
1 2 1 5 4 5 6 5 0 0 0 3 1
7
1 2 1 5 4 5 6 5 1 0 7 3 1
7
1 2 1 5 4 5 6 5 1 0 0 3 1
7
1 2 1 5 4 5 ...

output:

1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 5 1 3 7 3 1
1 2 1 5 4 5 6 ...

result:

ok 23077 lines

Test #12:

score: 0
Accepted
time: 105ms
memory: 14244kb

input:

23077
7
1 0 0 6 1 5 7 5 1 4 1 3 1
7
1 0 0 0 1 5 7 5 1 4 1 3 1
7
1 2 0 6 1 5 7 5 1 4 1 3 1
7
1 2 0 0 1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6 5 4 3 4 5 6 1
1 2 1 6 7 6 5 4 3 4 5 6 1
1 2 1 6 7 6 5 4 3 4 5 6 1
1 2 1 6 7 6 5 4 3 4 5 6 1
1 2 1 6 7 6 5 4 3 4 5 6 1
1 2 1 6 7 3 7 ...

result:

ok 23077 lines

Test #14:

score: 0
Accepted
time: 152ms
memory: 15180kb

input:

23077
7
0 0 0 0 0 6 4 7 1 5 1 3 1
7
1 0 1 7 4 6 4 7 1 5 1 3 1
7
1 0 0 7 4 6 4 7 1 5 1 3 1
7
1 0 0 0 4 6 4 7 1 5 1 3 1
7
1 0 0 0 0 6 4 7 1 5 1 3 1
7
1 2 0 7 4 6 4 7 1 5 1 3 1
7
1 2 0 0 4 6 4 7 1 5 1 3 1
7
1 2 0 0 0 6 4 7 1 5 1 3 1
7
1 2 1 0 4 6 4 7 1 5 1 3 1
7
1 2 1 0 0 6 4 7 1 5 1 3 1
7
1 2 1 7 0 6 ...

output:

1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 7 1 5 1 3 1
1 2 1 7 4 6 4 ...

result:

ok 23077 lines

Test #15:

score: 0
Accepted
time: 60ms
memory: 16052kb

input:

23077
7
1 2 3 2 4 0 5 2 7 2 1 6 1
7
1 2 3 2 4 0 0 2 7 2 1 6 1
7
1 2 3 2 4 0 0 0 7 2 1 6 1
7
1 2 3 2 4 0 0 0 0 2 1 6 1
7
1 2 3 2 4 2 0 2 7 2 1 6 1
7
1 2 3 2 4 2 0 0 7 2 1 6 1
7
1 2 3 2 4 2 0 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 2 1
1 2 3 2 7 6 7 5 7 4 7 2 1
1 2 3 2 7 6 7 ...

result:

ok 23077 lines

Test #17:

score: 0
Accepted
time: 111ms
memory: 14280kb

input:

23077
7
1 2 3 6 0 0 0 7 5 2 4 2 1
7
1 2 3 6 0 0 0 0 5 2 4 2 1
7
1 2 3 6 3 0 5 7 5 2 4 2 1
7
1 2 3 6 3 0 0 7 5 2 4 2 1
7
1 2 3 6 3 0 0 0 5 2 4 2 1
7
1 2 3 6 3 2 0 7 5 2 4 2 1
7
1 2 3 6 3 2 0 0 5 2 4 2 1
7
1 2 3 6 3 2 5 0 5 2 4 2 1
7
1 2 3 6 3 2 5 7 0 2 4 2 1
7
1 2 3 6 3 2 5 7 0 0 4 2 1
7
1 2 3 6 3 2 ...

output:

1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 5 2 4 2 1
1 2 3 6 3 2 5 7 4 7 5 2 1
1 2 3 6 3 2 5 ...

result:

ok 23077 lines

Test #18:

score: 0
Accepted
time: 106ms
memory: 15704kb

input:

23077
7
1 2 4 2 1 6 3 6 7 6 0 6 1
7
1 2 4 2 1 6 3 6 7 6 5 0 1
7
1 2 4 2 1 6 3 6 7 6 5 0 0
7
1 2 4 2 1 6 3 6 7 6 5 6 0
7
0 2 4 2 1 6 3 6 7 5 7 6 1
7
0 0 4 2 1 6 3 6 7 5 7 6 1
7
0 0 0 2 1 6 3 6 7 5 7 6 1
7
1 0 4 2 1 6 3 6 7 5 7 6 1
7
1 0 0 2 1 6 3 6 7 5 7 6 1
7
1 2 0 2 1 6 3 6 7 5 7 6 1
7
1 2 4 0 1 6 ...

output:

1 2 4 2 1 6 3 6 7 6 5 6 1
1 2 4 2 1 6 3 6 7 6 5 6 1
1 2 4 2 1 6 3 6 7 6 5 6 1
1 2 4 2 1 6 3 6 7 6 5 6 1
1 2 4 2 1 6 3 6 7 5 7 6 1
1 2 4 2 1 6 3 6 7 5 7 6 1
1 2 4 2 1 6 3 6 7 5 7 6 1
1 2 4 2 1 6 3 6 7 5 7 6 1
1 2 4 2 1 6 3 6 7 5 7 6 1
1 2 4 2 1 6 3 6 7 5 7 6 1
1 2 4 2 1 6 3 6 7 5 7 6 1
1 2 4 2 1 6 3 ...

result:

ok 23077 lines

Test #19:

score: 0
Accepted
time: 106ms
memory: 14636kb

input:

23077
7
1 2 4 2 7 2 5 3 6 3 0 0 0
7
1 2 4 2 7 2 5 3 6 3 5 0 1
7
1 2 4 2 7 2 5 3 6 3 5 0 0
7
1 2 4 2 7 2 5 3 6 3 5 2 0
7
0 2 4 2 7 2 5 6 5 2 1 3 1
7
0 0 4 2 7 2 5 6 5 2 1 3 1
7
0 0 0 2 7 2 5 6 5 2 1 3 1
7
0 0 0 0 7 2 5 6 5 2 1 3 1
7
0 0 0 0 0 2 5 6 5 2 1 3 1
7
1 0 4 2 7 2 5 6 5 2 1 3 1
7
1 0 0 2 7 2 ...

output:

1 2 4 2 7 2 5 3 6 3 5 2 1
1 2 4 2 7 2 5 3 6 3 5 2 1
1 2 4 2 7 2 5 3 6 3 5 2 1
1 2 4 2 7 2 5 3 6 3 5 2 1
1 2 4 2 7 2 5 6 5 2 1 3 1
1 2 4 2 7 2 5 6 5 2 1 3 1
1 2 4 2 7 2 5 6 5 2 1 3 1
1 2 4 2 7 2 5 6 5 2 1 3 1
1 2 4 2 7 2 5 6 5 2 1 3 1
1 2 4 2 7 2 5 6 5 2 1 3 1
1 2 4 2 7 2 5 6 5 2 1 3 1
1 2 4 2 7 2 5 ...

result:

ok 23077 lines

Test #20:

score: 0
Accepted
time: 101ms
memory: 15080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4 6 4 3 4 7 4 1
1 2 5 2 1 4 6 4 3 4 7 4 1
1 2 5 2 1 4 6 4 3 4 7 4 1
1 2 5 2 1 4 6 4 3 4 7 4 1
1 2 5 2 1 4 6 4 3 4 7 4 1
1 2 5 2 1 4 6 4 3 7 3 4 1
1 2 5 2 1 4 6 4 3 7 3 4 1
1 2 5 2 1 4 6 4 3 7 3 4 1
1 2 5 2 1 4 6 4 3 7 3 4 1
1 2 5 2 1 4 6 ...

result:

ok 23077 lines

Test #22:

score: 0
Accepted
time: 92ms
memory: 15560kb

input:

23077
7
1 2 0 2 7 2 3 6 4 6 3 2 1
7
1 2 0 0 7 2 3 6 4 6 3 2 1
7
1 2 0 0 0 2 3 6 4 6 3 2 1
7
1 2 5 0 7 2 3 6 4 6 3 2 1
7
1 2 5 0 0 2 3 6 4 6 3 2 1
7
1 2 5 2 0 2 3 6 4 6 3 2 1
7
1 2 5 2 7 0 3 6 4 6 3 2 1
7
1 2 5 2 7 0 0 6 4 6 3 2 1
7
1 2 5 2 7 0 0 0 4 6 3 2 1
7
1 2 5 2 7 2 0 6 4 6 3 2 1
7
1 2 5 2 7 2 ...

output:

1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 6 4 6 3 2 1
1 2 5 2 7 2 3 ...

result:

ok 23077 lines

Test #23:

score: 0
Accepted
time: 101ms
memory: 14852kb

input:

23077
7
1 2 5 6 5 2 1 4 7 0 0 3 1
7
1 2 5 6 5 2 1 4 7 0 0 0 1
7
1 2 5 6 5 2 1 4 7 0 0 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 4 1
1 2 6 2 1 4 7 4 3 5 3 4 1
1 2 6 2 1 4 7 4 3 5 3 4 1
1 2 6 2 1 4 7 4 3 5 3 4 1
1 2 6 2 1 4 7 4 3 5 3 4 1
1 2 6 2 1 4 7 4 3 5 3 4 1
1 2 6 2 1 4 7 ...

result:

ok 23077 lines

Test #25:

score: 0
Accepted
time: 133ms
memory: 14884kb

input:

23077
7
1 2 6 2 7 3 4 3 5 3 7 0 0
7
1 2 6 2 7 3 4 3 5 3 7 2 0
7
0 2 6 2 7 3 4 5 4 3 7 2 1
7
0 0 6 2 7 3 4 5 4 3 7 2 1
7
0 0 0 2 7 3 4 5 4 3 7 2 1
7
0 0 0 0 7 3 4 5 4 3 7 2 1
7
0 0 0 0 0 3 4 5 4 3 7 2 1
7
0 0 0 0 0 0 4 5 4 3 7 2 1
7
0 0 0 0 0 0 0 5 4 3 7 2 1
7
1 0 6 2 7 3 4 5 4 3 7 2 1
7
1 0 0 2 7 3 ...

output:

1 2 6 2 7 3 4 3 5 3 7 2 1
1 2 6 2 7 3 4 3 5 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 5 4 3 7 2 1
1 2 6 2 7 3 4 ...

result:

ok 23077 lines

Test #26:

score: 0
Accepted
time: 114ms
memory: 14940kb

input:

23077
7
1 2 6 5 6 3 6 4 7 0 0 2 1
7
1 2 6 5 6 3 6 4 7 0 0 0 1
7
1 2 6 5 6 3 6 4 7 0 0 0 0
7
1 2 6 5 6 3 6 4 7 4 0 2 1
7
1 2 6 5 6 3 6 4 7 4 0 0 1
7
1 2 6 5 6 3 6 4 7 4 0 0 0
7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2 1 6 1 3 1 5 1 4 1
1 2 7 2 1 6 1 3 1 5 1 4 1
1 2 7 2 1 6 1 ...

result:

ok 23077 lines

Test #28:

score: 0
Accepted
time: 129ms
memory: 14336kb

input:

23077
7
0 2 7 3 7 2 5 4 5 6 5 2 1
7
0 0 7 3 7 2 5 4 5 6 5 2 1
7
0 0 0 3 7 2 5 4 5 6 5 2 1
7
1 0 7 3 7 2 5 4 5 6 5 2 1
7
1 0 0 3 7 2 5 4 5 6 5 2 1
7
1 2 0 3 7 2 5 4 5 6 5 2 1
7
1 2 7 0 7 2 5 4 5 6 5 2 1
7
1 2 7 3 0 2 5 4 5 6 5 2 1
7
1 2 7 3 0 0 5 4 5 6 5 2 1
7
1 2 7 3 0 0 0 4 5 6 5 2 1
7
1 2 7 3 7 0 ...

output:

1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 4 5 6 5 2 1
1 2 7 3 7 2 5 ...

result:

ok 23077 lines

Test #29:

score: 0
Accepted
time: 87ms
memory: 15936kb

input:

11941
7
1 2 7 5 4 3 4 5 0 0 0 0 0
7
1 2 7 5 4 3 4 5 7 0 1 6 1
7
1 2 7 5 4 3 4 5 7 0 0 6 1
7
1 2 7 5 4 3 4 5 7 0 0 0 1
7
1 2 7 5 4 3 4 5 7 0 0 0 0
7
1 2 7 5 4 3 4 5 7 2 0 6 1
7
1 2 7 5 4 3 4 5 7 2 0 0 1
7
1 2 7 5 4 3 4 5 7 2 0 0 0
7
1 2 7 5 4 3 4 5 7 2 1 0 1
7
1 2 7 5 4 3 4 5 7 2 1 0 0
7
1 2 7 5 4 3 ...

output:

1 2 7 5 4 3 4 5 6 5 7 2 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 5 7 2 1 6 1
1 2 7 5 4 3 4 ...

result:

ok 11941 lines

Test #30:

score: 0
Accepted
time: 52ms
memory: 15204kb

input:

2805
40
1 2 1 17 1 7 1 19 1 36 25 36 3 21 3 29 3 23 3 31 15 31 37 39 37 16 37 6 37 31 3 36 8 36 1 14 38 14 20 14 9 14 34 14 1 40 1 24 33 32 33 5 33 22 33 28 33 24 30 24 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4 27 1
62
1 21 25 29 25 21 50 34 45 49 45 34 27 38 27 62 27 34 50 51 41 51 60 10 16 7 16 10 28 10 ...

output:

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

result:

ok 2805 lines

Test #31:

score: 0
Accepted
time: 61ms
memory: 16068kb

input:

2813
85
1 17 1 85 84 14 84 72 84 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 26 65 76 82 32 82 44 56 44 11 44 82 24 82 76 74 1 43 71 67 29 6 77 6 29 36 29 67 31 67 27 19 27 7 3 7 4...

output:

1 17 1 85 84 14 84 72 84 85 1 2 1 4 1 9 1 12 1 13 1 15 1 16 1 18 1 20 1 21 1 22 1 23 1 28 1 30 1 33 1 34 1 38 1 39 1 41 1 42 1 45 1 46 1 49 1 51 1 52 1 54 1 57 1 60 1 61 1 63 1 66 1 68 1 69 1 73 1 74 76 65 26 10 78 10 79 10 80 10 26 65 76 82 32 82 44 56 44 11 44 82 24 82 76 74 1 43 71 67 29 6 77 6 2...

result:

ok 2813 lines

Test #32:

score: 0
Accepted
time: 74ms
memory: 16088kb

input:

2846
97
1 12 20 12 38 12 1 8 59 47 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:

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

result:

ok 2846 lines

Test #33:

score: 0
Accepted
time: 72ms
memory: 15016kb

input:

2812
47
1 27 9 33 24 46 28 35 6 20 2 16 3 32 29 21 34 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 12 17 25 36 38 23 45 15 30 41 26 4 47 44 14 3 16 2 20 6 35 28 46 24 33 9 27 1
86
1 60 69 29 86 22 71 26 65 52 46 27 51 16 75 61 5 10 81 77 24 34 63 0...

output:

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

result:

ok 2812 lines

Test #34:

score: 0
Accepted
time: 62ms
memory: 15604kb

input:

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

output:

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

result:

ok 2853 lines

Test #35:

score: 0
Accepted
time: 46ms
memory: 15492kb

input:

2818
38
1 30 17 2 28 15 27 35 5 32 24 26 3 12 22 4 18 7 21 8 37 34 33 25 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 23 36 11 19 31 9 27 15 28 2 17 30 1
53
1 31 8 23 41 46 29 24 36 15 48 12 25 34 28 47 0 0 0 0 0 0 0 0 0 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:

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

result:

ok 2818 lines

Test #36:

score: 0
Accepted
time: 90ms
memory: 19136kb

input:

1507
43
1 29 24 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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
70
1 64 12 46 31 14 24 43 7 51 27 23 22 42 67 69 53 68 56 44 8 54 30 13 45 34 29 28 2 38 66 39 17 35 5 40 65 33 63 49 52...

output:

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

result:

ok 1507 lines

Test #37:

score: 0
Accepted
time: 83ms
memory: 19536kb

input:

2
60000
1 38990 31835 24650 31835 38990 27077 38990 53018 44774 53018 38990 27653 31899 29043 28272 29043 52124 29043 31899 44900 31899 10295 57102 44638 37209 39249 37209 1614 21680 1614 37209 44638 57986 51871 57986 41778 57986 44638 42094 44638 19175 49095 36798 34736 15883 34736 36798 49095 1917...

output:

1 38990 31835 24650 31835 38990 27077 38990 53018 44774 53018 38990 27653 31899 29043 28272 29043 52124 29043 31899 44900 31899 10295 57102 44638 37209 39249 37209 1614 21680 1614 37209 44638 57986 51871 57986 41778 57986 44638 42094 44638 19175 49095 36798 34736 15883 34736 36798 49095 19175 1368 1...

result:

ok 2 lines

Test #38:

score: 0
Accepted
time: 73ms
memory: 18780kb

input:

2
60001
1 25936 1 59262 23200 59683 14618 9485 6034 52890 6034 33413 49906 32050 49906 33413 6034 9485 33137 9485 26158 9485 17847 992 36864 992 3796 992 38649 17344 38649 992 17847 33213 17847 32799 2178 51324 2178 32799 17847 9485 29978 54605 29978 4723 29978 9485 14618 15268 14618 55477 14618 384...

output:

1 25936 1 59262 23200 59683 14618 9485 6034 52890 6034 33413 49906 32050 49906 33413 6034 9485 33137 9485 26158 9485 17847 992 36864 992 3796 992 38649 17344 38649 992 17847 33213 17847 32799 2178 51324 2178 32799 17847 9485 29978 54605 29978 4723 29978 9485 14618 15268 14618 55477 14618 38416 47898...

result:

ok 2 lines

Test #39:

score: 0
Accepted
time: 89ms
memory: 19552kb

input:

4
60001
1 58398 8763 26373 25026 26373 8763 21610 42614 53373 42614 34857 26394 5306 26394 34857 42614 21610 5167 21610 9728 46428 9728 50693 3672 50693 42938 50693 9728 11329 951 54443 951 19779 32939 19779 39137 7400 39137 56477 38236 56477 40583 56477 59614 56477 5894 56477 52938 35489 52938 5647...

output:

1 58398 8763 26373 25026 26373 8763 21610 42614 53373 42614 34857 26394 5306 26394 34857 42614 21610 5167 21610 9728 46428 9728 50693 3672 50693 42938 50693 9728 11329 951 54443 951 19779 32939 19779 39137 7400 39137 56477 38236 56477 40583 56477 59614 56477 5894 56477 52938 35489 52938 56477 39137 ...

result:

ok 4 lines

Test #40:

score: 0
Accepted
time: 82ms
memory: 18408kb

input:

5
30001
1 6837 29673 29555 7305 14902 9631 14902 7305 29555 29673 1276 29673 6837 20728 1985 14191 13092 14191 4499 14191 1985 20728 4145 20728 6837 7310 6837 1 15447 13104 15447 1 26935 4014 26935 5939 12852 2170 6826 2170 12852 910 12852 5939 199 29372 903 29372 199 5939 6495 12651 2834 12651 6495...

output:

1 6837 29673 29555 7305 14902 9631 14902 7305 29555 29673 1276 29673 6837 20728 1985 14191 13092 14191 4499 14191 1985 20728 4145 20728 6837 7310 6837 1 15447 13104 15447 1 26935 4014 26935 5939 12852 2170 6826 2170 12852 910 12852 5939 199 29372 903 29372 199 5939 6495 12651 2834 12651 6495 12637 3...

result:

ok 5 lines

Test #41:

score: 0
Accepted
time: 81ms
memory: 16856kb

input:

6
30001
1 1236 1058 16708 16367 25882 18222 25882 16367 21515 10787 21515 10341 21515 18687 21515 16367 16708 4514 11111 4514 16708 20859 14640 1976 14640 20859 16708 1058 24391 1058 1236 23617 13307 23468 13307 16567 13307 23617 2259 20767 416 1538 3887 1538 416 20767 19157 1455 19157 20767 7272 20...

output:

1 1236 1058 16708 16367 25882 18222 25882 16367 21515 10787 21515 10341 21515 18687 21515 16367 16708 4514 11111 4514 16708 20859 14640 1976 14640 20859 16708 1058 24391 1058 1236 23617 13307 23468 13307 16567 13307 23617 2259 20767 416 1538 3887 1538 416 20767 19157 1455 19157 20767 7272 20767 2259...

result:

ok 6 lines

Test #42:

score: 0
Accepted
time: 73ms
memory: 16080kb

input:

7
20001
1 19450 16570 673 1697 10976 1697 15457 969 10785 3162 8063 3162 10785 969 7112 969 15457 1697 673 16570 19203 3262 17973 3262 4128 3262 4759 3262 17503 7255 17280 7255 17503 7113 17503 3262 19674 10691 6623 7131 12599 2260 2060 12440 2060 5722 2060 11078 2060 2260 12599 7131 6623 10691 1967...

output:

1 19450 16570 673 1697 10976 1697 15457 969 10785 3162 8063 3162 10785 969 7112 969 15457 1697 673 16570 19203 3262 17973 3262 4128 3262 4759 3262 17503 7255 17280 7255 17503 7113 17503 3262 19674 10691 6623 7131 12599 2260 2060 12440 2060 5722 2060 11078 2060 2260 12599 7131 6623 10691 19674 6385 2...

result:

ok 7 lines

Test #43:

score: 0
Accepted
time: 75ms
memory: 16316kb

input:

9
20001
1 6496 7147 10728 6357 1495 7741 6512 7741 1495 6357 10728 8794 14430 8794 8510 8794 10728 7147 160 7147 18057 12851 18057 7147 6496 5391 11936 2500 3317 488 6981 16607 6981 488 3317 9021 3317 2500 13440 15229 8466 4489 14436 4489 8466 15229 13440 2500 18972 3401 8543 3401 18972 2500 11936 2...

output:

1 6496 7147 10728 6357 1495 7741 6512 7741 1495 6357 10728 8794 14430 8794 8510 8794 10728 7147 160 7147 18057 12851 18057 7147 6496 5391 11936 2500 3317 488 6981 16607 6981 488 3317 9021 3317 2500 13440 15229 8466 4489 14436 4489 8466 15229 13440 2500 18972 3401 8543 3401 18972 2500 11936 2248 1460...

result:

ok 9 lines

Test #44:

score: 0
Accepted
time: 68ms
memory: 15800kb

input:

10
15001
1 12647 2703 1643 2703 12647 1 6901 5839 14029 5839 2639 10845 2639 2742 2639 5839 7071 10352 13991 10352 7071 4905 5786 4905 7071 8718 7126 8718 10457 8718 7071 2567 7263 2567 10505 13229 10505 14277 4855 14277 6836 4140 13913 4140 6836 4093 6836 14277 10505 2567 9863 2567 7071 5839 2689 1...

output:

1 12647 2703 1643 2703 12647 1 6901 5839 14029 5839 2639 10845 2639 2742 2639 5839 7071 10352 13991 10352 7071 4905 5786 4905 7071 8718 7126 8718 10457 8718 7071 2567 7263 2567 10505 13229 10505 14277 4855 14277 6836 4140 13913 4140 6836 4093 6836 14277 10505 2567 9863 2567 7071 5839 2689 12425 2689...

result:

ok 10 lines

Test #45:

score: 0
Accepted
time: 66ms
memory: 15712kb

input:

11
15001
1 2516 14902 88 14902 2516 3762 1680 3762 2516 1 3468 12730 4558 3153 1846 3850 1846 5533 2753 5533 1846 3153 4558 12730 11200 12730 3468 5454 9877 9584 786 9584 9877 6123 2733 6123 9877 5454 6060 1904 6060 5454 7324 12221 7324 14079 7324 5454 3468 11361 14557 11361 3468 14172 3273 12723 32...

output:

1 2516 14902 88 14902 2516 3762 1680 3762 2516 1 3468 12730 4558 3153 1846 3850 1846 5533 2753 5533 1846 3153 4558 12730 11200 12730 3468 5454 9877 9584 786 9584 9877 6123 2733 6123 9877 5454 6060 1904 6060 5454 7324 12221 7324 14079 7324 5454 3468 11361 14557 11361 3468 14172 3273 12723 3273 11356 ...

result:

ok 11 lines

Test #46:

score: 0
Accepted
time: 67ms
memory: 15636kb

input:

12
12001
1 6246 8304 6246 4086 6535 10007 6535 4086 6246 1 8798 4488 8798 8389 1173 6199 1173 8389 8798 4101 11867 4101 8554 4101 4624 6494 7348 6494 4624 4101 6525 7094 2605 2972 1367 2972 5748 11421 5748 2972 2705 10579 2705 620 2705 2972 2605 4622 2605 7094 6525 6582 6525 9061 11236 7045 11236 55...

output:

1 6246 8304 6246 4086 6535 10007 6535 4086 6246 1 8798 4488 8798 8389 1173 6199 1173 8389 8798 4101 11867 4101 8554 4101 4624 6494 7348 6494 4624 4101 6525 7094 2605 2972 1367 2972 5748 11421 5748 2972 2705 10579 2705 620 2705 2972 2605 4622 2605 7094 6525 6582 6525 9061 11236 7045 11236 5525 11236 ...

result:

ok 12 lines

Test #47:

score: 0
Accepted
time: 41ms
memory: 16104kb

input:

7
12001
1 674 4851 1524 8809 1524 2686 1524 4851 6496 2848 6949 7382 6949 2848 1650 2848 11873 8951 7997 8951 11873 10748 11873 2848 6496 10629 6496 4851 674 7949 3968 6382 5576 6382 1020 3922 1020 6538 1020 6382 3968 5121 6858 5121 3777 5121 3968 7949 1999 5154 5646 5154 1999 7949 4227 8356 4227 80...

output:

1 674 4851 1524 8809 1524 2686 1524 4851 6496 2848 6949 7382 6949 2848 1650 2848 11873 8951 7997 8951 11873 10748 11873 2848 6496 10629 6496 4851 674 7949 3968 6382 5576 6382 1020 3922 1020 6538 1020 6382 3968 5121 6858 5121 3777 5121 3968 7949 1999 5154 5646 5154 1999 7949 4227 8356 4227 8096 9849 ...

result:

ok 7 lines

Test #48:

score: 0
Accepted
time: 142ms
memory: 31828kb

input:

1
300000
1 219291 136908 12972 259346 182232 141184 37796 92821 23695 7295 14724 162011 101696 30677 97223 15322 265386 222 7200 226460 76583 272681 163593 126597 255851 237329 176400 74517 259507 169133 73244 203550 253579 253480 79247 168106 216570 238081 212303 197915 160794 236536 177796 25823 1...

output:

1 219291 136908 12972 259346 182232 141184 37796 92821 23695 7295 14724 162011 101696 30677 97223 15322 265386 222 7200 226460 76583 272681 163593 126597 255851 237329 176400 74517 259507 169133 73244 203550 253579 253480 79247 168106 216570 238081 212303 197915 160794 236536 177796 25823 121443 265...

result:

ok single line: '1 219291 136908 12972 259346 1...32 259346 12972 136908 219291 1'

Test #49:

score: 0
Accepted
time: 120ms
memory: 28276kb

input:

1
300000
1 33042 92353 227385 156324 255539 112803 69413 273528 51499 89951 214396 265497 35018 10456 257201 189557 104551 252383 28995 123621 200310 58680 259929 173630 260096 261407 284043 115000 290924 232938 174371 159314 259649 173011 231839 188475 229034 160671 112538 222079 245266 53706 11276...

output:

1 33042 92353 227385 156324 255539 112803 69413 273528 51499 89951 214396 265497 35018 10456 257201 189557 104551 252383 28995 123621 200310 58680 259929 173630 260096 261407 284043 115000 290924 232938 174371 159314 259649 173011 231839 188475 229034 160671 112538 222079 245266 53706 112767 60593 1...

result:

ok single line: '1 33042 92353 227385 156324 25...539 156324 227385 92353 33042 1'

Test #50:

score: 0
Accepted
time: 90ms
memory: 25764kb

input:

1
300000
1 109254 275748 53743 68380 155503 265494 144413 32118 250499 124834 11124 159817 59440 136520 28422 169379 237939 7109 69381 36758 77664 86739 130967 94686 231996 109191 31674 261775 192182 293485 279139 51504 67706 69928 111353 281453 206425 238039 23978 208615 116147 242533 270053 112298...

output:

1 109254 275748 53743 68380 155503 265494 144413 32118 250499 124834 11124 159817 59440 136520 28422 169379 237939 7109 69381 36758 77664 86739 130967 94686 231996 109191 31674 261775 192182 293485 279139 51504 67706 69928 111353 281453 206425 238039 23978 208615 116147 242533 270053 112298 13977 11...

result:

ok single line: '1 109254 275748 53743 68380 15...503 68380 53743 275748 109254 1'

Test #51:

score: 0
Accepted
time: 271ms
memory: 46812kb

input:

1
300000
1 151447 262159 124253 59795 108218 93686 215119 195466 285373 66471 187456 176028 3785 112544 116919 140249 130238 248266 283633 173164 84366 95637 122227 29467 194029 191380 66007 223435 37703 137116 163106 160935 274006 122806 114697 42558 156366 191707 115115 206274 60034 162125 122474 ...

output:

1 151447 262159 124253 59795 108218 93686 215119 195466 285373 66471 187456 176028 3785 112544 116919 140249 130238 248266 283633 173164 84366 95637 122227 29467 194029 191380 66007 223435 37703 137116 163106 160935 274006 122806 114697 42558 156366 191707 115115 206274 60034 162125 122474 63275 207...

result:

ok single line: '1 151447 262159 124253 59795 1...18 59795 124253 262159 151447 1'

Test #52:

score: 0
Accepted
time: 169ms
memory: 38408kb

input:

1
300000
1 248483 157159 266064 127060 243309 210931 131380 81144 58845 14641 15763 242314 32863 278935 57154 245870 268150 122556 289536 296100 292040 249387 140500 199848 279670 274500 75294 15708 222709 22700 142606 123222 94518 68327 199516 117833 104186 229332 12831 204117 78356 149500 2133 149...

output:

1 248483 157159 266064 127060 243309 210931 131380 81144 58845 14641 15763 242314 32863 278935 57154 245870 268150 122556 289536 296100 292040 249387 140500 199848 279670 274500 75294 15708 222709 22700 142606 123222 94518 68327 199516 117833 104186 229332 12831 204117 78356 149500 2133 149059 29939...

result:

ok single line: '1 248483 157159 266064 127060 ...9 127060 266064 157159 248483 1'

Test #53:

score: 0
Accepted
time: 75ms
memory: 22536kb

input:

1
300000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:

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

result:

ok single line: '1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 ...97 1 299998 1 299999 1 300000 1'

Test #54:

score: 0
Accepted
time: 187ms
memory: 51820kb

input:

1
300000
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...

output:

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 101 102 ...

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 13 ...1 10 9 8 7 6 5 4 3 2 1 300000 1'

Test #55:

score: 0
Accepted
time: 192ms
memory: 51948kb

input:

1
300000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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:

1 300000 299999 299998 299997 299996 299995 299994 299993 299992 299991 299990 299989 299988 299987 299986 299985 299984 299983 299982 299981 299980 299979 299978 299977 299976 299975 299974 299973 299972 299971 299970 299969 299968 299967 299966 299965 299964 299963 299962 299961 299960 299959 2999...

result:

ok single line: '1 300000 299999 299998 299997 ...6 299997 299998 299999 300000 1'

Test #56:

score: 0
Accepted
time: 109ms
memory: 37980kb

input:

1
300000
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...

output:

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 101 102 ...

result:

ok single line: '1 2 3 4 5 6 7 8 9 10 11 12 13 ...97 1 299998 1 299999 1 300000 1'

Test #57:

score: 0
Accepted
time: 127ms
memory: 37572kb

input:

1
300000
1 299999 299997 299995 299993 299991 299989 299987 299985 299983 299981 299979 299977 299975 299973 299971 299969 299967 299965 299963 299961 299959 299957 299955 299953 299951 299949 299947 299945 299943 299941 299939 299937 299935 299933 299931 299929 299927 299925 299923 299921 299919 29...

output:

1 299999 299997 299995 299993 299991 299989 299987 299985 299983 299981 299979 299977 299975 299973 299971 299969 299967 299965 299963 299961 299959 299957 299955 299953 299951 299949 299947 299945 299943 299941 299939 299937 299935 299933 299931 299929 299927 299925 299923 299921 299919 299917 2999...

result:

ok single line: '1 299999 299997 299995 299993 ...299998 299997 299999 1 300000 1'

Test #58:

score: 0
Accepted
time: 125ms
memory: 33140kb

input:

1
300000
1 299983 299980 299977 299974 299971 299968 299965 299962 299959 299956 299953 299950 299947 299944 299941 299938 299935 299932 299929 299926 299923 299920 299917 299914 299911 299908 299905 299902 299899 299896 299893 299890 299887 299884 299881 299878 299875 299872 299869 299866 299863 29...

output:

1 299983 299980 299977 299974 299971 299968 299965 299962 299959 299956 299953 299950 299947 299944 299941 299938 299935 299932 299929 299926 299923 299920 299917 299914 299911 299908 299905 299902 299899 299896 299893 299890 299887 299884 299881 299878 299875 299872 299869 299866 299863 299860 2998...

result:

ok single line: '1 299983 299980 299977 299974 ...97 1 299998 1 299999 1 300000 1'

Test #59:

score: 0
Accepted
time: 87ms
memory: 23460kb

input:

1
300000
1 299601 299501 299401 299301 299201 299101 299001 298901 298801 298701 298601 298501 298401 298301 298201 298101 298001 297901 297801 297701 297601 297501 297401 297301 297201 297101 297001 296901 296801 296701 296601 296501 296401 296301 296201 296101 296001 295901 295801 295701 295601 29...

output:

1 299601 299501 299401 299301 299201 299101 299001 298901 298801 298701 298601 298501 298401 298301 298201 298101 298001 297901 297801 297701 297601 297501 297401 297301 297201 297101 297001 296901 296801 296701 296601 296501 296401 296301 296201 296101 296001 295901 295801 295701 295601 295501 2954...

result:

ok single line: '1 299601 299501 299401 299301 ...97 1 299998 1 299999 1 300000 1'

Test #60:

score: 0
Accepted
time: 85ms
memory: 24888kb

input:

1
300000
1 299959 299990 299998 299972 299964 299975 299845 299870 299962 299926 299942 299838 299927 299958 299869 299846 299825 299860 299851 299834 299798 299803 299773 299802 299754 299750 299819 299752 299764 299783 299744 299756 299691 299736 299767 299706 299675 299716 299670 299720 299751 29...

output:

1 299959 299990 299998 299972 299964 299975 299845 299870 299962 299926 299942 299838 299927 299958 299869 299846 299825 299860 299851 299834 299798 299803 299773 299802 299754 299750 299819 299752 299764 299783 299744 299756 299691 299736 299767 299706 299675 299716 299670 299720 299751 299655 2996...

result:

ok single line: '1 299959 299990 299998 299972 ...9990 299959 1 299999 1 300000 1'

Test #61:

score: 0
Accepted
time: 98ms
memory: 25168kb

input:

1
300000
1 299985 299962 299936 299924 299990 299968 299911 299918 299974 299928 299951 299864 299853 299882 299901 299861 299873 299769 299839 299877 299910 299799 299760 299842 299770 299774 299761 299850 299681 299788 299667 299725 299746 299686 299622 299588 299655 299654 299540 299575 299506 29...

output:

1 299985 299962 299936 299924 299990 299968 299911 299918 299974 299928 299951 299864 299853 299882 299901 299861 299873 299769 299839 299877 299910 299799 299760 299842 299770 299774 299761 299850 299681 299788 299667 299725 299746 299686 299622 299588 299655 299654 299540 299575 299506 299561 2995...

result:

ok single line: '1 299985 299962 299936 299924 ...97 1 299998 1 299999 1 300000 1'