QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#667603#5417. Chat Program1ockhartWA 87ms6420kbC++201.6kb2024-10-23 00:36:482024-10-23 00:36:48

Judging History

你现在查看的是最新测评结果

  • [2024-10-23 00:36:48]
  • 评测
  • 测评结果:WA
  • 用时:87ms
  • 内存:6420kb
  • [2024-10-23 00:36:48]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
//#pragma GCC target("avx2")

using ll = long long;
//using i128 = __int128_t;
#define endl "\n"
#define int long long
#define db cout << "db" << endl;
#define x first
#define y second
typedef pair<int, int> PII;
const int N = 5e5 + 10;
ll inf = 2e18;
void solve() {
    int n, k, m, c, d;
    cin >> n >> k >> m >> c >> d;
    vector<int> a(n + 1);
    for (int i = 1; i <= n; i++) {
    	cin >> a[i];
    }

    int l = 0, r = 1e18 + 10;
    while (l <= r) {
    	int mid = (l + r) >> 1;
    	vector<int> s(n + 2, 0);
    	for (int i = 1; i <= n; i++) {
    		if (a[i] >= mid) {
    			s[0]++;
    			continue;
    		}
    		int x;
    		if (!d) {
    			x = (a[i] + c >= mid ? 0 : 1e15);
    		} else {
    			int dis = (mid - a[i] - c);
    			x = (dis <= 0 ? 0 : (dis - 1 + d) / d);
    			//x = ((a[i] + c >= mid ? 0 : mid - a[i] - c + d - 1) / d);
    		}
    		if (x >= m) {
    			continue;
    		}
    		int p1 = max(i - x + 1, 0LL), p2 = max(i - m + 1, 0LL);
    		p1 = max(p1, p2);
    		s[p1]--;
    		s[p2]++;
    	}
    	int mx = 0, res = 0;
    	for (int i = 0; i <= n; i++) {
    		res += s[i];
    		mx = max(mx, res);
    	}
    	if (mx >= k) {
    		l = mid + 1;
    	} else {
    		r = mid - 1;
    	}
    }
    cout << r << endl;
}
signed main() {
    ios::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    int q = 1;
    //cin >> q;
    while (q --) {
        solve();
    }
    return 0;
} 

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

6 4 3 1 2
1 1 4 5 1 4

output:

4

result:

ok 1 number(s): "4"

Test #2:

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

input:

7 3 2 4 0
1 9 1 9 8 1 0

output:

9

result:

ok 1 number(s): "9"

Test #3:

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

input:

8 3 5 0 0
2 0 2 2 1 2 1 8

output:

2

result:

ok 1 number(s): "2"

Test #4:

score: 0
Accepted
time: 55ms
memory: 6320kb

input:

200000 200000 100000 0 1000000000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ...

output:

0

result:

ok 1 number(s): "0"

Test #5:

score: 0
Accepted
time: 63ms
memory: 6272kb

input:

200000 1 100000 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...

output:

100001000000000

result:

ok 1 number(s): "100001000000000"

Test #6:

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

input:

200000 1 200000 1000000000 1000000000
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 100000000...

output:

200001000000000

result:

ok 1 number(s): "200001000000000"

Test #7:

score: 0
Accepted
time: 59ms
memory: 6204kb

input:

200000 24420 17993 881138881 700368758
231187558 519018952 260661004 740633836 931672020 155904999 647179942 13217847 779799803 382810661 242588977 708308843 309853544 225488875 389115097 588643904 644409212 704920939 231829287 39891424 881158891 341251089 486868469 808002305 629160633 317239613 771...

output:

964474978

result:

ok 1 number(s): "964474978"

Test #8:

score: 0
Accepted
time: 59ms
memory: 6408kb

input:

200000 31878 34175 753689504 94554240
764252685 385025201 185233994 886343186 532991571 477855721 681289648 908112797 112162074 199451201 408329780 674092805 896613552 521026518 597166827 166901445 503106595 958954753 464273450 431481790 32269637 998211679 557906218 821269178 46577165 394469258 5350...

output:

218913332405

result:

ok 1 number(s): "218913332405"

Test #9:

score: 0
Accepted
time: 56ms
memory: 6236kb

input:

200000 66779 68097 331272836 488739723
665914031 251031451 773370496 810714172 839343832 504839150 83995574 139444234 739491638 942462815 647699510 49942183 188406268 595225798 436622337 155224403 656771269 212988566 991684904 118039448 141911186 286576049 628943968 834536050 463993698 103102683 298...

output:

645490226257

result:

ok 1 number(s): "645490226257"

Test #10:

score: 0
Accepted
time: 72ms
memory: 6184kb

input:

200000 81680 76838 613888876 587957914
198979157 822070409 771572414 956423522 735630675 195386090 413072573 370775671 366821201 759103355 887069240 425791562 480198984 964392370 571045139 69918434 105403235 130585891 929161775 173193325 587989225 533471222 699981718 847802923 586442939 180332329 61...

output:

960936852

result:

ok 1 number(s): "960936852"

Test #11:

score: 0
Accepted
time: 58ms
memory: 6276kb

input:

200000 91220 105205 669606004 726732973
405615679 508461591 318840594 861409998 284631403 936958719 947250328 347040871 121416461 99394333 909156607 370576415 378572464 877013117 152690261 992392798 908066995 281718650 822652735 474896480 407144540 554646021 805052591 301197617 583099837 1953227 277...

output:

10165030223607

result:

ok 1 number(s): "10165030223607"

Test #12:

score: 0
Accepted
time: 52ms
memory: 6208kb

input:

200000 127232 120467 895980455 492723394
67974256 451968973 76401255 93977911 241791237 47804708 449338922 918134740 663986817 479932840 38924404 319676905 350139438 427462753 171072159 971709621 283613979 507344968 142793571 933555229 899830335 24231006 846677144 441919608 211146097 783125953 34819...

output:

915538143

result:

ok 1 number(s): "915538143"

Test #13:

score: 0
Accepted
time: 55ms
memory: 6220kb

input:

200000 143295 141614 955791474 268985895
276555321 556167768 537607093 476166006 132948564 971746533 785402476 871110069 838805339 820188359 777901312 795957142 37915179 710693261 353090372 95835377 270446384 383039611 224736705 6220228 322677117 670856025 250928705 582340637 484301279 806539754 243...

output:

972259005

result:

ok 1 number(s): "972259005"

Test #14:

score: 0
Accepted
time: 60ms
memory: 6352kb

input:

200000 157096 159904 974133295 340215689
706474749 323930074 662376441 153321391 950476963 895688357 752869810 192681616 350060349 824007389 811845511 345866305 725690921 698956476 535108586 146332206 257278790 668799672 380308767 373852519 819152827 612448335 655180267 764230864 757456461 829953554...

output:

957299769272

result:

ok 1 number(s): "957299769272"

Test #15:

score: 0
Accepted
time: 58ms
memory: 6204kb

input:

200000 173159 181051 697507824 116478190
210023105 796725089 123582278 240542194 841634289 819630181 88933363 440624237 156282651 532859126 182226199 527179250 413466662 982186983 717126799 565425255 317740123 618123243 830848122 110081029 241999609 185444425 354399120 536055673 325578934 853367355 ...

output:

920924024876

result:

ok 1 number(s): "920924024876"

Test #16:

score: 0
Accepted
time: 31ms
memory: 6232kb

input:

200000 21000 56984 200 0
412 269 490 216 698 107 517 563 752 856 874 326 317 906 787 1000 686 304 79 362 367 216 923 629 973 921 717 862 73 40 167 932 80 1000 726 719 6 590 989 569 626 228 250 102 723 604 841 104 677 61 207 363 651 864 164 578 41 243 124 531 473 693 178 523 574 113 609 756 178 548 8...

output:

953

result:

ok 1 number(s): "953"

Test #17:

score: 0
Accepted
time: 40ms
memory: 6204kb

input:

200000 73811 67576 234 0
489 428 292 104 151 966 629 804 330 833 676 344 967 452 709 70 15 554 525 25 423 81 374 673 685 386 798 684 143 625 221 222 128 458 228 53 980 573 630 197 70 442 464 42 168 195 311 118 424 960 217 303 9 411 240 462 83 721 125 732 137 353 457 661 382 726 592 950 729 157 198 8...

output:

712

result:

ok 1 number(s): "712"

Test #18:

score: 0
Accepted
time: 39ms
memory: 6244kb

input:

200000 116970 130451 568 0
936 383 838 631 237 772 409 908 720 154 8 451 362 21 610 814 98 141 135 652 491 286 847 310 133 348 684 165 162 973 54 82 984 816 686 19 285 496 175 585 945 714 158 307 785 127 257 720 953 718 428 742 256 90 813 343 697 381 468 549 367 692 804 339 246 180 324 63 742 730 64...

output:

786

result:

ok 1 number(s): "786"

Test #19:

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

input:

200000 153847 163037 146 0
823 568 227 323 377 340 773 912 465 432 771 376 244 825 618 375 733 308 325 215 426 621 173 596 405 542 85 12 477 943 977 698 621 147 864 691 286 890 709 457 448 854 453 468 598 156 166 676 235 431 750 19 398 614 52 9 918 165 370 643 44 319 228 198 341 250 982 922 727 541 ...

output:

351

result:

ok 1 number(s): "351"

Test #20:

score: 0
Accepted
time: 37ms
memory: 6392kb

input:

200000 34646 46921 1376 0
3625 3613 715 2211 6864 5298 8737 8133 4362 4024 4323 3263 3079 9770 8434 8894 3444 8864 9573 3035 6014 2563 3251 3344 3413 4903 1805 6013 3396 915 5797 3715 6037 3486 9777 7865 79 8790 8695 1105 9695 6055 571 1276 3145 8874 4318 6771 9329 7746 5239 2765 4296 8940 3120 834 ...

output:

8587

result:

ok 1 number(s): "8587"

Test #21:

score: 0
Accepted
time: 42ms
memory: 6352kb

input:

200000 65314 84709 1695 0
4535 4712 2755 4999 6700 3104 190 9077 9431 1977 156 6255 1543 1715 453 4478 5291 8711 593 8261 6350 8081 4294 7816 9016 8341 3687 5718 6953 9071 9696 9309 1516 8625 7605 5268 9632 8440 8169 697 8840 1753 1947 5839 3527 9845 6075 7816 1696 3060 974 7482 7456 8054 769 3400 3...

output:

7463

result:

ok 1 number(s): "7463"

Test #22:

score: 0
Accepted
time: 44ms
memory: 6200kb

input:

200000 105963 120144 3879 0
1653 4286 2868 9802 1536 6698 1463 5352 839 6503 6437 8060 2934 7885 7146 7773 3149 6721 6463 2585 9811 399 248 8858 5575 794 9542 5360 8573 4866 739 6641 6932 2102 9264 2960 5715 9330 3285 4068 1116 4174 9191 4476 6448 7228 8779 8066 1359 8552 5707 4769 1048 1205 6333 47...

output:

7035

result:

ok 1 number(s): "7035"

Test #23:

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

input:

200000 140699 165864 5845 0
8875 1581 9783 7410 4826 6947 2094 7769 6181 2481 9583 4979 5067 4713 1044 1570 3103 8993 483 2457 2136 289 8172 5870 529 8760 767 6366 7991 4011 5712 3086 3456 9710 8540 9027 8162 5370 4728 2201 7493 7303 5401 1095 2704 2561 5888 2662 5945 25 6874 7879 5542 4738 1005 90 ...

output:

7829

result:

ok 1 number(s): "7829"

Test #24:

score: 0
Accepted
time: 38ms
memory: 6280kb

input:

200000 24184 22744 4290 0
5434 87501 86904 75409 46283 5856 40758 80493 93612 40292 12034 83275 39476 74881 19631 74468 64457 89881 49937 51624 4806 52068 94084 42839 49969 23388 92317 92905 79624 32321 38928 83025 99178 50822 39127 77459 14351 8500 88082 34628 92125 42073 39204 44557 51148 92079 36...

output:

88463

result:

ok 1 number(s): "88463"

Test #25:

score: 0
Accepted
time: 49ms
memory: 6212kb

input:

200000 61972 64815 36888 0
56144 26214 79295 70582 15881 1243 97642 68505 41128 5741 7991 77890 18201 86433 98009 48472 949 77410 36488 98775 92496 43037 26303 66252 75395 55109 8099 45878 87425 89074 94698 83763 43285 93332 42652 18445 18010 42513 22776 66779 46077 99334 50998 39220 57435 70669 628...

output:

80927

result:

ok 1 number(s): "80927"

Test #26:

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

input:

200000 117332 118894 35413 0
84677 62103 92687 45314 80946 96852 65153 34830 65357 28614 49780 16211 99554 14515 59130 91882 73944 62340 35914 45769 88451 83121 99023 70676 75596 896 301 57361 38393 58222 705 12775 10665 66580 58508 22195 79045 40128 54207 19604 22429 22798 35277 6584 55412 2385 298...

output:

62327

result:

ok 1 number(s): "62327"

Test #27:

score: 0
Accepted
time: 38ms
memory: 6420kb

input:

200000 163051 177822 1801 0
1937 9005 59335 52231 21474 66401 55223 35221 19535 10162 3242 64910 59647 27869 6826 2914 64579 88943 64742 96059 48727 20714 40830 24281 88237 93172 79643 38294 22068 17079 62276 90382 43404 59691 12523 96811 17950 63317 64376 15043 85049 23795 72658 32097 24855 64672 2...

output:

19986

result:

ok 1 number(s): "19986"

Test #28:

score: 0
Accepted
time: 42ms
memory: 6228kb

input:

200000 33041 33508 66709 0
185584 623495 697398 422714 297463 461353 759852 815887 859854 869332 490187 751575 384230 408607 868885 760306 174374 123674 976999 73253 406801 372576 704318 479628 908582 960304 190305 412173 275646 817727 632027 569599 416721 674809 326136 244417 319890 38759 125020 15...

output:

847882

result:

ok 1 number(s): "847882"

Test #29:

score: 0
Accepted
time: 65ms
memory: 6392kb

input:

200000 99563 83993 20032 1
49456 39318 88376 57017 87846 69732 37333 10290 54679 86198 67613 36735 67579 50497 48306 27313 91923 24960 10538 68332 80014 77448 20521 68406 77884 2092 61976 23523 60608 42316 81813 2808 52549 56680 51341 20003 90691 25139 75416 81612 6039 60831 28769 10726 22414 63637 ...

output:

74261

result:

ok 1 number(s): "74261"

Test #30:

score: 0
Accepted
time: 63ms
memory: 6356kb

input:

200000 134997 138071 52488 1
2335 39966 53075 31750 52909 40992 80498 65722 78908 44311 74161 75056 24584 13819 9427 70723 40569 34237 85618 90980 11209 93184 93241 61936 18498 12639 2871 83700 71163 11464 63474 31820 3863 54275 2437 48100 76072 57995 82499 34437 47151 84296 99596 78092 20391 19700 ...

output:

92372

result:

ok 1 number(s): "92372"

Test #31:

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

input:

200000 140716 177075 67910 1
19596 11215 44069 14320 93438 34889 70568 41767 97846 50207 27623 23754 19918 51521 32777 81755 55551 36493 38792 41269 36245 71191 35048 26435 55486 15808 33519 40286 54838 94668 14150 85081 52668 23039 45558 63127 79736 45943 92668 65118 45011 85293 36976 3603 25076 92...

output:

153273

result:

ok 1 number(s): "153273"

Test #32:

score: 0
Accepted
time: 38ms
memory: 6240kb

input:

200000 21774 41921 6357 0
89712 95985 37498 18246 85238 15690 87038 7162 80337 60762 42119 24094 74186 80823 77655 31082 61778 59228 21181 3218 62131 12648 44993 41565 10784 46194 94897 36740 85563 1696 26417 43682 49411 72162 3363 87031 91126 40721 49461 780 3570 92629 40410 16128 9394 98273 67959 ...

output:

90425

result:

ok 1 number(s): "90425"

Test #33:

score: 0
Accepted
time: 60ms
memory: 6388kb

input:

200000 99563 83993 20032 1
105603 154660 123300 154128 136013 103614 76570 120958 152476 133890 103012 133855 116772 114580 93587 158196 91232 76809 134602 146284 143717 86789 134673 144150 68358 128241 89787 126871 108578 148075 69069 118809 122939 117600 86261 156948 91395 141671 147867 72293 1270...

output:

89809

result:

ok 1 number(s): "89809"

Test #34:

score: 0
Accepted
time: 67ms
memory: 6228kb

input:

200000 134997 138071 52488 1
48542 61651 40326 61485 49568 89074 74298 87484 52887 82736 83631 33159 22394 18002 79298 49144 42812 94193 99555 19784 101759 101816 70511 27073 21214 11446 92274 79737 20038 72048 40394 12437 62849 11011 56674 84646 66569 91073 43011 55725 92870 108170 86665 28964 2827...

output:

97556

result:

ok 1 number(s): "97556"

Test #35:

score: 0
Accepted
time: 56ms
memory: 6240kb

input:

200000 140716 177075 67910 1
122041 154894 125145 204262 145712 181391 152589 208667 161028 138443 134574 130737 162339 143595 192572 166367 147309 149607 152084 147059 182004 145861 137247 166297 126619 144329 151096 165647 205476 124958 195888 163474 133845 156363 173932 190540 156746 203471 17592...

output:

230838

result:

ok 1 number(s): "230838"

Test #36:

score: 0
Accepted
time: 43ms
memory: 6208kb

input:

200000 21073 23010 17626152 0
603441899 789666772 211519895 11153159 956694747 337367686 704173749 649898178 60928045 690688990 272976565 952271675 846672494 894382495 83773975 376256883 138389060 874119983 716255306 168920806 577441868 270632508 511135430 301391686 181091202 823392389 122703248 511...

output:

895620609

result:

ok 1 number(s): "895620609"

Test #37:

score: 0
Accepted
time: 45ms
memory: 6280kb

input:

200000 36615 40188 106777337 0
549814400 770805853 542510288 113959640 385547413 719499674 37054718 829587715 404304568 33264081 455810133 91046881 902963669 932740382 477312519 146511348 665589108 870808685 272239080 204303577 767215406 520256410 416516387 877834148 178016422 746075005 792884138 63...

output:

841004875

result:

ok 1 number(s): "841004875"

Test #38:

score: 0
Accepted
time: 56ms
memory: 6212kb

input:

200000 69896 67070 78556437 0
86121483 46912225 914969878 511733412 150836569 28002734 296306760 304244544 84117579 80871882 7239920 819756673 32883770 602502048 575883770 580329326 897821864 498901167 459626634 608282568 620552455 769880311 616864637 495745806 764876227 668757621 168097734 91395376...

output:

677177647

result:

ok 1 number(s): "677177647"

Test #39:

score: 0
Accepted
time: 62ms
memory: 6260kb

input:

200000 75734 84249 239349988 0
327461275 659455087 950992979 909507185 211093016 410134722 555558801 778901374 58897883 423446974 558669707 253499171 89174945 345892642 674455022 350583792 56425692 832026357 647014188 643665339 105293284 19504212 890841814 777220976 56768738 886407529 543311332 5864...

output:

721180719

result:

ok 1 number(s): "721180719"

Test #40:

score: 0
Accepted
time: 59ms
memory: 6276kb

input:

200000 101855 101914 157279981 0
247805592 760723147 483711289 859043681 753131480 97241885 635195775 917722591 719326385 418735951 866157891 155149986 300465298 511516226 591644004 903555895 267659339 771732312 336386721 494866650 597814448 918127199 324725497 719742944 627370260 477134713 94630265...

output:

570461213

result:

ok 1 number(s): "570461213"

Test #41:

score: 0
Accepted
time: 63ms
memory: 6280kb

input:

200000 123925 120654 218331005 0
490223254 987465836 915309539 905608573 185192866 903634616 971948948 856770871 149561472 190780253 616548364 56871373 106584320 760082197 32774857 932804648 663077791 374566343 778686269 77772028 852210778 21037191 496666251 351722348 954171424 446425086 839173352 8...

output:

511208202

result:

ok 1 number(s): "511208202"

Test #42:

score: 0
Accepted
time: 52ms
memory: 6356kb

input:

200000 148761 143312 629481597 0
321466968 20158807 252398978 449173542 922493625 887653614 837989754 868060547 360820520 454596900 769969254 423971499 253115605 977332823 318524598 866229803 774403041 103674559 543701270 160750210 177787114 808861532 65177235 851292710 927138570 345876446 867614889...

output:

707341085

result:

ok 1 number(s): "707341085"

Test #43:

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

input:

200000 166155 165969 531911319 0
226339609 347819071 958084637 697771221 733423311 166639903 998997852 879350223 203483348 87009766 554793925 791071626 31050671 194583447 309307048 136091446 812099363 127750067 350185468 538695685 166926962 186620456 2284439 392332268 195073007 950360514 232492914 7...

output:

611703340

result:

ok 1 number(s): "611703340"

Test #44:

score: 0
Accepted
time: 52ms
memory: 6212kb

input:

200000 183549 178328 766893170 0
57583323 85544751 206783 241336190 175756777 150658900 865038658 890639900 119775104 719422633 708214816 158171751 514018445 748270561 595056789 995887674 849795685 225454502 115200469 621673867 787470590 269412089 529326227 523306410 168040153 849811874 892338233 17...

output:

764659135

result:

ok 1 number(s): "764659135"

Test #45:

score: 0
Accepted
time: 60ms
memory: 6240kb

input:

200000 29117 23526 52854 1498
636148599 62145074 351506745 540507066 166161937 907179233 319218828 122302222 694162195 5234196 526905762 299928391 3379739 848963739 885442166 901321415 352640706 622645375 795461108 191251162 553344997 734673293 371452740 316355713 957442040 959301892 515503866 63269...

output:

857834849

result:

ok 1 number(s): "857834849"

Test #46:

score: 0
Accepted
time: 73ms
memory: 6412kb

input:

200000 35612 36242 102228 5504
269599832 674557626 713682045 762335534 172386911 962602772 544220747 177878093 446174511 213885575 307690275 214946905 827988854 40628709 620769054 841027668 520538884 429256556 630909294 899920007 371822747 509984040 425785763 261646983 124798205 498085943 143856468 ...

output:

840480958

result:

ok 1 number(s): "840480958"

Test #47:

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

input:

200000 62108 56400 97423 3824
829422138 918373958 75857344 352760222 768546470 312993602 695593737 569890453 493154119 127569662 88474788 498561638 357630677 305922608 356095941 780733921 983404355 194398540 171390187 18654268 821704278 653891007 480118786 133309326 292154370 36869994 772209071 1029...

output:

720191204

result:

ok 1 number(s): "720191204"

Test #48:

score: 0
Accepted
time: 62ms
memory: 6208kb

input:

200000 88605 89117 38438 9988
757840663 825753802 438032644 238152201 774771444 73449848 920595655 256870104 908729947 409849970 164226592 413580151 182239792 497587579 386390121 720440173 782706313 369605941 6838372 432355821 271585807 134234462 829419100 373567889 164543244 534184848 326932744 122...

output:

752288402

result:

ok 1 number(s): "752288402"

Test #49:

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

input:

200000 91791 91880 194259 3027
492102904 38205195 469531176 375401297 907308881 88006629 395178398 113060578 880306649 32222237 617782093 678198317 358678610 954869212 900676569 28253048 8483536 460558455 5618693 127538024 959687538 858332880 824318334 516361342 211658462 693967502 321702951 9294179...

output:

604465812

result:

ok 1 number(s): "604465812"

Test #50:

score: 0
Accepted
time: 65ms
memory: 6280kb

input:

200000 115638 117956 81782 8388
391881163 207179720 850649124 975630478 846740660 83431558 110322121 954996971 888562055 241369404 757703640 467835259 155003253 442710973 274165506 529535284 369245531 456690725 403449285 23245063 252035546 569652695 132925391 594421581 949634127 586324788 225380686 ...

output:

686544155

result:

ok 1 number(s): "686544155"

Test #51:

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

input:

200000 138080 137711 121710 3179
892382555 975925817 133295825 318262069 5110520 172242830 726447020 498819311 956721770 395283497 923930822 777925142 548937933 325993886 86858637 316426507 63794340 31282827 732408521 541956068 786603577 144687316 229566755 447811507 69018627 320157477 320376510 599...

output:

461371953

result:

ok 1 number(s): "461371953"

Test #52:

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

input:

200000 150225 157466 161638 7970
24287727 408235425 752379016 292297440 942142018 892457882 342571919 747674359 951252557 885634080 90158002 793047733 574276393 135647870 309617184 808350439 463375859 605874930 61367756 429263292 26204315 719721939 694804339 79863069 851966639 53990167 710339627 635...

output:

615327375

result:

ok 1 number(s): "615327375"

Test #53:

score: 0
Accepted
time: 50ms
memory: 6200kb

input:

200000 185226 177220 1564 1010
114723702 250610449 35025717 266332812 100511877 612672934 590100598 660092919 650816051 965919245 256385184 103137615 673243781 313898075 827343024 5307077 862957377 180467032 390326992 611537809 970837763 926160341 160041922 933252997 634914650 156419076 805335452 96...

output:

152004386

result:

ok 1 number(s): "152004386"

Test #54:

score: 0
Accepted
time: 61ms
memory: 6352kb

input:

200000 29117 23526 52854 1498
81903737 371264568 560264049 185918081 926934537 338973292 142055846 713914979 24986140 546656866 319678655 23129163 868712323 905189910 921068319 372386770 642390599 815205492 210994706 573087702 754415158 391193765 336095898 977181385 979040397 535241531 83005993 6433...

output:

859066635

result:

ok 1 number(s): "859066635"

Test #55:

score: 0
Accepted
time: 75ms
memory: 6276kb

input:

200000 35612 36242 102228 5504
725416001 764539017 813191103 223241076 1000000000 595072106 228728048 497023063 264732723 358536020 265791247 878831792 91470244 671609186 891866396 571376209 480092477 681743812 950753122 422654458 560814348 476614668 312474484 175624303 548910637 194679759 133934464...

output:

844837746

result:

ok 1 number(s): "844837746"

Test #56:

score: 0
Accepted
time: 78ms
memory: 6208kb

input:

200000 62108 56400 97423 3824
1000000000 280573055 557472303 973254921 517698424 900294929 774588015 697848051 332259964 293161460 703244680 562310089 510598390 560768093 985402443 1000000000 399059803 376047820 223308271 1000000000 858537750 684761899 337948809 496790223 241502217 976837665 3075809...

output:

749730137

result:

ok 1 number(s): "749730137"

Test #57:

score: 0
Accepted
time: 69ms
memory: 6356kb

input:

200000 88605 89117 38438 9988
1000000000 1000000000 810916488 1000000000 646201281 1000000000 829608682 1000000000 982575693 736945888 986293019 754946233 1000000000 959083707 1000000000 1000000000 942280245 579506248 1000000000 844240829 706883056 1000000000 946203629 737172556 1000000000 899549201...

output:

883520709

result:

ok 1 number(s): "883520709"

Test #58:

score: 0
Accepted
time: 84ms
memory: 6188kb

input:

200000 91791 91880 194259 3027
247708546 679032247 584900088 1000000000 297500859 604670348 322550248 1000000000 241707346 827264922 887678866 568156879 1000000000 1000000000 237724476 217952684 670025322 215083280 337000331 1000000000 1000000000 1000000000 725814528 421109368 903416128 531149296 10...

output:

652364633

result:

ok 1 number(s): "652364633"

Test #59:

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

input:

200000 115638 117956 81782 8388
731904464 1000000000 1000000000 1000000000 608138508 635024622 1000000000 1000000000 766058559 1000000000 992515517 679679063 967382334 798832419 1000000000 893903546 981344292 928098403 547889733 776675767 1000000000 657556715 1000000000 1000000000 1000000000 7499942...

output:

864791917

result:

ok 1 number(s): "864791917"

Test #60:

score: 0
Accepted
time: 74ms
memory: 6208kb

input:

200000 138080 137711 121710 3179
1000000000 197380086 382345864 69193850 236325694 790529419 562901245 1000000000 459364500 988011360 842005214 613017540 390073028 150937313 380504718 127872085 95360107 796485336 606032417 850679461 208762735 293641708 511885995 133092650 384231034 384449602 6634892...

output:

483191629

result:

ok 1 number(s): "483191629"

Test #61:

score: -100
Wrong Answer
time: 63ms
memory: 6348kb

input:

200000 150225 157466 161638 7970
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 982924445 1000000000 1000000000 1000000000 1000000000 1000...

output:

1045396519

result:

wrong answer 1st numbers differ - expected: '1045391388', found: '1045396519'