QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#925023#10081. Split the PictureNatsuhi Kage (Qiyu Feng, Jianing Liu, Zemu Zhu) AC ✓916ms90708kbC++234.7kb2025-03-03 22:00:252025-03-03 22:00:31

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 11860kb

input:

4
4 4 2
3 2 4
1 3 3
2 2 5

output:

9
3
9

result:

ok 3 number(s): "9 3 9"

Test #2:

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

input:

4
3 2 5
4 4 2
1 4 4
2 2 1

output:

6
4
6

result:

ok 3 number(s): "6 4 6"

Test #3:

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

input:

10
1 1 55
1 6 83
1 7 38
2 2 62
2 4 42
5 10 81
8 2 82
7 10 54
5 5 60
2 8 57

output:

191
43
43
43
205
205
302
313
313

result:

ok 9 numbers

Test #4:

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

input:

100
1 49 14913297
45 13 31472676
13 63 4207002
78 45 901070470
5 71 95874685
32 11 447504709
68 20 165762781
37 61 205136785
58 33 17608641
46 70 760543083
49 60 198097179
45 5 63332487
20 87 152060001
39 62 299387255
18 38 85259542
81 12 747954493
38 36 502151643
5 67 26307313
97 20 489117584
30 69...

output:

14801994906
14779278496
14147563218
14001807736
14001807736
14001807736
13675367454
13675367454
13675367454
13675367454
13675367454
13331371500
13331371500
13212377118
13212377118
13212377118
13212377118
12996781304
11972881616
11888922676
11803267088
11803267088
11803267088
11658780075
11447821920
...

result:

ok 99 numbers

Test #5:

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

input:

200
73 176 132561049
10 87 198805875
60 156 136161213
8 17 649402108
74 136 529171869
99 172 749338791
172 93 277322956
54 162 230452838
50 54 431799737
189 111 258487118
105 50 629889371
177 33 734530113
146 129 905825910
188 138 597993052
161 164 455472496
111 34 386268268
41 5 524615518
134 43 13...

output:

42449771633
42237929564
42207880570
40635592598
40581687698
40581687698
40581687698
40581687698
40581687698
39563301366
39563301366
39119724178
38322171796
38060315408
38060315408
37882364886
37882364886
37882364886
37509502004
36244756662
35973685662
35973685662
35973685662
34905445025
34872364460
...

result:

ok 199 numbers

Test #6:

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

input:

1000
232 1 428653105
897 313 176853618
804 204 345680573
853 786 576478929
566 780 232585293
716 934 89126320
356 158 174063364
895 645 362249998
440 979 423236536
571 599 98517616
27 191 918528018
495 170 75028351
905 965 396323859
119 855 293835055
447 472 125463900
670 96 427185021
917 31 7570961...

output:

156248641042
156248641042
156248641042
156248641042
156248641042
156248641042
156248641042
155051018382
154892251859
154892251859
154892251859
154892251859
154892251859
154892251859
154892251859
154892251859
154892251859
154892251859
154892251859
154492235181
154492235181
154492235181
154492235181
1...

result:

ok 999 numbers

Test #7:

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

input:

2000
1 1 8057326
416 1268 986523923
989 1839 760215369
1252 493 641929206
168 862 200913488
488 1543 319513509
1446 246 902133495
1763 1890 21222057
92 870 699338896
1721 705 666348634
44 1593 561031643
632 62 671453182
524 501 464395058
766 745 6788737
1033 1606 20391204
18 1632 273512563
507 1455 ...

output:

348321696426
348321696426
348186060448
348063079778
347705309816
347586813393
347363740882
346128760110
345824700724
345429421214
345078795259
345078795259
344734366002
344734366002
343043503222
343007876350
342985044739
342771959326
342771959326
342675444118
342485474488
342305302507
342305302507
3...

result:

ok 1999 numbers

Test #8:

score: 0
Accepted
time: 9ms
memory: 14352kb

input:

3500
3036 832 351323242
1389 3111 18781553
1575 959 152388607
358 640 518862857
392 16 767375330
2003 1261 72599804
340 246 173675863
1198 802 88907838
3048 943 493349528
2366 30 312848941
800 513 500065921
1504 2336 375664751
2494 1824 40765719
105 2464 101134890
3211 2052 513463477
2636 3239 11581...

output:

491282535199
490739506142
490739506142
490208372616
490150048296
490048611463
489472843302
488928272798
487911895012
487831015080
487453362131
487210010546
486910062386
486670263433
486404012220
485945617814
485871870337
485623382082
485578751444
484954266972
484589213508
484555825900
484281125385
4...

result:

ok 3499 numbers

Test #9:

score: 0
Accepted
time: 13ms
memory: 16560kb

input:

5000
2500 1721 519380908
2560 4262 164219686
181 2028 122923799
1954 3810 54068798
431 3750 80345979
571 2827 181228000
2986 2510 189071032
265 898 321384690
2236 3605 163474657
3564 3270 72175720
697 3120 87841879
4749 2406 314793487
149 4723 3850207
2052 308 92108767
1298 4017 24194308
3870 4142 2...

output:

653294627184
653294627184
653294627184
652720251002
652720251002
652579574024
652579574024
652574519202
652258750368
652258750368
652258750368
652258750368
652258750368
652258750368
652258750368
652258750368
652254817539
652254817539
651866810252
651509009777
651272936548
651272936548
650969329568
6...

result:

ok 4999 numbers

Test #10:

score: 0
Accepted
time: 13ms
memory: 16404kb

input:

5000
3440 1 4599289
4632 2823 178269888
590 1361 242925326
4485 583 315961128
64 2567 41129869
2961 1528 286209597
1596 4510 722552423
4136 3713 352345861
4646 1809 71872411
195 1380 543811770
3058 1301 231585015
2851 555 305522861
1158 238 42273973
884 4200 225842095
4501 1755 195085400
765 185 630...

output:

629541875272
629249318268
628931884350
628779859286
628574597029
627925702098
627782226854
627271178278
626881351333
626223447448
625957911428
625657867649
625418194101
625418194101
625218539906
624690925368
624690925368
624690925368
624490649805
624424593090
624424593090
624329268709
624094698220
6...

result:

ok 4999 numbers

Test #11:

score: 0
Accepted
time: 65ms
memory: 22208kb

input:

20000
14890 4995 620316484
1736 8196 343830009
7777 10092 266272505
3044 14276 346340974
4523 12687 922176723
10893 1140 42800197
14207 8931 190626653
5757 6963 340533834
13612 15820 572877282
7094 492 668174333
11491 13365 318769491
10060 9037 493052933
15407 1444 276007129
10622 1904 2886689
13228...

output:

4964597183506
4964597183506
4964312802030
4963931596727
4963151373711
4963151373711
4962360297618
4961834486987
4961376533773
4961065037647
4960723590910
4960614192948
4959899768374
4959488904276
4959282158850
4958652697423
4958043206849
4957984668740
4957694319881
4956831651106
4956630156233
495500...

result:

ok 19999 numbers

Test #12:

score: 0
Accepted
time: 136ms
memory: 31880kb

input:

40000
13105 2 856436213
30626 29349 497035210
38426 17307 110657334
13142 21721 297294332
2777 21890 780800185
20648 1200 598254254
16980 38106 136531871
34192 12584 880931500
30316 807 144967080
18642 18728 607692999
15003 27336 47106687
31881 10999 26581417
564 18327 232136429
12097 30327 96751063...

output:

9992359784019
9991193255183
9990620960203
9990620960203
9990566354945
9989417091151
9988909744911
9988450493051
9988014889351
9987142641349
9986370593625
9985998626068
9984665679886
9984620522045
9984616046981
9984614393151
9984328112296
9984280449024
9984213286545
9984213286545
9983302352891
998316...

result:

ok 39999 numbers

Test #13:

score: 0
Accepted
time: 215ms
memory: 33548kb

input:

60000
19000 3453 154871796
31757 23406 37964713
34062 45173 741392944
7044 49935 625058617
52800 2620 454275163
45516 5697 121867116
26031 22562 122426312
45683 10908 363057188
49373 14299 10333932
15212 2172 899036410
53175 6751 240690654
47515 41698 38556690
21199 15793 666408974
59257 24686 47807...

output:

8629319046637
8629277084667
8628863441580
8627322346701
8626824340345
8626824340345
8624670357162
8624670357162
8624670357162
8624592794404
8624591364410
8624591364410
8624591364410
8623797510932
8623774040568
8623774040568
8623425940326
8623338319543
8622295825425
8622295825425
8622219999105
862221...

result:

ok 59999 numbers

Test #14:

score: 0
Accepted
time: 321ms
memory: 51452kb

input:

80000
77456 21418 326268009
65138 28939 11148906
68318 10890 71461183
12195 13274 391432545
62848 3832 439865149
61687 50541 192321584
7424 2943 95868120
79862 58311 357780455
45347 38821 301414416
61956 19457 98636258
35085 27391 329600778
12925 16269 8067508
26273 53465 71332652
3290 35342 8656799...

output:

12491327409788
12490997677544
12490682686278
12489447048685
12489021791659
12488686213004
12488564248582
12488234516338
12488234516338
12487827781483
12487804688548
12487706074220
12487706074220
12487706074220
12486655824550
12486162799710
12485682286824
12484293459317
12484128324986
12483766990928
...

result:

ok 79999 numbers

Test #15:

score: 0
Accepted
time: 411ms
memory: 51260kb

input:

100000
32748 2960 657734762
82963 21573 27335632
82499 12916 104747496
45786 71296 46513410
28736 63005 27002435
36475 23452 756436380
9428 84832 48663781
97094 35846 46552533
92470 18397 3744702
97124 23016 143430315
5341 9587 563044142
72263 83271 18950917
63771 2156 377642602
28844 36261 38829311...

output:

16594481844132
16594452714751
16594452714751
16594452714751
16593949238960
16593763201318
16593763201318
16593668809859
16593668809859
16593555037246
16593104340730
16592525879965
16592018233611
16591930685100
16591889849066
16591325065493
16590646683666
16590500298325
16590313216071
16590128190065
...

result:

ok 99999 numbers

Test #16:

score: 0
Accepted
time: 413ms
memory: 52688kb

input:

100000
52385 89946 428897170
78124 71863 231975254
82544 24720 257681733
81314 6066 475073952
3908 42257 79085186
38756 20585 423127157
32353 6909 876683793
40573 14547 694539205
43697 19738 898009253
1396 82818 70490153
67969 57802 76695764
92262 26369 408970524
93522 1300 120728498
925 60680 29086...

output:

16544654675423
16544515134496
16544515134496
16544042871855
16543430175436
16543430175436
16543273502218
16543273502218
16542859305512
16541622918068
16541622918068
16541094345666
16540368555020
16539870152791
16539734325498
16539734325498
16539483115480
16538928153601
16538281020286
16538211795904
...

result:

ok 99999 numbers

Test #17:

score: 0
Accepted
time: 522ms
memory: 52508kb

input:

120000
18794 1 214674792
11516 51341 293675344
51904 29420 391489550
28547 102924 55603891
100664 35841 332075051
111845 62185 2368797
87837 15682 113930040
82992 4463 122690400
37867 97199 3624213
29017 1901 652625886
15255 15586 972757401
3309 19924 552172113
98680 498 6451657
102367 44813 1038564...

output:

17935526102439
17935526102439
17935526102439
17935469964239
17935327708343
17934447106343
17934447106343
17934236455627
17934021115180
17934021115180
17934021115180
17932656264835
17932325029489
17932235961951
17932153308403
17931547891960
17931146047501
17931022194803
17931022194803
17930532808431
...

result:

ok 119999 numbers

Test #18:

score: 0
Accepted
time: 665ms
memory: 88184kb

input:

150000
58249 1 19776959
23880 144728 707215525
60538 59944 437205809
83926 125075 206602882
115768 48935 330410534
45276 85486 180747462
104083 22237 981210448
84465 115041 540247482
70150 50530 576722299
6752 2958 390677147
61622 43500 526962217
40606 12533 630726870
47291 123208 442725604
139715 1...

output:

26675992344567
26675480242599
26675348058427
26674978522089
26674772481829
26673846814333
26673832836613
26673600901937
26673288574710
26673256598846
26673042219148
26673042219148
26671806958100
26671563673084
26671563673084
26671563673084
26670798229748
26670762419116
26670144985865
26669653664774
...

result:

ok 149999 numbers

Test #19:

score: 0
Accepted
time: 803ms
memory: 88896kb

input:

175000
1 1 258080920
25863 142484 446044116
23560 167944 853986908
159960 30382 564123156
172597 26162 293742240
160005 44871 869933632
29895 53397 625744670
50685 126252 242688629
149657 13164 549228535
156989 4000 323723198
28427 16135 315660181
96842 819 984514167
108450 161965 549363934
13490 16...

output:

41594955177154
41594493526762
41594184598944
41594184598944
41594184598944
41592659354321
41592559411928
41591333801720
41591333801720
41591085549705
41590459454909
41589717538621
41589717538621
41589173240664
41588352063259
41586751192251
41586633538913
41586633538913
41586509749864
41586509749864
...

result:

ok 174999 numbers

Test #20:

score: 0
Accepted
time: 915ms
memory: 90708kb

input:

200000
199125 51714 149430392
164557 53641 38914600
199701 39073 24589035
186660 14211 169525442
119002 77920 424985118
80358 55342 60497221
192449 148975 428394187
167104 128957 6971949
124981 154399 365097744
81054 85560 599743793
156147 71805 92844577
110184 62308 113560700
103774 39582 35177587
...

output:

27915216218852
27915071959188
27915071959188
27914265639068
27913818944589
27913818944589
27913506634710
27913472683852
27912710832853
27911781842646
27911554581796
27911097332676
27911001629200
27910331571955
27909950395508
27909713697223
27909709934967
27909250788649
27909250788649
27909250788649
...

result:

ok 199999 numbers

Test #21:

score: 0
Accepted
time: 916ms
memory: 90460kb

input:

200000
43297 1 647166264
149783 42825 332657224
16894 1825 776449967
60031 946 812734838
156041 91076 46088910
49972 34966 279186855
62840 42290 587917118
81217 39965 202265645
138436 8868 308713079
108616 99785 459730457
2545 96597 63855894
112804 7802 310216231
35728 161130 397544895
8369 11557 31...

output:

35165983386984
35165905035348
35164029037614
35163748190705
35163299190751
35163257551981
35163257551981
35162221293368
35161740767069
35161608085070
35160274002221
35160274002221
35159878049145
35159878049145
35159353218780
35159353218780
35159237125331
35159237125331
35158394711106
35157932533601
...

result:

ok 199999 numbers

Test #22:

score: 0
Accepted
time: 906ms
memory: 90132kb

input:

200000
2 2 730140009
160870 109954 790430199
98265 161771 619341473
95039 76025 609672570
164072 155596 75353560
37046 191408 30233004
126905 129148 264439794
173820 121553 53394266
187037 45188 301506574
98995 110064 313856471
59190 69788 33998016
128024 76947 217329922
113149 195137 194198518
1292...

output:

41687565955652
41687328475782
41686730367368
41686730367368
41686730367368
41686311798524
41686217724511
41685972561069
41684960683716
41684960683716
41684960683716
41683595406854
41683422405582
41683422405582
41682483460854
41681505759238
41680378451659
41679905149914
41679772105077
41679525390438
...

result:

ok 199999 numbers

Test #23:

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

input:

2
1 1 1000000000
2 2 1

output:

1000000000

result:

ok 1 number(s): "1000000000"