QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#225663#1277. PermutationZhaoZiLongTL 13ms4616kbC++141.4kb2023-10-24 22:27:262023-10-24 22:27:26

詳細信息

Test #1:

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

input:

2
3
0 0 0
7
1 0 3 0 0 6 0

output:

2
21

result:

ok 2 tokens

Test #2:

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

input:

50
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

result:

ok 50 tokens

Test #3:

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

input:

25
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0
2
0 0

output:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

result:

ok 25 tokens

Test #4:

score: 0
Accepted
time: 1ms
memory: 3696kb

input:

16
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0
3
0 0 0

output:

2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2

result:

ok 16 tokens

Test #5:

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

input:

5
10
0 0 0 0 0 0 0 0 0 0
10
0 0 0 0 0 0 0 0 0 0
10
0 0 0 0 0 0 0 0 0 0
10
0 0 0 0 0 0 0 0 0 0
10
0 0 0 0 0 0 0 0 0 0

output:

3627734
3627734
3627734
3627734
3627734

result:

ok 5 tokens

Test #6:

score: 0
Accepted
time: 1ms
memory: 3684kb

input:

4
11
0 10 11 6 1 0 8 0 0 3 5
11
0 0 0 10 8 5 4 1 0 2 9
11
0 4 0 3 11 0 0 0 7 8 1
11
0 8 0 3 9 0 0 0 7 4 0

output:

24
24
120
720

result:

ok 4 tokens

Test #7:

score: 0
Accepted
time: 1ms
memory: 3700kb

input:

4
12
0 0 11 0 0 6 1 0 4 0 5 8
12
7 0 10 11 4 6 1 8 0 12 0 0
12
0 12 0 0 0 0 5 0 1 0 10 11
12
0 0 4 3 9 12 2 5 1 10 6 0

output:

720
24
5040
6

result:

ok 4 tokens

Test #8:

score: 0
Accepted
time: 1ms
memory: 3792kb

input:

3
13
0 13 6 3 0 11 0 0 0 0 1 2 0
13
9 0 0 0 0 0 8 0 5 7 0 12 0
13
0 0 0 0 0 0 3 10 2 9 0 12 0

output:

5040
40320
40320

result:

ok 3 tokens

Test #9:

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

input:

3
14
0 12 10 9 0 0 11 0 0 1 6 4 8 13
14
0 0 8 0 0 9 14 3 0 0 6 2 0 0
14
13 0 8 0 0 0 0 0 14 7 4 6 0 3

output:

120
40320
5040

result:

ok 3 tokens

Test #10:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

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

output:

720
5040
40320

result:

ok 3 tokens

Test #11:

score: 0
Accepted
time: 13ms
memory: 4616kb

input:

2
20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

output:

143388927
143388927

result:

ok 2 tokens

Test #12:

score: 0
Accepted
time: 7ms
memory: 4488kb

input:

1
30
21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

output:

586750519

result:

ok "586750519"

Test #13:

score: -100
Time Limit Exceeded

input:

1
40
0 0 0 0 23 26 0 0 0 0 0 0 32 20 33 0 0 0 0 0 0 0 0 0 0 0 0 0 36 0 0 0 0 0 0 0 0 0 0 0

output:


result: