QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#442583#8522. Waterfall Matrixucup-team1878#TL 6196ms4364kbC++23889b2024-06-15 12:53:552024-06-15 12:53:55

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

3

result:

ok 1 number(s): "3"

Test #2:

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

input:

1
1 1 58383964

output:

0

result:

ok 1 number(s): "0"

Test #3:

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

input:

2
1 1 204909414
2 2 807091086

output:

602181672

result:

ok 1 number(s): "602181672"

Test #4:

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

input:

4
2 4 107744934
3 2 143843719
4 4 908851567
2 2 307161330

output:

801106633

result:

ok 1 number(s): "801106633"

Test #5:

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

input:

7
1 2 140766572
5 3 795389698
3 6 279722536
2 6 442413348
4 2 475716910
5 4 704493410
5 2 423494885

output:

935621651

result:

ok 1 number(s): "935621651"

Test #6:

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

input:

11
1 5 104443431
4 9 692130290
4 1 18812720
7 3 381505729
7 7 706418558
11 9 242808397
10 4 490383412
3 2 72839501
10 7 883914647
10 6 738589165
11 10 556539693

output:

2757182575

result:

ok 1 number(s): "2757182575"

Test #7:

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

input:

17
14 13 957289906
14 1 220840920
10 3 230060608
9 12 405076666
13 5 112827045
12 12 925699151
11 9 243364659
3 15 66125969
1 5 481618704
17 11 67207393
9 4 141885319
2 2 641760683
4 6 30421350
5 9 145177348
7 13 468875688
11 7 557989385
13 17 468110036

output:

3056543193

result:

ok 1 number(s): "3056543193"

Test #8:

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

input:

26
22 1 655039096
18 3 405980640
11 23 310084709
17 6 5210226
6 25 869210460
14 23 9079903
17 9 162692938
21 1 703337421
13 8 216969244
8 23 242760842
11 9 876472951
5 15 545320494
8 6 764694540
4 12 164086724
6 13 394175551
10 1 906738317
26 25 224731347
12 14 967318812
26 14 449256484
23 4 6152281...

output:

3872286425

result:

ok 1 number(s): "3872286425"

Test #9:

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

input:

40
33 19 974202889
40 11 262863105
18 17 143706322
15 37 253303786
4 8 962133788
40 22 885916470
22 19 949122323
32 29 221627390
17 24 605257795
3 14 259799950
5 3 987951246
28 30 451968921
13 17 503334855
11 26 190979064
11 13 497711531
29 4 764544900
38 16 199461325
7 9 618831071
25 30 209848351
1...

output:

7657769074

result:

ok 1 number(s): "7657769074"

Test #10:

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

input:

61
6 25 772410634
9 47 581631393
40 34 565465748
8 55 154525415
3 50 298013089
16 23 593130934
26 5 721815207
42 43 28712243
61 21 539501497
49 53 283028482
4 20 267467572
59 45 55599983
26 3 218043086
15 8 213292621
37 44 119318590
29 33 445273185
37 3 734748198
21 56 178476345
12 40 897802983
3 29...

output:

9305689053

result:

ok 1 number(s): "9305689053"

Test #11:

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

input:

92
67 63 115551817
40 57 922062274
21 83 268857323
59 65 957783695
44 1 720871230
44 65 682393003
85 21 850933251
47 32 990892557
75 90 807656030
37 83 446279042
6 8 121301986
52 34 648749799
29 56 519610045
58 28 915936953
19 8 736754508
77 25 251573087
77 5 708764858
71 66 395892865
37 9 339525762...

output:

20584500053

result:

ok 1 number(s): "20584500053"

Test #12:

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

input:

139
34 89 106739274
76 37 623575790
96 95 241595468
100 37 24819785
67 78 157943133
86 66 173514198
6 107 220712008
95 94 902234730
124 117 827871287
82 10 199132415
48 29 821720496
99 15 21336498
79 84 287004315
27 57 112113016
102 106 99696275
52 94 326387056
17 41 717541828
24 119 561086579
137 1...

output:

34223480997

result:

ok 1 number(s): "34223480997"

Test #13:

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

input:

209
202 11 985436507
81 23 303372005
58 65 271936110
105 6 780231383
183 131 67052291
140 15 742761772
92 31 934033938
172 97 238586287
77 191 267962930
199 10 970201899
2 150 211701369
35 162 119938268
195 197 567498864
62 159 198698620
17 110 472437657
202 179 121800271
115 135 70371572
111 62 443...

output:

49909325408

result:

ok 1 number(s): "49909325408"

Test #14:

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

input:

314
26 307 692391292
279 111 226570582
290 76 261494858
132 47 708283863
253 177 82612833
32 26 881275895
248 213 349235000
240 136 227630771
133 208 894493845
295 174 760101024
191 182 333036912
309 205 326571720
138 220 582371900
185 262 33941275
113 151 91998856
194 51 532523590
219 174 90194801
...

output:

73980124774

result:

ok 1 number(s): "73980124774"

Test #15:

score: 0
Accepted
time: 12ms
memory: 3568kb

input:

472
215 64 888756595
191 437 782953525
284 151 807803141
142 382 737321722
200 373 933468526
387 190 414005694
137 464 157330847
240 55 838395267
262 74 996210474
428 42 179226852
364 446 789614149
177 66 882599216
6 278 229756157
22 325 676675321
231 131 811796299
335 86 632795653
184 433 454696152...

output:

115815454982

result:

ok 1 number(s): "115815454982"

Test #16:

score: 0
Accepted
time: 28ms
memory: 3868kb

input:

709
507 296 959229221
564 579 785837067
165 238 854583076
195 550 409079670
134 411 35472127
581 210 191747703
170 161 804804474
111 106 442762676
488 333 310679628
69 505 273768286
120 85 205745581
652 565 468876379
30 165 512567322
236 654 568944218
572 116 598480208
448 537 315385253
590 374 4940...

output:

176997131937

result:

ok 1 number(s): "176997131937"

Test #17:

score: 0
Accepted
time: 70ms
memory: 3680kb

input:

1064
1011 964 184314429
821 627 456155208
732 497 56527680
179 168 52071168
836 1005 604045343
19 401 439301716
818 500 303713286
970 268 24075641
888 744 839729821
101 97 726134962
942 260 735986500
143 436 241015562
668 910 391605524
634 635 160559352
205 50 612020502
20 360 696670729
175 575 2551...

output:

266930542461

result:

ok 1 number(s): "266930542461"

Test #18:

score: 0
Accepted
time: 175ms
memory: 3836kb

input:

1597
639 1393 166904194
1326 984 426206306
443 1524 935852282
848 1091 771776465
760 898 864783022
1379 372 38647886
481 603 346594658
521 122 293597610
1441 1589 133798182
1185 1272 279881925
544 666 231802145
1081 429 975793623
802 720 31278767
918 535 992962940
528 706 915212950
520 505 309874112...

output:

405559254752

result:

ok 1 number(s): "405559254752"

Test #19:

score: 0
Accepted
time: 419ms
memory: 4128kb

input:

2396
1981 1533 298355427
97 1737 959008541
787 1377 213392751
471 1 315600441
1995 1605 255228530
1813 309 900206470
463 536 734537574
730 2056 946098919
42 535 656307145
213 2365 598200890
582 105 100509217
1413 1740 655194157
1152 17 689800494
2106 1978 135105427
1252 999 617607068
1044 612 802184...

output:

597231143545

result:

ok 1 number(s): "597231143545"

Test #20:

score: 0
Accepted
time: 1041ms
memory: 4052kb

input:

3595
1226 458 449847735
3424 1750 313050010
3169 2627 640096567
162 1184 906369956
1422 1015 293642622
340 2940 990712500
1026 1217 841244511
388 3004 899853656
896 669 146375886
2674 2297 111706208
3201 1696 323055839
351 1670 182429627
1633 511 12020195
2001 3285 41275714
248 1703 219345489
1759 1...

output:

899911898812

result:

ok 1 number(s): "899911898812"

Test #21:

score: 0
Accepted
time: 2564ms
memory: 4364kb

input:

5393
2093 1287 583196596
2605 4403 533046343
3917 285 235297421
4318 4681 411844255
1588 1842 648962599
2164 2375 680797189
217 3854 531509369
4606 3646 354560797
4059 1754 976303595
1979 2652 265487574
4518 3955 157233712
2220 3416 107520029
1693 4855 722727994
4784 4162 245866252
498 1215 20109583...

output:

1349936604836

result:

ok 1 number(s): "1349936604836"

Test #22:

score: 0
Accepted
time: 6196ms
memory: 4180kb

input:

8090
4866 7478 356775584
2504 3192 239406790
7743 2941 65392868
5615 1820 337863138
7340 4815 69744983
6191 1229 587983387
7729 3212 685050434
4313 5380 999113456
6515 5715 447059187
2429 7934 458547204
3870 7822 238996790
2286 3953 479733208
2620 3563 480862876
1111 6631 522438482
7956 2469 1939648...

output:

2064278617120

result:

ok 1 number(s): "2064278617120"

Test #23:

score: -100
Time Limit Exceeded

input:

12136
9194 7715 385468038
10307 6421 156181299
2779 9831 370946156
5449 7750 978449190
1276 844 367495644
1009 11917 41206130
4623 821 884083711
7802 3252 270221800
11699 9720 67880248
905 7498 882641163
846 10014 591139488
6648 1671 688996597
4295 12118 207178901
4320 10134 122002645
3686 10730 854...

output:


result: