QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#504443#1646. Disk SortHuangHanShengWA 0ms3720kbC++173.7kb2024-08-04 13:04:332024-08-04 13:04:33

詳細信息

Test #1:

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

input:

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

output:

8
3 5
3 5
2 3
2 5
2 3
5 2
5 2
5 2

result:

ok n=4

Test #2:

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

input:

2
1 2
1 2
1 2

output:

0

result:

ok n=2

Test #3:

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

input:

3
2 2 1
1 3 3
1 2 3

output:

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

result:

ok n=3

Test #4:

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

input:

3
2 1 3
2 1 1
2 3 3

output:

8
2 4
2 4
3 2
3 4
3 2
4 3
4 3
4 3

result:

ok n=3

Test #5:

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

input:

3
1 3 2
2 3 3
2 1 1

output:

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

result:

ok n=3

Test #6:

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

input:

3
3 1 1
2 3 2
3 1 2

output:

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

result:

ok n=3

Test #7:

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

input:

3
3 2 1
2 3 2
1 1 3

output:

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

result:

ok n=3

Test #8:

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

input:

3
1 2 3
2 1 2
1 3 3

output:

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

result:

ok n=3

Test #9:

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

input:

3
1 3 1
3 2 2
2 3 1

output:

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

result:

ok n=3

Test #10:

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

input:

3
2 3 1
3 1 3
2 2 1

output:

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

result:

ok n=3

Test #11:

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

input:

3
1 3 2
3 1 3
1 2 2

output:

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

result:

ok n=3

Test #12:

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

input:

3
1 2 3
3 1 1
2 3 2

output:

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

result:

ok n=3

Test #13:

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

input:

3
3 1 2
1 3 1
3 2 2

output:

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

result:

ok n=3

Test #14:

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

input:

3
1 2 3
3 3 1
1 2 2

output:

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

result:

ok n=3

Test #15:

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

input:

3
3 1 2
2 2 3
3 1 1

output:

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

result:

ok n=3

Test #16:

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

input:

3
1 3 2
2 2 3
1 3 1

output:

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

result:

ok n=3

Test #17:

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

input:

3
1 3 2
3 2 3
1 1 2

output:

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

result:

ok n=3

Test #18:

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

input:

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

output:

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

result:

ok n=4

Test #19:

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

input:

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

output:

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

result:

ok n=4

Test #20:

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

input:

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

output:

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

result:

ok n=4

Test #21:

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

input:

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

output:

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

result:

ok n=4

Test #22:

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

input:

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

output:

13
1 5
1 5
4 1
4 5
4 1
1 4
1 4
3 1
3 1
3 4
5 3
5 3
5 3

result:

ok n=4

Test #23:

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

input:

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

output:

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

result:

ok n=4

Test #24:

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

input:

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

output:

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

result:

ok n=4

Test #25:

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

input:

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

output:

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

result:

ok n=4

Test #26:

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

input:

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

output:

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

result:

ok n=4

Test #27:

score: -100
Wrong Answer
time: 0ms
memory: 3700kb

input:

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

output:

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

result:

wrong answer Invalid number of operations