QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#502945#5639. Permutation Descent Countsxiaowuc1100 ✓48ms39068kbJava81.7kb2024-08-03 15:36:412024-08-03 15:36:43

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 100
Accepted
time: 48ms
memory: 39068kb

input:

1000
1 3 1
2 5 2
3 8 3
4 99 50
5 2 0
6 2 1
7 100 0
8 100 99
9 29 10
10 24 22
11 24 13
12 58 32
13 26 18
14 38 8
15 56 7
16 35 6
17 85 4
18 82 31
19 13 8
20 26 19
21 73 18
22 60 35
23 21 16
24 16 4
25 80 9
26 19 6
27 38 25
28 85 82
29 44 4
30 35 15
31 17 10
32 54 40
33 34 29
34 90 89
35 38 35
36 81 5...

output:

1 4
2 66
3 15619
4 325091
5 1
6 1
7 1
8 1
9 123353
10 759383
11 718909
12 816502
13 620537
14 776140
15 169065
16 492135
17 325050
18 418370
19 811849
20 161790
21 484259
22 451845
23 252400
24 313005
25 80649
26 382999
27 856931
28 551045
29 469653
30 801674
31 435150
32 202138
33 668262
34 1
35 27...

result:

ok 1000 lines