QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#83098#3412. Battle for Silverxiaowuc1AC ✓5ms3416kbC++171.9kb2023-03-01 05:51:002023-03-01 05:51:02

詳細信息

Test #1:

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

input:

409 412
4459
2527
1895
3518
4470
1757
3066
4342
5464
2770
263
1283
3338
147
1789
5977
1982
3528
5675
2655
4942
2408
2977
4480
463
2066
605
2926
5492
1230
4318
1166
5332
4581
408
1098
737
1018
282
5064
275
4106
2469
2598
5355
1711
4302
5581
2592
2099
2066
887
5890
2905
1204
2151
5550
3415
3154
2503
1...

output:

11630
10270
10970
11669
10536
13247
10400
10390
11486
10465
10850
11225
10214
12309
10839
11667
10468
11876
8860
10987
10426
11845
11714
11097
11572
11517
11627
11225
11141
11771
11569
11857
11838
11814
16329
8663
10565
15577
15196
9573
17897
15082
13049
12288
13246
18645
11469
11237
20095
15975
151...

result:

ok 982 lines

Test #2:

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

input:

450 449
100
113
126
139
152
165
178
191
204
217
230
243
256
269
282
295
308
321
334
347
360
373
386
399
412
425
438
451
464
477
490
503
516
529
542
555
568
581
594
607
620
633
646
659
672
685
698
711
724
737
750
763
776
789
802
815
828
841
854
867
880
893
906
919
932
945
958
971
984
997
1010
1023
10...

output:

11861
23592
16700
6435
17580
20594
17465

result:

ok 7 lines

Test #3:

score: 0
Accepted
time: 2ms
memory: 3416kb

input:

2 1
100
5000
1 2
3 3
100
5000
1000
1 2
1 3
2 3
5 9
100
5000
1000
2000
200
1 2
1 3
1 4
2 3
2 4
3 4
1 5
4 5
2 5
6 10
100
200
300
400
500
600
1 2
1 3
1 4
1 5
2 3
4 5
5 6
3 6
2 5
3 5
3 2
100
100
100
1 2
2 3
4 4
1000
1000
100
500
1 2
2 3
2 4
3 4
5 6
1000
2000
3000
4000
5000
1 2
1 3
2 3
3 4
3 5
4 5
5 7
60...

output:

5100
6100
8100
1400
200
2000
12000
12000
18000

result:

ok 9 lines

Test #4:

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

input:

300 894
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
100
...

output:

400
18128
18569
19602
8520
8935

result:

ok 6 lines

Test #5:

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

input:

300 299
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
10...

output:

2000

result:

ok single line: '2000'

Test #6:

score: 0
Accepted
time: 2ms
memory: 3348kb

input:

4 6
100
5000
1000
2000
1 2
1 3
1 4
2 3
2 4
3 4
6 8
1500
1000
100
2000
500
300
1 2
1 3
1 4
2 4
3 5
4 5
4 6
5 6

output:

8100
4500

result:

ok 2 lines