QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#188069 | #795. Cloud Computing | ZhangYiDe | 100 ✓ | 138ms | 6788kb | C++11 | 770b | 2023-09-25 13:32:16 | 2023-09-25 13:32:18 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 18
Accepted
Test #1:
score: 18
Accepted
time: 0ms
memory: 6564kb
input:
1 3 3253 744 1 1 2012 798
output:
54
result:
ok single line: '54'
Test #2:
score: 0
Accepted
time: 2ms
memory: 6592kb
input:
1 1 2291 728 1 3 3024 858
output:
0
result:
ok single line: '0'
Test #3:
score: 0
Accepted
time: 2ms
memory: 6568kb
input:
8 18 5754 6872 11 5543 1464 6 6940 9405 10 5152 4196 13 5784 7499 18 6787 260 14 5922 218 17 5037 7983 100 3 5482 4812 1 3922 7167 3 3566 8041 2 3532 3839 3 3948 4490 2 5301 6616 3 4216 796 2 4583 5021 1 3311 3984 3 3044 2702 2 4529 288 2 3352 6474 2 3102 4548 3 3784 2968 2 5054 2143 2 5385 1542 3 3...
output:
368159
result:
ok single line: '368159'
Test #4:
score: 0
Accepted
time: 2ms
memory: 6572kb
input:
7 11 6380 2002853 5 6813 1069986 13 5521 2570534 12 5793 1980585 9 6767 423810 19 5421 2358687 3 6223 527470 200 2 5408 222070 2 5072 205933 1 5263 95185 2 4419 43779 2 4337 128477 1 4234 73697 2 3655 35020 1 3599 60877 1 3391 14190 1 4499 59363 3 5218 428777 1 3617 15308 1 3932 67554 1 3847 16460 2...
output:
909469
result:
ok single line: '909469'
Test #5:
score: 0
Accepted
time: 2ms
memory: 6744kb
input:
15 38 253050473 94982 19 873235634 3331 34 96232154 99722 18 361560017 18236 1 43839514 70819 30 211957237 36759 21 276441039 97496 10 677009897 39625 43 899961447 35095 15 278681496 20167 16 777735821 93692 39 295651318 33500 40 814700985 79446 14 174272701 32273 33 149679268 37695 1900 23 83103560...
output:
7591941
result:
ok single line: '7591941'
Test #6:
score: 0
Accepted
time: 0ms
memory: 6632kb
input:
15 2 26589073 403672469 1 41525134 919365487 1 20631561 281192925 1 102777840 841011960 1 39965286 293659571 1 25731340 899094489 2 13795262 388700479 2 28949306 887569930 2 28301652 432739525 3 21401611 995905557 1 12908533 333560050 1 72630405 571268998 1 34438002 497580454 1 69595535 544742664 1 ...
output:
8077488943
result:
ok single line: '8077488943'
Test #7:
score: 0
Accepted
time: 2ms
memory: 6620kb
input:
15 48 695425366 943332504 45 712641768 231446475 47 634507753 371099212 48 428534339 104593262 46 729756277 470795290 50 928986319 548613644 50 788811011 128576493 48 345438587 877886664 47 925824152 799912937 47 313626363 126112358 46 451672372 689015214 50 838817670 270199427 48 150219527 52297669...
output:
7473136555
result:
ok single line: '7473136555'
Test #8:
score: 0
Accepted
time: 3ms
memory: 6620kb
input:
15 41 18252721 748361561 41 23829617 977014296 46 13332057 613274621 42 21746541 913354722 47 12012296 564577912 42 16440276 690491591 46 12022310 553026259 50 15767600 788380000 41 19620669 804447428 46 17824167 819911682 50 14624259 731212950 41 14693399 602429359 46 20592200 947241200 49 14448618...
output:
4484130835
result:
ok single line: '4484130835'
Subtask #2:
score: 18
Accepted
Dependency #1:
100%
Accepted
Test #9:
score: 18
Accepted
time: 0ms
memory: 6560kb
input:
1 3 3299 1200 2 2 2283 1024 2 2149 1770
output:
570
result:
ok single line: '570'
Test #10:
score: 0
Accepted
time: 0ms
memory: 6564kb
input:
5 1 1 5 1 7 17 1 5 13 1 9 21 1 4 11 5 1 15 33 1 8 19 1 14 31 1 11 25 1 6 15
output:
0
result:
ok single line: '0'
Test #11:
score: 0
Accepted
time: 2ms
memory: 6580kb
input:
100 5 3988 363 4 3239 709 2 4302 878 1 4138 455 1 3928 337 3 4006 417 2 4785 946 4 4737 648 2 3833 723 5 4562 477 1 3226 456 5 3568 277 1 3069 602 5 3364 874 4 3724 370 5 4720 939 3 3135 449 5 4700 552 4 3607 314 2 4779 217 1 4655 611 2 4878 551 5 3228 356 3 4458 625 1 4768 634 2 4896 798 2 3822 845...
output:
0
result:
ok single line: '0'
Test #12:
score: 0
Accepted
time: 0ms
memory: 6600kb
input:
100 2 4437 307926 2 4247 167130 1 4684 186733 2 4073 238659 1 3804 48731 3 3056 45708 2 3860 112024 2 4647 371585 3 3259 197199 1 4768 42372 1 3036 12459 3 3710 229671 4 4841 440511 1 3988 68687 4 3549 687968 2 3738 359574 2 3607 68959 4 3430 440612 4 3748 407532 4 4325 578735 2 4401 348560 1 3105 3...
output:
64383
result:
ok single line: '64383'
Test #13:
score: 0
Accepted
time: 7ms
memory: 6592kb
input:
900 16 78097 37837 15 85865 62139 49 31064 68151 16 58456 44102 37 32228 30053 21 49446 89428 14 57170 73364 27 35608 58145 21 68753 11458 17 59071 88943 49 42236 95365 16 63378 50821 38 14523 14873 35 30920 21578 25 77237 43260 30 40988 91773 45 94488 74532 30 59827 80439 48 99962 82003 10 13024 57...
output:
88600698
result:
ok single line: '88600698'
Test #14:
score: 0
Accepted
time: 2ms
memory: 6752kb
input:
900 1 12538 73489 1 14027 83274 1 13786 81682 2 13114 83609 1 26371 84117 1 27061 86572 1 28859 93003 1 13256 78192 1 18003 54981 1 11495 33356 1 26985 86301 1 15525 46619 1 11442 66369 1 18010 55004 1 12575 73730 1 20680 64162 1 29344 94746 1 12976 76354 1 11220 64937 2 10053 62181 1 11445 99583 1 ...
output:
37709616
result:
ok single line: '37709616'
Test #15:
score: 0
Accepted
time: 28ms
memory: 6612kb
input:
2000 6 84742360 86208510 37 841445753 240119795 36 925517345 663647148 38 176682386 280265895 36 524950464 57753727 32 72381535 638240474 40 204984951 269332513 44 320717849 87706581 5 998168978 168525713 18 165301380 884951148 15 161182430 143651904 31 480907165 44152030 39 897236092 437065186 39 7...
output:
6758697884
result:
ok single line: '6758697884'
Test #16:
score: 0
Accepted
time: 5ms
memory: 6704kb
input:
2000 2 27652228 347036385 13 28320347 832939387 1 430926982 981306874 5 46590950 517148665 1 24099332 48704155 1 22582582 136548610 3 88481938 592470679 1 106641630 458410140 1 162431552 710496731 1 42671896 264908112 1 84014730 178799288 1 191515606 421722564 3 11001494 67575122 8 21004881 36802898...
output:
134698680
result:
ok single line: '134698680'
Test #17:
score: 0
Accepted
time: 44ms
memory: 6620kb
input:
1937 41 1 4 44 1 20 46 1 7 46 1 7 47 1 12 44 1 18 41 1 3 48 1 2 48 1 19 43 1 11 48 1 6 40 1 4 40 1 1 48 1 19 45 1 2 49 1 3 47 1 19 48 1 11 50 1 17 46 1 13 49 1 3 48 1 15 46 1 18 48 1 11 48 1 12 40 1 3 41 1 6 40 1 11 44 1 2 47 1 12 41 1 2 47 1 12 40 1 6 45 1 6 41 1 16 41 1 6 48 1 5 41 1 15 50 1 19 47...
output:
9016347060
result:
ok single line: '9016347060'
Subtask #3:
score: 18
Accepted
Test #18:
score: 18
Accepted
time: 0ms
memory: 6520kb
input:
12 1 3728 3883 1 2483 1377 1 2421 2213 1 4866 648 1 2292 1737 1 4027 657 1 2119 2801 1 2559 859 1 3859 3261 1 2908 3110 1 2917 2467 1 2011 3406 18 1 2558 4956 1 3468 2947 1 4577 4082 1 2886 2222 1 2979 3572 1 2266 4860 1 2868 3183 1 3665 4259 1 2607 4802 1 2811 3874 1 2314 4212 1 2638 3152 1 2944 44...
output:
23934
result:
ok single line: '23934'
Test #19:
score: 0
Accepted
time: 2ms
memory: 6596kb
input:
12 1 2208 8567 1 2221 8626 1 2152 8312 1 2293 8956 1 2261 8809 1 2062 7905 1 2203 8544 1 2105 8099 1 2280 8896 1 2057 7882 1 2015 7693 1 2162 8357 18 1 2563 10209 1 2000 7626 1 3072 12633 1 2789 11276 1 2144 8276 1 2921 11906 1 2380 9357 1 2077 7972 1 2103 8090 1 2868 11652 1 2684 10778 1 3043 12493...
output:
0
result:
ok single line: '0'
Test #20:
score: 0
Accepted
time: 0ms
memory: 6668kb
input:
79 1 4427 4256458 1 3723 3490767 1 3982 3260428 1 3770 3355873 1 4741 4551396 1 5000 1319580 1 4063 2173424 1 2181 4525445 1 3737 1728963 1 3931 4866468 1 4157 4762822 1 4236 1841301 1 2378 2709820 1 4220 2261004 1 2446 4168561 1 4547 2573600 1 3060 2878656 1 4672 4605556 1 2852 3719524 1 4693 42886...
output:
20786601
result:
ok single line: '20786601'
Test #21:
score: 0
Accepted
time: 2ms
memory: 6584kb
input:
79 1 2056 12536 1 2597 8192 1 4936 68413 1 2084 25464 1 2720 34555 1 3791 50555 1 4363 59390 1 4401 14996 1 2332 28967 1 3914 52440 1 4042 13602 1 4057 27320 1 2954 9495 1 4090 13787 1 4478 61188 1 4040 27189 1 3415 22425 1 4636 47751 1 2837 36264 1 4816 33255 1 3383 44370 1 2916 28067 1 3901 52240 ...
output:
237760
result:
ok single line: '237760'
Test #22:
score: 0
Accepted
time: 0ms
memory: 6596kb
input:
224 1 6270 93747369 1 6502 167724928 1 6437 264148706 1 4077 760036221 1 5697 879487623 1 4557 733795468 1 6903 407495462 1 4106 697615090 1 7426 694689028 1 6401 689447791 1 7806 714964788 1 6997 288721199 1 5680 267711948 1 6188 217596834 1 7122 588728375 1 5561 436746734 1 5953 13086744 1 5223 33...
output:
40094608225
result:
ok single line: '40094608225'
Test #23:
score: 0
Accepted
time: 2ms
memory: 6580kb
input:
224 1 5309 28215 1 6848 18732 1 4262 55227 1 4660 48801 1 7916 66044 1 4018 31030 1 5015 26480 1 6577 17908 1 4879 51363 1 7792 86523 1 4023 31073 1 5349 56904 1 4124 10647 1 5126 67834 1 6453 52599 1 7970 44364 1 7728 85732 1 6969 76407 1 6245 33809 1 6330 85806 1 5045 13328 1 6873 18808 1 7161 984...
output:
1397706
result:
ok single line: '1397706'
Test #24:
score: 0
Accepted
time: 2ms
memory: 6576kb
input:
250 1 414892080 475780331 1 389986020 498894352 1 466122353 629641334 1 105791542 964215227 1 108319175 465600284 1 672601741 82971811 1 249420710 401256555 1 149341259 342168603 1 567366454 947578513 1 435092128 806081813 1 780065289 367591037 1 715227604 87185140 1 959201300 62189501 1 257570515 5...
output:
58593606691
result:
ok single line: '58593606691'
Test #25:
score: 0
Accepted
time: 0ms
memory: 6752kb
input:
250 1 139452088 615617196 1 108712470 470545881 1 218593295 999953196 1 200154778 909239851 1 216513655 989690503 1 206416295 939973840 1 101136346 870514051 1 210214974 958655407 1 107570262 465212767 1 114343906 496903861 1 169066882 757820712 1 130284386 572057468 1 178646230 804261003 1 20928398...
output:
11992746282
result:
ok single line: '11992746282'
Subtask #4:
score: 18
Accepted
Test #26:
score: 18
Accepted
time: 2ms
memory: 6556kb
input:
10 2 1 2274 2 1 2524 1 1 2699 5 1 2930 4 1 1802 2 1 2734 4 1 1036 3 1 2741 5 1 1138 1 1 2132 6 5 1 3573 1 1 4847 2 1 3885 1 1 2183 2 1 2534 1 1 4659
output:
17705
result:
ok single line: '17705'
Test #27:
score: 0
Accepted
time: 2ms
memory: 6560kb
input:
10 5 1 19 3 1 14 4 1 10 3 1 10 4 1 20 2 1 9 1 1 4 4 1 10 1 1 2 3 1 10 6 5 1 13 5 1 13 3 1 10 1 1 3 5 1 13 5 1 13
output:
4
result:
ok single line: '4'
Test #28:
score: 0
Accepted
time: 0ms
memory: 6600kb
input:
1500 5 1 766 1 1 925 5 1 545 5 1 916 1 1 747 3 1 981 2 1 794 1 1 853 4 1 745 2 1 539 4 1 611 3 1 730 2 1 995 4 1 663 1 1 667 4 1 615 3 1 813 3 1 750 2 1 917 3 1 568 1 1 602 1 1 792 1 1 774 5 1 860 5 1 834 1 1 946 2 1 567 3 1 770 3 1 750 5 1 752 4 1 718 3 1 987 2 1 977 4 1 838 2 1 642 4 1 558 4 1 878...
output:
0
result:
ok single line: '0'
Test #29:
score: 0
Accepted
time: 0ms
memory: 6776kb
input:
13 20 1 9848 33 1 11113 33 1 11397 43 1 5486 19 1 10018 37 1 8534 43 1 7616 43 1 5394 13 1 11453 44 1 11120 29 1 11057 46 1 9023 20 1 11984 1805 9 1 845 4 1 355 6 1 818 7 1 307 9 1 354 9 1 593 10 1 650 3 1 962 5 1 273 8 1 873 1 1 420 7 1 948 4 1 668 1 1 708 6 1 616 7 1 594 9 1 201 7 1 768 3 1 802 7 ...
output:
102484
result:
ok single line: '102484'
Test #30:
score: 0
Accepted
time: 66ms
memory: 6676kb
input:
1992 11 1 199631204 46 1 880088920 46 1 60421978 41 1 374317414 26 1 752692847 46 1 745140558 12 1 64000008 5 1 454886525 13 1 69573629 15 1 522471571 38 1 611340638 20 1 11136794 14 1 757697844 29 1 474321924 42 1 911180569 9 1 569689273 14 1 321726981 14 1 236570294 36 1 312654389 23 1 35766191 27...
output:
575524668672
result:
ok single line: '575524668672'
Test #31:
score: 0
Accepted
time: 119ms
memory: 6668kb
input:
2000 43 1 160482641 50 1 128216371 43 1 795777040 48 1 639914818 44 1 341588814 50 1 694546956 47 1 111220218 44 1 529410604 49 1 33620380 47 1 488422815 48 1 689416355 44 1 128908044 43 1 804535816 43 1 778001742 46 1 332918417 42 1 757120862 40 1 835341946 48 1 69935722 40 1 702766873 46 1 9924335...
output:
0
result:
ok single line: '0'
Test #32:
score: 0
Accepted
time: 120ms
memory: 6664kb
input:
2000 46 1 16 46 1 12 41 1 6 43 1 13 43 1 16 47 1 16 43 1 2 40 1 14 50 1 14 42 1 12 50 1 3 45 1 1 41 1 3 48 1 6 46 1 18 47 1 17 48 1 18 41 1 6 44 1 13 43 1 2 46 1 9 45 1 14 45 1 14 47 1 2 41 1 3 45 1 8 42 1 13 48 1 13 42 1 3 40 1 18 48 1 19 48 1 11 47 1 9 41 1 16 49 1 8 45 1 8 48 1 1 47 1 13 50 1 6 4...
output:
1000605883784
result:
ok single line: '1000605883784'
Test #33:
score: 0
Accepted
time: 118ms
memory: 6656kb
input:
1937 48 1 10 44 1 17 45 1 15 40 1 3 47 1 13 45 1 3 41 1 13 50 1 8 45 1 18 50 1 4 49 1 5 48 1 9 50 1 19 46 1 14 48 1 2 45 1 5 42 1 2 50 1 17 42 1 4 50 1 20 47 1 5 40 1 19 44 1 16 44 1 9 40 1 7 45 1 2 47 1 5 50 1 13 47 1 19 43 1 11 45 1 4 46 1 9 46 1 7 49 1 12 45 1 1 42 1 13 46 1 7 46 1 1 49 1 3 49 1 ...
output:
976944450013
result:
ok single line: '976944450013'
Subtask #5:
score: 18
Accepted
Test #34:
score: 18
Accepted
time: 2ms
memory: 6592kb
input:
4 43 2536 1 48 2001 1 49 3407 1 48 3778 1 2 42 3314 1 43 3073 1
output:
0
result:
ok single line: '0'
Test #35:
score: 0
Accepted
time: 2ms
memory: 6516kb
input:
57 47 1212 1 42 1104 1 48 1247 1 44 1420 1 41 1428 1 46 1364 1 47 1245 1 40 1199 1 48 1027 1 49 1113 1 50 1439 1 45 1208 1 41 1231 1 41 1131 1 48 1080 1 43 1218 1 45 1145 1 44 1071 1 43 1393 1 47 1314 1 45 1306 1 47 1439 1 42 1124 1 49 1383 1 47 1175 1 45 1099 1 46 1378 1 45 1285 1 46 1323 1 41 1234...
output:
0
result:
ok single line: '0'
Test #36:
score: 0
Accepted
time: 3ms
memory: 6528kb
input:
570 46 5838 1 40 6425 1 44 5897 1 42 6694 1 49 4775 1 43 6145 1 49 3903 1 46 4661 1 50 5987 1 43 7469 1 40 8641 1 47 7424 1 43 6303 1 44 9446 1 42 9626 1 48 3201 1 46 4829 1 44 7695 1 41 8599 1 48 4502 1 43 7551 1 44 4095 1 50 7648 1 45 5950 1 50 8967 1 42 3801 1 45 4723 1 42 8216 1 47 9791 1 41 586...
output:
233
result:
ok single line: '233'
Test #37:
score: 0
Accepted
time: 3ms
memory: 6612kb
input:
800 2 33219 1 3 24476 1 3 44557 1 1 84514 1 4 14659 1 1 62141 1 1 28408 1 3 26361 1 2 60406 1 4 75765 1 2 82764 1 4 57798 1 3 40248 1 3 41219 1 4 36238 1 1 59815 1 1 11587 1 2 25934 1 2 47903 1 2 33165 1 4 53043 1 1 78402 1 3 67224 1 2 43672 1 2 56655 1 2 30009 1 1 31863 1 2 98445 1 1 70192 1 3 3927...
output:
381
result:
ok single line: '381'
Test #38:
score: 0
Accepted
time: 83ms
memory: 6600kb
input:
1968 48 775828552 1 49 129659926 1 43 782523018 1 42 716703760 1 46 788642039 1 43 512170994 1 46 129364119 1 48 201273594 1 43 65172168 1 49 396205350 1 46 603534679 1 40 689641431 1 44 492506422 1 43 325797549 1 42 852455369 1 42 269221916 1 44 30771715 1 41 591385973 1 44 921620444 1 40 722250199...
output:
119
result:
ok single line: '119'
Test #39:
score: 0
Accepted
time: 118ms
memory: 6664kb
input:
2000 40 2 1 44 2 1 46 2 1 46 2 1 50 2 1 46 2 1 43 2 1 46 2 1 50 2 1 40 2 1 44 2 1 42 2 1 41 2 1 47 2 1 50 2 1 44 2 1 44 2 1 43 2 1 43 2 1 47 2 1 44 2 1 47 2 1 42 2 1 49 2 1 45 2 1 46 2 1 40 2 1 40 2 1 47 2 1 40 2 1 41 2 1 50 2 1 48 2 1 48 2 1 42 2 1 42 2 1 50 2 1 46 2 1 45 2 1 46 2 1 50 2 1 48 2 1 5...
output:
44
result:
ok single line: '44'
Subtask #6:
score: 10
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Test #40:
score: 10
Accepted
time: 7ms
memory: 6596kb
input:
503 47 2078 4318084 46 296 87616 49 793 628849 40 4125 17015625 49 1880 3534400 43 3131 9803161 49 186 34596 40 404 163216 47 4686 21958596 50 3915 15327225 43 4776 22810176 49 2592 6718464 45 2941 8649481 42 1917 3674889 45 1229 1510441 50 4489 20151121 48 596 355216 45 1811 3279721 48 4004 1603201...
output:
210039801
result:
ok single line: '210039801'
Test #41:
score: 0
Accepted
time: 17ms
memory: 6788kb
input:
756 42 2117 2126 40 3074 3296 47 1987 2052 48 3792 3819 41 4078 4252 49 4558 4679 48 4014 4206 40 4781 5030 45 2116 2216 49 4092 4328 50 2436 2638 50 4522 4891 46 219 228 47 4158 4235 50 2256 2448 50 4452 4571 49 367 401 43 1157 1161 43 2719 2927 49 4458 4755 50 4632 4685 47 2749 2812 43 3378 3637 4...
output:
144877
result:
ok single line: '144877'
Test #42:
score: 0
Accepted
time: 3ms
memory: 6644kb
input:
1534 1 853 1736 1 5615 98155 1 1821 3672 1 2504 5038 1 9847 85459 1 5935 97195 1 2478 4986 1 1740 3510 1 9634 86098 1 8062 90814 1 2982 5994 1 3361 6752 1 6486 95542 1 8171 90487 1 3856 7742 1 7100 93700 1 4295 8620 1 6622 95134 1 276 582 1 1699 3428 1 6879 94363 1 6509 95473 1 1272 2574 1 239 508 1...
output:
2839635
result:
ok single line: '2839635'
Test #43:
score: 0
Accepted
time: 138ms
memory: 6672kb
input:
2000 50 4337 185 50 4539 388 50 4109 600 50 4281 102 50 4300 902 50 4213 989 50 4417 927 50 4996 300 50 4079 380 50 4150 331 50 4728 298 50 4494 657 50 4218 841 50 4163 259 50 4212 202 50 4999 839 50 4407 396 50 4681 646 50 4148 887 50 4393 749 50 4502 113 50 4697 968 50 4863 683 50 4608 339 50 4539...
output:
1942070
result:
ok single line: '1942070'
Test #44:
score: 0
Accepted
time: 138ms
memory: 6672kb
input:
2000 50 4142 6 50 4946 10 50 4618 8 50 4208 3 50 4075 3 50 4821 4 50 4630 5 50 4888 5 50 4458 2 50 4087 2 50 4947 8 50 4507 2 50 4490 1 50 4497 1 50 4049 6 50 4037 4 50 4975 4 50 4915 10 50 4597 1 50 4413 4 50 4482 10 50 4329 1 50 4733 5 50 4282 7 50 4423 3 50 4044 3 50 4966 10 50 4483 7 50 4743 10 ...
output:
1999999988971
result:
ok single line: '1999999988971'
Test #45:
score: 0
Accepted
time: 86ms
memory: 6604kb
input:
2000 50 540914946 816513388 50 530384352 673909813 50 696487519 312388683 50 381429063 583584269 50 500291031 116356000 50 399021243 330068408 50 139442192 846858839 50 301479979 717884895 50 658454992 997436548 50 287451490 501778595 50 165327971 313820700 50 332686787 170337088 50 295951532 178964...
output:
452709190838
result:
ok single line: '452709190838'
Test #46:
score: 0
Accepted
time: 3ms
memory: 6568kb
input:
1000 1 3901 7805 1 4499 9001 1 2757 5517 1 346 695 1 2960 5923 1 4486 8975 1 1043 2089 1 3345 6693 1 3135 6273 1 2068 4139 1 4803 9609 1 4622 9247 1 2971 5945 1 4204 8411 1 52 107 1 3381 6765 1 140 283 1 577 1157 1 2705 5413 1 1338 2679 1 2907 5817 1 4538 9079 1 4273 8549 1 2653 5309 1 4975 9953 1 1...
output:
0
result:
ok single line: '0'
Test #47:
score: 0
Accepted
time: 0ms
memory: 6620kb
input:
1503 1 4517 20403289 1 1911 3651921 1 3140 9859600 1 3739 13980121 1 4367 19070689 1 4660 21715600 1 2639 6964321 1 631 398161 1 2856 8156736 1 3696 13660416 1 3416 11669056 1 4000 16000000 1 2707 7327849 1 4878 23794884 1 2601 6765201 1 2872 8248384 1 2462 6061444 1 2568 6594624 1 2848 8111104 1 21...
output:
0
result:
ok single line: '0'
Test #48:
score: 0
Accepted
time: 0ms
memory: 6640kb
input:
1507 1 302078 3310 1 150296 6653 1 330793 3023 1 444125 2251 1 486880 2053 1 953131 1049 1 865186 1155 1 850404 1175 1 729686 1370 1 913915 1094 1 994776 1005 1 667592 1497 1 307941 3247 1 206917 4832 1 326229 3065 1 969489 1031 1 185596 5388 1 541811 1845 1 634004 1577 1 194211 5149 1 429453 2328 1...
output:
16940043
result:
ok single line: '16940043'