QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#76758#5508. Job for a HobbitqiuzxML 36ms10080kbC++114.6kb2023-02-12 10:02:592023-02-12 10:03:02

詳細信息

Test #1:

score: 100
Accepted
time: 2ms
memory: 3524kb

input:

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

output:

TAK
26
2 3
1 2
2 3
1 2
2 1
2 1
1 0
0 1
1 2
1 0
2 1
1 0
3 2
2 1
3 2
1 2
2 3
2 1
0 1
1 2
2 3
1 0
3 2
3 2
2 1
2 1
NIE

result:

ok Correct! Used 26 swaps

Test #2:

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

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
146
2 3
1 2
2 3
1 2
2 3
1 2
2 3
1 2
2 3
1 2
2 3
1 2
2 3
1 2
2 3
1 2
2 1
2 1
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
0 1
1 2
0 1
1 2
0 1
1 2
0 1
1 2
0 1
1 2
1 0
1 0
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
2 1
1 0
3 2
2 1
3 2
2 1
3 2
3 2
2 1
3 2
3 2
2 1
3 2
3 2
2 1
1 2
2 3
1 2
2 3
1 2
2 3
...

result:

ok Correct! Used 1268 swaps

Test #3:

score: 0
Accepted
time: 36ms
memory: 10080kb

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:

TAK
835814
50 51
49 50
50 51
48 49
49 50
50 51
47 48
48 49
49 50
50 51
46 47
47 48
48 49
49 50
50 51
45 46
46 47
47 48
48 49
49 50
50 51
44 45
45 46
46 47
47 48
48 49
49 50
50 51
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
42 43
43 44
44 45
45 46
46 47
47 48
48 49
49 50
50 51
41 42
42 43
43 44
4...

result:

ok Correct! Used 835814 swaps

Test #4:

score: -100
Memory Limit Exceeded

input:

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

output:


result: