QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#241621 | #7144. Candies | 8BQube# | AC ✓ | 34ms | 8600kb | C++20 | 1.5kb | 2023-11-06 14:20:50 | 2023-11-06 14:20:52 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define X first
#define Y second
#define ALL(v) v.begin(), v.end()
#define pb push_back
#define SZ(a) ((int)a.size())
int arr[200005], ub[200005];
vector<ll> gap;
int lt(ll x) {
return lower_bound(ALL(gap), x) - gap.begin();
}
int main() {
ios::sync_with_stdio(0), cin.tie(0);
int n, m, x, y, a1;
cin >> n >> m >> x >> y >> a1, --n;
for (int i = 0; i < n; ++i)
cin >> arr[i];
if (n == 0)
return cout << a1 + y + (ll)m * x << "\n", 0;
priority_queue<ll, vector<ll>, greater<ll>> pq;
for (int i = 0; i < n; ++i)
pq.push(arr[i]);
while (SZ(gap) <= m) {
gap.pb(pq.top());
ll t = pq.top() + x;
pq.pop(), pq.push(t);
}
ll ans = a1 + y;
ub[m + 1] = 0;
for (int i = m; i >= 1; --i) {
auto check = [&](ll mid) {
return i + lt(a1 + mid + (ll)(i - 1) * x) > m;
};
if (check(0)) {
ub[i] = 0;
}
else {
int l = 0, r = y + 1;
while (r - l > 1) {
int mid = (l + r) >> 1;
if (check(mid))
r = mid;
else
l = mid;
}
ub[i] = r;
// [ub[i + 1], ub[i])
if (ub[i + 1] < ub[i])
ans = max(ans, (ll)i * x + a1 + ub[i] - 1);
}
}
cout << ans << "\n";
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3412kb
input:
2 1 2 2 1 2
output:
4
result:
ok 1 number(s): "4"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3424kb
input:
10 9 4 3 19 32 11 1 3 3 3 12 17 34
output:
22
result:
ok 1 number(s): "22"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3460kb
input:
10 8 2 25 31 12 12 34 2 14 1 8 10 34
output:
56
result:
ok 1 number(s): "56"
Test #4:
score: 0
Accepted
time: 1ms
memory: 3388kb
input:
10 7 4 23 22 30 23 34 28 33 8 24 22 15
output:
45
result:
ok 1 number(s): "45"
Test #5:
score: 0
Accepted
time: 1ms
memory: 3400kb
input:
10 9 5 26 45 11 30 40 29 22 33 14 35 3
output:
71
result:
ok 1 number(s): "71"
Test #6:
score: 0
Accepted
time: 0ms
memory: 3456kb
input:
10 4 4 3 7 14 20 13 7 11 10 19 15 7
output:
14
result:
ok 1 number(s): "14"
Test #7:
score: 0
Accepted
time: 0ms
memory: 3468kb
input:
10 9 2 11 6 29 41 9 8 3 33 9 8 21
output:
17
result:
ok 1 number(s): "17"
Test #8:
score: 0
Accepted
time: 1ms
memory: 3460kb
input:
10 10 4 39 16 33 13 30 1 17 22 31 25 36
output:
55
result:
ok 1 number(s): "55"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
10 9 3 41 25 11 39 38 32 36 39 41 12 16
output:
66
result:
ok 1 number(s): "66"
Test #10:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
10 9 2 34 32 17 29 34 3 31 18 2 34 20
output:
66
result:
ok 1 number(s): "66"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3432kb
input:
10 6 4 21 20 5 23 20 17 22 23 27 6 21
output:
41
result:
ok 1 number(s): "41"
Test #12:
score: 0
Accepted
time: 0ms
memory: 5464kb
input:
10 192452 1 349793 261556 751823 78443 365930 686964 56471 824875 420739 392610 121201
output:
611349
result:
ok 1 number(s): "611349"
Test #13:
score: 0
Accepted
time: 3ms
memory: 5352kb
input:
10 190339 3 183831 489416 225873 347356 274719 48019 323021 941337 458359 223575 671498
output:
673247
result:
ok 1 number(s): "673247"
Test #14:
score: 0
Accepted
time: 12ms
memory: 4572kb
input:
10 121541 5 568482 297528 295544 425227 299848 107171 366521 203644 506124 384806 376747
output:
866010
result:
ok 1 number(s): "866010"
Test #15:
score: 0
Accepted
time: 6ms
memory: 5120kb
input:
10 155746 2 127355 708544 7964 662942 750109 293269 546552 348710 683848 528759 27248
output:
835899
result:
ok 1 number(s): "835899"
Test #16:
score: 0
Accepted
time: 6ms
memory: 5380kb
input:
10 189950 4 320620 727257 452462 146035 704003 281528 175747 72858 312138 114935 224412
output:
1047877
result:
ok 1 number(s): "1047877"
Test #17:
score: 0
Accepted
time: 4ms
memory: 4664kb
input:
10 114766 1 356824 375173 146633 70072 31817 55471 553493 54270 173424 118747 52364
output:
731997
result:
ok 1 number(s): "731997"
Test #18:
score: 0
Accepted
time: 14ms
memory: 5200kb
input:
10 145873 5 8025 281544 523494 95770 241062 421293 384178 324742 388922 65406 722173
output:
349185
result:
ok 1 number(s): "349185"
Test #19:
score: 0
Accepted
time: 6ms
memory: 5184kb
input:
10 176980 1 207389 168885 67047 821956 46492 656129 825751 2363 381763 454484 860355
output:
376274
result:
ok 1 number(s): "376274"
Test #20:
score: 0
Accepted
time: 7ms
memory: 5376kb
input:
10 187943 4 836477 583977 521068 887641 397078 425376 883500 915076 773036 590 867354
output:
1420454
result:
ok 1 number(s): "1420454"
Test #21:
score: 0
Accepted
time: 3ms
memory: 4136kb
input:
10 80376 1 71852 348246 178594 146591 264532 117621 252046 131684 116962 222868 376178
output:
420098
result:
ok 1 number(s): "420098"
Test #22:
score: 0
Accepted
time: 0ms
memory: 3368kb
input:
100 98 5 277 124 141 254 316 264 129 191 410 357 16 410 449 161 459 175 117 396 388 368 2 460 278 130 29 391 75 453 292 315 157 187 276 52 457 221 172 317 441 173 164 334 217 12 140 89 138 36 387 227 152 152 134 322 65 377 83 257 490 119 81 418 21 1 98 315 66 451 337 170 177 291 39 127 110 238 54 15...
output:
401
result:
ok 1 number(s): "401"
Test #23:
score: 0
Accepted
time: 1ms
memory: 3424kb
input:
100 44 4 195 49 143 124 77 198 28 44 132 187 82 204 210 51 185 204 173 150 2 44 89 17 154 136 23 73 8 202 166 160 178 187 16 35 148 94 213 195 10 132 132 99 212 77 33 16 77 2 161 9 109 161 169 3 162 84 108 26 56 202 164 58 113 128 189 52 206 45 38 174 195 31 9 98 107 144 107 84 214 106 166 151 213 3...
output:
244
result:
ok 1 number(s): "244"
Test #24:
score: 0
Accepted
time: 0ms
memory: 3472kb
input:
100 84 5 146 153 384 295 288 387 211 389 129 252 326 96 308 81 120 316 180 6 333 390 346 87 69 359 396 166 395 230 419 227 114 254 246 39 119 346 288 229 221 83 367 260 191 158 275 75 126 95 283 263 41 215 401 145 115 187 321 170 268 106 401 317 260 171 240 116 415 69 250 111 76 185 350 183 74 168 3...
output:
299
result:
ok 1 number(s): "299"
Test #25:
score: 0
Accepted
time: 0ms
memory: 3520kb
input:
100 87 3 415 428 44 313 341 262 23 349 241 106 117 169 348 116 285 121 377 290 218 11 9 224 240 385 96 274 21 392 257 381 87 320 323 136 298 393 25 182 112 20 96 111 31 281 99 222 10 66 408 332 390 303 112 27 196 416 238 279 126 431 235 374 102 108 72 168 137 337 65 64 333 348 213 99 386 13 337 402 ...
output:
843
result:
ok 1 number(s): "843"
Test #26:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
100 83 1 341 372 210 3 118 328 118 310 158 152 220 261 366 308 298 411 19 215 265 84 15 16 387 118 159 195 255 60 340 74 81 40 330 285 134 19 57 406 288 61 161 380 225 23 161 396 20 104 405 405 74 177 392 164 109 38 376 49 181 240 219 234 328 375 383 33 87 146 401 140 263 399 238 125 38 297 105 179 ...
output:
713
result:
ok 1 number(s): "713"
Test #27:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
100 92 4 134 115 48 346 425 7 460 64 274 265 407 451 331 2 127 325 40 109 408 299 407 111 248 206 361 387 72 125 127 451 329 432 401 253 363 432 66 275 154 96 415 191 208 370 323 123 413 80 274 22 171 275 83 317 346 51 284 112 193 209 1 247 27 328 25 393 131 404 328 460 180 267 299 310 414 447 104 2...
output:
249
result:
ok 1 number(s): "249"
Test #28:
score: 0
Accepted
time: 1ms
memory: 3456kb
input:
100 99 2 321 145 384 339 96 147 399 410 287 361 454 212 207 93 428 224 381 188 186 306 220 178 390 407 490 217 288 119 290 81 140 386 380 126 209 159 173 102 280 277 247 152 367 54 372 348 318 331 287 239 5 254 353 221 218 340 494 332 249 332 271 52 174 355 241 129 262 391 433 331 153 44 159 461 166...
output:
466
result:
ok 1 number(s): "466"
Test #29:
score: 0
Accepted
time: 0ms
memory: 3428kb
input:
100 81 4 95 159 135 34 382 321 353 219 129 155 343 181 360 398 338 165 98 208 378 182 40 330 44 135 25 234 252 46 323 211 157 109 397 245 148 311 179 325 322 146 73 116 387 275 144 270 155 115 29 313 398 283 379 88 316 233 352 247 76 70 254 140 241 367 208 338 128 30 323 62 238 115 38 272 73 82 51 3...
output:
254
result:
ok 1 number(s): "254"
Test #30:
score: 0
Accepted
time: 0ms
memory: 3420kb
input:
100 70 2 10 5 336 314 226 114 21 68 291 10 60 334 30 112 140 58 44 62 176 213 129 50 296 227 64 210 173 85 247 311 280 190 329 303 54 117 94 314 54 287 307 287 121 249 276 169 276 30 298 310 186 127 21 70 197 276 84 156 118 309 281 3 153 75 290 294 137 324 194 167 325 44 273 117 10 266 260 46 71 322...
output:
36
result:
ok 1 number(s): "36"
Test #31:
score: 0
Accepted
time: 1ms
memory: 3428kb
input:
100 83 3 365 168 207 166 173 282 322 172 293 31 302 7 255 357 103 207 386 269 240 129 178 203 310 86 216 99 10 336 344 110 302 79 96 329 131 350 376 48 125 376 325 279 222 8 39 239 306 235 142 135 280 407 32 165 367 157 121 176 297 39 380 27 277 226 204 14 321 40 397 402 20 247 247 206 37 344 258 21...
output:
533
result:
ok 1 number(s): "533"
Test #32:
score: 0
Accepted
time: 1ms
memory: 3412kb
input:
1 78 775 325531 90984
output:
476965
result:
ok 1 number(s): "476965"
Test #33:
score: 0
Accepted
time: 0ms
memory: 3388kb
input:
1 188772 45 922491007 599820980
output:
1530806727
result:
ok 1 number(s): "1530806727"
Test #34:
score: 0
Accepted
time: 16ms
memory: 8528kb
input:
200000 199861 6 1352767 696906 1746032 495175 931354 28690 1668347 1285548 120091 1828621 1666139 523841 1015658 80233 1451695 1559713 1054244 701508 871247 55435 141953 880133 1066885 911265 504021 179705 1459682 1937432 1654956 8865 1451794 909047 31293 1541475 1589546 1721745 691555 700369 165364...
output:
2049673
result:
ok 1 number(s): "2049673"
Test #35:
score: 0
Accepted
time: 26ms
memory: 8528kb
input:
200000 185394 9 1005376 1020000 1546862 816276 1695357 996117 122143 790518 1043803 761583 1547022 1832076 796300 1305484 1068392 914612 668675 1542457 123685 1729751 245410 805231 325880 745251 1072008 1380061 1805782 1786886 900584 1061292 1088195 684061 1553328 1119710 1188909 197395 145907 14023...
output:
2025376
result:
ok 1 number(s): "2025376"
Test #36:
score: 0
Accepted
time: 21ms
memory: 8552kb
input:
200000 170928 1 86076 144819 1372752 275050 1661972 1010198 592886 490980 50421 1296744 1373190 201094 21589 1565747 1000233 647260 1707692 380902 790026 1555158 446968 1214162 988951 1632519 693721 954669 1685732 547561 446005 610771 3847 1603992 1517173 879488 518045 1363282 297094 88759 1133604 8...
output:
230895
result:
ok 1 number(s): "230895"
Test #37:
score: 0
Accepted
time: 20ms
memory: 8500kb
input:
200000 166040 3 1193315 1250515 898843 127067 444455 484035 1150160 1517850 1096967 1229913 1345739 406872 1137258 76627 44682 146796 1651177 132403 1131138 1393028 1386930 804800 790138 28736 1153334 1290358 1232142 356 280299 179233 752572 1286074 665770 525254 1046554 111566 755890 1085403 65742 ...
output:
2443830
result:
ok 1 number(s): "2443830"
Test #38:
score: 0
Accepted
time: 21ms
memory: 7752kb
input:
200000 110532 5 164115 187715 1073261 12220 357426 381384 341907 687873 590466 225402 755039 812978 692648 488130 424139 103068 723758 717016 486499 993658 250356 1046487 1018397 416128 558395 315198 621471 407007 597456 733584 909065 52645 90943 376149 727311 945281 555997 716399 760800 896731 9961...
output:
351830
result:
ok 1 number(s): "351830"
Test #39:
score: 0
Accepted
time: 25ms
memory: 8556kb
input:
200000 193259 4 697719 1548858 654775 25907 792163 1767752 1904471 901773 950914 437893 1515648 1014285 969685 1556501 1671716 36637 509206 1371417 498851 527869 1288784 978259 1373738 495494 663847 1862412 772931 181122 1860356 1215529 461402 969279 695098 1096557 387289 204239 936323 1646023 10630...
output:
2246577
result:
ok 1 number(s): "2246577"
Test #40:
score: 0
Accepted
time: 23ms
memory: 8532kb
input:
200000 199515 10 714038 1453238 223876 1395071 281012 1481329 1505324 1402071 1738626 82147 1502331 714617 1149890 1986814 1453157 827487 1439987 774220 543287 1324735 1267550 1379120 1501315 1720637 286306 86666 792385 1234215 1085723 1374969 916309 897622 1051879 1618172 1130128 1813463 305779 882...
output:
2167276
result:
ok 1 number(s): "2167276"
Test #41:
score: 0
Accepted
time: 28ms
memory: 8520kb
input:
200000 193783 2 1122340 223752 1260576 233378 1906867 281810 1862992 959269 1456384 791486 1293091 1588103 1557180 372007 1074568 192045 1117168 26455 669934 1284933 1520216 608806 49646 8393 791715 1539160 1883165 188824 606637 722624 1167289 300882 1700230 1337316 86175 234770 12514 1733567 248034...
output:
1346092
result:
ok 1 number(s): "1346092"
Test #42:
score: 0
Accepted
time: 27ms
memory: 8600kb
input:
200000 194044 4 1283689 88353 823550 192585 1543310 9597 427405 65993 1087626 382541 1238770 1788657 202669 1936991 1918135 64637 717195 314651 446284 461843 534125 1080264 1647962 1697466 628550 1797734 1266366 1476459 1598799 769931 342412 933855 73803 58415 691217 1198680 1586012 1807087 771792 6...
output:
1372042
result:
ok 1 number(s): "1372042"
Test #43:
score: 0
Accepted
time: 18ms
memory: 8524kb
input:
200000 143973 3 598151 410851 802230 32714 435992 995561 1929 925101 195150 992556 1093281 1276033 955782 1369581 272535 189697 6748 1417399 830851 603600 125951 863131 334431 288809 1201101 120962 716901 1072090 1281295 362189 711216 29323 1068762 1369625 1098412 266032 210216 127191 473769 25169 1...
output:
1009002
result:
ok 1 number(s): "1009002"
Test #44:
score: 0
Accepted
time: 29ms
memory: 8572kb
input:
200000 163114 47 2940952 3742943 14701466 8407245 470495 3075020 2464952 3700374 3050850 3468094 15330540 11167184 7447948 13267513 10879803 3995784 15727616 5795668 11621069 3376093 3652403 621472 14495419 4968974 11787136 3070420 15527927 12491849 10208178 1247316 7852076 14997333 12587510 1281667...
output:
6683895
result:
ok 1 number(s): "6683895"
Test #45:
score: 0
Accepted
time: 20ms
memory: 7748kb
input:
200000 111758 66 9477059 6181308 3787165 3809354 3616401 1139325 7749196 8151118 823551 789984 8110736 5793848 180551 8330337 2866627 2588289 7693693 9799577 2714707 1738916 10580096 2381989 4761626 7936142 9983837 7370175 6974255 7800684 393132 485579 8152291 813621 9408201 2270659 9969365 6026180 ...
output:
15658367
result:
ok 1 number(s): "15658367"
Test #46:
score: 0
Accepted
time: 23ms
memory: 8556kb
input:
200000 158041 76 525067 12273072 5554468 14721255 137994 8050639 15543552 13210069 10906749 9642874 12690831 9323809 13200567 2891773 4911758 2100595 4337270 5262794 4485953 13092738 3035486 8425911 11869729 10703111 12292431 10419322 9243891 11238216 15228779 1788743 2332806 8459918 14033596 243935...
output:
12798139
result:
ok 1 number(s): "12798139"
Test #47:
score: 0
Accepted
time: 32ms
memory: 8532kb
input:
200000 182463 86 10982278 10831340 13902975 2148352 4641300 3215345 1651400 6871509 11644754 9104464 3139423 1971173 14283 13801600 5864178 175497 16971338 12454316 12456108 10942965 1561779 14865225 2873536 1339880 17355728 6154877 18019522 16994055 11980921 76706 17519621 1320014 4257588 17006555 ...
output:
21813618
result:
ok 1 number(s): "21813618"
Test #48:
score: 0
Accepted
time: 26ms
memory: 8572kb
input:
200000 181641 4 571281 14045504 7170674 17133057 3306494 1293458 12290557 17153160 16239955 11086854 7199923 4182637 12033095 4259432 14991705 9391103 7666419 4516521 4143054 1041883 2729469 15254942 16785235 3732257 16629417 2743423 10367358 16617082 1822667 17248173 15506432 15823711 9870775 60678...
output:
14616785
result:
ok 1 number(s): "14616785"
Test #49:
score: 0
Accepted
time: 21ms
memory: 8552kb
input:
200000 191516 11 6867688 5920357 18313377 2960462 4363799 12389564 279709 12874004 3293852 7802944 6568014 11768802 14677007 18180760 17090033 10393409 10301791 7840943 2537509 3442813 1303262 12188468 15372046 9964729 14630914 1279578 13525686 16379914 5839926 8705033 903543 12114199 4512774 430634...
output:
12788045
result:
ok 1 number(s): "12788045"
Test #50:
score: 0
Accepted
time: 22ms
memory: 8528kb
input:
200000 197997 21 10048599 4523021 3151080 7389863 16537097 16666670 6485357 14550756 8673353 5670230 7386914 15267862 19676227 806392 2808256 6845106 15530268 10095056 1519051 13930740 7184444 905985 17877553 3078098 19490816 4550625 1052521 17380349 16301968 17273200 2527258 75396 1794662 19433941 ...
output:
14571620
result:
ok 1 number(s): "14571620"
Test #51:
score: 0
Accepted
time: 31ms
memory: 8532kb
input:
200000 182426 39 15576406 4557285 16113375 5223168 688603 10921183 7704109 17154299 2848254 8552524 12326005 11875635 12628039 7586719 2841080 8309412 13600240 12996770 14721698 17858762 8662737 6913095 12379556 1555763 15572005 8964480 14974653 17784280 3827915 7475663 13919276 15209193 18196957 16...
output:
20133691
result:
ok 1 number(s): "20133691"
Test #52:
score: 0
Accepted
time: 24ms
memory: 8600kb
input:
200000 182688 50 5893817 13170450 15823282 9691173 12899796 1857689 2210962 17704443 2268051 11895510 7571601 1616803 1780451 1719551 4375511 13669918 7475013 4339583 11501152 9804385 3006927 2562421 12727163 7620436 412202 5365426 9311181 11346516 7223957 16039231 17750987 10317489 3504352 12211924...
output:
19064267
result:
ok 1 number(s): "19064267"
Test #53:
score: 0
Accepted
time: 26ms
memory: 8524kb
input:
200000 143249 26 10225797 8618726 8705103 2729995 4265144 13144979 10103053 11283910 5787596 5003143 4116334 10986697 9447568 12473516 11926285 11020877 5327727 12688086 12300848 12233293 8513699 1406999 7788088 4413832 14188825 10413749 1490382 5914514 4394879 7825312 10912808 11521914 6905469 1393...
output:
18844523
result:
ok 1 number(s): "18844523"
Test #54:
score: 0
Accepted
time: 30ms
memory: 8572kb
input:
200000 150482 3104 505345950 251328375 371858130 156876582 407682088 72687991 143449276 411957265 727485096 90825423 624206563 694432920 167734202 639716607 300376449 704119500 423311548 253635483 358778282 28237476 622868802 397499627 210370897 145077785 721603427 135430572 300923504 442859418 3967...
output:
756674325
result:
ok 1 number(s): "756674325"
Test #55:
score: 0
Accepted
time: 30ms
memory: 8544kb
input:
200000 158360 3544 37188398 159878466 246837667 124499609 360384197 643579906 391531027 365357987 376712041 378659172 690711636 685558941 269555881 443800464 235456658 241333721 673003305 308149796 516798152 37636702 667014880 568679214 75824330 159642598 540863835 786998005 147210875 331619360 3868...
output:
197066864
result:
ok 1 number(s): "197066864"
Test #56:
score: 0
Accepted
time: 25ms
memory: 8500kb
input:
200000 151005 1687 241465437 623978556 129514100 751111420 495957114 299918036 156503585 399206005 505008985 432197920 558867118 216108747 371629456 468172025 302542674 614802942 323403166 201606404 443323830 590905120 712492447 292996505 157025466 724243899 592134243 690606927 13998654 639523894 84...
output:
865443993
result:
ok 1 number(s): "865443993"
Test #57:
score: 0
Accepted
time: 32ms
memory: 8540kb
input:
200000 178639 2935 648390989 165653646 179873637 853989447 341690031 452204951 710068847 389896728 105314034 473666669 134485704 578941256 10891135 623668586 756102882 537769460 59134923 347924228 61270997 730954346 859603525 145259605 40188898 730906008 623053843 845471657 404521025 499476131 33461...
output:
814044635
result:
ok 1 number(s): "814044635"
Test #58:
score: 0
Accepted
time: 33ms
memory: 8504kb
input:
200000 196945 3374 480853029 734878736 476942775 867426258 182077948 542462673 952880597 203809746 770613275 497757314 385263482 833598765 74020518 9932443 894295794 837541385 190302079 711043541 413815867 284167764 720196499 110724192 568470035 486955820 325824251 825334091 29751100 662756073 27044...
output:
1215731765
result:
ok 1 number(s): "1215731765"
Test #59:
score: 0
Accepted
time: 28ms
memory: 8600kb
input:
200000 151790 1518 325287772 394837339 399312312 645879285 402558569 336210396 404310860 113265468 395410220 166321062 5611259 36632082 141512198 245321300 473506003 662610606 365276940 735625957 157890737 128679287 229374874 583241483 373213467 256157929 422743851 59511116 137181175 445844118 52954...
output:
720125111
result:
ok 1 number(s): "720125111"
Test #60:
score: 0
Accepted
time: 30ms
memory: 8532kb
input:
200000 152052 4254 161177516 149487429 543208745 210926904 340200678 239672310 304842610 439073486 467570269 118554811 36234845 125219592 58806581 359267861 720144723 89632123 533548697 327532973 715200608 372001217 123405144 170376878 63786899 325154230 656964259 595048550 535168546 283211356 53385...
output:
310664945
result:
ok 1 number(s): "310664945"
Test #61:
score: 0
Accepted
time: 26ms
memory: 8552kb
input:
200000 173217 2397 579207260 728827519 584003282 743659123 108668595 145610441 215222872 146564208 681752213 474637751 113075327 746649397 375822452 324891718 169264931 460576344 57333558 8120390 216827774 319524635 379166223 242604169 252390332 623374043 620256156 810743280 246650517 28088593 38829...
output:
1308034779
result:
ok 1 number(s): "1308034779"
Test #62:
score: 0
Accepted
time: 34ms
memory: 8520kb
input:
200000 191574 2837 370460107 565170313 687274716 417611742 236266512 493097355 307394622 491914930 799587262 46229204 586970401 367321906 15459539 209395575 30327843 648010565 386755715 834124702 640474940 295303861 90911493 917638756 569646468 745511151 366639268 443658010 40152888 234425831 655327...
output:
935630420
result:
ok 1 number(s): "935630420"
Test #63:
score: 0
Accepted
time: 29ms
memory: 8528kb
input:
200000 189010 4750 908519345 939141663 839351092 368377420 399323044 827012300 308547150 835537574 282588921 536513919 416945693 641068911 164423798 820368561 140488883 594837738 286174996 156515309 324973605 458818909 506171076 273253715 942388442 658217233 616704167 78039110 437272879 533109268 62...
output:
1847661008
result:
ok 1 number(s): "1847661008"
Extra Test:
score: 0
Extra Test Passed