QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#565909#3998. The ProfiteerZ_301WA 379ms25640kbC++172.2kb2024-09-15 22:35:352024-09-15 22:35:37

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

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

output:

1

result:

ok single line: '1'

Test #2:

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

input:

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

output:

3

result:

ok single line: '3'

Test #3:

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

input:

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

output:

7

result:

ok single line: '7'

Test #4:

score: 0
Accepted
time: 353ms
memory: 6760kb

input:

200000 50 23333
2620 5 21
8192 17 34
6713 38 46
6687 13 42
390 9 13
4192 7 37
7898 17 21
1471 16 45
3579 22 40
9628 8 23
7164 28 45
3669 14 31
5549 29 35
4670 30 39
5811 15 20
4162 18 29
7590 29 41
7786 23 35
383 9 40
5576 39 46
5586 4 9
1110 14 33
8568 4 6
8548 39 42
9133 10 42
6679 22 39
8353 33 3...

output:

0

result:

ok single line: '0'

Test #5:

score: 0
Accepted
time: 354ms
memory: 6888kb

input:

200000 50 233332
8019 18 20
3111 27 40
2015 16 47
6491 17 18
1224 30 38
428 23 34
7521 4 41
7252 6 33
4121 32 45
4230 18 35
1605 21 42
9489 17 25
3704 35 45
6202 8 22
6493 1 5
3041 14 46
4509 23 43
9646 11 48
5294 19 27
3562 19 40
9408 30 47
1751 21 29
4053 4 27
5596 32 49
8609 13 29
1686 4 31
3588 ...

output:

17523021

result:

ok single line: '17523021'

Test #6:

score: 0
Accepted
time: 347ms
memory: 6812kb

input:

200000 50 2333331
7420 30 44
8652 22 28
5418 8 21
9825 3 8
4257 21 40
9962 6 16
3370 18 41
2192 37 41
231 8 18
7764 3 41
3455 9 18
1159 8 46
9775 9 42
4400 21 43
4593 10 22
712 7 22
2067 21 27
9618 9 35
8008 13 38
114 4 31
4503 39 49
4661 14 41
4837 15 35
1371 12 16
9568 21 48
8934 16 34
870 4 35
83...

output:

20000100000

result:

ok single line: '20000100000'

Test #7:

score: 0
Accepted
time: 379ms
memory: 6760kb

input:

200000 50 253330
4837 37 46
2436 11 48
2043 24 50
3544 27 40
1499 21 43
9009 36 46
9172 11 17
585 29 44
6379 4 28
6630 25 37
9230 24 35
5736 23 50
4324 34 50
4624 23 47
9933 3 12
577 12 18
4411 24 32
8750 42 48
4808 21 34
3904 7 17
5979 41 48
2838 29 40
8682 25 46
4026 11 19
8371 8 42
4550 6 24
1546...

output:

2513593675

result:

ok single line: '2513593675'

Test #8:

score: 0
Accepted
time: 353ms
memory: 6840kb

input:

200000 50 193334
8521 14 21
3902 5 6
2949 4 41
1034 10 36
6156 16 36
9432 35 37
3752 25 37
9668 5 9
3194 43 45
9849 1 26
1582 6 10
9920 20 50
994 34 50
9510 12 38
4513 18 31
6294 3 48
4949 9 18
2348 10 49
5492 19 46
2265 3 37
67 20 40
8752 1 5
4610 27 41
7344 27 39
7767 16 29
921 7 16
1853 23 44
936...

output:

1432887

result:

ok single line: '1432887'

Test #9:

score: 0
Accepted
time: 274ms
memory: 6456kb

input:

100000 100 304560
2347 27 64
3715 15 62
6005 16 86
9856 21 55
1347 5 89
9403 25 33
3889 36 74
554 18 95
5218 27 72
3282 2 68
4955 48 83
3478 7 36
3917 34 99
2117 24 41
9764 35 52
7991 81 94
8026 55 69
7755 27 44
3568 18 50
1968 36 57
7992 63 67
7760 4 55
6938 4 53
722 89 99
1111 47 66
5995 71 80
510...

output:

6114559

result:

ok single line: '6114559'

Test #10:

score: 0
Accepted
time: 276ms
memory: 5340kb

input:

100000 100 404561
3114 87 96
4983 68 99
4734 9 65
3721 49 79
7965 40 74
4463 33 81
731 7 61
9048 36 50
6891 40 68
4236 2 43
5436 6 45
1643 64 85
6889 5 95
5673 21 42
2119 57 70
2940 14 98
5620 59 67
8567 76 90
7543 81 99
5576 4 51
7281 4 100
2485 55 75
9357 6 45
4345 33 62
2261 7 26
2371 4 44
9758 5...

output:

29508633

result:

ok single line: '29508633'

Test #11:

score: 0
Accepted
time: 285ms
memory: 5344kb

input:

100000 100 454562
4294 4 37
7975 12 19
4648 1 83
674 41 84
8184 33 57
9088 56 79
2734 56 60
411 11 52
267 20 41
3503 75 86
6921 24 90
1255 49 90
1841 25 27
7767 86 97
9921 25 26
3063 23 44
9237 10 32
4991 7 87
969 36 100
5989 21 87
1420 45 73
780 7 26
6408 85 90
33 31 41
9767 36 89
7666 16 35
3725 1...

output:

160913569

result:

ok single line: '160913569'

Test #12:

score: 0
Accepted
time: 254ms
memory: 6132kb

input:

50000 200 604563
7628 31 102
3694 47 127
4931 101 187
332 7 146
800 131 143
6750 50 136
3718 88 108
5113 36 188
6565 16 49
7739 66 159
215 97 125
1184 90 150
6960 41 173
2281 18 66
3221 144 155
3431 12 162
4191 59 164
8530 28 30
2720 103 196
1176 171 194
2328 124 200
8209 62 114
2606 6 168
1201 120 ...

output:

97043020

result:

ok single line: '97043020'

Test #13:

score: 0
Accepted
time: 287ms
memory: 5952kb

input:

50000 200 804564
2147 132 170
2582 142 185
2492 29 44
4085 50 81
2749 40 115
7068 3 49
5096 72 127
2097 71 122
6697 130 145
6755 141 163
6197 66 130
3397 136 167
7546 71 156
7798 153 169
655 91 94
9498 62 117
7881 71 112
582 67 100
2382 6 189
7366 101 116
2254 56 138
4321 68 125
1601 44 54
2186 65 1...

output:

566251550

result:

ok single line: '566251550'

Test #14:

score: 0
Accepted
time: 309ms
memory: 6180kb

input:

50000 200 824565
2301 142 166
3523 60 153
3438 18 182
4052 42 116
6084 106 166
5687 45 55
2362 34 57
891 171 177
4412 18 49
3142 99 186
9489 86 103
7153 32 90
8357 35 115
6666 161 181
9346 160 196
6328 60 119
3756 16 135
990 130 150
4038 113 128
3608 69 127
8803 119 193
7508 100 141
2918 96 179
5466...

output:

718514472

result:

ok single line: '718514472'

Test #15:

score: 0
Accepted
time: 297ms
memory: 6172kb

input:

50000 200 844566
3943 49 169
1142 177 181
5370 77 91
9254 48 141
1986 87 196
8256 21 188
4440 116 174
6575 5 126
6139 8 67
5192 44 66
3795 51 60
2574 93 139
9861 46 164
3735 46 149
4388 19 46
3578 110 138
6011 25 99
9446 145 189
9215 22 156
9708 119 128
4207 28 172
1229 19 121
4672 161 174
938 35 60...

output:

832753831

result:

ok single line: '832753831'

Test #16:

score: 0
Accepted
time: 243ms
memory: 6052kb

input:

50000 200 864567
1496 192 200
501 22 137
8461 144 151
6841 56 92
4249 5 170
8990 100 155
8686 54 66
3745 144 175
406 127 179
8669 94 108
6146 141 187
1715 178 188
9270 20 160
1541 12 19
9499 66 132
2513 124 152
6228 83 126
8232 106 133
9816 101 197
7403 28 98
4128 14 113
2935 162 190
9541 78 166
773...

output:

1250025000

result:

ok single line: '1250025000'

Test #17:

score: 0
Accepted
time: 223ms
memory: 5984kb

input:

20000 500 604507
8220 251 441
473 267 330
7866 43 172
1675 178 390
7373 216 466
5691 122 274
4101 219 461
7195 406 475
3120 229 462
9594 164 276
8539 4 337
4490 98 498
6378 297 375
2771 40 144
5832 127 372
7877 6 438
9080 140 247
3343 56 354
4402 329 451
7275 56 90
8068 32 47
1412 143 373
9605 17 41...

output:

22551597

result:

ok single line: '22551597'

Test #18:

score: 0
Accepted
time: 235ms
memory: 6008kb

input:

20000 500 704517
6908 150 406
9324 73 113
9557 128 342
3522 265 344
5140 74 283
6988 397 456
8814 436 439
8944 74 400
9177 158 459
6200 105 230
2367 4 247
5138 402 427
9506 181 272
3341 94 396
8436 34 396
3890 195 466
2215 364 372
8343 159 489
7693 57 82
1961 43 74
3854 205 350
5171 38 87
9512 377 4...

output:

46171637

result:

ok single line: '46171637'

Test #19:

score: 0
Accepted
time: 250ms
memory: 5936kb

input:

20000 500 804527
694 70 142
6628 18 245
8865 27 483
472 22 297
5019 332 444
618 411 474
8356 336 483
2233 353 367
3244 193 322
4513 28 455
4447 52 243
7911 8 270
3402 49 469
6244 427 449
7769 27 359
8126 33 108
7584 314 358
6188 115 337
2092 38 154
6307 46 389
7366 34 362
4285 150 393
9307 399 419
6...

output:

90970591

result:

ok single line: '90970591'

Test #20:

score: 0
Accepted
time: 227ms
memory: 4048kb

input:

10000 1000 704537
6257 67 731
8667 640 807
7190 16 344
8470 336 963
5114 32 272
4196 825 946
8056 363 991
7445 616 873
242 237 944
2998 694 786
1256 105 229
3271 538 719
7616 451 687
8292 65 854
6622 407 883
4558 643 805
9402 240 572
1664 182 253
6327 702 851
6549 232 479
3798 22 490
8720 597 963
15...

output:

44558728

result:

ok single line: '44558728'

Test #21:

score: 0
Accepted
time: 197ms
memory: 5956kb

input:

5000 2000 404547
1199 130 149
2031 232 1571
8922 942 1218
7294 143 166
7867 364 666
5214 609 1185
785 618 1453
4296 1165 1731
7467 939 1711
4932 32 336
1804 1377 1750
6492 279 846
3487 361 516
7077 1668 1909
2759 781 1319
1519 574 1831
5072 389 971
7269 521 1155
2308 707 713
1947 288 930
2934 443 76...

output:

3355833

result:

ok single line: '3355833'

Test #22:

score: 0
Accepted
time: 155ms
memory: 3964kb

input:

3000 3000 204557
3644 409 2773
9860 1718 1833
6980 849 1708
5059 744 878
5394 1473 2309
6100 1424 2358
4621 338 2392
8682 781 1500
2734 822 1792
1935 562 1215
6772 454 750
8506 453 1765
3681 1742 2506
6915 387 1496
3963 1943 2004
6263 1859 2591
3124 334 897
3631 352 1380
1132 1075 1753
7719 1832 196...

output:

404256

result:

ok single line: '404256'

Test #23:

score: 0
Accepted
time: 154ms
memory: 6108kb

input:

3000 3000 254557
5040 794 2655
8982 113 2414
2507 796 1594
1127 224 1427
694 655 1184
3136 1607 2269
606 750 1453
7027 696 1263
5853 523 2414
4896 129 2589
7544 878 2295
689 368 1422
5719 1397 1848
3939 835 887
2854 550 738
7426 283 2732
4328 1468 1676
6199 657 1514
8612 1284 1601
6594 288 2356
9930...

output:

626919

result:

ok single line: '626919'

Test #24:

score: 0
Accepted
time: 173ms
memory: 3988kb

input:

3000 3000 304557
9819 663 846
4223 2500 2553
2955 2016 2896
9526 1334 1873
2184 985 1087
1539 1303 2638
6366 2141 2314
8445 329 2572
7882 1503 2075
5998 925 1904
779 1964 2148
2609 774 1142
7463 1613 1986
8926 819 1402
3880 1446 1669
7101 201 1722
8076 273 2570
8653 1484 2658
3424 2201 2591
7281 282...

output:

1789494

result:

ok single line: '1789494'

Test #25:

score: 0
Accepted
time: 177ms
memory: 4044kb

input:

3000 3000 354557
9782 185 1593
3837 2922 2949
8960 518 1539
3903 73 768
3087 2284 2848
4054 239 1071
8856 920 1389
9133 2053 2528
2062 1764 2649
1854 992 2275
6359 205 373
3649 1397 1419
6880 2285 2912
2055 1350 2453
318 1886 1971
4250 829 2565
313 1188 2713
3727 113 2141
3288 627 2569
2197 116 2099...

output:

2198841

result:

ok single line: '2198841'

Test #26:

score: 0
Accepted
time: 181ms
memory: 3984kb

input:

3000 3000 404557
708 802 2784
6640 109 1264
6684 46 1872
2837 1443 2707
587 1190 2330
6780 621 1708
2159 1522 1704
8738 1483 1908
238 137 516
3032 1739 2649
3675 1249 2777
1836 46 1902
1388 1713 2947
5627 476 1478
3073 812 1039
1235 2360 2589
9211 167 2441
8579 1740 2393
1982 461 2914
8369 865 925
8...

output:

3206289

result:

ok single line: '3206289'

Test #27:

score: 0
Accepted
time: 185ms
memory: 4328kb

input:

2000 5000 304567
3784 2499 5000
3491 2864 4941
3594 2101 3768
8110 1158 3663
1039 751 4924
333 80 2728
844 1083 4516
1940 63 3261
4414 1718 2352
4158 1027 3827
7048 1886 3090
7294 2842 3093
9489 1056 4955
5573 3166 4734
737 1959 3819
7890 2266 4309
7453 1680 4291
237 419 486
5602 495 1736
4968 487 4...

output:

1814585

result:

ok single line: '1814585'

Test #28:

score: 0
Accepted
time: 161ms
memory: 5040kb

input:

1000 10000 204577
1152 5103 9381
8782 268 5975
7743 6743 7323
8250 8412 8621
3987 7810 9955
9988 3263 5353
3267 1270 2302
9258 1791 8246
6156 5588 5865
3605 173 2370
6062 4685 6687
2097 6056 7346
7872 1131 1820
9835 5267 8695
6997 3397 9090
6233 6312 6664
361 309 743
3467 5699 8922
7766 670 7035
815...

output:

87842

result:

ok single line: '87842'

Test #29:

score: 0
Accepted
time: 141ms
memory: 8300kb

input:

500 20000 104587
964 4142 16635
6646 6532 10065
7296 7455 19855
4317 10262 10674
737 10824 12615
1947 5010 6953
2191 4137 18435
692 5757 13061
6052 14796 15895
4903 1335 13698
3006 927 7492
8096 952 4912
8212 10091 14249
9475 13819 14844
6903 3421 10365
2033 15662 17575
2061 4732 13496
1339 5005 152...

output:

38003

result:

ok single line: '38003'

Test #30:

score: 0
Accepted
time: 117ms
memory: 9484kb

input:

200 50000 74597
9588 27711 49855
5798 13401 35454
3163 37425 43074
1300 14772 49588
5445 8585 44770
3393 18689 43728
7747 5528 32127
1335 16928 45939
2038 10120 35057
7556 4277 19641
5989 2879 46380
8818 29554 36714
8791 2348 40820
9264 29592 34761
2033 826 29568
2253 40270 48103
6498 3469 22981
103...

output:

4693

result:

ok single line: '4693'

Test #31:

score: 0
Accepted
time: 111ms
memory: 10216kb

input:

100 100000 64067
3830 10209 47413
2236 11577 63433
602 12486 15366
9978 39578 67766
4732 80805 93353
1222 64481 86851
4368 29603 38059
6669 13473 73241
6857 33194 50911
6248 37920 39054
9414 10801 73316
6527 11781 63154
3570 53755 56008
5385 7820 34323
4335 37647 92580
8397 27180 82736
2773 71697 89...

output:

5050

result:

ok single line: '5050'

Test #32:

score: 0
Accepted
time: 87ms
memory: 25640kb

input:

50 200000 2167
5125 2778 70281
7973 49883 131314
6688 60715 63660
1842 64990 87433
2170 44234 140368
7454 5352 106136
740 49479 73311
683 74708 188982
1814 74591 148654
9219 36677 158650
5554 4211 170022
6362 48921 68439
7925 6840 88248
6590 38020 186698
3803 24350 76742
6265 54217 119088
1303 58245...

output:

0

result:

ok single line: '0'

Test #33:

score: 0
Accepted
time: 85ms
memory: 23500kb

input:

50 200000 4167
6609 143489 170762
434 28498 122523
1227 39445 153286
7182 67865 156238
2850 88324 174863
9332 43804 102485
8834 55181 123990
1101 80491 164065
6758 104936 132629
5497 18085 184894
2385 90449 193119
5840 22417 46690
5918 9637 188692
1496 154233 158153
3819 101861 121123
9746 55797 180...

output:

0

result:

ok single line: '0'

Test #34:

score: 0
Accepted
time: 81ms
memory: 23424kb

input:

50 200000 7167
7703 52615 124671
9171 112234 122718
4898 73136 156936
44 17394 39016
2675 15166 116007
3571 26765 197777
4250 118182 187213
2203 102983 191342
7337 92218 110455
8602 87335 154991
8615 57163 114174
1746 23030 163737
3675 13164 87869
5748 12601 113569
7713 9949 20072
5369 99739 161123
...

output:

0

result:

ok single line: '0'

Test #35:

score: 0
Accepted
time: 85ms
memory: 25496kb

input:

50 200000 10167
8075 59281 59771
7041 117846 144814
6023 117104 132757
5542 71215 145103
2826 59190 86575
6164 70537 156429
4401 37851 54386
4588 50954 69363
8340 155681 170235
8904 89500 124427
6087 42177 151934
1285 58299 111323
1944 147771 183280
7506 41632 89665
5947 39825 144201
7518 94117 1937...

output:

21

result:

ok single line: '21'

Test #36:

score: 0
Accepted
time: 87ms
memory: 25528kb

input:

50 200000 14167
8475 123768 166527
850 29097 94804
5234 3747 28169
4356 44647 182942
1534 34124 119082
568 41249 169003
5523 25967 179160
4199 125909 195567
3709 83310 107375
3 88826 154545
9018 120591 150466
5795 2365 79805
4236 114610 142555
1315 36306 192017
9097 139543 181116
4774 46101 62074
44...

output:

4

result:

ok single line: '4'

Test #37:

score: 0
Accepted
time: 95ms
memory: 23496kb

input:

50 200000 24267
860 56050 101280
9482 12523 82739
7002 96274 167332
1735 31033 120671
1444 20893 177228
9069 79034 104342
4663 4108 175891
9156 11549 94621
7680 68395 163471
4626 62487 139183
9789 84524 165403
3513 162012 169007
1202 78679 176824
5813 73637 158062
4403 2046 125475
2770 122228 168401...

output:

62

result:

ok single line: '62'

Test #38:

score: -100
Wrong Answer
time: 99ms
memory: 25464kb

input:

50 200000 34367
541 155629 179137
4059 22479 137541
6141 159107 188389
278 19063 23156
5135 17960 76747
1840 58827 190124
2608 171542 171885
8786 49163 190480
6538 69653 102189
1768 100965 190700
1403 10354 86777
3623 86885 89463
5140 58840 86043
329 56549 57262
5265 103074 120836
8925 2951 162804
4...

output:

378

result:

wrong answer 1st lines differ - expected: '330', found: '378'