QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#439342 | #6369. Frog Jumping | moyujiang | RE | 19ms | 8200kb | C++14 | 945b | 2024-06-11 19:48:53 | 2024-06-11 19:48:54 |
Judging History
answer
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a),i##END=(b);i<=i##END;i++)
#define Rof(i,b,a) for(int i=(b),i##END=(a);i>=i##END;i--)
#define go(u) for(int i=head[u];i;i=nxt[i])
#define int long long
using namespace std;
inline int read(){
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}
return x*f;
}
const int N=2e5+10;
int n,m,k,d,c[N],a[N],ans,s[N];
signed main(){
n=read(),m=read(),k=read(),d=read();
if(d>=n-1)return puts("0"),0;
For(i,1,m)c[i]=read();
For(i,1,k)a[i]=read();a[0]=1,a[k+1]=n;
sort(a+1,a+1+k);
int mn=m;
For(i,1,k)s[a[i]]++;
For(i,1,n)s[i]+=s[i-1];
For(i,d+1,n-1)mn=min(mn,s[i]-s[i-d]);
For(i,0,k)if(a[i+1]-a[i]>d)mn=0;
sort(c+1,c+1+m);For(i,1,m-mn)ans+=c[i];
if(mn==0){ans-=c[1];For(i,0,k)ans+=c[1]*(a[i+1]-a[i]>d);}
printf("%lld\n",ans);
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 5880kb
input:
10 2 3 3 4 7 4 8 7
output:
4
result:
ok 1 number(s): "4"
Test #2:
score: 0
Accepted
time: 1ms
memory: 5928kb
input:
10 2 2 3 4 7 9 5
output:
15
result:
ok 1 number(s): "15"
Test #3:
score: 0
Accepted
time: 0ms
memory: 7560kb
input:
200000 1 1 3 218918215 92715
output:
437836430
result:
ok 1 number(s): "437836430"
Test #4:
score: 0
Accepted
time: 2ms
memory: 7440kb
input:
200000 1 1 782 106901742 116085
output:
213803484
result:
ok 1 number(s): "213803484"
Test #5:
score: 0
Accepted
time: 0ms
memory: 7300kb
input:
200000 1 1 99310 470724012 56740
output:
470724012
result:
ok 1 number(s): "470724012"
Test #6:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
200000 1 1 397388 866331561 81794
output:
0
result:
ok 1 number(s): "0"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
200000 1 1 366196424 320141515 2621
output:
0
result:
ok 1 number(s): "0"
Test #8:
score: 0
Accepted
time: 0ms
memory: 7112kb
input:
200000 1 10 5 557858482 147035 80127 3016 45003 198875 147608 95378 95913 55911 154570
output:
6136443302
result:
ok 1 number(s): "6136443302"
Test #9:
score: 0
Accepted
time: 2ms
memory: 7168kb
input:
200000 1 10 857 798079756 190803 44941 156382 20011 151186 30934 75614 171027 36421 12368
output:
8778877316
result:
ok 1 number(s): "8778877316"
Test #10:
score: 0
Accepted
time: 0ms
memory: 7332kb
input:
200000 1 10 77323 81465022 165863 8555 141636 162074 24267 190677 150729 52568 3435 122063
output:
0
result:
ok 1 number(s): "0"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
200000 1 10 6362589 436867804 129476 193807 73455 45400 113719 86285 22023 19582 193666 185427
output:
0
result:
ok 1 number(s): "0"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
200000 1 10 641765372 771571502 104484 34844 156779 15391 79618 157578 199281 9815 67278 80442
output:
0
result:
ok 1 number(s): "0"
Test #13:
score: 0
Accepted
time: 0ms
memory: 7392kb
input:
200000 1 100 6 780956883 97439 117410 28642 154629 183945 136830 615 155670 188072 122569 50885 118123 106428 114288 156877 18670 82340 22532 36195 153398 67859 148564 74493 109191 161147 187805 15868 140567 144296 177416 61346 82324 19043 5766 172232 66752 44509 24126 96571 131352 139304 141607 194...
output:
78876645183
result:
ok 1 number(s): "78876645183"
Test #14:
score: 0
Accepted
time: 1ms
memory: 6804kb
input:
200000 1 100 554 394386326 38334 179783 76256 194833 140409 35141 135372 4221 14666 43172 140515 141697 123871 65397 127212 83791 143458 12156 100382 7232 102868 99549 182087 55655 172518 31836 38813 41841 77378 55310 72049 71973 86801 80598 71070 174735 118643 173421 25741 38899 59002 49493 19893 1...
output:
29578974450
result:
ok 1 number(s): "29578974450"
Test #15:
score: 0
Accepted
time: 1ms
memory: 6692kb
input:
200000 1 100 83893 887295447 100706 128427 126706 151297 38720 60682 183920 20567 114775 132802 54873 159140 74980 45977 192332 64374 32055 76344 154215 42241 53853 17391 128550 67026 16548 54781 160577 195413 175762 66013 61699 59196 161634 70218 69838 48871 57693 11808 143533 168841 166886 183957 ...
output:
0
result:
ok 1 number(s): "0"
Test #16:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
200000 1 100 7160310 214850501 39104 88094 83169 49607 64260 109230 268 120676 4407 156376 181532 110249 45314 100852 172915 53998 106488 140422 189223 193224 171693 62825 139921 111054 39493 176544 93658 192769 186465 55663 48921 35059 151253 178202 53190 187920 106325 10138 73477 76727 111598 1893...
output:
0
result:
ok 1 number(s): "0"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
200000 1 100 419748069 514922935 89554 125094 160986 75148 112809 125576 110623 30800 38227 173819 132641 80584 110435 81435 71757 128432 150074 175431 129963 100820 27375 164978 183949 133999 60228 119872 101261 84010 176115 133667 14538 4186 59239 52338 83022 26307 114900 140080 171114 101975 1067...
output:
0
result:
ok 1 number(s): "0"
Test #18:
score: 0
Accepted
time: 2ms
memory: 7568kb
input:
200000 1 1000 1 326910705 161910 36782 76324 56495 164474 179171 95228 199779 56962 193319 46547 84978 114473 64900 71650 155761 191825 15526 63684 195229 130588 177851 1621 5026 6185 93899 91779 171182 119375 127770 93879 140893 70454 75525 114048 38494 146517 90575 40082 141263 29711 74092 75837 1...
output:
325929972885
result:
ok 1 number(s): "325929972885"
Test #19:
score: 0
Accepted
time: 2ms
memory: 7440kb
input:
200000 1 1000 568 445318823 38241 27467 178119 175362 182749 20539 169235 73109 64924 38834 117615 159988 53991 180167 74550 3524 136452 39645 142214 59715 132155 26678 88167 100691 68365 107747 160210 37412 48224 87843 120372 32603 156561 113196 42813 66499 195338 106685 45898 40581 191485 120439 1...
output:
26719129380
result:
ok 1 number(s): "26719129380"
Test #20:
score: 0
Accepted
time: 0ms
memory: 7408kb
input:
200000 1 1000 92199 457831690 148389 139508 96988 193637 24117 104791 52811 91317 110437 109902 182380 99507 179504 172822 112066 57368 59544 118175 6700 61282 90197 102978 173586 162871 92459 85396 135655 156012 117513 124582 22329 19740 194231 41960 161600 115320 11449 112501 134968 101327 37834 1...
output:
0
result:
ok 1 number(s): "0"
Test #21:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
200000 1 1000 2729258 961247784 140968 58377 115264 35005 108370 178119 60772 25556 191751 174667 121898 25022 172159 20585 176155 81487 39104 182659 8267 120352 57281 118107 46014 186965 70108 151623 64504 35550 34790 16292 9465 57410 122996 80212 119639 131430 7019 121035 195714 157920 64634 51904...
output:
0
result:
ok 1 number(s): "0"
Test #22:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
200000 1 1000 166145351 548478623 70083 76653 156629 119257 181698 186081 15504 197652 46272 114185 47413 17676 19922 74429 99247 160017 103588 184226 57091 196652 72410 71071 59862 164614 136335 80471 133794 51797 136745 3429 36889 186173 151001 129033 135748 137246 15554 72565 52309 184720 169297 ...
output:
0
result:
ok 1 number(s): "0"
Test #23:
score: 0
Accepted
time: 2ms
memory: 7480kb
input:
200000 1 10000 8 218184570 9441 62407 185950 31318 153697 193624 154986 22726 125989 104661 57286 55927 18098 81091 136270 1006 85639 44988 138025 110672 46123 190564 99878 60127 183129 98886 81253 138155 179648 46722 181719 96779 152526 159353 146660 65236 6144 58106 139369 66328 119617 121206 8144...
output:
1450054652220
result:
ok 1 number(s): "1450054652220"
Test #24:
score: 0
Accepted
time: 0ms
memory: 7420kb
input:
200000 1 10000 138 956181952 173083 147339 152943 174830 186957 80296 2428 41108 85482 49573 179346 53367 80428 44790 18766 107583 75132 113987 47411 175248 144867 124934 143269 77637 83598 97221 36401 87439 76392 185929 86504 124921 30145 55026 160336 115879 142377 16220 160716 39704 38601 126044 5...
output:
6693273664
result:
ok 1 number(s): "6693273664"
Test #25:
score: 0
Accepted
time: 0ms
memory: 7032kb
input:
200000 1 10000 89920 381038580 68262 114332 96457 8092 83874 127736 10563 101629 121177 171633 86005 125944 44127 117037 5880 97076 144131 33618 132479 84240 188454 67297 160778 178104 81933 52368 195929 184181 106383 80468 104400 93322 136061 159484 31473 72605 110737 146783 134092 148441 43439 103...
output:
0
result:
ok 1 number(s): "0"
Test #26:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
200000 1 10000 5936147 409631921 35256 138382 119471 94762 40533 146118 81330 46541 43239 78292 39119 79396 126620 114398 5619 166075 43270 108440 31225 18611 31847 185835 51002 176439 37080 11898 92673 3928 110138 108610 83047 188992 40521 30621 167706 30719 41301 10943 53076 153279 21272 102096 75...
output:
0
result:
ok 1 number(s): "0"
Test #27:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
200000 1 10000 909496785 13002623 59305 171642 26635 51420 149696 6640 26243 168601 149895 140622 101788 161889 113735 103891 74618 65214 128339 7186 165594 171218 140139 185274 49337 131587 196608 108640 122663 7683 18818 77011 178718 103698 111657 76072 125820 161282 105459 119679 57914 141358 194...
output:
0
result:
ok 1 number(s): "0"
Test #28:
score: 0
Accepted
time: 9ms
memory: 7248kb
input:
200000 1 100000 6 974149772 128811 110089 197031 110817 196037 179021 199095 833 176247 100323 24141 74218 148216 195862 63117 120738 169416 72477 70641 152909 65164 117692 5958 105163 89222 84015 2652 113234 150494 89501 40289 57409 22288 90923 118403 167244 72593 191368 40064 177226 52102 192153 3...
output:
1552794736568
result:
ok 1 number(s): "1552794736568"
Test #29:
score: 0
Accepted
time: 10ms
memory: 8148kb
input:
200000 1 100000 339 381494004 20767 49204 133472 17173 91818 124405 71317 101612 81144 16428 187391 193731 195199 171634 138497 90331 193404 46602 99894 4538 82241 20769 188304 183728 68727 138082 21726 58285 108925 34253 47134 85465 62742 26768 62346 192574 96133 26131 71615 62972 109548 198542 121...
output:
0
result:
ok 1 number(s): "0"
Test #30:
score: 0
Accepted
time: 6ms
memory: 7356kb
input:
200000 1 100000 91571 127435862 159880 94861 128551 92460 127984 105843 81314 97291 108523 88897 16125 30470 170971 36770 198872 124565 76747 75855 141274 11369 185316 13363 56626 163233 112548 27447 166774 26962 154705 41098 64944 35137 198586 61494 87676 115085 130893 148464 66577 29635 115937 756...
output:
0
result:
ok 1 number(s): "0"
Test #31:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
200000 1 100000 2333429 588411801 5538 89940 115114 138871 109421 196376 76993 23642 160500 8412 63108 6243 36107 107392 33108 88444 106000 117236 158351 114443 76883 81682 36131 7056 22405 172496 125206 171712 161550 69154 24862 170981 142530 86824 20434 50876 32737 143426 124023 116561 193002 6169...
output:
0
result:
ok 1 number(s): "0"
Test #32:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
200000 1 100000 793309368 63319545 91400 76503 50252 120309 199954 2303 94125 186892 80015 55395 119416 71377 106729 141626 106204 117697 147380 134313 61428 96792 35986 61187 90198 116911 157208 141173 80204 178557 98824 18826 160706 195461 167860 29828 145976 162963 37945 874 10950 3873 179088 160...
output:
0
result:
ok 1 number(s): "0"
Test #33:
score: 0
Accepted
time: 0ms
memory: 7432kb
input:
200000 10 1 1 138846217 816505063 66917448 659164850 420923701 600771262 60874981 913244606 672279394 180151632 130818
output:
4590554135
result:
ok 1 number(s): "4590554135"
Test #34:
score: 0
Accepted
time: 0ms
memory: 7416kb
input:
200000 10 1 785 188475189 386308801 978677961 586615230 719278477 526368416 825724244 385555647 343915193 178662014 159346
output:
5298243186
result:
ok 1 number(s): "5298243186"
Test #35:
score: 0
Accepted
time: 0ms
memory: 7560kb
input:
200000 10 1 72757 758278927 3102019 611161045 884970006 644875632 291217679 738226773 497382934 342425575 319115282 158101
output:
5090755872
result:
ok 1 number(s): "5090755872"
Test #36:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
200000 10 1 3176495 229847953 785328206 204483117 515599864 409724894 203720208 409862572 200926021 187911547 892493189 52355
output:
0
result:
ok 1 number(s): "0"
Test #37:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
200000 10 1 434745520 157298333 83682983 835112975 575416423 322227424 875356007 408372955 341379288 351224046 511269951 107977
output:
0
result:
ok 1 number(s): "0"
Test #38:
score: 0
Accepted
time: 1ms
memory: 6460kb
input:
200000 10 10 5 233384229 483313087 85497956 304174114 880569136 194210157 103956536 737450618 30270485 765092886 186031 157482 83821 119504 445 46102 20482 142744 117914 34596
output:
4120624054
result:
ok 1 number(s): "4120624054"
Test #39:
score: 0
Accepted
time: 2ms
memory: 6948kb
input:
200000 10 10 797 150250509 699856606 623687225 606069176 312717372 569449971 649930257 888770930 633889151 916851973 149769 196995 144528 108998 45403 139269 63659 28597 10557 74150
output:
7553978260
result:
ok 1 number(s): "7553978260"
Test #40:
score: 0
Accepted
time: 2ms
memory: 6976kb
input:
200000 10 10 48077 71826732 797854387 925582287 183441605 982924482 115423691 801250568 787356893 80615534 415967877 98500 177165 24806 164202 37543 172201 159756 131484 169573 12201
output:
5162244056
result:
ok 1 number(s): "5162244056"
Test #41:
score: 0
Accepted
time: 0ms
memory: 3524kb
input:
200000 10 10 6724299 464791809 244973641 502954716 853648715 528898203 561711299 699836531 234083275 284764142 88680334 169453 67690 199472 47126 80720 68299 52399 80255 188160 15432
output:
0
result:
ok 1 number(s): "0"
Test #42:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
200000 10 10 669689376 471719575 382154582 27937634 104655140 385251219 165329966 146562914 733199179 547411191 939612301 59977 122893 82395 80057 176817 160941 91953 98842 100610 20210
output:
0
result:
ok 1 number(s): "0"
Test #43:
score: 0
Accepted
time: 0ms
memory: 7444kb
input:
200000 10 100 4 717306138 309971115 999641847 186356920 148518495 286510663 134675681 940277663 987574967 237305584 20837 82585 151904 61471 30962 39581 13956 86634 90292 117475 99995 108522 190703 187628 171689 133956 36026 114086 86819 61981 153885 39252 35295 36798 162835 150161 142010 134622 629...
output:
18281031492
result:
ok 1 number(s): "18281031492"
Test #44:
score: 0
Accepted
time: 0ms
memory: 7424kb
input:
200000 10 100 2 976908537 24065905 505870031 168985832 405017879 600169116 852757301 141042708 106101849 816803765 74872 174295 96740 30300 148099 31715 98332 110191 93436 46980 47895 145006 12687 54832 28464 20738 130054 185062 78988 74339 43462 25021 89729 33626 159555 146329 54604 167732 37882 15...
output:
7004313423
result:
ok 1 number(s): "7004313423"
Test #45:
score: 0
Accepted
time: 2ms
memory: 7556kb
input:
200000 10 100 6104 396036031 530294089 193531647 275742112 718676331 168507632 348489642 259569590 275534622 398011534 166582 9916 65569 157682 140233 6875 132135 123581 33187 184632 84379 166989 69643 192142 115244 23984 1032 187477 101592 153668 109767 79455 6021 30347 145477 159951 77468 132399 3...
output:
3564393230
result:
ok 1 number(s): "3564393230"
Test #46:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
200000 10 100 933598 197231511 512923000 450031031 589400564 581982144 519015781 467016524 134035067 1966583 685850136 2203 98207 192951 149816 115392 149894 145524 42840 170839 31364 96116 23946 136662 188140 118490 94960 3447 199836 71705 139437 73419 195745 93524 26514 159099 182815 62627 127192 ...
output:
0
result:
ok 1 number(s): "0"
Test #47:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
200000 10 100 256904886 884893126 769422384 908913675 307482184 637522996 637542663 341482001 860467029 849613697 256008109 90494 15345 174839 124975 58413 54068 64783 91768 7325 43100 163317 90966 13198 82170 80250 188157 15805 169948 47228 103089 189709 83249 89691 29890 181963 157728 47175 105878...
output:
0
result:
ok 1 number(s): "0"
Test #48:
score: 0
Accepted
time: 1ms
memory: 6468kb
input:
200000 10 1000 10 384114162 623518919 644651111 646002354 741957390 329592218 958881693 148525650 277548925 975495543 130722 22984 69004 94007 61098 138082 170626 170776 53635 122039 158410 171300 171593 102070 142859 198570 45822 56123 146473 46340 76693 153020 183779 97395 72160 198514 58754 15818...
output:
145641450265
result:
ok 1 number(s): "145641450265"
Test #49:
score: 0
Accepted
time: 0ms
memory: 7100kb
input:
200000 10 1000 730 995489045 964042465 820291273 467457431 743066730 424375128 355972584 431016667 139259103 208623656 15271 192423 129276 70681 46601 79170 192719 164315 98000 105395 100427 125896 36344 15756 93078 40781 72090 54965 63347 197145 157230 173504 59544 153195 197662 153854 78171 74438 ...
output:
9031071657
result:
ok 1 number(s): "9031071657"
Test #50:
score: 0
Accepted
time: 1ms
memory: 7096kb
input:
200000 10 1000 86613 630979887 844715331 786970542 468566771 542882344 821466019 343496305 292726845 372387217 594198680 184710 161914 105950 35692 187687 101263 186259 117898 81356 57658 55023 190646 51059 165974 125041 56802 70932 171836 24400 77684 167468 49269 16374 78700 62220 183518 4666 12897...
output:
0
result:
ok 1 number(s): "0"
Test #51:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
200000 10 1000 653262 511652753 106361895 788079882 413606576 939973235 808989739 205206483 525854958 462994944 259416678 154201 128342 81207 187024 9782 4020 129596 101254 33619 2008 130019 114579 191030 8184 151309 55644 177558 122643 185473 87922 43233 195851 40849 34040 91883 8985 38713 175450 1...
output:
0
result:
ok 1 number(s): "0"
Test #52:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
200000 10 1000 716550320 333107829 812503939 733119687 810697467 222464251 670699918 438334596 911429982 423180239 979325153 120629 103599 22296 9119 112538 48385 123198 144300 177967 66758 134488 145334 33241 24206 150150 172516 138611 93965 115175 163685 63 30574 196187 53457 8133 53278 105679 690...
output:
0
result:
ok 1 number(s): "0"
Test #53:
score: 0
Accepted
time: 0ms
memory: 7188kb
input:
200000 10 10000 9 210772189 947728218 672058109 913951714 984001001 360311363 11965634 400797428 899504727 170414630 136361 91067 101752 124524 174039 30528 15547 143154 136514 84623 141089 88262 93455 172621 123719 111885 96076 27505 45594 176610 34874 35720 23753 99352 28066 131137 35887 135769 12...
output:
80488339487
result:
ok 1 number(s): "80488339487"
Test #54:
score: 0
Accepted
time: 2ms
memory: 7428kb
input:
200000 10 10000 757 319698344 846225271 233464825 559757937 478818579 477459069 313277066 758005172 334178191 630858801 83354 134390 159793 163130 139045 33306 74316 57442 70830 77828 17389 47759 187432 196614 16640 80788 43472 154083 193616 155326 29684 13478 71747 98856 130285 40205 55752 17085 37...
output:
0
result:
ok 1 number(s): "0"
Test #55:
score: 0
Accepted
time: 0ms
memory: 7564kb
input:
200000 10 10000 63208 218195397 407631986 879271048 644510108 890933580 778770501 965452106 192678636 794622362 336592674 126677 192431 198400 148628 22362 182857 178356 181511 64035 174617 187130 61199 141135 89535 175295 28184 170051 102108 172333 59354 7442 61472 71251 11322 39353 150852 137065 1...
output:
0
result:
ok 1 number(s): "0"
Test #56:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
200000 10 10000 3092964 779602112 53438210 964023218 761657813 192245012 576169733 400125571 948090104 500356235 575812487 184718 121821 183897 130915 91377 86899 102426 94180 150579 123868 81108 95438 34056 48192 122691 154763 118076 171606 167143 127894 55436 60976 84745 120389 160246 42414 51586 ...
output:
0
result:
ok 1 number(s): "0"
Test #57:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
200000 10 10000 984499680 130441040 843223084 935946732 768001949 694676948 570651709 565602446 653823976 739576048 559750686 23327 97073 176430 90714 185171 10970 95631 61261 120322 28093 24565 188357 192711 195586 49271 92542 96792 75635 35685 175888 54940 53978 183565 31038 41562 55905 162505 132...
output:
0
result:
ok 1 number(s): "0"
Test #58:
score: 0
Accepted
time: 10ms
memory: 8200kb
input:
200000 10 100000 9 524319994 182672074 986479351 507390609 27082556 184517376 664924021 840514491 637694685 267267225 66514 8167 53752 164905 62296 77982 99689 7527 130832 143038 3869 58906 18143 133545 87305 41146 128895 97405 29953 99418 148642 93422 84350 18922 165143 138662 59454 42475 108898 18...
output:
9941465466
result:
ok 1 number(s): "9941465466"
Test #59:
score: 0
Accepted
time: 6ms
memory: 7836kb
input:
200000 10 100000 561 554642200 10903409 681679528 897806788 597991887 130417456 603251025 791162427 431030786 386854459 454 166926 177 61633 186500 117448 118194 51760 129245 150852 198277 172444 78066 160200 135652 33071 103127 138442 106178 69096 87386 74075 82099 46181 148056 63772 172702 13662 9...
output:
0
result:
ok 1 number(s): "0"
Test #60:
score: 0
Accepted
time: 9ms
memory: 8096kb
input:
200000 10 100000 39768 532616639 1070881 72095707 173748824 953957375 68744459 703642065 584498527 695842211 764935024 68431 22568 86656 196083 25967 36984 172674 29681 126813 135016 101571 32370 195503 18795 127577 98085 164656 24916 86103 7840 68039 61579 109358 18848 62920 177020 123397 179862 38...
output:
0
result:
ok 1 number(s): "0"
Test #61:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
200000 10 100000 7514207 78073711 96519765 493261935 824681608 482218971 169135500 202010870 554342657 928698585 299129531 14855 20324 21108 35550 135255 81217 160841 146712 110977 58802 161495 149806 43852 474 192591 139122 40883 194593 35092 188491 65788 99083 82025 143955 176168 127715 110090 143...
output:
0
result:
ok 1 number(s): "0"
Test #62:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
200000 10 100000 577938575 763457187 667429097 144194719 57975908 582610011 667504304 761789591 82166326 757860388 464252250 12611 53746 60574 144838 189734 69384 168655 141122 34763 118725 78933 198154 25531 65488 33630 15350 316 133336 5500 186240 93047 71750 17380 57206 126863 114409 63528 27288 ...
output:
0
result:
ok 1 number(s): "0"
Test #63:
score: 0
Accepted
time: 2ms
memory: 7332kb
input:
200000 100 1 1 254563453 168675817 762311861 537345751 971328671 530624660 761012623 377464696 572194142 518524357 600578637 756689967 898839842 663199901 258112919 936143153 333775092 345953670 125019898 269435960 544681219 912888488 976757606 350531840 898536224 744164980 476917680 609537995 95961...
output:
54401227003
result:
ok 1 number(s): "54401227003"
Test #64:
score: 0
Accepted
time: 2ms
memory: 7360kb
input:
200000 100 1 316 540645943 376670511 711634670 842052903 649131876 371730249 584911630 20629180 122479405 184488940 845625172 322171568 910122023 199812270 588025956 806054910 696154151 170305037 889245801 740810947 596966601 613859304 95567759 333178563 254223853 394564100 44764295 888632291 436145...
output:
49686428457
result:
ok 1 number(s): "49686428457"
Test #65:
score: 0
Accepted
time: 0ms
memory: 7244kb
input:
200000 100 1 43510 308449149 31026023 16341822 374631917 50045977 50405065 638141522 980979851 348252500 989343987 411106773 478677940 151767095 89533820 457937713 463401264 815472814 229498236 210877685 793096330 297937417 732669456 638022994 688866192 199590268 962410715 618825886 365159126 790302...
output:
50378160968
result:
ok 1 number(s): "50378160968"
Test #66:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
200000 100 1 8314013 402996149 40765880 694145027 920770210 873944984 248859149 188426785 501720242 153107548 849792884 422388954 870066117 336455941 959445576 115284068 582719928 579698717 551130119 412906171 84001738 416747569 420348883 138934815 339265311 472469587 536472306 390320017 719316800 4...
output:
0
result:
ok 1 number(s): "0"
Test #67:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
200000 100 1 607893717 412736006 718569085 240283321 744669217 662333660 653920220 414199880 306575289 13556445 861075065 813777130 759787667 206367698 616791931 234602731 346945830 51073705 898382798 408844283 907844594 959202804 776036512 84301230 202079222 341498474 12999141 154543100 380860216 6...
output:
0
result:
ok 1 number(s): "0"
Test #68:
score: 0
Accepted
time: 0ms
memory: 7344kb
input:
200000 100 10 4 314957676 770868002 594238540 436298227 105315134 606615870 11936998 334391674 572788474 453777236 79485020 558009317 394196587 95946279 907652501 627978661 676566320 436529777 919687306 478837339 895996222 300051807 938740425 913668958 579984732 94169361 899565042 799411770 34458154...
output:
47879508832
result:
ok 1 number(s): "47879508832"
Test #69:
score: 0
Accepted
time: 1ms
memory: 6528kb
input:
200000 100 10 244 142838128 208597190 755811338 681072071 725123086 477430432 246871312 726256215 912508092 223203835 646944522 962752504 47901104 409160364 984894168 589037625 491762963 405163932 803679884 387093246 838905728 575842122 363737581 719659775 899195529 817211463 234638069 568562759 727...
output:
48521872779
result:
ok 1 number(s): "48521872779"
Test #70:
score: 0
Accepted
time: 2ms
memory: 7404kb
input:
200000 100 10 2992 140375828 780235396 585182 890814614 300970352 712364746 638735854 771008538 681934692 790663337 906463517 766200126 951049781 781369327 95696237 553977372 315172926 848965023 711935792 330002753 259920235 839279 169728398 333837869 622237631 152284489 3789058 656721876 252512718 ...
output:
53005311643
result:
ok 1 number(s): "53005311643"
Test #71:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
200000 100 10 240691 6981330 174752344 770136237 466661881 125839258 104229288 683488176 540435137 249394194 345149628 709911139 519605699 28291449 37395588 910892880 227644231 494132800 197412418 800069490 45984556 684917392 806830095 488939195 761912674 957310658 626468182 91948175 476493936 55553...
output:
0
result:
ok 1 number(s): "0"
Test #72:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
200000 100 10 211878897 546722470 89527591 786174992 701596195 517703800 148981611 747882072 107894640 508913189 293821442 463316712 451623174 989350413 707368039 174494331 261379914 402388708 140321925 370827101 470981712 490908208 126040893 66757105 391952997 431494351 9594595 206687531 484549766 ...
output:
0
result:
ok 1 number(s): "0"
Test #73:
score: 0
Accepted
time: 2ms
memory: 7092kb
input:
200000 100 100 4 774509596 5365528 877822748 736761889 933147701 986648305 598895771 280383900 620914987 97908317 638280951 972914105 524893697 422989541 648184389 222542436 348446972 841897716 639760415 437506218 218641961 135954011 580287009 824701758 191029207 242639055 846843501 135134453 291276...
output:
48136395663
result:
ok 1 number(s): "48136395663"
Test #74:
score: 0
Accepted
time: 0ms
memory: 7076kb
input:
200000 100 100 163 377335654 51989910 56275000 803871934 810188225 64389205 897896242 774382729 261671878 781999766 916625119 243192718 669911662 149692252 874425240 115694086 46874006 125237041 57316060 709738986 820032124 512356002 274770381 330704250 752697927 469522625 570360753 220290490 106981...
output:
47633469969
result:
ok 1 number(s): "47633469969"
Test #75:
score: 0
Accepted
time: 2ms
memory: 7336kb
input:
200000 100 100 76326 423960036 230442162 978160853 975879753 182896421 508613869 686862367 120172323 240730623 60343934 332127923 93243388 691581669 670900399 767576889 814121119 330213331 542792686 474773019 311129149 491401412 206839374 75740169 482307562 274548793 782974469 950484086 741028127 28...
output:
19387624208
result:
ok 1 number(s): "19387624208"
Test #76:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
200000 100 100 8857603 307444992 2584911 425568 53620654 627121084 152355802 327619257 99231068 519074790 475846738 36954401 260137587 622855224 564052048 466003922 242684636 747768976 520058158 930938990 687531140 890917487 712841867 932376185 709191132 588000637 718387402 471221722 218499162 68194...
output:
0
result:
ok 1 number(s): "0"
Test #77:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
200000 100 100 807309855 374555037 174592730 373133765 647588421 975895721 938336884 306678002 377575236 639610299 475640512 203848600 191411142 516006873 967511785 749343248 515016089 725034447 976224129 307340982 382014512 396919980 569477883 719068267 727675680 523413570 388868142 653725462 31598...
output:
0
result:
ok 1 number(s): "0"
Test #78:
score: 0
Accepted
time: 0ms
memory: 7492kb
input:
200000 100 1000 7 966636373 132259503 776775224 15972545 9138911 237572680 555822749 280978231 556167866 281847405 439600301 468270850 517448586 632337635 340019897 5525152 439023080 341597828 554194498 83788517 900772576 948193726 438391423 211182970 130968180 225094930 36717276 520097625 287872023...
output:
52471659747
result:
ok 1 number(s): "52471659747"
Test #79:
score: 0
Accepted
time: 0ms
memory: 7440kb
input:
200000 100 1000 941 209262333 801199282 190261464 879863144 356079896 21316183 898490574 269444120 740578261 878286412 411981863 380971800 174227052 546560464 657407955 206270193 986765605 39671125 408631063 96902305 487047647 75493121 661251593 270643223 30121098 659396400 250291221 216885944 56919...
output:
43283954987
result:
ok 1 number(s): "43283954987"
Test #80:
score: 0
Accepted
time: 0ms
memory: 7224kb
input:
200000 100 1000 3005 173169408 214685522 199376255 226804128 139823399 363984008 327147950 599078707 42049973 850667974 324682813 742782970 88449881 158915818 858152997 754012719 539614710 748883497 421744850 273111967 759571234 298353290 720711846 759730733 464422568 167937641 947079540 498205262 3...
output:
43470797994
result:
ok 1 number(s): "43470797994"
Test #81:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
200000 100 1000 8066976 586655648 518767609 401093047 10547632 777458520 792641384 806525641 195517714 14431535 468401628 686493983 657005799 700805236 359660860 405895522 452086015 99083979 907221477 597954513 955700963 982431403 357813543 914832060 899064907 972963809 864725960 228398858 322188712...
output:
0
result:
ok 1 number(s): "0"
Test #82:
score: 0
Accepted
time: 1ms
memory: 3536kb
input:
200000 100 1000 791553215 745513543 425517105 330060742 648182753 911148600 272019076 813030057 167899276 777389381 830212798 600716812 124136961 606582981 907403385 958744627 866331092 407165062 788463843 575510804 768495724 336858952 846901054 203909338 112638852 669752128 851077982 347349604 6898...
output:
0
result:
ok 1 number(s): "0"
Test #83:
score: 0
Accepted
time: 0ms
memory: 7420kb
input:
200000 100 10000 3 201133899 120876415 77238886 698580920 239428242 119498749 206847679 739170153 905331652 840643335 4248193 598967960 844491848 372869523 79807864 532181612 699166827 356638233 953054865 701401553 736674780 34450710 54456927 822227445 984470577 317597580 372439959 466792652 6671455...
output:
86092420890
result:
ok 1 number(s): "86092420890"
Test #84:
score: 0
Accepted
time: 0ms
memory: 7564kb
input:
200000 100 10000 467 347622349 396630240 18094031 259895579 943038669 817565305 946617087 58799393 299374192 147967009 542678973 413047765 914758940 581315727 184064416 611638132 561614522 293307300 26244098 932804509 718528823 691558624 567263364 124145621 122623748 290086379 196986248 596159491 60...
output:
38438536741
result:
ok 1 number(s): "38438536741"
Test #85:
score: 0
Accepted
time: 2ms
memory: 7160kb
input:
200000 100 10000 87212 473633070 337485385 579408690 813762901 936072521 412110522 971279031 157874637 456954761 981365084 356758779 483314858 123205145 685572279 118296744 474085827 643507781 216753429 552614350 209625848 670604034 204365062 869181539 557266088 95112547 259856860 31385791 240210489...
output:
0
result:
ok 1 number(s): "0"
Test #86:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
200000 100 10000 8273742 269264023 603832747 988051820 956539858 530617737 436772466 365321572 610422503 850161349 795444890 427025871 546536870 932494400 59996095 420935927 410754895 421729718 743123681 534468393 866733762 888443175 506283237 862110518 234787591 64883028 243999507 970404084 1536281...
output:
0
result:
ok 1 number(s): "0"
Test #87:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
200000 100 10000 769128886 975802873 307443174 276052969 401341970 555279682 535847710 227934845 3629090 959208450 570744686 490247883 796017614 11950920 922443790 62637698 483944128 948099970 724977724 486543603 674507495 190361350 499212216 834599317 59333880 754058379 888050504 178788994 61712151...
output:
0
result:
ok 1 number(s): "0"
Test #88:
score: 0
Accepted
time: 7ms
memory: 8004kb
input:
200000 100 100000 4 33060578 724861595 356449542 919796322 640095721 781458431 207442010 529198840 384238035 641962686 499604938 591522849 494031430 64705030 717566388 622757720 344091130 271072316 454112972 793597576 548914495 302620533 440938139 762166418 261893748 802438651 757403131 168420811 42...
output:
132528635184
result:
ok 1 number(s): "132528635184"
Test #89:
score: 0
Accepted
time: 10ms
memory: 7320kb
input:
200000 100 100000 145 96831721 235649408 94085241 510819954 194932942 672935445 441678478 97514289 100693542 788547945 535233862 917363155 311627152 219074251 274640523 111338244 621272797 644622303 413407417 40011519 986698646 78039837 212235041 401568792 312497523 970016847 193581702 353336627 709...
output:
11158790093
result:
ok 1 number(s): "11158790093"
Test #90:
score: 0
Accepted
time: 5ms
memory: 6900kb
input:
200000 100 100000 29289 607619534 118509299 830333065 770689879 791442661 347363400 304961223 959193988 952311506 119144166 6298361 175150365 465996372 776148386 763221047 683487207 144565888 753659852 364854065 477795670 57085246 849336738 146604710 601915671 775043015 816260826 83530222 638867334 ...
output:
0
result:
ok 1 number(s): "0"
Test #91:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
200000 100 100000 2517101 785446721 709532930 944978798 957134189 170903320 915678850 871673626 105779247 282907726 444984472 823894083 329519586 23070508 559696206 40402714 57037194 103860333 410139203 802638216 253214974 533414851 783706408 51984293 914718059 621286994 146400834 369060930 82246855...
output:
0
result:
ok 1 number(s): "0"
Test #92:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
200000 100 100000 990344288 81503056 264370152 981680004 896403361 739218769 632134357 723291589 436375468 608748032 262580194 273230599 886593721 806618328 541910577 708919997 871107447 55306981 288114842 873024816 24511876 467784521 689085991 219562489 350896630 951427002 286707350 552662155 99246...
output:
0
result:
ok 1 number(s): "0"
Test #93:
score: 0
Accepted
time: 2ms
memory: 6500kb
input:
200000 1000 1 4 895945412 306487628 125828253 374502568 46331565 502838886 224282684 974405751 704646724 797143298 347121986 571576915 155309137 17409043 109000563 734471097 544116530 378590272 892175719 198885658 153830233 262696035 81752329 345442394 651758027 451331084 894179352 168830801 8451401...
output:
496142923557
result:
ok 1 number(s): "496142923557"
Test #94:
score: 0
Accepted
time: 0ms
memory: 7560kb
input:
200000 1000 1 276 533233562 150252311 694015679 66798902 916313397 689776119 181852685 563147169 811163754 490840802 220320632 723865054 264331164 50699915 386353901 456587835 878533858 377652346 523728203 939894553 946774149 718854026 945254120 86400366 256357252 811825772 899024397 774154052 82447...
output:
502358116937
result:
ok 1 number(s): "502358116937"
Test #95:
score: 0
Accepted
time: 2ms
memory: 7324kb
input:
200000 1000 1 31129 817189733 573215545 91344717 492070334 808283335 352378824 770594103 964631496 949571658 659006743 667576067 687662890 2654740 182829060 258213743 791005163 582628635 714237534 264737099 142903877 402932139 727580010 536468989 690999591 616851940 816670817 504347648 937258676 741...
output:
499663622138
result:
ok 1 number(s): "499663622138"
Test #96:
score: 0
Accepted
time: 1ms
memory: 3576kb
input:
200000 1000 1 2087301 945185671 410736071 811583445 679007567 470886039 381311730 877111134 808072104 822770304 811294882 776598095 720953762 134783885 904945798 442887966 495099940 919213823 455246429 762713719 188996460 266433931 468537983 700876726 756526984 621696985 421994068 372484976 37520917...
output:
0
result:
ok 1 number(s): "0"
Test #97:
score: 0
Accepted
time: 1ms
memory: 3572kb
input:
200000 1000 1 150083238 637482005 130974798 853296486 341610272 204851650 342604569 720551742 681270749 270025739 215284206 664664775 853082907 151867919 944395829 1758552 831685129 660222719 807998857 513839005 462563660 152616096 337978424 206595606 56339324 227020236 730322884 400370071 641499048...
output:
0
result:
ok 1 number(s): "0"
Test #98:
score: 0
Accepted
time: 0ms
memory: 7348kb
input:
200000 1000 10 1 372161134 761229712 622162545 691735901 740201237 11786216 476157088 674497910 351352687 754571457 44681021 220341716 889225893 315578682 918646500 197069143 441977316 940332052 520039029 182306498 590776029 118076471 355861394 449085245 946372677 373347117 281331490 632407254 51111...
output:
512329966474
result:
ok 1 number(s): "512329966474"
Test #99:
score: 0
Accepted
time: 0ms
memory: 7340kb
input:
200000 1000 10 701 133199838 941553899 11249012 465701278 425260727 941650522 586977549 64628940 623367721 188399836 164052729 902492210 267533507 715121660 703727754 209224429 585499830 710548360 802116339 81873053 951897688 433154579 753929676 86047720 178373285 198977910 362600849 145163511 30989...
output:
497093367945
result:
ok 1 number(s): "497093367945"
Test #100:
score: 0
Accepted
time: 0ms
memory: 6540kb
input:
200000 1000 10 73214 313524025 890448877 785214388 1017664 765190442 52470983 417300066 776835463 792354885 452995737 551235927 985832529 667076485 500202913 861107232 352746943 915524649 847401477 406715599 148027417 972008501 391031373 831083639 318048328 4004078 280247269 875357107 238912603 7761...
output:
502769752205
result:
ok 1 number(s): "502769752205"
Test #101:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
200000 1000 10 3197400 557386299 104605742 320530775 930881970 170978199 882793501 689315101 505631138 911726593 135146230 929543542 530599699 452157739 657582391 4629747 827995954 197601959 746968033 472869962 463105525 75109486 468185337 63084247 143679122 85273437 793003527 969106198 410146819 84...
output:
0
result:
ok 1 number(s): "0"
Test #102:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
200000 1000 10 762283867 331351676 639922128 810203593 41702432 1300717 154808536 563334969 770227039 3942495 513453845 474310712 315680952 904504513 506137610 334654566 964849072 97168515 663379293 933172263 566206511 152263450 700185944 743490848 519915777 598029695 886752618 140340415 633331797 9...
output:
0
result:
ok 1 number(s): "0"
Test #103:
score: 0
Accepted
time: 0ms
memory: 6716kb
input:
200000 1000 100 9 502255999 368881920 714979565 106732080 345553415 449918367 195836826 822901889 604566632 549484371 12976411 229383400 879102838 273877185 446512333 168042658 676050871 314086241 714434305 636589824 568449509 945981438 575197563 577923561 488129902 364933431 406136307 20656214 7136...
output:
496574009722
result:
ok 1 number(s): "496574009722"
Test #104:
score: 0
Accepted
time: 2ms
memory: 6596kb
input:
200000 1000 100 374 740852046 739403623 426245191 776086159 568425582 661330261 30348823 463067078 8215228 746629818 173094413 597401860 520799306 93244388 524958165 443297984 959254018 609976339 961432370 764579237 925026847 212299260 322959480 627804946 169959600 323782727 455882514 642646936 6176...
output:
484724155706
result:
ok 1 number(s): "484724155706"
Test #105:
score: 0
Accepted
time: 2ms
memory: 6880kb
input:
200000 1000 100 49614 111373749 305445057 95599270 439149815 779837476 346099154 670514012 866715673 760650275 316813228 541112873 239098328 194942318 321433324 95180788 726501132 109919925 6717508 384389079 416123872 896377373 960061178 932649376 604601939 128808895 668496230 372840532 546663610 99...
output:
481317777177
result:
ok 1 number(s): "481317777177"
Test #106:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
200000 1000 100 6014420 677415183 414990624 613438734 650561709 759573666 841040151 74162607 768893824 775544085 830055880 182809341 58465531 568355445 596688651 378383935 877167038 651885286 869865705 35933713 682441694 644139291 569751074 909446370 563451235 178555102 290486952 571824502 624362186...
output:
0
result:
ok 1 number(s): "0"
Test #107:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
200000 1000 100 882312750 81928046 637862791 824850628 190106410 254514662 539656042 826597655 634044530 698852145 326528156 2176544 991687171 843610772 879891798 529049842 419132399 779874699 81218851 7284239 135236315 548796483 986739555 868295665 613197442 95513120 339727818 354555781 812958256 7...
output:
0
result:
ok 1 number(s): "0"
Test #108:
score: 0
Accepted
time: 0ms
memory: 6960kb
input:
200000 1000 1000 1 367063491 865216212 32212898 505634456 559533449 701792770 895928985 619350956 121803303 247043405 101932700 963300156 737080989 938298930 909110379 330744659 942825355 941949551 257663657 633344132 718797240 660281991 238648926 722795107 115178639 342020161 19455863 391665674 165...
output:
495391069517
result:
ok 1 number(s): "495391069517"
Test #109:
score: 0
Accepted
time: 2ms
memory: 7432kb
input:
200000 1000 1000 354 237186338 56636955 679923375 430257681 525332689 361422420 531830594 275271045 705774262 540618811 907011169 305636906 185221051 410618242 277594759 710072468 146925840 743140283 958186678 914926969 344360104 610909408 322606834 549820978 147046330 937102283 416826565 94043967 6...
output:
505219546418
result:
ok 1 number(s): "505219546418"
Test #110:
score: 0
Accepted
time: 2ms
memory: 7444kb
input:
200000 1000 1000 83905 578350185 704347432 604546600 691024218 479929636 142548221 187750683 564274708 704382372 345697280 249347919 753776969 952507659 779102622 361955272 59397146 243083869 443663304 239769514 835457129 149763329 959708532 704922305 286721373 742128452 39505690 824237562 581601250...
output:
194620575451
result:
ok 1 number(s): "194620575451"
Test #111:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
200000 1000 1000 3247753 371284854 628970658 865313137 55686572 261055437 653244118 771721642 857850114 509460841 688034031 697487982 521063577 26024743 158430431 711279949 155555174 648639594 580021949 160299674 345893057 643786645 342024003 591565804 881803495 844531858 446916686 311794845 6161949...
output:
0
result:
ok 1 number(s): "0"
Test #112:
score: 0
Accepted
time: 1ms
memory: 3520kb
input:
200000 1000 1000 576182422 295908080 889737195 229975491 426746965 66718629 237215076 475362456 662928582 997021783 136174093 464774590 889547957 110385256 507755108 662213785 561110899 930222430 500552109 110927091 839916373 616036708 228667501 331872118 279174197 251942855 374665457 346388531 1796...
output:
0
result:
ok 1 number(s): "0"
Test #113:
score: 0
Accepted
time: 0ms
memory: 7508kb
input:
200000 1000 10000 8 269682995 958033232 447209077 110986633 852441408 421472508 44332964 17789094 506650810 510306091 965750192 807952909 695379492 316421659 880083894 564818215 611546840 841377531 711946983 756241804 841669503 439426672 807678730 119328141 401732250 321600786 257961720 889149099 61...
output:
536002105184
result:
ok 1 number(s): "536002105184"
Test #114:
score: 0
Accepted
time: 2ms
memory: 7128kb
input:
200000 1000 10000 563 330003358 471633135 430499744 723165640 539979724 655050591 635301436 365151255 674069652 254693199 601920818 558902706 418119588 86624461 216701018 378793953 341321116 197423610 81084349 37799232 418472081 444780428 424172571 541407293 126626955 175608140 324375398 547019166 8...
output:
484908863468
result:
ok 1 number(s): "484908863468"
Test #115:
score: 0
Accepted
time: 3ms
memory: 7284kb
input:
200000 1000 10000 926 698379069 309699610 42678751 410703956 68525103 100794871 572598189 532570098 713424056 335574226 502613719 281642802 333546582 13176177 30676756 253792421 402399899 566560976 657609073 909569105 128858541 61274269 141219020 266301998 980634309 536989115 277212762 795816616 165...
output:
468190485389
result:
ok 1 number(s): "468190485389"
Test #116:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
200000 1000 10000 3276636 681669736 921878617 584992875 499057847 514269382 183315816 740017032 571924501 204370490 646332534 225353815 197069796 260098298 532184619 760451033 609838501 476569970 848118403 529378947 914922861 745352382 778320718 716370621 120309352 47047987 899891886 526010212 94556...
output:
0
result:
ok 1 number(s): "0"
Test #117:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
200000 1000 10000 886567303 588816039 609416933 818570958 90026319 861631544 205510467 779371435 357838232 810096095 369072630 140780809 123621512 779106741 702150384 821529816 538784379 53094693 574664085 239765407 236449407 462398831 648439614 720121079 481690326 704918054 588880824 380790797 1681...
output:
0
result:
ok 1 number(s): "0"
Test #118:
score: 0
Accepted
time: 5ms
memory: 8104kb
input:
200000 1000 100000 8 766017287 275266565 846111453 324966667 809348515 121564668 986006223 829993061 349434036 599262381 994634244 811155252 505025429 928762808 482977383 126559995 944442854 974541474 148892779 611622240 966035464 838036819 807326084 41344173 788884388 490209943 923938476 340546129 ...
output:
501070688878
result:
ok 1 number(s): "501070688878"
Test #119:
score: 0
Accepted
time: 7ms
memory: 7164kb
input:
200000 1000 100000 150 647236691 870535510 644479778 975040044 240071883 451499658 447505403 207934481 763025942 138353059 754866265 928357155 175684930 984485246 778442798 711689967 474485060 339402110 231432081 457132489 522114932 589651974 491412796 223526727 295236111 546617600 70739725 28698951...
output:
461697701595
result:
ok 1 number(s): "461697701595"
Test #120:
score: 0
Accepted
time: 10ms
memory: 7144kb
input:
200000 1000 100000 10066 392248740 818646940 294553155 110796116 570006874 912998838 415381416 621526387 597083916 338776568 17292360 599016655 231407368 574917957 363572770 386956365 839345695 571684516 781975034 13211957 128505895 128514494 528371158 24845746 351643768 693418849 17183106 932873558...
output:
0
result:
ok 1 number(s): "0"
Test #121:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
200000 1000 100000 7146308 190617066 173753020 990117739 735698402 326473349 880874850 534006025 455584361 502540129 455978471 687951860 654739094 821840079 865080633 38839169 606592809 481693509 267451661 338054502 914570216 107559903 165472856 179947073 786286107 793412313 934829526 663067153 1730...
output:
0
result:
ok 1 number(s): "0"
Test #122:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
200000 1000 100000 395514633 545723146 604476388 615020025 902230286 704414770 999499460 663031295 656007870 619742032 831670676 598450107 390395996 406970051 540347032 258475612 394164815 472427950 383339641 384636953 303689631 849550969 817048771 91130538 933087356 739855694 580713573 747494349 87...
output:
0
result:
ok 1 number(s): "0"
Test #123:
score: 0
Accepted
time: 3ms
memory: 7336kb
input:
200000 10000 1 3 393340357 151625146 4009154 924907537 830960772 348200719 543278582 169287796 188243641 508002927 312317987 793717826 945305739 237041445 414961859 598528875 309527525 472327139 492527442 902354816 848610039 785753404 498873298 735634488 313113268 585284647 275945800 446536685 71670...
output:
4987627640251
result:
ok 1 number(s): "4987627640251"
Test #124:
score: 0
Accepted
time: 0ms
memory: 7336kb
input:
200000 10000 1 733 523595272 178176316 99196456 701685005 761675231 153996209 226991626 341711382 966733784 456036802 882653031 368637464 483963567 61693914 810220190 76774639 382336133 683036773 227197362 634674360 469831517 430942292 890735815 452788312 390310816 193592220 176730280 645722101 7356...
output:
4976555169550
result:
ok 1 number(s): "4976555169550"
Test #125:
score: 0
Accepted
time: 3ms
memory: 7380kb
input:
200000 10000 1 92839 845113738 418587810 875973923 337432167 272503424 692485060 254191020 825234229 914767659 616306438 312348477 52519484 13648739 751919542 728657442 294807438 888013062 712673988 959516905 960928541 409987701 117772104 902856934 529985859 998618388 944633596 375915696 664673595 8...
output:
5002458082623
result:
ok 1 number(s): "5002458082623"
Test #126:
score: 0
Accepted
time: 0ms
memory: 7136kb
input:
200000 10000 1 11305 495590640 900397981 511721086 998003465 516024980 719684455 32681163 773268105 485102703 601291484 996230498 26915057 998841663 525132601 946690241 655260176 917650278 4802044 580738383 606117429 801850218 539958632 275021778 138293431 749659765 293562116 394867190 753572463 649...
output:
5004792488608
result:
ok 1 number(s): "5004792488608"
Test #127:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
200000 10000 1 850231311 567335403 536145144 317516576 681716509 838191671 643398790 685747743 638570445 60022341 729883905 675658774 422173389 772054723 743165400 307142979 830121583 649969821 626023521 930959975 997979946 519004041 912123475 883329350 39077912 98588285 312513610 483766059 93550527...
output:
0
result:
ok 1 number(s): "0"
Test #128:
score: 0
Accepted
time: 0ms
memory: 7364kb
input:
200000 10000 10 8 659716049 124746104 459319362 61706091 712415462 770023573 73098143 511983196 189780140 60923319 714343777 476811011 98210842 166466326 716974445 997345172 769581214 557744769 4778327 941198615 795359384 77847002 55804652 202307049 653538781 790608789 135591592 517929015 493281844 ...
output:
5039781795840
result:
ok 1 number(s): "5039781795840"
Test #129:
score: 0
Accepted
time: 0ms
memory: 7088kb
input:
200000 10000 10 912 201748934 778710716 235995010 878106991 183498085 538591577 424462834 343247881 224686879 858062592 420522024 256701352 118421151 363706500 354260680 536828327 57688355 490254954 266041161 991489113 56892411 692906349 507151479 383148416 595634957 348205308 248122610 717263062 11...
output:
4996821810553
result:
ok 1 number(s): "4996821810553"
Test #130:
score: 0
Accepted
time: 3ms
memory: 7320kb
input:
200000 10000 10 13798 150680842 260419068 197620102 759255021 657098793 889956269 255727519 83187325 167050345 709465031 905445069 836720173 905595917 150735839 188711131 824935468 400263947 751517787 461555850 253022139 671951758 144253177 393025551 735310001 858264181 870801734 447456658 339515382...
output:
4988013075070
result:
ok 1 number(s): "4988013075070"
Test #131:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
200000 10000 10 5578409 632389194 76819967 933543940 232855730 713496188 571477850 290634259 320518087 873228592 344131180 780431186 328927643 397657960 690218994 476818272 167511061 956494077 801808284 577864685 163048783 828331290 175351440 40154432 292906520 675827903 70135782 774741681 965752947...
output:
0
result:
ok 1 number(s): "0"
Test #132:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
200000 10000 10 837286761 448790093 252935294 407144649 879187717 984952362 756127694 232997725 26696333 212927445 364341489 272638656 820989686 232108411 273293431 114361160 868965382 301751870 768374015 782858624 614395610 714205361 972223425 597750951 110470242 875161950 692388101 695946542 13030...
output:
0
result:
ok 1 number(s): "0"
Test #133:
score: 0
Accepted
time: 3ms
memory: 7420kb
input:
200000 10000 100 6 52426220 542030117 265384534 596393991 750723760 914138456 535943063 601466102 610393557 514680372 970276106 19380002 98735241 284871185 310570111 788229461 179853146 914437964 417903463 186145439 91506877 953036999 965389657 239278803 327116170 336634471 683842191 892224263 59079...
output:
5001348012196
result:
ok 1 number(s): "5001348012196"
Test #134:
score: 0
Accepted
time: 1ms
memory: 6984kb
input:
200000 10000 100 788 768776051 439551696 915907102 621447993 327612968 1436497 513945740 763861299 973411228 113994921 963091015 522066966 386569114 812077974 145144969 242067555 119414254 608412794 510987984 877571197 637115112 602491355 394380129 761758509 141660639 306521315 622417859 224837663 1...
output:
4960142645343
result:
ok 1 number(s): "4960142645343"
Test #135:
score: 0
Accepted
time: 0ms
memory: 6724kb
input:
200000 10000 100 73619 516554526 90074263 940961104 758145713 824976417 979439175 676340937 831911674 277758482 106809830 465777979 250092328 764032799 646652832 598983063 31885559 813389083 701497315 202413743 833244841 286569468 326449123 916859836 281335683 111547483 245096983 955031259 775283789...
output:
4939049300341
result:
ok 1 number(s): "4939049300341"
Test #136:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
200000 10000 100 6419390 167077093 820160969 77658824 990667946 392913687 141834372 744391312 431226223 270573391 49688282 193803341 922523309 188542249 395458222 538544170 875603493 201440900 392923073 453054682 777666492 305494532 143896126 731404305 546189822 50123151 872677679 505477385 77314421...
output:
0
result:
ok 1 number(s): "0"
Test #137:
score: 0
Accepted
time: 1ms
memory: 3600kb
input:
200000 10000 100 666941957 192131095 397050177 164956865 968670623 965374291 209884747 343705862 129073836 213451843 337522156 571267026 757098167 642380343 480243522 232519000 113912206 597899363 498339821 102509038 501624261 827974239 368506003 996258445 484765490 677703847 423123805 503337812 157...
output:
0
result:
ok 1 number(s): "0"
Test #138:
score: 0
Accepted
time: 0ms
memory: 7376kb
input:
200000 10000 1000 6 730579883 702373029 402183089 918040169 467513910 298733825 733414271 603002601 868346653 916706162 358401995 172285105 587968633 881851066 709386408 953315854 709981176 721656145 456747262 688184384 823791963 360225249 432062217 579704315 532440312 51056072 904977625 963765224 1...
output:
4963428786996
result:
ok 1 number(s): "4963428786996"
Test #139:
score: 0
Accepted
time: 3ms
memory: 6756kb
input:
200000 10000 1000 450 74343155 281382954 92329088 43270847 417241041 198907705 515482240 581622907 80469723 502120810 115996118 451491847 983548996 61151167 310231361 622452481 926632435 647256593 307994225 19921691 899079170 69163915 29772938 672115355 856082240 527656749 398991524 44903642 3534176...
output:
4985287319643
result:
ok 1 number(s): "4985287319643"
Test #140:
score: 0
Accepted
time: 2ms
memory: 7432kb
input:
200000 10000 1000 8018 653353080 411720441 362783958 287965273 22447625 126199866 934294033 233937464 960851667 699906422 395202860 552104913 603040585 106706520 274335285 839103740 852232882 793470851 344764237 685143490 48209324 961841931 976959786 995757283 332682917 611605240 775097238 987464273...
output:
4970557326826
result:
ok 1 number(s): "4970557326826"
Test #141:
score: 0
Accepted
time: 1ms
memory: 3604kb
input:
200000 10000 1000 8250648 783690567 536951120 462254192 188139154 244707082 399787468 146417102 819352112 863669982 538921675 495815926 26372310 353628642 70810444 345762351 914447292 998447141 685016671 9986036 244339053 645920044 614061483 740793202 767325256 416631408 692743658 717657869 96793984...
output:
0
result:
ok 1 number(s): "0"
Test #142:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
200000 10000 1000 988588135 613953950 781645546 362428073 970207122 518294683 757134729 26799046 17137724 702685236 639534742 970083323 776960367 317732565 992494406 271362799 765694254 35217153 200495366 569181598 137017069 593106893 377894900 922426583 556306452 497769826 635304289 843357630 87589...
output:
0
result:
ok 1 number(s): "0"
Test #143:
score: 0
Accepted
time: 3ms
memory: 7480kb
input:
200000 10000 10000 1 442831192 508438201 936870988 516156979 316661498 761578745 822897177 728648723 471846810 467605787 460779498 27585312 1340788 35255245 350527593 658555082 916931267 839813985 406726790 574266468 258790472 829618766 469033972 253281704 783498698 449563566 424497065 471339826 701...
output:
5063683397172
result:
ok 1 number(s): "5063683397172"
Test #144:
score: 0
Accepted
time: 3ms
memory: 7276kb
input:
200000 10000 10000 567 440216839 256262341 835670090 187385730 585118665 288390612 936095657 330347256 336402051 194432905 116520517 569896705 282177366 852035456 310437885 684178380 44790275 892203417 899109014 454920201 808664175 106135669 703350327 218141037 254589734 47176189 496500717 630415154...
output:
4989738825129
result:
ok 1 number(s): "4989738825129"
Test #145:
score: 0
Accepted
time: 3ms
memory: 7468kb
input:
200000 10000 10000 81703 333265171 155061443 361674649 750810193 406897827 401589092 242826894 489869793 63229170 555206628 513607719 145700580 98957578 516978452 336061184 957261580 392147002 944394152 74730042 4793904 790213782 340452025 668209660 394264778 852202357 119179841 360608749 89822839 5...
output:
1818911251101
result:
ok 1 number(s): "1818911251101"
Test #146:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
200000 10000 10000 7905843 381807377 386098707 925099112 277622060 520096307 853544521 402349431 216696911 424002893 657326534 89411593 817256599 763900573 132536343 463920191 864426819 589561930 560206669 329636449 281310807 319497434 305311357 699109208 286844697 924206009 278255169 820016435 4353...
output:
0
result:
ok 1 number(s): "0"
Test #147:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
200000 10000 10000 586704945 758068833 949523170 597135171 390820540 972051736 867842866 129176549 577470634 116057390 233130408 760967612 627423787 379458464 405619543 811276919 356809043 470215662 815113076 606153352 515627162 989389470 481435098 296721831 358848349 83281337 737662855 165557584 26...
output:
0
result:
ok 1 number(s): "0"
Test #148:
score: 0
Accepted
time: 6ms
memory: 6900kb
input:
200000 10000 100000 10 603174104 350269460 258517166 232947129 406289570 959049953 969657868 136344923 724129496 560764379 348843385 662042896 303353373 874263030 810581282 38940008 429182152 878657784 203733031 571392770 960946018 591258623 809459484 458605846 792887594 375731704 201070730 29140580...
output:
4954537113109
result:
ok 1 number(s): "4954537113109"
Test #149:
score: 0
Accepted
time: 11ms
memory: 7004kb
input:
200000 10000 100000 671 871982690 432684328 257492944 571981099 782589873 435151303 48824561 877597238 19495236 492562201 605753909 871909291 826217855 17121849 690822811 196429265 83634074 543985465 191202612 452043042 275336736 446561181 468482981 932562638 180757872 118717150 726632104 842595638 ...
output:
4691547415980
result:
ok 1 number(s): "4691547415980"
Test #150:
score: 0
Accepted
time: 11ms
memory: 7828kb
input:
200000 10000 100000 80257 804654454 576884298 891494210 948281401 553658519 659542188 790076876 877995681 951293057 189664213 815620304 544516877 559011266 192330674 143279365 850881187 894185947 676679238 776885588 471466464 425606590 545776166 382631260 320432916 923743319 939245820 572789233 2846...
output:
0
result:
ok 1 number(s): "0"
Test #151:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
200000 10000 100000 9552021 948854424 770694075 122570320 424382751 778049403 255570311 85442616 809793503 353427773 254306415 193260594 982342992 439252796 644787228 502763991 661433060 586688232 822170726 91276306 621736319 84630087 19732958 65468834 63418362 744271988 490435653 14812060 713529249...
output:
0
result:
ok 1 number(s): "0"
Test #152:
score: 0
Accepted
time: 1ms
memory: 3692kb
input:
200000 10000 100000 8527799 142664201 146994378 598671670 503549444 374077526 255968754 17240437 506895515 418069976 631946705 926054005 157551817 891709349 299239150 313315863 499159537 172371208 431528740 241546160 575727112 998778367 702570532 663230089 883947032 295461821 932458480 738690141 648...
output:
0
result:
ok 1 number(s): "0"
Test #153:
score: 0
Accepted
time: 7ms
memory: 7616kb
input:
200000 100000 1 8 975862568 515141538 136133267 854686240 243366485 961213885 140219637 6773081 171895286 109322085 687013448 345154417 154290688 87929090 63546699 103837608 637131424 89739856 977266740 511503830 53193395 890748126 493783852 488856292 315246668 2546320 130205902 182315342 288807730 ...
output:
50061325469813
result:
ok 1 number(s): "50061325469813"
Test #154:
score: 0
Accepted
time: 7ms
memory: 7424kb
input:
200000 100000 1 136 592144368 160557325 174199351 968866526 79721100 750937264 919252719 30395731 418309838 125699559 434089622 722846606 334851211 860021858 755720412 404378537 294716145 462743367 131313672 544290419 574826239 130885549 938924914 454921711 807572488 342819618 912508938 922854355 54...
output:
49964618330516
result:
ok 1 number(s): "49964618330516"
Test #155:
score: 0
Accepted
time: 5ms
memory: 7384kb
input:
200000 100000 1 9231 387303259 198623409 993412341 950445333 869444480 235003050 237842665 571777579 289463120 577808437 666557619 53150233 106943980 552195571 56261341 356930555 667719656 616790298 869132965 65923264 814963662 576026612 54733438 947247532 852878490 830155358 798272143 470309078 380...
output:
49942317723678
result:
ok 1 number(s): "49942317723678"
Test #156:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
200000 100000 1 2200826 720336639 607770990 269958444 594944520 648477561 703336100 484257217 442930861 741571997 810276434 142085438 530275705 799117692 852736500 713846062 434966770 821766588 354609591 685733105 601027983 555072021 691835135 397316154 287520830 635181526 715918563 200502674 142112...
output:
0
result:
ok 1 number(s): "0"
Test #157:
score: 0
Accepted
time: 1ms
memory: 3524kb
input:
200000 100000 1 925234206 979741116 444125605 914457631 79010306 821843316 949750652 355410499 895039739 269007291 580771549 473986718 367673610 99658621 215353925 86849573 294046405 559585881 731018244 925870528 751201750 375913248 329385148 737589452 774856569 520944731 118149094 744404890 1375070...
output:
0
result:
ok 1 number(s): "0"
Test #158:
score: 0
Accepted
time: 8ms
memory: 7400kb
input:
200000 100000 10 6 355110463 2927005 714757035 551368002 557777296 234243663 118237083 850355921 195607065 731152023 376676176 266807613 317843245 177460326 581032223 617531976 568350785 453063788 708247486 635978422 613384048 494967971 591220938 568694994 227683832 172375237 118330180 389497064 810...
output:
49971920235671
result:
ok 1 number(s): "49971920235671"
Test #159:
score: 0
Accepted
time: 11ms
memory: 7500kb
input:
200000 100000 10 30 229672939 34148389 870881113 578244632 352750879 583730518 57802855 54107510 189882880 520394992 210518626 181366458 129415151 787572790 974447483 335597898 658040078 193724112 960820968 809513777 474013380 228322636 18763617 367358875 977401405 35976600 119690659 299453789 63912...
output:
50173948491914
result:
ok 1 number(s): "50173948491914"
Test #160:
score: 0
Accepted
time: 5ms
memory: 7784kb
input:
200000 100000 10 70506 701085811 750080978 897757743 78250919 997205030 523296289 261554445 48383326 124350040 354237441 830110175 142681469 329462207 475955346 692513406 130319895 693667698 301073402 134356322 670143109 207368045 655865314 672203306 117076449 841002768 37337079 174871576 273168265 ...
output:
49840545072665
result:
ok 1 number(s): "49840545072665"
Test #161:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
200000 100000 10 759186 417018400 922181801 397764030 572961966 346836209 727047879 255830260 837626294 663225194 563763583 791425186 898018125 17844763 488988565 77169995 165947515 651273884 619832949 994985654 403497773 634910723 309305004 862112367 275645108 842363247 92517996 3361861 259759170 6...
output:
0
result:
ok 1 number(s): "0"
Test #162:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
200000 100000 10 621915968 294151927 717155384 747250885 512527738 845555095 721323694 190297420 816692935 577784039 375335489 841729138 586400681 735910686 578677858 112797615 418520997 824809238 480462281 23307615 831040452 288350413 499214065 725713730 277005587 897544164 921008281 989952766 6201...
output:
0
result:
ok 1 number(s): "0"
Test #163:
score: 0
Accepted
time: 3ms
memory: 7732kb
input:
200000 100000 100 9 415942612 84219638 195163237 8799704 363736926 511079511 78461052 585117747 211712715 889375832 226745401 228364951 949622885 83199129 961103036 820866064 241976263 694144558 27052477 240985690 491468895 358012961 718611461 946444906 744377843 895927277 274396656 169356518 246683...
output:
49975709121337
result:
ok 1 number(s): "49975709121337"
Test #164:
score: 0
Accepted
time: 7ms
memory: 7428kb
input:
200000 100000 100 180 456189764 514554591 328312815 234461158 779329831 543954487 497597385 70213161 348106689 370464216 172075965 667921907 330121250 462610899 472748867 154447568 899120848 72337616 565828236 687598624 42091074 355713158 251289337 884052886 700953446 192043076 899550113 325440442 4...
output:
50106409484312
result:
ok 1 number(s): "50106409484312"
Test #165:
score: 0
Accepted
time: 11ms
memory: 7220kb
input:
200000 100000 100 63140 886524717 207512680 553974269 355086768 957428998 963090820 277660095 206607134 534227776 461018972 611632920 48420272 709533021 974256730 661106179 811592153 717505393 51304862 307408465 828155395 39791271 328582522 188897317 135595785 997069244 962420725 200858230 330889917...
output:
50017701983119
result:
ok 1 number(s): "50017701983119"
Test #166:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
200000 100000 100 1422284 579482807 578398327 674599879 533185935 81598036 743153530 414054069 687695518 624782532 755351735 992131285 427832042 221178852 12870938 318250765 484752507 256281152 497917796 152997940 825855592 867436443 971223206 735407512 136744288 767446893 823537354 61083513 9751460...
output:
0
result:
ok 1 number(s): "0"
Test #167:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
200000 100000 100 79347670 805144261 993991232 707474854 952322268 566693449 879547503 600175156 483282978 64339488 281074292 371543056 939477873 259793060 819758628 136635310 23528265 702894085 198283078 150698137 358533468 805044423 372509209 881780206 761897745 628563522 978729933 306912 14872934...
output:
0
result:
ok 1 number(s): "0"
Test #168:
score: 0
Accepted
time: 11ms
memory: 7356kb
input:
200000 100000 1000 10 903728080 252777998 891844999 323210514 636766704 343872766 366754292 608829526 833542654 579038561 708207109 391917508 893929929 600684652 474797404 457118129 15365603 425125304 151527069 506209048 240912932 750417343 798450163 858882070 914206760 179018851 481578377 545955951...
output:
50087057792704
result:
ok 1 number(s): "50087057792704"
Test #169:
score: 0
Accepted
time: 11ms
memory: 7496kb
input:
200000 100000 1000 455 624748124 916269057 642723625 507490937 757347277 977471918 521309165 692043100 742802122 587084708 335628521 462485846 552639478 681337971 403968228 927836908 925068889 196812208 126018889 437042661 434495456 730519156 163726501 348849099 984045020 839416285 276149547 8333323...
output:
49958967943164
result:
ok 1 number(s): "49958967943164"
Test #170:
score: 0
Accepted
time: 11ms
memory: 7444kb
input:
200000 100000 1000 45692 437982287 521923491 681779856 187880022 801011838 986802599 899490034 896269863 455880973 919538824 406196859 416162691 928260092 905476091 434495520 837540194 696755793 611495516 761885206 925592481 414597269 800828199 358726234 123720063 499218262 339020159 858493225 43121...
output:
49796404057090
result:
ok 1 number(s): "49796404057090"
Test #171:
score: 0
Accepted
time: 0ms
memory: 3528kb
input:
200000 100000 1000 2879854 893893617 1171209 507393133 526511879 105309815 364983468 808749501 314381418 83302385 549915675 64906408 791783306 857430917 376194871 49231510 609227099 521504509 102137641 545402322 905694294 484906312 730986715 428564494 638893305 144046327 481172349 866439900 45773933...
output:
0
result:
ok 1 number(s): "0"
Test #172:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
200000 100000 1000 393758480 373141335 826784486 846024989 271001344 188523388 274242936 521828352 236770126 8646531 503592519 735494319 870697234 477892800 695963565 261109902 288751622 747305418 590687461 230536839 270970632 269840636 505857679 88961928 283721370 286198517 929310512 482900224 8254...
output:
0
result:
ok 1 number(s): "0"
Test #173:
score: 0
Accepted
time: 11ms
memory: 7560kb
input:
200000 100000 10000 3 985020713 438216904 349276701 979427040 208569849 304096734 511581526 329967881 846542271 429107785 814988639 173440252 504701436 685788170 678131492 275967798 696637861 598706103 756534337 679261191 253701026 582840570 176200075 670543377 932726096 335085327 406662024 57194260...
output:
50114630804036
result:
ok 1 number(s): "50114630804036"
Test #174:
score: 0
Accepted
time: 12ms
memory: 7712kb
input:
200000 100000 10000 576 810187030 373700759 153715959 784326785 717571246 977074961 537414815 10012 887838642 548642047 822183969 368224650 932710291 179639355 927850602 463884974 948906585 801819476 4103736 449830755 266918683 108269069 825644704 72401139 140111496 619275740 302136200 891053985 362...
output:
49961403822097
result:
ok 1 number(s): "49961403822097"
Test #175:
score: 0
Accepted
time: 8ms
memory: 7544kb
input:
200000 100000 10000 84598 895413989 768074609 958615704 148103991 390549472 707940954 912489650 746339087 417438311 406094273 311935663 651009313 426561476 724325761 115767778 716153698 446987253 49388875 774673300 52983003 792347182 757713697 377245570 279786539 129334612 365006812 766471773 291824...
output:
46131102387130
result:
ok 1 number(s): "46131102387130"
Test #176:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
200000 100000 10000 311556 140044735 278007058 467617101 261273705 121415465 523207277 658818725 570906053 274890537 455654478 594720326 849893202 676280586 617275641 368036501 214234367 399589356 965182630 377825549 283444206 441791810 14347268 729855162 563976951 170032981 684118193 22018238 98636...
output:
0
result:
ok 1 number(s): "0"
Test #177:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
200000 100000 10000 344942302 355009888 787008455 140595328 697172402 641714493 124312160 483385691 723325575 619418039 883663333 793604215 394579608 864197762 869544364 866117170 461803766 465126216 568334879 608286752 932888835 993392677 366956859 14045574 164483832 489144361 939664658 716561887 2...
output:
0
result:
ok 1 number(s): "0"
Test #178:
score: 0
Accepted
time: 16ms
memory: 7692kb
input:
200000 100000 100000 7 153579073 134898666 663687511 402199923 746395807 592389974 830260601 806573628 681429192 205536789 568475788 968004192 167411151 199482537 314383557 639291731 427618606 428213399 21757695 988513740 56170816 957646568 383604535 840372294 920850374 542267049 783261457 374801792...
output:
50020441434767
result:
ok 1 number(s): "50020441434767"
Test #179:
score: 0
Accepted
time: 19ms
memory: 7632kb
input:
200000 100000 100000 640 506868792 688111569 721713034 617120040 415929893 295754036 159244754 394705445 514524542 712194603 911715205 590742877 151437363 110858716 145950342 194865720 778413881 67042833 753547773 842235137 641724681 20706233 290440917 60525417 347293217 995875173 104995387 13660186...
output:
49720712171843
result:
ok 1 number(s): "49720712171843"
Test #180:
score: 0
Accepted
time: 19ms
memory: 7716kb
input:
200000 100000 100000 42167 355048991 41104387 791408958 581621422 414261252 624738188 747376571 522768091 875958164 200658212 534453890 164703680 357780837 792682397 141715819 840628290 712210611 93800208 167077682 132821706 559560154 927542614 365369848 486968260 505934045 727674511 866795456 47945...
output:
31337286235343
result:
ok 1 number(s): "31337286235343"
Test #181:
score: 0
Accepted
time: 1ms
memory: 3624kb
input:
200000 100000 100000 9689663 267850321 815833016 901134533 284985484 743245404 917902710 580471922 29425905 659389069 118364193 253638885 781112563 39604519 348256386 197543797 479457724 298776497 357587013 457664251 900914075 906588023 2471546 232004179 940576385 532700680 784441876 209644255 80827...
output:
0
result:
ok 1 number(s): "0"
Test #182:
score: 0
Accepted
time: 0ms
memory: 3688kb
input:
200000 100000 100000 472747889 482770438 925558591 604498595 613969637 36409925 45965356 941905543 517889514 282127754 397357700 724823576 462936245 595178508 994018956 131340528 211247803 562563302 648173581 520723916 102717752 981516955 869105877 390645007 967343019 589468044 127290675 538465600 2...
output:
0
result:
ok 1 number(s): "0"
Test #183:
score: -100
Runtime Error
input:
1000000000 1 1 7 546704894 800798395