QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#76830#5508. Job for a HobbitnjwrzML 2ms3412kbC++232.3kb2023-02-12 12:21:542023-02-12 12:21:58

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

TAK
48
1 0
1 0
2 1
2 1
1 2
2 3
1 2
2 1
0 1
1 2
2 3
0 1
1 2
1 0
2 1
1 0
3 2
2 1
3 2
2 1
1 2
2 3
1 2
2 1
0 1
1 2
2 3
1 0
3 2
2 1
3 2
2 1
1 2
1 2
2 3
2 1
3 2
2 1
1 2
2 1
1 2
2 3
1 2
2 3
0 1
1 2
0 1
1 2
NIE

result:

ok Correct! Used 48 swaps

Test #2:

score: -100
Memory Limit Exceeded

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:


result: