QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#820269#1845. PermuteqiuzxRE 355ms28888kbC++204.9kb2024-12-18 20:31:582024-12-18 20:32:05

详细

Test #1:

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

input:

3
0 1 0 0 1 0 0 0 0 0
0 2 0 0 0 0 1 0 0 1
0 1000000000 0 0 0 0 0 0 0 0

output:

2
1 1
1 4
4
1 1
1 1
1 6
1 9
-1

result:

ok T=3

Test #2:

score: 0
Accepted
time: 126ms
memory: 3984kb

input:

100000
0 0 0 1 0 1 1 1 0 1
1 1 0 0 1 0 1 0 1 0
1 1 1 1 0 0 0 1 0 1
0 1 1 0 0 1 1 1 1 0
0 0 1 0 1 0 1 0 1 0
0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 1 1
1 0 1 1 1 0 1 0 0 0
0 1 1 0 0 1 0 1 0 1
1 0 0 1 1 0 0 1 0 0
1 1 0 1 0 0 1 0 1 1
0 0 1 0 0 0 0 1 0 0
0 1 1 1 1 1 1 1 0 1
1 0 0 0 0 1 0 0 0 1
0 0 0 0 1 0 1...

output:

5
1 7
1 9
1 6
1 5
1 3
5
1 0
1 4
1 8
1 1
1 6
6
1 7
1 0
1 1
1 9
1 3
1 2
6
1 7
1 8
1 1
1 2
1 5
1 6
4
1 8
1 2
1 4
1 6
-1
4
1 0
1 8
1 1
1 9
5
1 0
1 2
1 4
1 3
1 6
5
1 7
1 1
1 9
1 2
1 5
-1
6
1 0
1 8
1 1
1 9
1 6
1 3
-1
8
1 7
1 1
1 9
1 2
1 4
1 3
1 5
1 6
-1
4
1 8
1 9
1 4
1 6
7
1 7
1 0
1 9
1 2
1 5
1 6
1 8
6
1 ...

result:

ok T=100000

Test #3:

score: 0
Accepted
time: 250ms
memory: 6216kb

input:

100000
2 1 2 1 0 1 1 0 2 0
1 2 0 1 1 2 1 1 2 1
2 2 2 1 0 2 1 1 2 2
1 1 0 2 0 2 0 1 2 0
1 0 2 2 1 2 1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
1 3
12
2 0
2 8
2 2
1 3
3 4
3 5
1 6
1 8
1 3
1 3
1 1
1 1
10
2 8
1 9
2 3
3 5
2 6
1 9
1 1
1 9
1 1
1 1
13
1 7
1 8
1 9
1 2
1 3
...

result:

ok T=100000

Test #5:

score: 0
Accepted
time: 292ms
memory: 24844kb

input:

100000
0 1 3 1 1 0 1 3 0 1
4 3 4 1 3 4 3 4 2 3
1 3 1 3 3 4 3 4 2 2
1 0 1 0 3 3 3 1 1 1
3 4 1 3 1 0 1 2 1 2
0 1 2 1 4 1 0 3 4 2
0 4 1 2 4 3 2 1 1 3
0 4 0 4 2 1 0 2 1 3
4 4 0 4 4 1 4 1 4 1
1 3 2 1 1 4 2 3 4 1
3 3 4 3 3 4 1 2 1 4
3 1 4 0 3 0 4 3 1 4
3 0 3 2 3 4 2 3 1 3
3 1 2 4 3 4 2 4 1 1
2 1 0 2 2 3 2...

output:

11
1 7
1 1
1 9
1 3
1 4
1 6
1 2
1 2
1 2
1 7
1 7
15
4 7
1 0
2 8
3 1
3 9
2 2
1 3
3 4
4 5
3 6
1 0
1 0
1 0
1 2
1 2
14
2 7
2 8
1 1
2 9
1 2
3 3
3 4
4 5
3 6
1 7
1 7
1 1
1 0
1 1
12
1 7
1 0
1 8
1 9
1 2
1 5
3 6
1 4
1 5
1 5
1 4
1 4
13
2 7
1 8
2 1
2 9
1 2
3 3
1 4
1 6
1 0
1 1
1 0
1 0
1 1
11
3 7
2 8
2 9
1 3
4 4
1 ...

result:

ok T=100000

Test #6:

score: 0
Accepted
time: 314ms
memory: 27804kb

input:

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

result:

ok T=100000

Test #8:

score: 0
Accepted
time: 331ms
memory: 28888kb

input:

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

output:

12
1 7
1 8
1 1
4 9
4 3
5 4
5 6
1 2
1 3
1 2
1 3
1 2
15
3 7
2 0
7 8
1 1
7 9
4 2
4 3
3 4
2 5
2 6
1 1
1 2
1 2
1 2
1 1
13
7 7
3 0
4 1
1 9
5 2
6 3
5 4
1 6
1 0
1 4
1 0
1 0
1 4
13
4 7
4 1
2 9
1 2
2 3
5 4
2 5
5 6
1 7
1 1
1 7
1 1
1 0
12
4 0
4 8
1 9
4 3
4 4
5 5
4 6
1 0
1 1
1 0
1 1
1 1
14
5 7
4 0
3 8
4 1
7 9
4 ...

result:

ok T=100000

Test #9:

score: 0
Accepted
time: 322ms
memory: 28828kb

input:

100000
7 3 4 5 2 6 6 3 6 0
8 3 8 6 5 1 8 2 7 7
5 1 8 4 7 0 1 1 1 0
1 1 8 7 8 0 6 2 3 7
5 2 1 3 5 8 4 5 1 0
8 7 7 5 3 3 3 6 5 6
4 1 5 0 7 8 0 8 1 4
5 2 6 5 5 2 0 6 8 2
3 0 0 1 7 2 3 1 3 5
2 4 1 3 7 3 3 3 1 5
2 7 8 2 1 8 0 2 1 7
1 5 7 8 1 6 2 3 6 2
0 0 1 6 7 6 8 2 2 0
4 0 3 1 4 3 0 4 7 5
3 3 7 0 6 8 8...

output:

14
3 7
4 0
6 8
1 1
4 2
5 3
2 4
6 5
6 6
1 0
1 1
1 0
1 0
1 1
15
2 7
6 0
7 8
3 1
7 9
5 2
6 3
5 4
1 5
8 6
1 2
1 0
1 0
1 2
1 2
13
1 7
5 0
1 8
1 1
5 2
4 3
5 4
1 6
1 4
1 2
1 4
1 2
1 2
14
2 7
1 0
3 8
1 1
7 9
5 2
7 3
6 4
6 6
1 2
1 4
1 2
1 4
1 2
14
5 7
2 0
1 8
2 1
1 2
3 3
5 4
6 5
4 6
1 5
1 0
1 5
1 0
1 0
15
6 ...

result:

ok T=100000

Test #10:

score: 0
Accepted
time: 331ms
memory: 28796kb

input:

100000
7 8 0 3 2 6 7 9 8 7
7 8 8 5 0 0 6 8 7 7
6 6 0 8 8 9 9 2 1 8
4 7 7 8 2 1 1 3 5 4
1 6 9 6 6 4 0 5 0 2
7 1 7 1 1 2 9 8 5 7
5 3 6 6 1 1 8 4 5 8
4 5 3 0 9 2 8 5 5 4
0 4 9 2 1 4 1 4 0 1
3 4 7 9 0 8 6 5 8 5
4 1 2 1 0 0 2 0 4 9
2 9 0 9 5 7 4 7 6 5
9 3 4 5 9 6 3 2 0 2
3 2 3 4 7 4 6 6 0 7
7 1 5 9 5 6 1...

output:

14
9 7
4 0
8 8
6 1
7 9
3 3
2 4
6 5
7 6
1 0
1 1
1 0
1 1
1 0
13
8 7
4 0
7 8
6 1
7 9
8 2
5 3
6 6
1 0
1 0
1 1
1 0
1 1
14
2 7
6 0
1 8
6 1
8 9
8 3
8 4
6 5
7 6
1 6
1 5
1 6
1 5
1 5
15
3 7
4 0
5 8
4 1
4 9
5 2
8 3
2 4
1 5
1 6
1 1
1 2
1 1
1 2
1 1
12
4 7
6 1
2 9
6 2
6 3
6 4
4 5
1 2
1 7
1 0
1 2
1 2
15
8 7
4 0
5 ...

result:

ok T=100000

Test #11:

score: 0
Accepted
time: 317ms
memory: 28816kb

input:

100000
0 8 3 9 3 7 10 1 5 1
7 7 2 3 5 7 4 5 2 6
6 1 7 7 6 3 4 5 10 7
7 3 3 8 9 0 1 8 1 5
0 6 1 0 5 2 0 4 7 3
9 7 7 3 1 7 8 10 8 7
4 7 3 7 0 2 2 10 0 10
8 9 5 1 4 7 4 6 4 9
1 1 7 7 8 5 7 5 3 2
3 6 6 8 4 5 5 10 3 10
10 1 7 5 1 5 6 5 9 0
9 1 0 0 0 3 6 1 0 0
5 9 9 8 10 8 1 1 1 4
2 5 10 5 7 3 7 2 4 6
1 8...

output:

14
1 7
5 8
5 1
1 9
3 2
9 3
3 4
7 5
8 6
1 1
1 1
1 6
1 1
1 6
15
5 7
4 0
2 8
5 1
6 9
2 2
3 3
5 4
7 5
4 6
1 1
1 0
1 1
1 0
1 0
15
5 7
4 0
10 8
1 1
7 9
4 2
7 3
6 4
3 5
4 6
1 2
1 2
1 2
1 0
1 0
14
8 7
4 0
1 8
3 1
5 9
3 2
8 3
7 4
1 6
1 0
1 4
1 4
1 0
1 0
12
4 7
7 8
3 1
3 9
1 2
3 4
2 5
1 1
1 4
1 1
1 1
1 4
15
1...

result:

ok T=100000

Test #12:

score: 0
Accepted
time: 355ms
memory: 28808kb

input:

100000
494719969 120370150 440274545 51278543 770105708 138663251 867692060 230246532 162623412 131761825
16498099 70750104 350416959 359532393 346253463 539196901 104480711 629723297 27266106 267471731
320561715 423589912 850677494 604957917 815663121 8935553 252297110 812216267 821793396 495865924...

output:

15
230246532 7
494719969 0
162623412 8
120370150 1
131761825 9
440274545 2
51278543 3
770105706 4
138663251 5
867692057 6
1 6
1 4
1 6
1 4
1 6
15
629723297 7
16498096 0
27266106 8
70750104 1
267471731 9
350416957 2
359532393 3
346253463 4
539196901 5
104480711 6
1 0
1 2
1 2
1 0
1 0
15
812216267 7
320...

result:

ok T=100000

Test #13:

score: -100
Runtime Error

input:

100000
1 0 0 0 0 0 738556701 0 0 0
0 376417170 0 0 0 1 0 0 0 0
0 0 0 169526540 0 1 0 0 0 0
0 0 1 0 0 0 0 0 822697278 0
0 0 0 0 121828077 0 0 0 1 0
0 994528277 0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0 0 771142048
0 0 0 0 0 77945594 0 0 1 0
1 0 0 0 963629977 0 0 0 0 0
0 0 0 1 0 805871384 0 0 0 0
0 0 0 0 306368...

output:


result: