QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#479968#6457. Greetings!lmq26052003AC ✓616ms22244kbC++231.2kb2024-07-15 23:49:282024-07-15 23:49:28

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5 1
10 10 5
9 8 10
4 12 20
12 4 8
2 3 16

output:

5836

result:

ok single line: '5836'

Test #2:

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

input:

5 2
10 10 5
9 8 10
4 12 20
12 4 8
2 3 16

output:

1828

result:

ok single line: '1828'

Test #3:

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

input:

5 5
10 10 5
9 8 10
4 12 20
12 4 8
2 3 16

output:

0

result:

ok single line: '0'

Test #4:

score: 0
Accepted
time: 3ms
memory: 21416kb

input:

15 1
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

6623180902386

result:

ok single line: '6623180902386'

Test #5:

score: 0
Accepted
time: 34ms
memory: 21888kb

input:

15 2
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

3669004576131

result:

ok single line: '3669004576131'

Test #6:

score: 0
Accepted
time: 79ms
memory: 21288kb

input:

15 3
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

1679223844562

result:

ok single line: '1679223844562'

Test #7:

score: 0
Accepted
time: 120ms
memory: 21768kb

input:

15 4
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

1144611745804

result:

ok single line: '1144611745804'

Test #8:

score: 0
Accepted
time: 168ms
memory: 21416kb

input:

15 5
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

791363702124

result:

ok single line: '791363702124'

Test #9:

score: 0
Accepted
time: 208ms
memory: 21420kb

input:

15 6
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

522367397240

result:

ok single line: '522367397240'

Test #10:

score: 0
Accepted
time: 259ms
memory: 21432kb

input:

15 7
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

365669147321

result:

ok single line: '365669147321'

Test #11:

score: 0
Accepted
time: 300ms
memory: 21640kb

input:

15 8
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

274664238179

result:

ok single line: '274664238179'

Test #12:

score: 0
Accepted
time: 341ms
memory: 21280kb

input:

15 9
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

199764725171

result:

ok single line: '199764725171'

Test #13:

score: 0
Accepted
time: 393ms
memory: 21292kb

input:

15 10
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

134616923465

result:

ok single line: '134616923465'

Test #14:

score: 0
Accepted
time: 434ms
memory: 21188kb

input:

15 11
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

80438469665

result:

ok single line: '80438469665'

Test #15:

score: 0
Accepted
time: 482ms
memory: 21284kb

input:

15 12
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

43007942949

result:

ok single line: '43007942949'

Test #16:

score: 0
Accepted
time: 524ms
memory: 21448kb

input:

15 13
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

16596601356

result:

ok single line: '16596601356'

Test #17:

score: 0
Accepted
time: 567ms
memory: 21904kb

input:

15 14
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

3943630032

result:

ok single line: '3943630032'

Test #18:

score: 0
Accepted
time: 612ms
memory: 21492kb

input:

15 15
5055 1714 3285
9671 207 8459
9401 981 6906
1797 5262 9922
7599 9757 6767
7349 3753 4599
2095 7162 5062
4066 2683 5551
8754 8291 667
5371 9157 7853
8645 2910 6133
9651 9486 7444
2233 5924 9613
2179 5756 5749
4111 3811 9610

output:

0

result:

ok single line: '0'

Test #19:

score: 0
Accepted
time: 610ms
memory: 22044kb

input:

15 15
2082 730 9313
9060 5894 6300
3362 5422 6411
5535 1034 1508
9037 9140 9883
4883 3621 4413
8562 4319 1579
1783 3232 4201
7221 1169 3971
2861 6608 6780
3137 4039 1257
6891 1729 2693
5193 6297 549
6040 1883 8617
1912 516 3275

output:

0

result:

ok single line: '0'

Test #20:

score: 0
Accepted
time: 610ms
memory: 21208kb

input:

15 15
9960 4624 359
6685 2656 384
9894 7063 902
4317 131 7388
5347 8699 8731
8534 7839 851
700 3583 2025
9075 8643 3805
2819 7074 419
5591 4906 5998
2546 8888 8676
1140 8909 2094
2962 1291 6732
7903 533 7966
3968 7338 8141

output:

0

result:

ok single line: '0'

Test #21:

score: 0
Accepted
time: 607ms
memory: 21960kb

input:

15 15
8820 3401 8581
604 7998 1253
808 4184 6732
9618 1589 912
4540 228 51
6086 7984 9985
3990 2891 6299
5258 3020 4808
9736 4293 7894
456 3350 5797
4705 3763 7060
8667 7232 1749
549 2870 5192
5646 2320 6821
9864 9922 8936

output:

0

result:

ok single line: '0'

Test #22:

score: 0
Accepted
time: 616ms
memory: 21280kb

input:

15 15
5501 1746 6928
5074 2039 1866
4320 6248 6993
7163 1942 6361
1044 8880 8019
506 7141 6678
7290 3389 9605
6187 7520 7933
3187 1970 7308
3683 9138 2183
4303 3000 2421
201 6685 5272
6502 2313 1929
7551 5670 6782
4943 7731 1342

output:

0

result:

ok single line: '0'

Test #23:

score: 0
Accepted
time: 608ms
memory: 21212kb

input:

15 15
3426 2442 973
7028 876 7286
5813 2586 5834
5327 9193 7425
8011 5817 4697
6683 2535 3097
7699 4061 5244
7584 3350 1235
5094 3672 2005
7293 6905 7415
9610 1927 1470
6705 212 9239
7912 8458 814
8495 210 1096
1981 1203 4023

output:

0

result:

ok single line: '0'

Test #24:

score: 0
Accepted
time: 610ms
memory: 22180kb

input:

15 15
631 8838 420
5853 7110 2986
6763 7550 7102
7520 8225 2869
4083 2493 2923
5170 339 3634
7411 3610 5452
4689 9601 6510
1578 7869 6616
5989 5246 7966
6285 5657 9226
6110 6963 523
7336 5795 4882
9268 2747 6489
8166 1642 1405

output:

0

result:

ok single line: '0'

Test #25:

score: 0
Accepted
time: 608ms
memory: 22244kb

input:

15 15
7931 4067 7819
1815 1646 8085
2008 9535 5467
7302 6657 1547
2806 8185 9913
85 3775 132
6278 7783 6789
2266 8503 9445
2722 6694 8866
617 8983 3972
7033 4218 1140
9145 7464 7670
4372 8483 1582
8334 915 6250
8150 6241 2525

output:

0

result:

ok single line: '0'

Test #26:

score: 0
Accepted
time: 608ms
memory: 21284kb

input:

15 15
2502 2001 2064
2949 2970 3345
1 2990 4975
6740 2096 7354
9499 3227 2959
2828 352 774
317 3100 8385
4303 4885 8695
8383 8815 733
399 5858 1633
1871 9382 946
9089 5445 9779
4086 8095 4925
1775 547 6070
4956 415 7766

output:

0

result:

ok single line: '0'

Test #27:

score: 0
Accepted
time: 608ms
memory: 21280kb

input:

15 15
6804 2879 7326
6782 7622 9676
9061 3440 850
1159 1850 4445
3552 1857 3571
4577 437 890
2469 3426 9565
7 1453 6569
724 9375 2298
445 1426 5279
9014 4122 3425
1021 8015 8417
9788 2362 3062
9897 2837 6481
9890 2531 9363

output:

0

result:

ok single line: '0'

Test #28:

score: 0
Accepted
time: 608ms
memory: 21656kb

input:

15 15
6700 6034 2043
4103 7221 2206
1914 5721 7338
8440 8585 9812
3034 8149 2096
458 268 4242
6908 5157 8462
132 8526 3548
9595 8752 6400
1870 4486 8340
1587 3246 7763
1568 5733 8106
4165 5348 8174
10 2114 1288
265 7250 4370

output:

0

result:

ok single line: '0'

Test #29:

score: 0
Accepted
time: 609ms
memory: 21192kb

input:

15 15
3361 783 1564
2776 3514 3741
1749 2035 3251
981 2449 1217
1339 1430 353
1620 420 1499
32 1246 507
689 904 978
803 799 328
452 27 357
246 333 860
59 170 198
463 186 165
271 594 7
357 53 464

output:

0

result:

ok single line: '0'

Test #30:

score: 0
Accepted
time: 607ms
memory: 21700kb

input:

15 15
9260 4724 456
3418 298 4971
1734 1600 1657
284 193 155
1403 1116 1290
816 1278 1185
930 29 1250
243 827 778
565 179 250
800 279 17
728 191 254
458 41 747
73 734 359
713 317 692
25 215 110

output:

0

result:

ok single line: '0'

Test #31:

score: 0
Accepted
time: 611ms
memory: 21492kb

input:

15 15
4350 1055 405
4792 787 321
244 2426 2645
698 1572 2472
791 5 1456
864 1160 1561
942 1415 973
865 662 798
779 1103 467
811 250 573
442 62 255
57 8 596
282 31 115
142 240 323
69 311 624

output:

0

result:

ok single line: '0'

Test #32:

score: 0
Accepted
time: 613ms
memory: 21220kb

input:

15 15
5703 7017 3628
4891 3598 347
420 3033 312
2220 249 199
1808 100 1743
728 1332 1154
1359 1131 1330
420 772 1067
309 947 930
164 228 491
822 68 433
60 29 86
450 752 122
698 462 355
521 401 378

output:

0

result:

ok single line: '0'

Test #33:

score: 0
Accepted
time: 609ms
memory: 21192kb

input:

15 15
4880 2938 6965
4068 1629 4636
1306 812 410
419 575 2220
768 1875 1215
1307 1130 1621
810 1371 948
1214 1163 156
135 845 357
114 93 38
450 802 430
680 527 319
419 16 33
20 533 522
462 70 661

output:

0

result:

ok single line: '0'

Test #34:

score: 0
Accepted
time: 611ms
memory: 21204kb

input:

15 15
5553 4205 3443
2698 4252 4348
1581 3076 1067
697 1885 669
514 1455 780
598 1006 1465
330 1038 262
321 1143 846
364 292 261
174 440 305
144 786 326
533 765 267
239 711 165
403 137 346
458 150 592

output:

0

result:

ok single line: '0'

Test #35:

score: 0
Accepted
time: 605ms
memory: 21212kb

input:

15 15
6699 30 5901
4291 4611 607
1414 1642 973
2383 1299 739
388 1994 462
160 537 1500
686 63 118
388 112 775
1099 140 633
669 599 41
759 354 523
393 387 224
416 93 235
258 513 97
564 317 282

output:

0

result:

ok single line: '0'

Test #36:

score: 0
Accepted
time: 607ms
memory: 21956kb

input:

15 15
7497 6213 6655
3436 3484 1303
2579 1651 750
43 1444 355
547 1128 1352
921 1251 441
657 206 1372
776 277 1195
830 863 1036
633 916 897
408 629 439
722 528 821
524 337 566
21 644 293
429 593 86

output:

0

result:

ok single line: '0'

Test #37:

score: 0
Accepted
time: 611ms
memory: 22168kb

input:

15 15
2516 7839 6784
2890 1014 2072
2424 2972 1647
1368 1900 1460
428 312 533
339 433 1330
1413 749 1285
667 322 1226
927 1084 135
96 612 479
436 402 743
296 25 12
756 154 20
228 472 356
385 199 276

output:

0

result:

ok single line: '0'

Test #38:

score: 0
Accepted
time: 606ms
memory: 21912kb

input:

15 15
679 368 8711
2293 130 2883
2970 1132 5
325 650 2248
497 1907 610
443 305 1162
870 928 640
319 516 494
889 288 141
834 752 675
528 226 596
125 422 226
217 760 581
160 285 193
611 13 15

output:

0

result:

ok single line: '0'

Test #39:

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

input:

11 3
91 8222 7928
5826 5032 151
6108 2878 132
6672 5428 8484
2913 1012 9242
6453 5035 4385
9126 2230 2705
2268 7619 7360
20 7480 1694
9251 9691 8817
8221 443 1551

output:

808166058092

result:

ok single line: '808166058092'

Test #40:

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

input:

13 3
9338 714 8472
7691 2325 1111
6382 1728 5739
2902 4070 9944
5136 575 8233
783 296 4112
4821 456 2830
5252 8293 5667
9524 1682 1855
668 933 3391
5895 3824 4902
7745 1073 7628
7132 2994 6084

output:

761210769305

result:

ok single line: '761210769305'

Test #41:

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

input:

11 2
9421 5913 3564
4571 5272 2627
1767 5855 4349
7064 6681 5150
3063 7213 5579
3355 4198 4593
4619 6562 527
4784 9437 8490
4578 8647 6835
9990 5305 119
1668 890 3707

output:

827253265068

result:

ok single line: '827253265068'

Test #42:

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

input:

9 14
9979 9146 1427
8943 5775 5823
2794 6955 9156
1967 3973 9113
9933 2842 9738
9631 9542 561
4128 6310 9320
2161 7374 1907
1256 7984 7691

output:

0

result:

ok single line: '0'

Test #43:

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

input:

2 13
8723 6837 8698
5780 841 3069

output:

0

result:

ok single line: '0'

Test #44:

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

input:

7 12
6008 1375 3296
7860 5202 4591
6033 9788 1123
8079 1933 3717
10 9645 9150
7238 8338 3721
226 3654 1404

output:

0

result:

ok single line: '0'

Test #45:

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

input:

4 11
9355 6938 8053
7387 8602 3018
8485 7828 2316
813 8538 3149

output:

0

result:

ok single line: '0'

Test #46:

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

input:

7 2
5264 9304 4638
2117 1379 1271
5106 6271 8090
2474 2087 2984
5629 1202 1364
3999 4295 1559
1071 452 9926

output:

336222153295

result:

ok single line: '336222153295'

Test #47:

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

input:

9 4
8176 6831 5129
3072 3361 6111
2261 3840 2598
333 7122 6535
3652 3435 8322
1315 7155 762
285 1376 1240
2717 3481 7766
2047 9350 2609

output:

90245525024

result:

ok single line: '90245525024'

Test #48:

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

input:

1 13
4061 3526 6683

output:

0

result:

ok single line: '0'

Test #49:

score: 0
Accepted
time: 3ms
memory: 21640kb

input:

6 6
3508 6290 9595
8222 414 6735
2428 8615 3999
245 23 5973
7835 5051 8417
1505 904 5002

output:

0

result:

ok single line: '0'

Test #50:

score: 0
Accepted
time: 3ms
memory: 21028kb

input:

1 1
7497 657 7202

output:

0

result:

ok single line: '0'

Test #51:

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

input:

7 3
1577 1478 9606
7959 5987 393
7692 9925 2526
5150 8487 3293
7860 1259 7958
6264 4468 6276
8451 8492 1962

output:

292201607391

result:

ok single line: '292201607391'

Test #52:

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

input:

2 1
6810 3466 3436
8577 6080 1453

output:

98079589200

result:

ok single line: '98079589200'

Test #53:

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

input:

8 7
8482 2082 8163
3261 4912 469
5713 1582 836
5132 8449 9060
4362 5710 3888
8973 3548 8223
5143 8453 1417
9463 9814 4231

output:

1028409660

result:

ok single line: '1028409660'

Test #54:

score: 0
Accepted
time: 15ms
memory: 21968kb

input:

13 5
7692 2550 3478
7126 7560 431
775 364 3139
5785 3926 7751
7369 9585 6509
4862 5075 6757
9547 4567 6656
4431 4512 6671
2117 2732 3464
9478 2494 8459
8001 8631 2559
1537 7563 8373
4653 1098 2348

output:

396800585287

result:

ok single line: '396800585287'

Test #55:

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

input:

3 2
4458 8893 567
3888 6721 4820
7768 981 9516

output:

65136255720

result:

ok single line: '65136255720'

Test #56:

score: 0
Accepted
time: 4ms
memory: 20960kb

input:

7 4
8951 6056 7753
6012 4093 1026
987 783 6250
1338 435 3886
3095 3750 2778
3638 6827 8035
1173 8288 6937

output:

70650849282

result:

ok single line: '70650849282'

Test #57:

score: 0
Accepted
time: 8ms
memory: 21364kb

input:

13 3
9651 7831 2448
605 8534 4150
7616 6294 3219
3011 8978 4080
5912 2457 7733
7456 9719 208
5035 4672 4557
5158 105 4967
1567 1976 4878
2487 4304 1694
6305 3043 2623
2416 1683 9723
2381 2665 7987

output:

1050930205880

result:

ok single line: '1050930205880'

Test #58:

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

input:

8 2
3879 1104 4298
5892 6459 3289
7514 9968 4835
4432 9932 1733
9217 718 7623
4370 5880 1936
1958 6675 1219
5294 2603 63

output:

401623285702

result:

ok single line: '401623285702'

Test #59:

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

input:

4 2
2563 8545 9089
7482 6673 500
4103 5446 9050
5335 3080 401

output:

248109140536

result:

ok single line: '248109140536'

Test #60:

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

input:

6 4
6727 7823 7597
5996 9868 2440
6636 4165 590
795 6837 125
9245 9091 9366
9319 9054 8545

output:

15145906529

result:

ok single line: '15145906529'

Test #61:

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

input:

8 4
5348 4792 1293
6555 5287 8888
8630 6098 2228
9571 5101 8521
7249 3723 2213
2310 1339 3324
5212 2443 894
7302 6985 2291

output:

117897831035

result:

ok single line: '117897831035'

Test #62:

score: 0
Accepted
time: 99ms
memory: 21148kb

input:

14 8
1224 4203 650
5781 2080 7261
6132 2099 142
4728 8764 3883
6143 8684 8003
4513 6047 9329
8644 7145 9497
2279 7154 3262
5609 1799 7421
130 9350 8137
3584 1440 7686
6047 3242 781
1341 7006 2102
4621 9350 1309

output:

80294947849

result:

ok single line: '80294947849'

Test #63:

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

input:

5 3
7884 3878 5961
7167 4325 5786
4725 7707 3404
6273 7669 5201
4697 799 8766

output:

80800964196

result:

ok single line: '80800964196'

Test #64:

score: 0
Accepted
time: 3ms
memory: 21912kb

input:

13 2
7197 7123 4134
968 1796 670
5959 3569 9221
3132 3893 721
64 9610 8220
7762 6616 3205
4861 5343 4927
5806 3327 8331
6047 7436 9507
9434 2196 6686
8597 6112 4664
8780 430 3524
8342 6840 9286

output:

2303198953680

result:

ok single line: '2303198953680'

Test #65:

score: 0
Accepted
time: 387ms
memory: 21204kb

input:

15 10
2 2 2
16 16 16
54 54 54
128 128 128
250 250 250
432 432 432
686 686 686
1024 1024 1024
1458 1458 1458
2000 2000 2000
2662 2662 2662
3456 3456 3456
4394 4394 4394
5488 5488 5488
6750 6750 6750

output:

66097080

result:

ok single line: '66097080'

Test #66:

score: 0
Accepted
time: 395ms
memory: 21668kb

input:

15 10
6750 2 2
5488 16 16
4394 54 54
3456 128 128
2662 250 250
2000 432 432
1458 686 686
1024 1024 1024
686 1458 1458
432 2000 2000
250 2662 2662
128 3456 3456
54 4394 4394
16 5488 5488
2 6750 6750

output:

996651096

result:

ok single line: '996651096'

Test #67:

score: 0
Accepted
time: 385ms
memory: 21288kb

input:

15 10
2 6750 2
16 5488 16
54 4394 54
128 3456 128
250 2662 250
432 2000 432
686 1458 686
1024 1024 1024
1458 686 1458
2000 432 2000
2662 250 2662
3456 128 3456
4394 54 4394
5488 16 5488
6750 2 6750

output:

996651096

result:

ok single line: '996651096'

Test #68:

score: 0
Accepted
time: 395ms
memory: 21416kb

input:

15 10
6750 6750 2
5488 5488 16
4394 4394 54
3456 3456 128
2662 2662 250
2000 2000 432
1458 1458 686
1024 1024 1024
686 686 1458
432 432 2000
250 250 2662
128 128 3456
54 54 4394
16 16 5488
2 2 6750

output:

835781640

result:

ok single line: '835781640'

Test #69:

score: 0
Accepted
time: 390ms
memory: 21912kb

input:

15 10
2 2 6750
16 16 5488
54 54 4394
128 128 3456
250 250 2662
432 432 2000
686 686 1458
1024 1024 1024
1458 1458 686
2000 2000 432
2662 2662 250
3456 3456 128
4394 4394 54
5488 5488 16
6750 6750 2

output:

835781640

result:

ok single line: '835781640'

Test #70:

score: 0
Accepted
time: 395ms
memory: 21264kb

input:

15 10
6750 2 6750
5488 16 5488
4394 54 4394
3456 128 3456
2662 250 2662
2000 432 2000
1458 686 1458
1024 1024 1024
686 1458 686
432 2000 432
250 2662 250
128 3456 128
54 4394 54
16 5488 16
2 6750 2

output:

996651096

result:

ok single line: '996651096'

Test #71:

score: 0
Accepted
time: 394ms
memory: 21540kb

input:

15 10
2 6750 6750
16 5488 5488
54 4394 4394
128 3456 3456
250 2662 2662
432 2000 2000
686 1458 1458
1024 1024 1024
1458 686 686
2000 432 432
2662 250 250
3456 128 128
4394 54 54
5488 16 16
6750 2 2

output:

996651096

result:

ok single line: '996651096'

Test #72:

score: 0
Accepted
time: 389ms
memory: 21916kb

input:

15 10
6750 6750 6750
5488 5488 5488
4394 4394 4394
3456 3456 3456
2662 2662 2662
2000 2000 2000
1458 1458 1458
1024 1024 1024
686 686 686
432 432 432
250 250 250
128 128 128
54 54 54
16 16 16
2 2 2

output:

66097080

result:

ok single line: '66097080'