QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#869585#7745. Trapping Rain Waterucup-team5077#TL 1333ms16204kbC++174.2kb2025-01-25 11:35:052025-01-25 11:35:07

詳細信息

Test #1:

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

input:

2
6
1 2 3 4 5 6
2
1 2
3 3
5
100 10 1 10 100
1
3 100

output:

1
4
180

result:

ok 3 lines

Test #2:

score: 0
Accepted
time: 104ms
memory: 14152kb

input:

1000000
1
243315
1
1 211072
1
611907
1
1 931483
1
570785
1
1 223585
1
728162
1
1 547207
1
986415
1
1 479472
1
679456
1
1 889033
1
885718
1
1 118339
1
214466
1
1 464451
1
222854
1
1 70138
1
393099
1
1 909835
1
73671
1
1 100066
1
148162
1
1 110510
1
142367
1
1 58777
1
87989
1
1 684723
1
630453
1
1 719...

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
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
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 1000000 lines

Test #3:

score: 0
Accepted
time: 326ms
memory: 16204kb

input:

500000
4
88702 934403 687350 528632
3
1 482595
4 331839
4 890431
1
80653
7
1 758092
1 691959
1 809872
1 96403
1 84281
1 713083
1 474452
1
664273
10
1 353641
1 827527
1 998495
1 749722
1 274869
1 974568
1 425227
1 59445
1 966182
1 558246
1
926871
9
1 791338
1 215107
1 534658
1 84624
1 331235
1 37824
...

output:

0
173121
247053
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
0
741826
865168
865168
865168
0
0
0
0
0
0
174868
174868
333931
333931
288889
288889
440773
1872642
1872642
2378495
2378495
2378495
461966
181899
929389
815797
587291
2126531
3019305
0
...

result:

ok 1000000 lines

Test #4:

score: 0
Accepted
time: 251ms
memory: 14156kb

input:

100000
9
272731 81240 712792 756370 371398 606967 695759 435539 424972
2
7 612034
3 447470
1
224913
5
1 899939
1 336327
1 645641
1 691033
1 575786
10
993768 216988 205093 811915 511384 502237 614274 381635 990027 42252
4
4 777608
7 652846
5 363199
10 770154
10
22666 635213 263573 639439 335341 44224...

output:

725866
1937542
0
0
0
0
0
3516033
3694466
3331267
3331267
1410899
1410899
2053173
295228
396517
396517
519182
102861
0
640249
0
166563
386556
386556
0
156838
458646
0
0
0
0
0
1371130
1015470
1876560
278983
956261
188367
128567
128567
1090711
1090711
1633568
847392
847392
1598365
1598365
1903522
19035...

result:

ok 551067 lines

Test #5:

score: 0
Accepted
time: 1333ms
memory: 16076kb

input:

100000
70
145193 658934 178288 794526 30824 650903 967695 859363 412145 407205 567321 710188 164547 487440 13142 152385 446544 152988 944579 108224 666495 560673 346640 101467 19114 893706 417954 63192 581728 3542 325395 766608 850980 486235 954285 488688 946028 849470 34419 904827 91171 209915 3015...

output:

30677120
30128541
30854948
49823414
49638839
49025024
48817633
50489348
50351344
50122630
9235000
9221552
34754054
34235876
33805872
42534746
42534746
49619768
49410351
32190253
32167214
32933289
38505826
37536691
37224911
37110480
36766767
38508914
38253397
23476586
23398446
30165925
43254609
43178...

result:

ok 551150 lines

Test #6:

score: 0
Accepted
time: 352ms
memory: 14156kb

input:

100000
6
103019 33646 352613 101143 273682 996950
75
5 471413
3 227928
1 792208
3 579889
1 27745
5 360114
3 860851
3 481795
3 215974
6 905243
2 853741
2 988745
2 564176
5 540078
3 27307
2 735489
1 605101
3 356425
5 279706
4 954599
6 423370
1 55497
1 952552
6 211832
1 838067
4 720011
5 244544
4 37809...

output:

320843
548771
2120483
2009243
2036988
1893392
1893392
1893392
1893392
3487360
2633619
2598034
2598034
2057956
2057956
2057956
2057956
2057956
1823850
869251
1670391
1670391
1670391
2094055
2094055
1374044
1129500
1091691
1480407
1678799
1690719
1480407
621624
621624
621764
621764
621764
621764
62176...

result:

ok 1000000 lines

Test #7:

score: -100
Time Limit Exceeded

input:

12
30070
37311 92074 618927 991732 129711 612126 541583 552857 299118 773097 33928 750975 945843 707175 557221 117284 247929 241816 479602 219689 684863 410721 21888 219478 730953 691722 207141 430804 199900 788735 407544 718641 463430 105167 678681 969312 106835 841776 357671 170038 982105 139449 2...

output:

14975733644
14975532130
15304908882
15304596244
15304289202
15384458135
24369948725
24369178590
25146086589
31361231023
31360866614
33168588125
33913933403
33913190726
33912967806
33912394737
33911402760
33911251576
33910650481
33910032550
33909815157
33909044007
33908737999
33908519234
33907906607
...

result: