QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#796092#9638. 线段树与区间加carrotqq40 2318ms61020kbC++143.9kb2024-12-01 10:39:582024-12-01 10:39:59

詳細信息


Pretests


Final Tests

Test #1:

score: 0
Wrong Answer
time: 8ms
memory: 38532kb

input:

2000 2000
1793 1798 1262660447 3355636366 3629 1228
103 1852 1180930258 1265499397 1821 3806
680 680 2673755170 3193571303
737 740 3064103572 3343535318 1993 502
1720 1721 3117882744 1227116751 3561 1857
117 117 2249090646 234980450
1897 1901 87845907 4069299503 2523 1140
1832 1835 981230847 3022191...

output:

3808167656
4244695135
3765313866
482902797
3215657440
1844446912
1703652652
297516010
1693317732
2568562131
1084913987
743730695
958332816
2327243096
2192004360
3695785356
3506505464
4238178381
2143914816
4224002433
97126046
1910232366
3646935298
3269965698
2885696823
3320670385
1160348364
142141411...

result:

wrong answer 1st lines differ - expected: '3152111116', found: '3808167656'

Test #2:

score: 0
Wrong Answer
time: 4ms
memory: 15980kb

input:

2000 2000
372 372 0 989361745
268 744 0 2134086804 3992 1151
929 932 0 3450655381 1108 1775
1527 1527 0 2098122263
261 264 0 767043297 3813 2562
1011 1013 0 1426875762 997 1431
160 160 0 2574808476
1660 1770 0 2181120880 1536 69
1650 1650 0 3634539115
811 811 0 4269292508
518 518 0 3874323908
248 25...

output:

1733106310
3332616210
510370652
42337596
399056276
192116260
1520857868
113154650
1205916623
151904785
3165260335
910812799
4266749767
2481974351
1278336070
915029898
1248663725
1091468886
1238484225
3475394314
2053993551
2251014531
3493107038
1750618112
3011487645
3699054604
2473999662
696495118
21...

result:

wrong answer 1st lines differ - expected: '2047726267', found: '1733106310'

Test #3:

score: 0
Wrong Answer
time: 4ms
memory: 35800kb

input:

2000 2000
1045 1046 0 2632377141 2540 3747
1673 1674 0 1669064774 1585 1359
1737 1737 0 4187517691
134 134 0 1381105987
1678 1678 0 3194199856
629 632 0 1039365507 1669 3337
1224 1225 0 2056342816 2564 1715
501 1491 0 2746594998 563 3172
1859 1860 0 1399867507 3486 1239
377 377 0 4114286174
266 266 ...

output:

4152379248
3857066456
3769246203
3474682407
2276919435
2557604189
3286879053
2794858283
618284278
357151393
1065576317
3333918759
3565128456
2681591528
4112599871
430150679
1034851495
4283181796
2423294218
524211261
3026525084
1387280474
1236792427
2199621987
1563340470
1606971341
2337535127
1254885...

result:

wrong answer 1st lines differ - expected: '1036900736', found: '4152379248'

Test #4:

score: 4
Accepted
time: 7ms
memory: 15976kb

input:

2000 2000
1922 1923 4154142567 0 624 1116
1611 1625 1842722647 0 1405 1312
101 102 328256453 0 3110 2786
859 860 1546215739 0 489 2099
1154 1157 4134074442 0 341 792
531 532 1656285477 0 1961 1533
451 454 2149232978 0 3570 253
496 496 12489066 0
1697 1700 2769881303 0 2485 3845
1232 1232 4274380990 ...

output:

1244935696
3881730871
3861620299
3630808070
143145097
2542509128
1911111576
1280561467
1684782375
2123438102
2161767784
3868604371
1741793529
2089766304
678790465
1362988883
4274049504
2200807299
860968345
3853101004
3567112617
324269778
1482245920
1786084156
4221544804
1782731166
734908652
43686813...

result:

ok 2000 lines

Test #5:

score: 4
Accepted
time: 8ms
memory: 34944kb

input:

2000 2000
1516 1516 786840671 0
546 547 533550872 0 3506 319
947 952 3586638444 0 1398 2922
1769 1777 1598495528 0 2351 3492
1487 1488 3433976236 0 2998 372
266 268 4081199540 0 3034 1376
9 11 16162852 0 2016 2453
606 606 868772445 0
500 501 1406522390 0 1201 3967
1448 1449 2080781326 0 1547 1988
22...

output:

355422488
3256264388
2788279524
918980988
2210590456
3507874393
505332537
3048538642
4064960139
1074955896
3262754244
36045922
102158252
2531234752
2688363642
3901653384
1506351899
3058812581
1455338180
3078090178
3231337104
1798127493
3384246559
3744336983
2892296332
2097334835
441826825
2362367029...

result:

ok 2000 lines

Test #6:

score: 0
Wrong Answer
time: 247ms
memory: 22836kb

input:

40000 40000
19061 19064 2717945240 3834098532 59850 71996
14933 14933 877340266 1841904212
34098 34170 3550522541 2738188651 75607 2753
4691 4691 530532762 675854163
9890 9890 2833834223 2233457146
14140 14140 1300081732 193421532
1623 1623 1598527863 3121134528
4929 4929 1218079042 439770536
324 39...

output:

3513252662
1155220622
1061010733
1949521254
4000421534
3742618044
49286356
3270642343
1414600109
1575243616
2291088362
4129455462
1993834893
803900572
437227388
3494402912
2259491339
3693331239
705599910
500503505
3252748392
3952690288
3115639816
1265468888
651471964
1170949483
1415859959
3039388295...

result:

wrong answer 1st lines differ - expected: '3762372552', found: '3513252662'

Test #7:

score: 0
Wrong Answer
time: 162ms
memory: 35672kb

input:

40000 40000
37504 37504 0 2993769426
14320 14322 0 3704545631 44050 52152
2757 37130 0 1236105917 2455 3677
884 884 0 4026492894
10076 10077 0 609448457 7650 75701
16404 16404 0 245461674
22018 22018 0 2771692605
1501 1501 0 2419888954
16860 16861 0 1871411848 33204 21442
15067 15068 0 1175031405 20...

output:

1109388816
2293582222
3355220460
1239425804
1962342612
4141681737
1580308381
661664141
2142322027
694779784
1568696795
3057792009
1965504715
3467969442
1510086704
298580235
941283429
2202817342
3968899246
3236737720
3860350732
1902213127
803809721
1507936152
597901997
696541703
3038808166
3990588001...

result:

wrong answer 1st lines differ - expected: '2153180388', found: '1109388816'

Test #8:

score: 0
Wrong Answer
time: 164ms
memory: 29328kb

input:

40000 40000
20206 20206 0 4103926985
25572 25573 0 1124285259 79417 25683
23524 23524 0 2945938453
26314 26316 0 3769707656 62994 20223
1933 1933 0 3202000408
12690 27072 0 663839624 50239 60259
27007 27013 0 1608124753 48394 32123
1283 1284 0 4010999538 17252 36084
11373 11375 0 3200987115 25973 22...

output:

3234190746
3423326188
1373849269
2417046571
827772241
2104034045
585000243
3862790306
1880315479
2888986055
3779231203
1733955884
1128738940
603053418
1964330060
2540000252
3898699762
1120915404
483034734
2787820030
83383480
296662828
1706848972
1180929131
691228460
4136605334
8885959
2553757427
370...

result:

wrong answer 1st lines differ - expected: '287427596', found: '3234190746'

Test #9:

score: 4
Accepted
time: 297ms
memory: 23044kb

input:

40000 40000
28600 31103 398400104 0 50206 67695
18214 18214 987691543 0
21117 21117 2501164446 0
35971 35972 884844107 0 49942 386
17501 17501 4216208706 0
12649 12649 3198897355 0
1690 1695 1689582721 0 30803 36361
33084 33084 2651714130 0
26656 26660 3389387136 0 27495 17328
32764 32764 2921506964...

output:

2661989864
1947893360
2177273740
2805317845
3770448246
2061736392
1286068422
632882163
3718808793
1339549657
1307728358
1283051688
2714825475
994135893
4142896407
4091591129
445121640
2810682714
1807820506
2543434294
2527190896
1674553699
2254191164
2154047668
2209081836
465070118
4118239274
2112220...

result:

ok 40000 lines

Test #10:

score: 4
Accepted
time: 194ms
memory: 30092kb

input:

40000 40000
24203 24203 1353036479 0
30073 30082 1740596718 0 53750 62241
11650 11652 3664808690 0 7271 53525
17686 17686 2170088447 0
14215 14215 877899577 0
10389 14544 1220290260 0 2779 34931
17557 17561 3312844542 0 9486 56774
37025 37026 360931058 0 52630 1863
8544 8545 2355582057 0 34372 13606...

output:

2519124594
2634462594
1417233555
3471878224
3842866513
3184281095
2935202671
521564492
3416348650
162479576
3589724768
212609364
71379846
2070355303
3565115141
3837902349
3818069677
1727479892
3949071907
1303465618
1184109510
1311402470
1395756280
3730263576
113268436
886996392
3630256423
3074325479...

result:

ok 40000 lines

Test #11:

score: 0
Wrong Answer
time: 1262ms
memory: 55036kb

input:

200000 200000
32600 32601 279707947 3333652085 81223 369345
107195 110357 2797643167 3204100200 211635 180774
50076 50076 3586231592 2031356328
9086 9086 2226760698 457985624
89785 143170 2137446218 370802330 339432 56185
15190 19580 3336566407 2687475581 239505 274514
199717 199717 1343907462 27476...

output:

307035696
439820276
3332961531
3179258588
1637177070
133433225
1777562633
1039866695
2147037414
4002322289
3231544451
3172358157
507597960
3658526062
3754939054
4175085723
1737914067
2757930736
1650743206
911291532
723190796
2799395938
3701433138
1899340502
3712939249
2601286547
2226689897
212606071...

result:

wrong answer 1st lines differ - expected: '2009836216', found: '307035696'

Test #12:

score: 0
Wrong Answer
time: 1695ms
memory: 54940kb

input:

200000 200000
103447 103448 0 2671179003 304649 129499
145911 145911 0 1121422691
157741 157744 0 1929193038 145603 72009
11904 11905 0 2289998670 146636 237088
122867 122868 0 186090819 413 270761
193873 193873 0 203093844
20838 20838 0 2999266101
92497 92498 0 2375994881 321423 197661
10185 10185 ...

output:

2728034949
2545155969
220007247
504627905
2007329797
858487842
776477013
1814363912
2704778160
141507866
4069042691
1573350312
564942942
2358317904
887170297
2037380458
1991786802
68115222
1055987771
1302762953
1165259731
432633903
1728249080
3062499919
1407093575
4097576355
160499149
223136512
1517...

result:

wrong answer 1st lines differ - expected: '1287630144', found: '2728034949'

Test #13:

score: 0
Wrong Answer
time: 989ms
memory: 60708kb

input:

200000 200000
190183 190188 0 1706040846 362170 41622
150705 150705 0 2188179441
148325 148330 0 2355075143 61581 324431
190406 190407 0 1131747042 383315 217073
23144 23152 0 1897327529 396050 285637
93051 93051 0 1804212175
186538 186541 0 3315936642 306793 151829
45692 45692 0 1239029798
30972 30...

output:

2932630785
2203975657
3738353571
1919977433
661429833
46409251
1442807167
924234302
3650216174
934422430
1219182156
3489336421
502709508
2174709204
2809786861
2574418054
2078995446
1147030868
1234803532
818170116
131666493
3326562629
3308772377
2559769318
126563430
1888294606
583489042
2408780034
33...

result:

wrong answer 1st lines differ - expected: '2075029659', found: '2932630785'

Test #14:

score: 4
Accepted
time: 1128ms
memory: 59576kb

input:

200000 200000
90506 102530 236918570 0 337847 201999
50479 50482 1884914043 0 242965 18370
197965 197965 1150415084 0
181841 181841 524351831 0
43868 43886 3739237894 0 365544 340081
104279 104279 1518148351 0
34148 34154 3970381744 0 379789 218872
73698 73698 3847658012 0
71224 71225 2029945887 0 3...

output:

2255959540
776843588
1939762368
407450021
2416728973
3351051967
238272039
3173214263
964780820
2479009385
2078308329
1085718897
3336408401
2469655047
3702885352
590105323
625121410
2752075115
3402348887
2538671649
3018668433
680197831
421512740
52919903
1904990371
2601865274
2699800194
868148810
207...

result:

ok 200000 lines

Test #15:

score: 4
Accepted
time: 1179ms
memory: 60208kb

input:

200000 200000
184636 184636 470383782 0
69147 163622 581509052 0 286341 357499
95155 95155 577954429 0
126294 126294 3693354981 0
184618 187568 3886149811 0 333358 166507
188512 188512 303047117 0
20400 20400 3407789462 0
44704 44705 1224895264 0 162096 75280
133755 133757 109227272 0 132577 372294
...

output:

3881118135
3222757985
114387977
2262724873
1481024296
3192177672
1825099959
3248957793
800918233
2409713038
1720265294
846986202
3604862840
2795825247
2843485417
302001729
4214926529
1468759477
2241022395
1641387459
929124036
182926454
8909911
3676263238
36476901
4207789233
2593381466
1110673084
829...

result:

ok 200000 lines

Test #16:

score: 0
Wrong Answer
time: 1395ms
memory: 60268kb

input:

200000 200000
30492 35854 729190907 1956530869 220290 207964
178288 178288 793919639 4043397768
4965 4965 2255872372 819681301
64878 99465 669086428 517288923 75560 27338
13595 16760 415742798 3804064469 203533 253759
154291 154293 601666143 200879632 289484 190128
121100 121101 2476950350 105407364...

output:

3548805144
2606238054
594170036
499034158
3692032873
1854618551
2708019005
1419933107
3858626517
2468090577
4036128811
4049125356
952274097
1609748638
1013578616
1168470269
1457258907
1744467534
2985111773
994512525
3529601058
1598412457
3178111918
2916764376
110102281
420946682
754911544
4166957105...

result:

wrong answer 1st lines differ - expected: '3408975650', found: '3548805144'

Test #17:

score: 0
Wrong Answer
time: 1516ms
memory: 61020kb

input:

200000 200000
158994 158994 0 2397655320
165026 165026 0 1247467790
193088 193089 0 1131792894 25325 134960
34834 34834 0 1974874050
106908 106908 0 158855686
73570 73571 0 660499851 32725 33730
126276 126276 0 2799927501
183868 183870 0 2792433045 319704 248051
145831 145832 0 796369972 384435 1211...

output:

1626236768
2331595949
3935591688
3382916144
2384994733
3677232660
1604148281
36675068
3383205967
3031699497
3828569020
2400552181
2753337123
3751829535
385941605
1603214773
1936643663
3172907659
3577197659
1257290556
3903652165
2143777213
706890789
2313725000
3618384216
4262798092
3292351732
3336906...

result:

wrong answer 1st lines differ - expected: '3513723604', found: '1626236768'

Test #18:

score: 0
Wrong Answer
time: 1610ms
memory: 59884kb

input:

200000 200000
42026 42026 0 103840682
115527 115527 0 730801603
175286 175286 0 952465904
115721 115722 0 3887082779 210578 202527
14017 17027 0 2717984672 155430 298216
113340 113340 0 1196664755
143222 143224 0 1622284707 237907 258953
115973 115975 0 2441078898 207848 192004
54478 54478 0 3169258...

output:

3466045536
488430788
1917877532
1407514515
1103449720
2931296340
1497078791
3018618491
4011077266
661349043
3495693959
3962419474
3078651493
2000828836
196736996
2505036150
2361939504
3561740530
2278133354
1489588859
254586877
205529515
319777039
3450497632
2928882435
131348712
1503382877
825338281
...

result:

wrong answer 1st lines differ - expected: '2991484163', found: '3466045536'

Test #19:

score: 4
Accepted
time: 1378ms
memory: 60664kb

input:

200000 200000
92524 92524 182603024 0
116778 116778 2576939405 0
10207 10207 1898802503 0
178036 178038 1935186518 0 44870 317892
137541 137544 2674676024 0 210860 64999
68085 68085 1958593201 0
179926 179929 2584382023 0 185913 349215
45422 45423 2495993608 0 157833 264143
109854 121340 113104103 0...

output:

2492113792
387547552
1287637345
1246110835
3554600264
2475459858
817374010
860956968
3592212748
843429959
892269148
2605540021
1936900198
3444541631
897088597
2122584008
3776561361
2718574796
4068742267
2171824493
3882117424
2986652517
3044629662
1506524729
1709279996
1909679383
476604845
3231501778...

result:

ok 200000 lines

Test #20:

score: 4
Accepted
time: 1269ms
memory: 59472kb

input:

200000 200000
12387 12389 2109068107 0 384829 227596
26592 26594 2550267931 0 57077 72658
80444 80444 1329109323 0
119995 119995 4165698375 0
48876 48876 766047886 0
155836 155836 3512049107 0
50100 50100 1831955483 0
193088 193089 3589455426 0 34273 140648
126549 126549 1726763169 0
149430 154350 1...

output:

569029630
311635424
3739584698
359129174
1753297532
1305935475
1374589943
3464547062
2330850518
1484796394
2114090757
1901682195
1305826277
673509997
2742098365
4035655271
433281375
3757714729
3033297819
178695315
2478541628
862382819
3146110952
2738114560
1833832974
2981667281
1263472846
486182013
...

result:

ok 200000 lines

Test #21:

score: 0
Wrong Answer
time: 1912ms
memory: 58364kb

input:

200000 200000
165129 165131 3633865218 98447901 160942 69260
170590 170592 2878276602 4164208122 147121 65383
199006 199017 3624152661 4138881358 49640 64235
92616 137590 1278705205 1262535969 229078 92015
12733 12733 1753647128 400573041
138294 138294 503689729 1701121075
178554 185671 951413620 10...

output:

2814594848
988114136
2964493909
1704535670
3884700701
2737374227
2957155303
3041096812
2430001231
21819852
1370103915
3971653345
1679911620
1509491936
3232833676
3907298481
2770709394
3732068408
561246216
1564876986
2178994241
2544727501
3783443395
833427215
3931866050
3564337868
1564184490
59397790...

result:

wrong answer 1st lines differ - expected: '2335307688', found: '2814594848'

Test #22:

score: 0
Wrong Answer
time: 1498ms
memory: 59228kb

input:

200000 200000
42616 42616 0 4073548647
148817 148819 0 678516345 137141 295278
136568 136568 0 1311526245
162591 162591 0 1123778942
152429 152430 0 865424725 274628 226053
123226 123226 0 1843160929
3315 3315 0 2548140955
158521 158522 0 726899994 308692 139695
128630 128630 0 3560425273
137094 137...

output:

590897993
3591672001
3517740285
2622689105
3365388309
3235147495
2155844333
2871252984
441763855
2129761915
3650049909
1435372102
2289911298
2643041090
3062345500
3873848756
3688193483
2533313507
3620111903
843403518
554654993
411076010
1882896630
2232583426
648370542
2111925076
737402175
3368811477...

result:

wrong answer 1st lines differ - expected: '1344432873', found: '590897993'

Test #23:

score: 0
Wrong Answer
time: 1387ms
memory: 59000kb

input:

200000 200000
92930 92933 0 945338790 270177 344831
44586 44586 0 2120126372
80169 80169 0 3407810035
173606 173606 0 2056188474
144888 144888 0 1376882346
9586 9586 0 2496173660
67542 67542 0 3278572994
95705 95705 0 2103944675
73814 73815 0 4244900263 66623 87248
149429 149431 0 2014898776 8786 61...

output:

691458141
3538848926
3295956020
470269848
2527979556
3834014465
3081736505
405422381
4059964821
3884250755
974075633
3940190579
294067861
885606359
451375995
1482897413
19516679
2075728321
1491091714
3353577872
746749263
708374860
4010143367
1488838211
467886938
3995888489
2887651372
1758601468
3797...

result:

wrong answer 1st lines differ - expected: '2400628999', found: '691458141'

Test #24:

score: 4
Accepted
time: 2318ms
memory: 61008kb

input:

200000 200000
182457 182458 3070241886 0 235330 232917
130450 160512 2343593919 0 288610 262204
86835 86836 2084902783 0 271317 299422
39111 91715 827843559 0 14965 357810
131676 131677 2889067161 0 266237 6055
88274 88274 4216568292 0
119859 119861 3636500316 0 297047 394521
30700 112091 528067902 ...

output:

232843874
3859588364
4061971686
3229697766
768722138
3628079555
1171480643
2327135560
3076854411
3090084018
768799705
3410231241
1345078640
3430977197
143599789
2278623575
2946691797
984916925
4081086279
134265600
803886895
3598885394
1931230981
2897966763
935493305
2972270338
1451927266
1041356600
...

result:

ok 200000 lines

Test #25:

score: 4
Accepted
time: 1344ms
memory: 59284kb

input:

200000 200000
16728 16728 2942007300 0
176509 176509 1919353043 0
102679 102679 3974389408 0
182519 182519 1184106257 0
83079 83089 1520374942 0 181757 4901
35926 35926 2259226600 0
33932 33933 3693656209 0 101981 2261
1804 1805 4038337356 0 92067 46297
15141 15143 4117148560 0 172165 356831
59008 5...

output:

1004805744
1590024402
3730693826
1559294237
1731869573
3120634605
3849899635
2263931148
1149785468
1275293204
1183074874
2186222154
3663082834
3028177459
3058881381
17465701
1454709892
4135314630
3940212968
2005209
1553786931
171494779
4004835088
2442859104
3959824050
4289605916
2346822689
340108913...

result:

ok 200000 lines