QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#210829#5478. Quiz ContestZhangYiDeTL 2662ms68320kbC++173.3kb2023-10-11 20:30:152023-10-11 20:30:16

详细

Test #1:

score: 100
Accepted
time: 5ms
memory: 33100kb

input:

2 4
2 2
1 2

output:

20
4

result:

ok 2 lines

Test #2:

score: 0
Accepted
time: 5ms
memory: 31764kb

input:

4 6
1 1 2 2
1 1 1 2

output:

168
168
336
48

result:

ok 4 lines

Test #3:

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

input:

4 82
20 22 12 28
20 22 7 8

output:

746371221
528486621
148054814
913602744

result:

ok 4 lines

Test #4:

score: 0
Accepted
time: 5ms
memory: 33164kb

input:

2 2
1 1
1 1

output:

1
1

result:

ok 2 lines

Test #5:

score: 0
Accepted
time: 4ms
memory: 31396kb

input:

1 1
1
1

output:

1

result:

ok single line: '1'

Test #6:

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

input:

1 2
2
1

output:

2

result:

ok single line: '2'

Test #7:

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

input:

2 5
2 3
2 1

output:

12
108

result:

ok 2 lines

Test #8:

score: 0
Accepted
time: 8ms
memory: 31768kb

input:

3 6
3 1 2
3 1 2

output:

108
420
192

result:

ok 3 lines

Test #9:

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

input:

10 181
21 11 1 38 33 31 2 25 17 2
13 9 1 37 26 16 2 4 13 2

output:

933670175
947389273
127286706
932736158
827765819
807282126
45553639
228256557
350039760
45553639

result:

ok 10 lines

Test #10:

score: 0
Accepted
time: 5ms
memory: 31840kb

input:

9 141
47 11 1 53 2 3 1 1 22
30 1 1 40 1 2 1 1 4

output:

959854830
649008360
59000760
9143465
118001520
42136705
59000760
59000760
221770152

result:

ok 9 lines

Test #11:

score: 0
Accepted
time: 6ms
memory: 31892kb

input:

6 167
40 2 1 54 43 27
31 2 1 14 37 18

output:

21684914
968181716
594826171
452099065
231748717
716046725

result:

ok 6 lines

Test #12:

score: 0
Accepted
time: 6ms
memory: 31464kb

input:

18 166
5 1 14 6 12 12 1 5 12 9 1 16 12 7 13 17 5 18
5 1 2 5 1 2 1 1 8 9 1 14 9 1 13 9 5 17

output:

424073779
982729592
570450467
984062217
812067221
258146602
982729592
920670548
515287508
879372936
982729592
802466756
124165180
889641026
888797216
227029638
424073779
310377834

result:

ok 18 lines

Test #13:

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

input:

8 152
50 16 54 13 1 6 11 1
19 4 24 13 1 2 2 1

output:

877632556
241460682
91908033
969346444
96488448
124488250
658149142
96488448

result:

ok 8 lines

Test #14:

score: 0
Accepted
time: 883ms
memory: 39176kb

input:

146 32696
368 65 173 10 276 370 47 358 412 456 4 78 196 420 311 52 268 30 299 442 350 381 129 256 165 368 178 23 374 197 375 16 85 292 243 252 119 365 229 139 149 4 6 131 357 160 73 457 314 157 47 240 451 103 72 216 225 2 348 75 122 120 215 431 324 390 290 201 152 397 41 456 160 59 95 222 427 366 12...

output:

467990629
463000266
943072509
432089030
49032918
611725131
153142050
344818177
77750674
577573890
168930682
784177123
289251676
359922539
792694167
6087427
525005617
82895478
85438974
681066466
186956527
334880899
244523308
287659908
691939081
470665184
582502913
222544676
12306392
202576806
6796758...

result:

ok 146 lines

Test #15:

score: 0
Accepted
time: 406ms
memory: 52992kb

input:

12 135502
445 7 74 7828 3973 88981 2 3 34020 6 14 149
296 1 44 2077 1410 58906 2 2 20274 5 8 97

output:

247771824
547131421
646713541
586476213
655944584
292156217
450970619
631309320
381265997
891057017
213293851
155903656

result:

ok 12 lines

Test #16:

score: 0
Accepted
time: 1448ms
memory: 64116kb

input:

34 191157
12849 385 7417 5645 3650 14937 5263 14239 6748 8 5559 7584 6916 7862 10048 7 4440 12669 14879 6 1578 1 11033 64 1013 832 4689 14222 85 55 9369 4830 2220 55
4207 162 5105 4482 3092 12838 4290 1343 1237 8 538 3464 4374 1541 6650 3 2080 10969 5545 2 954 1 5674 32 224 35 4297 12964 23 46 1233 ...

output:

255119209
521376107
197752736
442383424
832357744
455431749
949816103
213054433
580939700
62100482
889645036
129669655
386246248
79884619
472922214
913181203
438817794
983088203
944477001
334844558
742360339
456376198
73581656
572167147
590992793
24664993
595551147
589468590
415150968
757752443
5798...

result:

ok 34 lines

Test #17:

score: 0
Accepted
time: 2662ms
memory: 68320kb

input:

70 182517
2435 152 2917 21 5364 4056 4106 5062 2452 4938 1581 5477 1575 5258 422 5017 1811 1668 44 5138 4822 1548 1555 1471 1001 3030 2262 3634 2448 2756 5574 3013 73 403 1760 23 2761 5568 958 816 3233 529 1771 290 1668 3227 2 3198 3489 5689 733 354 5524 5196 413 1298 1691 887 5305 1514 3315 2556 55...

output:

713670549
493984929
786459236
608057522
777911712
678950818
645324064
464695978
588897470
704643687
1308082
951095374
545178848
759655092
867183769
314404297
655634891
311057797
687724076
165666906
408580851
249765524
147179956
908049799
624378594
724558870
249141772
899676450
694659492
215347473
90...

result:

ok 70 lines

Test #18:

score: 0
Accepted
time: 217ms
memory: 42360kb

input:

15 55966
18 15004 226 815 2 19930 8 11437 1 144 11 722 7050 346 252
8 4263 219 763 1 15689 2 1379 1 96 9 595 5354 195 24

output:

791239607
202491784
333152928
35656281
54347292
560275242
570958010
418598684
27173646
343462640
566313512
813564902
257035400
163734689
302743685

result:

ok 15 lines

Test #19:

score: -100
Time Limit Exceeded

input:

22255 200000
11 17 12 16 15 16 7 8 14 1 14 2 4 9 4 10 8 2 12 11 4 3 7 11 17 3 6 11 6 1 8 15 10 4 12 10 4 15 4 1 13 17 11 8 17 6 13 17 13 8 11 6 8 6 14 6 9 10 5 6 13 17 1 12 9 9 10 5 6 9 13 5 15 13 9 7 5 15 13 15 4 14 7 15 13 15 8 12 2 8 15 7 3 5 2 1 12 10 10 5 3 10 13 7 3 15 10 10 14 12 17 11 2 11 7...

output:


result: