QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#668840#5637. M-ary PartitionsHuangHanSheng100 ✓74ms4588kbC++201.4kb2024-10-23 16:16:342024-10-23 16:16:35

详细


Pretests


Final Tests

Test #1:

score: 100
Accepted
time: 74ms
memory: 4588kb

input:

1000
1 3 9
2 3 47
3 5 123
4 7 4321
5 97 9999
6 6 216
7 90 8761
8 5 7720
9 6 4515
10 6 3309
11 5 6923
12 6 3986
13 4 5626
14 3 1036
15 8 1680
16 67 1633
17 3 1190
18 3 1383
19 31 7080
20 8 1632
21 9 7
22 4 3772
23 4 1323
24 25 9714
25 16 1881
26 9 8611
27 4 1155
28 8 3175
29 4 79
30 5 5708
31 4 4346
...

output:

1 5
2 63
3 75
4 144236
5 111
6 134
7 106
8 21089725
9 523800
10 182142
11 13454415
12 341520
13 76041920
14 1511871
15 4820
16 25
17 2785914
18 5566401
19 964
20 4472
21 1
22 13000256
23 195432
24 3224
25 496
26 234180
27 119874
28 26278
29 64
30 6191145
31 24028496
32 2107296
33 125286310
34 286434...

result:

ok 1000 lines