QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#555452 | #9236. Nile | tiger2005 | 100 ✓ | 224ms | 37920kb | C++14 | 2.2kb | 2024-09-09 23:28:00 | 2024-09-09 23:28:00 |
Judging History
answer
#include <vector>
#include <algorithm>
#include <cstring>
#include <numeric>
using namespace std;
using i64 = long long;
struct Mat {
i64 arr[3][3];
Mat() {
for (int i = 0; i < 3; i ++)
for (int j = 0; j < 3; j ++)
arr[i][j] = -1e18;
}
Mat operator * (const Mat &m) const {
Mat res;
for (int i = 0; i < 3; i ++)
for (int j = 0; j < 3; j ++)
for (int k = 0; k < 3; k ++)
res.arr[i][k] = max(res.arr[i][k], arr[i][j] + m.arr[j][k]);
return res;
}
};
Mat tr[400010];
void mdf(int x, int l, int r, int k, Mat v) {
if (l == r) {
tr[x] = v;
return;
}
int m = (l + r) >> 1;
if (k <= m)
mdf(x << 1, l, m, k, v);
else
mdf(x << 1 | 1, m + 1, r, k, v);
tr[x] = tr[x << 1] * tr[x << 1 | 1];
}
vector<i64> calculate_costs(vector<int> W, vector<int> A, vector<int> B, vector<int> E) {
i64 sumA = 0;
int n = W.size(), q = E.size();
for (int i = 0; i < n; i ++) {
sumA += A[i];
A[i] = A[i] - B[i];
}
vector<int> P(n);
iota(P.begin(), P.end(), 0);
sort(P.begin(), P.end(), [&] (int a, int b) {
return W[a] < W[b];
});
vector<pair<int, int>> evts;
for (int i = 0; i < n; i ++) {
for (int j: {i - 1, i - 2}) if (j >= 0)
evts.emplace_back(W[P[i]] - W[P[j]], i);
}
sort(evts.begin(), evts.end());
evts.emplace_back(1e9 + 10, -1);
vector<i64> res(q);
vector<int> id(q);
iota(id.begin(), id.end(), 0);
sort(id.begin(), id.end(), [&] (int a, int b) {
return E[a] < E[b];
});
int ptr = 0;
for (int i = 0; i < n; i ++) {
Mat new_m;
new_m.arr[0][0] = new_m.arr[0][1] = new_m.arr[1][2] = 0;
mdf(1, 0, n - 1, i, new_m);
}
for (auto e: id) {
int D = E[e];
while (evts[ptr].first <= D) {
auto [_, idx] = evts[ptr ++];
Mat new_m;
new_m.arr[0][0] = new_m.arr[0][1] = new_m.arr[1][2] = 0;
if (W[P[idx]] - W[P[idx - 1]] <= D)
new_m.arr[1][0] = A[P[idx]] + A[P[idx - 1]];
if (idx > 1 && W[P[idx]] - W[P[idx - 2]] <= D)
new_m.arr[2][0] = A[P[idx]] + A[P[idx - 2]];
mdf(1, 0, n - 1, idx, new_m);
}
res[e] = sumA - tr[1].arr[0][0];
}
return res;
}
详细
Subtask #1:
score: 6
Accepted
Test #1:
score: 6
Accepted
time: 4ms
memory: 32012kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 1999 1 944875548 658248446 1 942241221 862662770 1 941119201 29746260 1 880914757 565054749 1 847064455 320121519 1 733996624 169808259 1 996624758 17694396 1 443015155 112456087 1 663253472 657917906 1 615525463 269052422 1 943972695 44091769 1 996234621 36756381 1 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 488770893818 488770893818 488770893818 488770893818 488770893818
result:
ok
Test #2:
score: 6
Accepted
time: 0ms
memory: 32012kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 1999 1 376690691 327819324 1 897732007 9680782 1 741477171 6221134 1 917075973 867619400 1 773874620 202706173 1 984471947 16113413 1 539249319 2746890 1 925107925 91463234 1 901884969 325582602 1 966466042 237093643 1 960014918 123530258 1 570734136 554363882 1 9923...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 504900859962 504900859962 504900859962 504900859962 504900859962
result:
ok
Test #3:
score: 6
Accepted
time: 4ms
memory: 31956kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 1999 1 765138607 63924190 1 754044146 435023607 1 913538316 165133513 1 964285043 96404739 1 866399497 116800783 1 975831995 619747460 1 411809789 247889763 1 970070708 381258711 1 942913927 73612917 1 349724279 74734119 1 773950880 80253965 1 378508266 99289906 1 69...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 488021346327 488021346327 488021346327 488021346327 488021346327
result:
ok
Test #4:
score: 6
Accepted
time: 0ms
memory: 31968kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 1 726014424 266622515 1 958978169 685147231 1 877369298 403786763 1 822890594 235157763 1 946520276 760833165 1 980566093 54738 1 728941307 622208071 1 739512410 212376106 1 935766872 42515780 1 985127738 26039032 1 922769658 692872256 1 485089393 295202479 1 94...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 498431750019 498431750019 498431750019 498431750019 498431750019
result:
ok
Test #5:
score: 6
Accepted
time: 3ms
memory: 32260kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 1 960864825 152919752 1 431987133 73412685 1 767252651 109982535 1 964684386 49081947 1 978634401 302041518 1 966226476 116106728 1 883793860 655366696 1 797126161 509001847 1 992664436 60894792 1 421056102 112564773 1 755225225 518961980 1 566012362 79060466 1 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 495860506822 495860506822 495860506822 495860506822 495860506822
result:
ok
Test #6:
score: 6
Accepted
time: 7ms
memory: 32008kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 1 988827895 106860745 1 933259652 741441117 1 952170258 67581305 1 800169339 8175459 1 874443498 384831789 1 554186422 28195429 1 816979121 813155187 1 808883702 111682786 1 994638456 27603895 1 780346036 292685817 1 871710256 33511670 1 485623009 358297137 1 81...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 504646296281 504646296281 504646296281 504646296281 504646296281
result:
ok
Subtask #2:
score: 13
Accepted
Test #7:
score: 13
Accepted
time: 153ms
memory: 36176kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 99999 1 861638807 94882398 2 833230604 614785443 3 966029790 128330623 4 816575126 538407218 5 986009547 37253186 6 916840492 855054969 7 916601396 172534376 8 981205290 570648122 9 998615754 278308550 10 681674032 229714739 11 771844109 35063252 12 614120870 4569839...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 24988165506548 24987663919650 24987663919650 24987663919650 24987663919650
result:
ok
Test #8:
score: 13
Accepted
time: 150ms
memory: 36360kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 99999 1 318628492 290849551 2 845463299 104762071 3 990202862 649113932 4 914571563 149127339 5 601268922 376727424 6 856589811 255163481 7 348500546 162091877 8 960854916 81611054 9 101757430 62459595 10 957455002 66091038 11 570625506 142349959 12 996162725 2751305...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 25071161060829 25071161060829 25071161060829 25071161060829 25071161060829
result:
ok
Test #9:
score: 13
Accepted
time: 153ms
memory: 36092kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 99999 1 379984118 64704095 2 581130099 307732699 3 989350420 106741271 4 870555741 768120189 5 743335461 321944519 6 952679617 99343140 7 142304291 60057536 8 995545692 413684 9 857260638 370730944 10 708408472 73042589 11 843518961 160005468 12 573957526 415949 13 7...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 25078485674586 25078485674586 25078485674586 25078485674586 25078485674586
result:
ok
Test #10:
score: 13
Accepted
time: 157ms
memory: 36144kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 1 738188970 26927213 2 896117222 505715435 3 892449133 170674888 4 158734886 28520539 5 754022521 13340530 6 535020592 195610354 7 937330830 358057612 8 398395394 173227955 9 933944228 224403845 10 517791228 54215935 11 895740501 113461115 12 103196003 3115335...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 24899675330685 24899675330685 24899675330685 24899675330685 24899675330685
result:
ok
Test #11:
score: 13
Accepted
time: 156ms
memory: 36212kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 1 932073502 608879185 2 924146350 7907757 3 822859658 782790370 4 956676675 137654676 5 276411224 21061646 6 790712659 81878557 7 428803170 128450998 8 731916699 206466419 9 980197668 616677480 10 927143348 16206207 11 173428349 93747598 12 876923644 49735410 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 24939860695975 24939860695975 24939860695975 24939860695975 24939860695975
result:
ok
Test #12:
score: 13
Accepted
time: 160ms
memory: 36360kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 1 781141442 537612802 2 823554518 448970207 3 671270103 316200701 4 595388569 450472454 5 425488227 285208375 6 981945538 643724029 7 902784982 66344783 8 823413809 63644458 9 521175082 478186858 10 709717771 128862668 11 634055360 556754178 12 918254302 11537...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 24868218285753 24868218285753 24868218285753 24868218285753 24868218285753
result:
ok
Subtask #3:
score: 17
Accepted
Test #13:
score: 17
Accepted
time: 167ms
memory: 36108kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 35601 2 1 842654935 2 1 17142 2 1 796467255 2 1 44298 2 1 21817 2 1 28217 2 1 4257 2 1 373807290 2 1 30163 2 1 41042 2 1 557846460 2 1 281627745 2 1 310200220 2 1 416691705 2 1 19836 2 1 14454 2 1 177753835 2 1 18139 2 1 4177 2 1 34713 2 1 348814005 2 1 108532...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 110686 122188 144976 100000 144966
result:
ok
Test #14:
score: 17
Accepted
time: 166ms
memory: 36096kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 999977639 2 1 999995094 2 1 999983366 2 1 551700071 2 1 999991102 2 1 999955361 2 1 999987481 2 1 999991439 2 1 999964627 2 1 671199221 2 1 999978831 2 1 999980637 2 1 935658725 2 1 999989251 2 1 999963988 2 1 999971986 2 1 58505705 2 1 999990534 2 1 479288795...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 144976 106250 144966 124524 100000
result:
ok
Test #15:
score: 17
Accepted
time: 178ms
memory: 36096kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 883339193 2 1 811625558 2 1 254612424 2 1 38693781 2 1 939772836 2 1 450380180 2 1 680466876 2 1 147221710 2 1 52518039 2 1 436715630 2 1 103537404 2 1 724090955 2 1 922964112 2 1 189122266 2 1 456487820 2 1 732752319 2 1 275814702 2 1 665826193 2 1 797723209 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 106250 129024 129028 122852 100000
result:
ok
Test #16:
score: 17
Accepted
time: 180ms
memory: 36156kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 784081024 2 1 501225134 2 1 953690131 2 1 484323903 2 1 725277373 2 1 159462498 2 1 420012947 2 1 526285281 2 1 491162850 2 1 590394287 2 1 824998258 2 1 912486271 2 1 400714528 2 1 706532201 2 1 472370684 2 1 571739808 2 1 558054234 2 1 118423578 2 1 56700367...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 121112 129098 129098 106250 100000
result:
ok
Test #17:
score: 17
Accepted
time: 168ms
memory: 36176kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 311685302 2 1 311761052 2 1 311755398 2 1 311715987 2 1 311750120 2 1 311667941 2 1 311681534 2 1 311677811 2 1 311675299 2 1 311730055 2 1 311760205 2 1 311701661 2 1 311744566 2 1 311750039 2 1 311763019 2 1 311732658 2 1 311756971 2 1 311718313 2 1 31167074...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 120102 120102 100000 100000 120102
result:
ok
Test #18:
score: 17
Accepted
time: 194ms
memory: 36084kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 344145121 2 1 105081951 2 1 282104414 2 1 633348604 2 1 726653032 2 1 532663789 2 1 612920554 2 1 335899196 2 1 144632359 2 1 878670913 2 1 108413116 2 1 908335052 2 1 900339336 2 1 445473553 2 1 724184735 2 1 543907908 2 1 778752843 2 1 462795741 2 1 46011302...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 106270 200000 100000 132980 198616
result:
ok
Subtask #4:
score: 11
Accepted
Dependency #1:
100%
Accepted
Test #19:
score: 11
Accepted
time: 3ms
memory: 31964kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 843901338 675439998 190604776 843781845 48989908 44652541 843112470 943613518 45769460 843605463 183138386 65511112 844697032 952228650 362730 843497823 826953787 136568534 844774518 851591201 561196448 843521907 652452200 143617220 843111997 955686248 336195020...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 1110620165305 1488883026395 484684117199 1039282408192 1449821390364
result:
ok
Test #20:
score: 11
Accepted
time: 4ms
memory: 32304kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 634108506 790426920 65640955 633362623 782365861 103485105 634077933 811817855 302795360 633676399 662449247 65483811 633345256 986430490 310342721 633262056 266157350 14405619 634120828 386062123 112623996 632754699 656167963 634202554 632362758 889555447 20641...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 715205088135 1500791120511 1495259765539 1502646447114 500970299903
result:
ok
Test #21:
score: 11
Accepted
time: 0ms
memory: 32008kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 57660575 950266684 460354319 56334490 806154384 121722265 56842144 807837655 435503743 57305806 497818165 199424372 56863560 755530568 595033348 57573407 412642365 165183503 57648750 618205257 352391664 56833078 162228478 46169898 56544775 871288251 843493157 55...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 504522659572 1494096356874 1326169041379 530818187413 887284040692
result:
ok
Test #22:
score: 11
Accepted
time: 3ms
memory: 32308kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 605711005 985579237 499023088 607113816 991794621 312597158 606800132 983909801 253740 606726453 877478316 82477284 607346358 672911447 51759265 606308824 998509607 19939653 607077345 349739999 82520543 607322693 636632550 284836511 606043943 728238506 12118959 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 484795871164 1487194285499 1386360064049 514326200860 1093787353022
result:
ok
Test #23:
score: 11
Accepted
time: 4ms
memory: 32296kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 660619592 706371465 471102882 660618967 845300280 53499185 660618674 489191736 241818017 660618266 992329745 91355576 660618948 814416872 272209622 660619528 864971371 32690625 660617885 807965324 315544700 660618266 969503023 532902690 660619341 805935827 91832...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 514536373481 655693655464 514536373481 655693655464 514536373481
result:
ok
Test #24:
score: 11
Accepted
time: 0ms
memory: 32036kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 2000 808817964 297045365 289197882 539437822 929634813 21156201 685338349 440625054 39507667 773857052 881482347 28529101 276602068 435710502 255891374 212372586 925304470 144941120 85812147 588888875 32803279 190453612 772454621 114076096 838306516 944484902 8098336...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 1461377076509 1501819906993 1261282617771 482601349986 519453795245
result:
ok
Subtask #5:
score: 20
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Test #25:
score: 20
Accepted
time: 171ms
memory: 36100kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 249453438 913605294 31295399 43104 896563619 4457848 45401 661143217 150519021 40551 958122967 786121708 47740 857904979 1467211 18199 971641346 178019628 2260 663584702 86286791 59004100 393547911 130916961 22112 863308618 247318979 92067426 878257328 3206503...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 47468457847091 24985616360377 38705178981706 47472204094849 28137535101793
result:
ok
Test #26:
score: 20
Accepted
time: 166ms
memory: 36224kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 999990976 999828101 888312362 429186836 600218798 212462262 389986640 827588482 360288223 563212160 660533358 55902917 999970616 294845989 214800905 999987870 883050308 111253806 999964192 798496987 546213730 999983196 885492961 851925509 999988585 999827324 9...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 28424027523768 47470465421298 28154754949916 25031171643394 32395469654094
result:
ok
Test #27:
score: 20
Accepted
time: 187ms
memory: 36360kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 360130461 619926813 147571192 289633687 880945848 273795108 378022975 855245431 482769582 842857157 503600182 145628386 850741155 870758047 131307861 177624950 937407526 35883200 770965482 918012100 80519323 474509180 609551217 87231330 500973462 805585977 427...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 37048943509634 26365218706840 26394530814164 37761571946629 24994090347417
result:
ok
Test #28:
score: 20
Accepted
time: 182ms
memory: 36360kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 349835932 348292194 234195720 3960535 899335333 114226536 984521048 945115445 619878003 697074259 714657122 280768796 61022649 966533065 29731505 96851993 989260666 583768581 400029929 945071791 293481935 888813422 829099358 704721270 792061233 153888116 34823...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 37882270783158 25104204106319 33817348249720 37161598094170 26462946617513
result:
ok
Test #29:
score: 20
Accepted
time: 168ms
memory: 36220kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 23660185 947560089 9376833 23737933 722516272 652908743 23730216 912838614 29507409 23665513 698637624 129992644 23719789 176853263 165957824 23678085 715072823 3412814 23750006 938586397 1240682 23664143 659786665 317541529 23728332 980904530 31404572 2365322...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 32475973082580 32475973082580 32475973082580 24986190640635 32475973082580
result:
ok
Test #30:
score: 20
Accepted
time: 201ms
memory: 36340kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 743664933 838977752 344039974 955638594 612348266 410761132 820348885 838669629 9236857 895213608 626458318 89646917 642846498 777025339 134212384 373859359 995653046 3554239 93295309 904564206 516731418 198149915 588420206 569023418 60931351 497611683 1980917...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 26577245945435 24913953243880 75005385703298 51855539570115 74905664962367
result:
ok
Subtask #6:
score: 15
Accepted
Dependency #3:
100%
Accepted
Test #31:
score: 15
Accepted
time: 175ms
memory: 37788kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 49555 2 1 46002 2 1 27374 2 1 77827375 2 1 249140881 2 1 34258938 2 1 54082 2 1 24172 2 1 24667 2 1 8210 2 1 13822 2 1 51712 2 1 15890 2 1 10890 2 1 41748 2 1 377782030 2 1 13772688 2 1 306606 2 1 530567038 2 1 27467 2 1 374080735 2 1 21073 2 1 46566 2 1 45454...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 138636 137324 142622 101832 104570 137940 132952 100000 116314 100000 100000 100662 135300 110944 100000 133430 125572 135582 144142 100000 142962 111636 100000 100000 100000 127968 100000 113622 119056 128392 100000 121022 128272 100000 124228 104568 100560 10000...
result:
ok
Test #32:
score: 15
Accepted
time: 175ms
memory: 37908kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 920543141 2 1 999951887 2 1 999954667 2 1 942901660 2 1 999983987 2 1 999967338 2 1 999958804 2 1 999999148 2 1 999946412 2 1 999967278 2 1 920732021 2 1 971667955 2 1 999994473 2 1 999957415 2 1 999969908 2 1 435856763 2 1 999954677 2 1 999989313 2 1 99995747...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 102196 121778 128972 100000 115188 120854 140428 120150 100000 113580 131232 115270 134256 100000 144402 131922 102600 108088 136652 123408 100000 100000 100000 140142 108544 127348 112132 120022 116070 139422 116260 106106 100000 130500 117598 114562 100000 10000...
result:
ok
Test #33:
score: 15
Accepted
time: 213ms
memory: 37696kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 240995822 2 1 883882518 2 1 160287489 2 1 331760832 2 1 512064640 2 1 958678726 2 1 733066515 2 1 482108350 2 1 213006376 2 1 794698271 2 1 445451162 2 1 329810925 2 1 486969602 2 1 283138635 2 1 475468445 2 1 974324400 2 1 861006384 2 1 267986066 2 1 43843593...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 100000 100000 104832 100000 115754 126432 100000 100676 111400 107260 100000 101114 104456 113078 115064 107694 115164 100000 126752 103036 111552 117394 100000 120452 100256 122580 113982 100930 101382 120836 124654 100000 123264 108180 111386 113444 100000 10524...
result:
ok
Test #34:
score: 15
Accepted
time: 201ms
memory: 37660kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 540948971 2 1 690781105 2 1 606155281 2 1 575375567 2 1 615477099 2 1 478737799 2 1 251447941 2 1 117064996 2 1 681175150 2 1 84140672 2 1 401376115 2 1 656342512 2 1 341577196 2 1 329396369 2 1 486967974 2 1 775059347 2 1 479742224 2 1 794891037 2 1 95884997 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 100000 110086 126514 101148 100000 100000 107342 104186 100000 126708 125034 100000 117942 102468 105088 100000 100000 122392 112678 102240 119828 100000 121048 108150 119516 119934 100000 109898 101406 127232 102406 114908 104162 101756 118352 117400 118150 10146...
result:
ok
Test #35:
score: 15
Accepted
time: 203ms
memory: 37788kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 249758914 2 1 265099264 2 1 48561796 2 1 972063607 2 1 135294171 2 1 637427791 2 1 365683048 2 1 715645679 2 1 694286600 2 1 914900657 2 1 488497383 2 1 698096617 2 1 124443573 2 1 875382445 2 1 754925286 2 1 944273851 2 1 451413680 2 1 570245714 2 1 134004492...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 117554 110322 105988 125512 123386 100000 116952 109884 121322 127736 113716 112504 102238 100000 100000 103922 113822 105224 125892 108024 105020 108362 123332 127636 114540 100000 118048 114246 101784 101488 124186 113062 100000 107896 103390 107590 101642 10000...
result:
ok
Test #36:
score: 15
Accepted
time: 198ms
memory: 37672kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 210159195 2 1 48314888 2 1 690353955 2 1 822277924 2 1 294328835 2 1 462943100 2 1 659087479 2 1 958280757 2 1 271609083 2 1 978510596 2 1 651290811 2 1 835693551 2 1 67795946 2 1 629364957 2 1 340565778 2 1 871815311 2 1 761349106 2 1 473663277 2 1 692185507 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 105990 121938 112464 114690 105874 118594 115078 127502 117236 106956 100000 100000 100000 100000 109454 120806 100000 107264 125122 122660 101334 103556 100000 116292 126692 103820 106360 119392 124534 118046 100000 105610 100000 100000 111210 101492 119706 10571...
result:
ok
Test #37:
score: 15
Accepted
time: 196ms
memory: 37744kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 572433645 2 1 567899605 2 1 972068968 2 1 891716424 2 1 90050961 2 1 375335248 2 1 89189552 2 1 999080361 2 1 632551799 2 1 150246762 2 1 503364964 2 1 917437556 2 1 243878385 2 1 271924908 2 1 672914540 2 1 49564196 2 1 51934472 2 1 321137999 2 1 567450286 2 ...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 100000 122076 106634 122164 109362 127300 101910 100054 100000 114192 100000 118012 106146 109998 100000 107040 102470 110226 100168 106632 104990 100000 102678 114090 115344 100000 100000 113610 124814 100000 122174 109636 107850 125470 123018 127044 100000 10896...
result:
ok
Test #38:
score: 15
Accepted
time: 183ms
memory: 37772kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 221305761 2 1 221249099 2 1 221295151 2 1 221292056 2 1 221287395 2 1 221265172 2 1 221320573 2 1 221245201 2 1 221232996 2 1 221234790 2 1 221269106 2 1 221268146 2 1 221260794 2 1 221318113 2 1 221325918 2 1 221287169 2 1 221246193 2 1 221247842 2 1 22125097...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 100000 100000 100000 120098 100000 100000 100000 120098 100000 100000 120098 120098 100000 100000 100000 100000 100000 100000 100000 120098 120098 100000 120098 120098 120098 120098 120098 120098 120098 120098 120098 120098 120098 120098 100000 100000 100000 12009...
result:
ok
Test #39:
score: 15
Accepted
time: 213ms
memory: 37776kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 429721478 2 1 256558120 2 1 445882285 2 1 866448697 2 1 107806020 2 1 603629080 2 1 280950245 2 1 511275103 2 1 181904511 2 1 666298877 2 1 32705763 2 1 368813944 2 1 630663826 2 1 73062058 2 1 372176221 2 1 68014470 2 1 527991219 2 1 402898826 2 1 917546538 2...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 100000 147400 157616 100000 100000 100000 100000 100000 100000 130686 129890 100000 150890 110648 100000 100000 100000 100000 158598 100000 107316 100000 138696 100000 200000 100000 100000 141392 100000 100000 100000 100000 143092 100000 101350 100000 182260 10000...
result:
ok
Subtask #7:
score: 18
Accepted
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
100%
Accepted
Dependency #4:
100%
Accepted
Dependency #5:
100%
Accepted
Dependency #6:
100%
Accepted
Test #40:
score: 18
Accepted
time: 191ms
memory: 37744kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 232942150 973205186 88207877 20854 639193395 327268472 47405 823615548 564473406 22630 976320755 252830002 1330 762080191 692256984 407106406 731671863 313496824 21623 866780499 303282656 69167295 848442081 53988178 34458 498870860 117415720 51985926 722485601...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 25019947180411 27118992668641 25019947180411 25203248341507 25019947180411 29947782051996 25019947180411 25019947180411 39544603531814 25019947180411 43438610187106 25019947180411 47074862756326 35081718591087 44780331574802 25019947180411 25019947180411 292301165...
result:
ok
Test #41:
score: 18
Accepted
time: 189ms
memory: 37640kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 803847338 426417045 395494146 938039591 739497309 21490621 999971831 726177445 694702288 959565205 462153966 136578861 931676438 626986336 179470383 999987920 933909814 33205420 999946631 749825443 676684672 999993810 625066832 420601061 527181715 997250612 19...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 47128998981583 26695681190463 28399407610368 24902318627760 31105022814406 46849330421464 25234677505714 40065780866460 24902318627760 40826141991911 24902318627760 29904287326436 32032517030065 24902318627760 31148754770998 24902318627760 30409634591864 396223875...
result:
ok
Test #42:
score: 18
Accepted
time: 210ms
memory: 37780kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 811533057 893222019 13515136 615386742 969099349 953602080 247421685 921893346 606984906 159342374 897320822 317648912 498096323 468745029 86496427 8653981 218668096 74571454 916192662 982356843 7373518 104654527 988071472 50214392 252660312 911260874 57457628...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 25716435946545 26746549013441 29131066029296 31791043813686 28241718749465 25092450691386 25217575910248 33986957975880 30323356981537 25092450691386 25092450691386 29168110325518 33470605955900 25092450691386 25875196431168 25217575910248 29750636285115 250924506...
result:
ok
Test #43:
score: 18
Accepted
time: 201ms
memory: 37704kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 668575342 939153373 126174018 822404685 541282335 152924004 820193651 836673163 87954011 466459561 916416450 455797874 275292519 927442517 53461967 608181168 907565997 629950687 967859803 509509679 222832335 395343452 775365437 774824552 659821702 613568195 36...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 24867507140551 26038319925814 35294312236664 28365891880802 33912649234020 24867507140551 26269496101983 36190560352091 25163797070863 25245221460506 24867507140551 25535819836741 30008498255149 32069744665932 25120997062473 24867507140551 32756730449845 249155820...
result:
ok
Test #44:
score: 18
Accepted
time: 210ms
memory: 37784kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 736823668 968442922 77369046 960738858 856593668 525040862 963983717 453662738 337030839 414726818 515208187 472911955 97118055 898394008 644050752 217998715 826819728 735137293 152287367 997005754 907083611 277212752 530834978 581528 47220370 779983148 503144...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 25024171767338 25024171767338 28206538737551 27386128283317 27313728678208 27941707586792 31052214081766 25117168819306 25024171767338 25574150988328 25024171767338 25549501581994 25318372099781 34906789795113 26322048984040 31483040130085 25024171767338 276235643...
result:
ok
Test #45:
score: 18
Accepted
time: 204ms
memory: 37656kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 245808753 942903059 938595122 402891674 920572986 905250717 238485473 928469838 23186679 181187587 966007391 80830579 229306289 808774488 480407530 402113302 977092952 43411794 861652047 954092359 1071446 382008082 638582944 437582985 275915658 895375043 18638...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 28779130194395 26424480236989 29469258166271 27362090702208 33395506432132 27707235606301 28442703797701 25875826868873 24998073520224 27954051723527 30137635700889 24998073520224 25085350175481 26587580867153 34155941343728 25076303828035 25983281053178 263659833...
result:
ok
Test #46:
score: 18
Accepted
time: 209ms
memory: 37920kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 36970745 727952059 471264829 256436694 220374555 184382433 852291884 922029295 34316357 444711867 451730440 100595760 747345032 933776451 249150630 819911342 803488763 230711566 317434012 675127386 193960309 107590469 669185521 126644339 49955646 940677172 774...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 25078725173826 32780111399850 28500169082132 25078725173826 25078725173826 25581694536616 26194590023987 25146305847758 31663371958512 26660380252152 30048537836195 27220936247722 36872580619386 25078725173826 30588259055732 29359515705531 25078725173826 263419567...
result:
ok
Test #47:
score: 18
Accepted
time: 194ms
memory: 37768kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 514416805 939655172 292761757 514450930 510342552 92994723 514445300 878012860 198145191 514472425 979042735 23576885 514458151 383246256 339759179 514441223 994317038 50818745 514430867 971913837 241337734 514468310 278267696 56073766 514412913 719626337 3362...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 32400867576673 24945423432605 32400867576673 24945423432605 24945423432605 24945423432605 24945423432605 32400867576673 24945423432605 24945423432605 24945423432605 24945423432605 24945423432605 24945423432605 24945423432605 24945423432605 24945423432605 324008675...
result:
ok
Test #48:
score: 18
Accepted
time: 224ms
memory: 37740kb
input:
1U22aPSRkiGgB7zXbfJs9IqSfacMQ9t7 100000 103065982 815484751 515762852 761295639 855981875 89911996 305974975 861795986 103170958 116421245 687649699 336269734 930557983 515239090 479425435 747469743 943982201 105547308 775689485 882843659 163902779 454513245 723567835 255428332 139028848 663776844 6...
output:
4FBwMMwcdlgPodEtp0owUlxQgA5SuIlq OK 24909461594395 38452027651278 56098477887501 25942360605714 24909461594395 33385238930505 24909461594395 24909461594395 24909461594395 57002690642088 66509216146551 24909461594395 24909461594395 24909461594395 24909461594395 43980463503556 24909461594395 378434397...
result:
ok
Extra Test:
score: 0
Extra Test Passed