QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#251426#5508. Job for a Hobbitucup-team254RE 1ms3824kbC++205.6kb2023-11-14 18:53:122023-11-14 18:53:13

详细

Test #1:

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

input:

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

output:

TAK
36
1 0
1 0
2 1
2 1
1 2
2 3
1 2
0 1
1 2
0 1
2 1
1 0
2 1
1 0
3 2
2 1
1 2
2 3
1 2
3 2
2 3
2 3
0 1
1 2
0 1
2 1
1 2
1 2
2 1
1 0
2 1
1 0
3 2
2 1
3 2
2 1
NIE

result:

ok Correct! Used 36 swaps

Test #2:

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

input:

25
2 7
4 1 2 2 3 2 4
4 4 6 4 2 2 5
2 5
6 5 5 3 3
1 6 5 2 5
2 8
1 4 2 1 4 1 2 1
1 3 4 4 2 2 1 2
2 4
1 1 5 2
1 5 2 2
2 10
3 5 4 5 5 2 1 3 5 2
5 2 2 1 5 1 3 3 4 2
2 8
2 4 3 3 4 2 1 2
5 1 4 1 2 6 3 4
2 9
4 3 4 3 4 2 4 1 2
2 4 4 2 2 3 3 3 4
2 4
4 1 3 1
4 2 4 3
2 4
5 1 2 2
2 4 3 2
2 7
1 2 4 5 2 5 2
4 5 5 ...

output:

NIE
NIE
TAK
197
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
2 1
2 1
2 1
2 1
2 1
2 1
2 1
2 1
1 2
1 2
2 3
1 2
2 3
1 2
2 3
1 2
2 3
1 2
2 3
1 2
1 2
2 3
0 1
1 2
0 1
1 2
2 3
0 1
1 2
0 1
1 2
0 1
1 2
2 3
0 1
1 2
0 1
1 2
0 1
1 2
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
3 2
3 2
3 2
3 2
3 2
3 2
3 2
...

result:

ok Correct! Used 1605 swaps

Test #3:

score: -100
Runtime Error

input:

1
50 10
2 2 2 2 2 1 2 1 1 2
2 1 2 1 1 2 2 2 2 2
2 1 1 2 2 2 2 1 1 1
2 2 1 2 2 2 1 1 1 2
2 1 1 2 1 2 2 1 2 1
2 1 2 1 1 1 2 1 2 2
1 2 1 1 2 2 1 1 2 1
2 2 1 1 2 2 2 1 1 2
1 2 2 2 2 1 1 2 1 1
2 2 2 1 2 1 1 2 1 1
2 2 1 2 2 1 1 1 1 1
1 2 2 1 2 2 2 1 1 1
2 2 2 1 2 2 1 1 2 2
1 2 1 2 1 1 1 1 2 2
1 2 1 1 2 2 ...

output:


result: