QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#447805 | #4401. Prize | zhaohaikun | 100 ✓ | 1408ms | 317920kb | C++20 | 4.2kb | 2024-06-18 20:06:29 | 2024-06-18 20:06:30 |
Judging History
answer
// MagicDark
#include <bits/stdc++.h>
#define debug cerr << "\033[32m[" << __LINE__ << "]\033[0m "
#define SZ(x) ((int) x.size() - 1)
#define all(x) x.begin(), x.end()
#define ms(x, y) memset(x, y, sizeof x)
#define F(i, x, y) for (int i = (x); i <= (y); i++)
#define DF(i, x, y) for (int i = (x); i >= (y); i--)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
template <typename T> T& chkmax(T& x, T y) {return x = max(x, y);}
template <typename T> T& chkmin(T& x, T y) {return x = min(x, y);}
template <typename T> T& read(T &x) {
x = 0; int f = 1; char c = getchar();
for (; !isdigit(c); c = getchar()) if (c == '-') f = - f;
for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
return x *= f;
}
const int N = 1e6 + 10;
int n, k, q, t;
struct Tree {
int fa[N], rt, dfn[N], nfd[N], dfscnt, sz[N], son[N], dep[N], top[N], dis[N];
vector <int> v[N];
void dfs(int x) {
dep[x] = dep[fa[x]] + 1;
sz[x] = 1;
for (int i: v[x]) {
dfs(i);
sz[x] += sz[i];
if (sz[i] > sz[son[x]]) son[x] = i;
}
if (son[x]) v[x].erase(find(all(v[x]), son[x])), v[x].insert(v[x].begin(), son[x]);
}
void dfs2(int x, int tt) {
top[x] = tt;
nfd[dfn[x] = ++dfscnt] = x;
for (int i: v[x]) dfs2(i, i == v[x].front() ? tt : i);
}
void init() {
F(i, 1, n) {
cin >> fa[i];
if (!~fa[i]) fa[i] = 0, rt = i;
else v[fa[i]].push_back(i);
}
dfs(rt), dfs2(rt, rt);
}
int lca(int x, int y) {
int cnt = 0;
while (top[x] != top[y]) {
cnt++;
assert(cnt <= 50 && x && y);
if (dep[top[x]] > dep[top[y]]) swap(x, y);
y = fa[top[y]];
}
return dep[x] < dep[y] ? x : y;
}
int query(int x, int y) {
return dis[x] - dis[lca(x, y)] * 2 + dis[y];
}
} T1, T2;
int val[N], an[N];
vector <pair <int, int>> v[N], vv[N];
void dfs(int x, int g) {
T2.dis[x] = g;
// debug << x << " " << T2.dis[x] << endl;
for (auto [i, j]: vv[x]) dfs(i, g + j);
}
int t1[N], t2[N];
signed main() {
ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
cin >> n >> k >> q >> t;
T1.init(), T2.init();
vector <int> g;
F(i, 1, k) g.push_back(T1.nfd[i]);//, debug << T1.nfd[i] << endl;
// debug << T1.rt << endl;
sort(all(g), [&] (int x, int y) {
return T2.dfn[x] < T2.dfn[y];
});
for (int i: g) cout << i << " "; cout << endl;
F(i, 0, SZ(g) - 1) cout << "? " << g[i] << " " << g[i + 1] << '\n';
cout << "!" << endl;
// set <int> s;
stack <int> s;
s.push(g[0]);
F(i, 0, SZ(g) - 1) {
int a, b, c, d; cin >> a >> b >> c >> d;
int k1 = T1.lca(g[i], g[i + 1]);
int k2 = T2.lca(g[i], g[i + 1]);
// debug << k1 << " " << k2 << endl;
v[k1].emplace_back(g[i], a);
v[g[i]].emplace_back(k1, - a);
v[k1].emplace_back(g[i + 1], b);
v[g[i + 1]].emplace_back(k1, - b);
// if (k2 == )
an[g[i + 1]] = k2;
val[g[i + 1]] = d;
int lst = 0;
while (s.size() && T2.dep[s.top()] > T2.dep[k2]) c -= val[lst], lst = s.top(), s.pop();
if (s.empty() || s.top() != k2) {
assert(lst);
if (s.size()) {
an[k2] = s.top();
val[k2] = val[lst] - c;
}
an[lst] = k2;
val[lst] = c;
s.emplace(k2);
}
s.push(g[i + 1]);
// s[g[i + 1]] = d;
// an[g[i + 1]] = k2;
// if (!s[g[i]]) {
// s[g[i]] = d;
// an[g[i]] = d;
// } else {
// if (T2.dep[an[g[i]]] < T2.dep[g[i]]) {
// }
// }
}
queue <int> q;
// int rt = T1.nfd[1];
T1.dis[T1.rt] = 1;
q.push(T1.rt);
while (q.size()) {
int x = q.front(); q.pop();
// debug << x << " " << T1.dis[x] << endl;
for (auto [i, j]: v[x])
if (!T1.dis[i]) {
// debug << i << " " << x << " " << j << endl;
T1.dis[i] = T1.dis[x] + j;
q.push(i);
}
}
// for (int i: g) cout << T1.dis[i] << " "; debug << endl;
while (s.size() > 1) s.pop();
F(i, 1, n)
if (an[i]) vv[an[i]].emplace_back(i, val[i]);//, assert(T2.dep[an[i]] < T2.dep[i]);
dfs(s.top(), 0);
// return 0;
F(i, 1, t) cin >> t1[i] >> t2[i];
F(i, 1, t) {
// int k1 = T1.lca(p, q), k2 = T2.lca(p, q);
// cout << T1.query(p, k1) << " " << T1.query(q, k1) << " " << T2.query(p, k2) << " " << T2.query()
cout << T1.query(t1[i], t2[i]) << " " << T2.query(t1[i], t2[i]) << '\n';
}
cout << endl;
return 0;
}
/* why?
*/
詳細信息
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 722ms
memory: 203984kb
input:
500000 64682 64681 100000 46115 470589 209303 2979 473162 343535 79503 299539 404621 102085 237721 279170 392890 165201 441593 456314 218991 358478 86614 410800 159785 169761 95368 285837 297549 370283 378974 26449 444381 39320 149913 404523 144109 174828 263837 49847 468694 478535 152644 216598 301...
output:
422989 414496 290928 388223 160563 301045 470257 259625 222733 231286 345214 169817 435263 277447 386014 210139 455433 225855 264772 199736 355788 288506 233893 146148 454958 267562 498596 183745 352665 151125 266374 43142 9414 204593 212097 311775 25324 300764 6643 94847 396968 428563 311355 255767...
result:
ok good job!
Test #2:
score: 0
Accepted
time: 727ms
memory: 216580kb
input:
500000 90967 90966 100000 122547 312039 290084 118442 352297 175176 294396 496975 127062 90539 132654 408480 493670 419897 53432 141795 264165 60368 473480 5634 253119 64236 85346 422987 28583 262389 111931 271291 13577 415079 132797 256502 76402 265607 11274 289667 398726 32021 302401 410650 369760...
output:
3090 193269 3028 186608 498475 64618 82114 231445 7541 329983 134623 235591 70401 18906 403427 280451 146897 355174 160090 144279 193430 332022 488244 228900 80781 84465 218682 27818 6035 368489 155673 440755 443926 241570 193717 143661 374105 56616 323329 95909 337798 20531 236329 28564 437244 4969...
result:
ok good job!
Test #3:
score: 0
Accepted
time: 554ms
memory: 162800kb
input:
500000 68287 68286 100000 273928 229768 65518 144983 311611 494773 489379 439644 467893 456131 430188 247387 485565 272285 474827 476962 338340 365804 344570 390867 390170 456217 43185 447057 385874 305750 107742 230530 259907 252254 280920 16831 45761 185191 117450 55891 175190 255615 35904 14855 2...
output:
242387 339454 497922 201163 474669 26464 481148 316750 450339 21547 419006 345058 85434 22138 317872 165853 423690 413507 470866 445053 471167 370637 457924 456466 227392 10605 117822 209779 188485 262898 483926 431972 82148 180932 384936 409699 116022 440967 167868 202498 422821 376604 343665 43492...
result:
ok good job!
Test #4:
score: 0
Accepted
time: 557ms
memory: 159724kb
input:
500000 63976 63975 100000 230132 63748 303785 13497 431672 370351 360004 412191 378555 409703 485802 218204 475692 27602 220794 398856 89157 166559 116145 350738 277404 196706 40307 118602 171802 378360 389092 485168 224465 383516 33147 322617 254917 274019 57283 272241 216098 421952 489927 75641 40...
output:
210552 1449 320642 372383 262729 281250 39370 30507 7571 32979 107 69216 303978 8420 124374 467448 269357 232509 496783 288663 459729 302050 172868 424536 230951 280026 395414 183022 403261 157066 227946 379135 381718 473330 68136 129462 197961 115571 176912 228218 457918 296317 280290 195630 1352 2...
result:
ok good job!
Test #5:
score: 0
Accepted
time: 498ms
memory: 167208kb
input:
500000 87673 87672 100000 151599 456749 347511 703 348209 260440 488627 416030 419890 408089 83617 120781 133411 374231 460689 211838 137587 252914 392401 321583 55161 335205 334340 4527 14086 142229 197076 17695 262896 258702 273353 51181 10968 366799 324067 299421 281975 7236 420627 92324 299845 1...
output:
51300 74889 382285 63865 132781 53691 488798 168564 224453 362423 119973 22799 414679 196987 452355 299553 250068 233210 172748 5621 274694 463465 248488 150320 156472 158357 333855 382284 217187 313309 238165 465047 280100 23928 337004 273051 471339 130942 227415 212752 287558 349362 406197 152851 ...
result:
ok good job!
Test #6:
score: 0
Accepted
time: 524ms
memory: 174612kb
input:
500000 77912 77911 100000 270576 129318 366297 25873 179787 473782 221947 331327 209469 412992 410608 286179 37554 355546 297085 420463 496948 223036 122019 151250 478469 468136 19073 318549 398897 364415 23730 407160 26064 436939 30150 336421 375149 131841 58480 259944 117641 414831 64311 336164 31...
output:
210887 450513 372367 243217 17878 393825 463407 324697 246607 415699 193455 464346 34314 337722 389758 398573 961 150261 11366 431566 348482 426544 62168 402483 378539 193152 58656 464684 494519 390067 339840 385119 273679 473724 265624 54661 280376 405045 456676 370595 196033 263134 190021 243754 2...
result:
ok good job!
Test #7:
score: 0
Accepted
time: 515ms
memory: 172744kb
input:
500000 77688 77687 100000 433011 472346 395389 187114 436024 138403 189990 398859 136147 195283 331183 46789 19828 335128 387768 442181 65556 72327 318927 462834 421288 227912 37067 387794 145879 258896 185861 356020 202881 490952 443694 95413 137215 137239 112863 481338 167802 304239 309781 391976 ...
output:
176419 131882 35390 373863 204978 443479 492305 157831 85371 217598 310810 104348 344506 18218 34919 284048 375157 93215 437374 179027 246201 105486 90705 261692 432138 60063 214041 101698 415529 126781 367122 36224 346513 351518 104123 456286 93719 361257 433265 427613 233241 73489 455345 86243 286...
result:
ok good job!
Test #8:
score: 0
Accepted
time: 524ms
memory: 172848kb
input:
500000 70973 70972 100000 449081 8094 7358 89457 426121 454508 470543 485236 63347 441977 422774 88672 243638 499709 170209 157788 229166 106888 228931 289706 435222 496384 381579 323479 499140 1511 385050 44171 413854 248273 352221 305112 24289 277461 391744 395003 85800 396455 355110 186446 285096...
output:
449195 359470 62857 516 49116 212775 238351 344036 287306 191612 27113 107127 151520 273425 250496 60335 369915 324800 64090 294847 116290 472262 346162 294387 394563 459841 489754 10232 282110 452952 212602 190468 18187 304310 65407 436452 81924 67075 130414 319607 304506 80799 215666 222467 329086...
result:
ok good job!
Test #9:
score: 0
Accepted
time: 459ms
memory: 160008kb
input:
500000 66403 66402 100000 297237 432967 138046 88503 315699 372893 55309 335404 127581 165919 247543 254268 285147 289728 275281 44427 94393 302830 489861 429097 425153 11083 439096 414157 386411 152968 394984 46119 149177 369378 413029 198215 134317 366218 281170 465540 39702 367778 247925 64320 86...
output:
294428 473786 295516 356041 418380 409382 484446 470069 426742 451557 333426 76010 26162 217029 199747 158527 56693 127686 458269 268432 3097 450062 17124 95072 49754 380988 452454 28056 397880 35183 17487 114352 243554 334011 215673 336427 488017 263664 318241 436355 172881 340947 365629 395161 436...
result:
ok good job!
Test #10:
score: 0
Accepted
time: 474ms
memory: 161440kb
input:
500000 82328 82327 100000 280281 366446 183709 14447 442815 440473 121531 103568 472324 479656 337467 424742 474404 340302 269686 457628 230012 484228 422877 10759 156759 66102 130428 307888 123685 460634 235321 98667 93133 489886 479420 34961 352500 322001 129001 121871 135775 235639 100221 221760 ...
output:
185494 187429 377218 243873 267775 178621 184766 4349 195440 465216 493888 59837 492409 22119 296383 439761 227299 182158 289180 431722 209705 314005 454482 353551 499618 396603 245525 104974 434770 192984 248421 240157 449388 468195 283671 95646 489750 482977 464080 484685 93051 90798 105815 437324...
result:
ok good job!
Test #11:
score: 0
Accepted
time: 431ms
memory: 161268kb
input:
500000 53948 53947 100000 287984 258934 272973 481182 131565 217198 34714 463056 337977 495727 310042 26372 320480 231799 249741 340990 365501 267377 460708 248843 285777 172137 492784 201463 213559 259528 461602 235849 398717 25475 241699 451061 188952 251790 83551 169967 335575 209367 55705 6381 2...
output:
490646 220299 110592 14671 171220 242764 176269 161808 463889 328060 432595 16152 170752 57934 356770 375971 256037 111598 453045 174234 100365 351281 259794 414103 190140 24374 395359 151855 110182 142594 52422 217198 81725 318333 446147 15096 181082 6 128876 384901 418294 63218 305603 498438 36263...
result:
ok good job!
Test #12:
score: 0
Accepted
time: 450ms
memory: 164328kb
input:
500000 77935 77934 100000 38748 422564 39441 105430 38474 225464 237519 121832 72613 477531 321661 29181 307418 314049 120252 261006 88761 17726 492112 460837 55199 354114 417097 133271 231933 436973 110894 478550 291976 50101 38774 316091 306160 121826 315769 361823 82990 188508 124574 13093 235123...
output:
423149 432427 271601 403524 194295 171107 323540 222391 289224 289983 437127 346762 296242 442430 254232 229891 40286 216206 222693 324588 77610 399666 132814 148661 227933 464084 443510 207124 404501 316458 482242 2976 298396 215487 116145 286999 333929 421259 184783 29644 92601 99085 202135 241824...
result:
ok good job!
Subtask #2:
score: 25
Accepted
Test #13:
score: 25
Accepted
time: 638ms
memory: 217156kb
input:
500000 88721 177440 100000 30974 23891 211201 125199 180489 387190 218020 498838 230147 307989 484136 257785 353027 304420 311738 169842 334090 486070 126212 328609 174959 368840 238722 418092 488389 226349 427271 457322 332454 12958 197530 264474 355717 482774 221286 282148 216441 266659 213750 628...
output:
299348 225578 286701 388703 273711 466172 478011 490391 462013 126494 92677 182472 13812 107732 303666 361862 256289 91025 389690 156797 268792 434419 208299 409874 319842 64913 385537 136511 498213 255392 208598 45196 97386 482069 290480 370649 225780 380585 84550 485237 301855 494683 414740 107270...
result:
ok good job!
Test #14:
score: 0
Accepted
time: 592ms
memory: 218036kb
input:
500000 50267 100532 100000 68723 142685 445548 215087 478634 201362 177405 373123 227456 161487 276716 452818 230715 466238 250886 368974 77152 493722 129115 154402 319190 170867 27898 338290 170229 428001 62611 19188 164329 435154 128 358453 137653 430592 160391 407392 125236 320137 27945 393135 17...
output:
180276 246334 495583 402629 160081 135829 437502 411046 380530 139431 365266 373213 304147 83868 82333 429663 60973 379653 172399 163454 32708 375362 151036 335442 305087 243402 252686 172089 94334 222818 22129 288097 54119 315516 305714 257805 486465 169334 213035 447566 446068 161042 183900 97933 ...
result:
ok good job!
Test #15:
score: 0
Accepted
time: 478ms
memory: 161468kb
input:
500000 67604 135206 100000 269046 235003 144646 314602 323547 204450 484229 26672 78499 602 110738 117079 125630 408912 188317 256853 71590 365703 370008 194267 342683 400737 369194 127912 96314 269751 219125 431887 398790 200053 279314 365797 187505 75025 48264 492515 387506 13267 80948 378737 1106...
output:
23134 473027 81298 369543 432384 125086 416805 90416 217415 63525 104485 125406 400608 409382 345294 41501 17431 57508 68042 175815 467604 267508 73845 241628 346750 137565 491082 182609 129559 34605 395214 88360 182199 3821 98242 193360 247519 491792 355081 222937 195573 312934 38123 449963 483712 ...
result:
ok good job!
Test #16:
score: 0
Accepted
time: 493ms
memory: 163232kb
input:
500000 90109 180216 100000 153893 273609 184853 157428 466683 457867 343783 259618 87262 260826 466902 41972 482221 496695 293976 300490 455874 320279 314574 128316 280220 2566 383716 351629 219577 29212 26631 73182 458601 318651 105942 60715 392339 265615 387177 110713 319395 336826 483543 70790 36...
output:
492189 302216 313016 434801 40203 496907 15435 263357 220394 4703 345400 489792 72060 186119 350885 106931 485337 397961 238857 206845 449003 403108 374578 35630 487996 488566 13994 484618 16810 445455 18189 419001 219272 295905 316512 56400 302906 195898 52650 446184 29921 286911 197322 246486 5933...
result:
ok good job!
Test #17:
score: 0
Accepted
time: 498ms
memory: 162804kb
input:
500000 74321 148640 100000 477030 412534 57969 357009 116485 327483 437765 67781 471780 418080 308252 138279 338053 95055 275789 97204 386829 122048 57181 436136 222481 395950 352928 73438 250800 184259 16097 398913 456107 105407 39764 116186 80552 65160 316601 284871 313136 414498 414938 343247 310...
output:
329874 244414 317824 353516 242287 481069 239982 16317 298715 120189 205605 215513 278925 396162 408539 40987 169291 64447 200316 124983 92370 364953 138362 458118 216751 28628 28295 173511 160288 305045 213716 324123 469301 286377 240467 63187 179194 178601 63311 312815 376592 240033 43855 266763 3...
result:
ok good job!
Test #18:
score: 0
Accepted
time: 528ms
memory: 170940kb
input:
500000 54262 108522 100000 150680 169780 208423 114492 398775 47217 58682 258733 452080 54148 451364 196867 75350 134397 51280 339529 475503 166592 224426 358444 423175 366761 49422 400504 398619 18773 429051 59685 291626 145365 261042 445752 234123 21931 318295 94503 388014 414710 346782 466751 205...
output:
418228 319507 256114 56650 439927 188819 62071 266908 180021 336198 290826 346178 325637 84245 264848 454568 334831 364744 45752 383178 91406 408019 416298 293395 489192 312298 63595 64429 345094 46016 185429 459856 393960 19494 221196 99388 348876 179058 346799 91751 103528 367460 71206 450663 1905...
result:
ok good job!
Test #19:
score: 0
Accepted
time: 561ms
memory: 171140kb
input:
500000 81364 162726 100000 321857 75911 117294 148668 322025 103777 419430 187082 374875 230927 338513 433399 305556 363405 457801 70917 297078 386374 322110 76493 189187 21851 453679 296595 389232 386129 310835 432013 450769 74142 284176 90713 430145 142503 212302 384600 157386 490862 201498 415387...
output:
241513 168813 448633 172697 392538 271369 6603 174161 123447 492038 435481 81624 3703 239157 115955 271959 381923 364637 50435 109677 303049 186565 192439 288382 460814 428726 329011 487528 487793 415689 477758 465373 482703 453732 163253 69535 215760 269759 15254 160499 412350 195243 298037 163743 ...
result:
ok good job!
Test #20:
score: 0
Accepted
time: 554ms
memory: 179244kb
input:
500000 84343 168684 100000 92159 3025 19095 171545 269452 230103 428411 105653 130154 107687 352956 242321 444883 277419 59579 326919 4318 292812 326242 108917 253600 261383 320680 353469 283662 437811 470379 170617 46289 454830 253014 4165 381169 328908 493243 143442 265851 59330 347945 264421 2460...
output:
158645 59501 79152 384672 425765 479100 432165 180790 361836 211893 149573 182735 9160 442222 264983 376431 223092 106122 142324 189587 324249 482483 275508 194474 288086 249607 177928 394047 42907 433957 471110 38002 431850 406539 181788 85700 414963 183470 439659 276412 311221 88173 14420 439171 2...
result:
ok good job!
Test #21:
score: 0
Accepted
time: 530ms
memory: 173300kb
input:
500000 88757 177512 100000 445069 77200 391318 333565 435416 362966 141662 45522 355791 256039 214614 450379 170016 467327 282215 243533 183175 463770 163579 461662 317411 261187 253905 468654 231023 3749 90566 45210 343865 165800 136852 383910 367984 413623 325053 41177 298566 351228 15540 262375 2...
output:
324663 125620 387542 459211 303744 61810 68343 129500 267925 483622 193714 186295 392762 72650 254574 272861 7810 392193 454901 84925 471750 161740 205711 270727 378356 23153 65338 424152 21059 17216 417862 34966 407113 113186 5640 237846 10804 491627 205345 212517 152306 439831 348141 349714 451110...
result:
ok good job!
Test #22:
score: 0
Accepted
time: 554ms
memory: 174776kb
input:
500000 96344 192686 100000 195205 422258 407338 9779 476600 35329 336839 237680 366318 378932 386654 353800 118734 312717 156858 133692 72221 189109 391324 145763 38629 330117 404936 68820 255606 431020 392503 176884 178395 275064 488090 130311 314587 217628 462496 28966 425413 116762 437176 468713 ...
output:
408744 460941 473526 17026 206497 290915 308200 394760 35426 390338 340346 277629 174638 459187 129906 309076 309264 3187 259702 468605 485224 311961 282541 341731 9280 324346 388318 28864 359140 366802 201324 177377 393014 216929 121812 219524 499768 454995 460258 10415 38165 77557 321837 234227 42...
result:
ok good job!
Test #23:
score: 0
Accepted
time: 508ms
memory: 171100kb
input:
500000 62967 125932 100000 228958 294130 161634 80333 361275 345422 393334 286611 311452 453264 275215 289266 452502 447517 458518 295775 420774 426985 410788 79249 309720 61573 250760 5587 481312 161015 303445 8961 463259 24340 331413 237498 488929 475822 425952 251105 487129 230062 368282 264038 1...
output:
241585 249658 148161 291435 309762 212790 453994 155339 226161 101036 295285 6865 110415 21283 105450 202362 496695 50186 495450 396175 259749 117379 228713 170968 80941 397827 123805 325901 23616 215309 460310 191901 318739 271903 387139 131561 236993 343386 266304 169169 2451 452137 352656 51681 2...
result:
ok good job!
Test #24:
score: 0
Accepted
time: 569ms
memory: 176024kb
input:
500000 94830 189658 100000 104237 453576 334546 43320 88991 174623 80118 405142 341990 225030 164655 136865 106241 208562 67332 289772 379828 245569 190369 136859 196296 376390 298773 202031 129266 220643 477229 76909 267607 412545 178338 100575 280161 390719 280691 294766 490870 175723 312546 47683...
output:
77461 337115 87262 422003 194839 367501 476129 273442 9238 375341 202395 420525 420091 385305 134356 14574 499705 51691 362855 275194 415260 290194 146085 343335 463380 499233 304635 102875 427973 71264 354576 447364 58622 481360 140670 32375 91953 182406 20326 374204 374912 383928 141577 389116 103...
result:
ok good job!
Subtask #3:
score: 19
Accepted
Test #25:
score: 19
Accepted
time: 487ms
memory: 188216kb
input:
500000 200 199 40000 76296 130139 291501 292412 139543 433345 372726 451574 18315 465578 324564 477223 237354 81532 65170 465332 342130 9670 193303 193680 129668 149532 268907 89969 398275 356210 324593 433492 482232 466692 135343 433758 102545 287283 432859 351864 305769 489532 101532 450535 295762...
output:
12225 329473 124294 112780 478338 445039 249189 32330 65783 179054 497476 452979 319006 30813 48206 427935 466790 486377 109196 200837 164218 45188 487722 282259 229713 367076 188057 187010 232559 151913 348461 116954 20242 322713 185020 157495 443679 326708 325415 391214 266949 457474 3735 299220 2...
result:
ok good job!
Test #26:
score: 0
Accepted
time: 497ms
memory: 190524kb
input:
500000 200 199 40000 83785 150667 304961 267635 97760 385201 77226 6522 352645 72592 427133 30755 100574 359648 403948 394809 425453 115868 11287 351385 494434 245106 58157 395180 326236 277135 359592 13569 76251 45366 172378 122783 216597 466130 284420 342613 471698 380682 92490 79264 241049 54038 ...
output:
455890 309275 63656 335800 292806 9763 489623 63346 86191 446791 183068 362736 197911 107095 211424 101597 145440 202553 8696 425553 151090 60540 369501 412878 462364 222 148686 133609 158102 107714 270626 112101 244973 133381 421561 462192 28928 193698 101629 183699 205161 304190 364442 409432 4207...
result:
ok good job!
Test #27:
score: 0
Accepted
time: 348ms
memory: 133588kb
input:
500000 200 199 40000 94863 498513 460682 411416 360517 309831 253717 325019 496632 255803 130770 289206 181204 74729 481723 293737 94126 307214 342974 448321 17084 433126 387809 279606 251781 65795 125269 129465 433572 219622 11806 179248 367117 84640 114067 122590 4140 116015 77759 392439 408930 10...
output:
266156 61142 385289 312819 343625 399079 330638 41394 140033 85100 3416 226021 368005 204388 478509 147683 184350 103373 4327 151883 476167 350980 179746 372648 445389 314574 425644 28361 284511 380102 238927 60348 83101 276509 135589 128184 29894 378344 475612 346881 26171 241504 253720 45130 33016...
result:
ok good job!
Test #28:
score: 0
Accepted
time: 351ms
memory: 132764kb
input:
500000 200 199 40000 460896 356428 214577 150748 16877 1635 258267 370689 262538 369939 466845 415822 304104 329494 6035 489031 48344 181107 61121 4048 156120 273134 234110 418870 101454 330401 45460 74853 175589 44170 192108 214802 482345 120910 76381 307448 204387 170471 187255 20694 494550 351800...
output:
310401 339466 264846 66690 356653 203418 457484 293896 386728 105590 212325 367309 18554 486639 177303 61363 188458 361394 93705 164324 197523 35203 472449 426578 342281 239585 496960 402184 400435 280409 208176 374293 369985 65666 459035 271099 294068 69031 337579 199672 220229 287262 473335 43085 ...
result:
ok good job!
Test #29:
score: 0
Accepted
time: 345ms
memory: 132124kb
input:
500000 200 199 40000 472275 149661 377034 488618 186507 171592 345983 124571 76807 5855 300138 80553 340257 185587 378146 311401 334561 194922 182638 104826 420776 448537 393232 195734 347470 219413 82586 185915 58528 404731 329285 300479 342445 115864 230618 360114 281628 86760 203158 212935 376440...
output:
146128 191383 294042 430962 202159 463665 112312 376940 199021 253802 460855 111161 333187 476575 395022 326423 218898 224068 490165 237385 215446 377494 415819 356081 1821 492760 323491 214333 417432 372679 286100 379852 89275 290923 154336 32146 333181 448395 76868 230071 138803 346133 141478 3902...
result:
ok good job!
Test #30:
score: 0
Accepted
time: 413ms
memory: 143452kb
input:
500000 200 199 40000 457235 436089 312892 490957 247950 207946 50653 437012 325088 141386 319878 207087 398253 383132 11996 402164 409233 443227 294400 242006 327126 10129 244769 232885 165818 291514 332036 352883 406737 63191 380159 208131 327008 61194 18237 223687 413010 160943 426911 162568 18875...
output:
344934 288089 92221 324681 216984 218315 199295 347120 451632 471908 59111 344342 215660 428847 94095 215631 77907 32762 348919 28797 264796 420506 368057 197133 444390 442114 128661 130574 186430 171959 175699 263007 82714 162872 274756 253370 288636 133689 63747 188874 82137 345501 147725 298436 1...
result:
ok good job!
Test #31:
score: 0
Accepted
time: 425ms
memory: 144256kb
input:
500000 200 199 40000 498222 451076 484997 74171 344510 119552 181399 378715 468521 103237 143923 10760 103036 353626 331913 232159 181090 14984 85005 467731 200014 74750 304897 488094 80862 428792 303440 325833 70112 301252 111208 109820 23216 97480 361786 424164 357979 22040 249278 329701 472798 13...
output:
166391 254190 454751 164279 300603 36999 339812 105753 356297 273309 338444 226857 117455 127032 337917 325652 446208 164862 73853 375860 413753 335517 108097 256699 242979 214740 226342 349604 147811 242991 318636 366333 448 111690 227542 380869 450735 215195 255021 318862 493856 284852 167822 4798...
result:
ok good job!
Test #32:
score: 0
Accepted
time: 419ms
memory: 146740kb
input:
500000 200 199 40000 235229 335906 185851 155252 476682 68595 44502 499901 403010 120212 365527 365904 165512 445297 44401 416812 282314 301556 484290 469265 250037 184042 387456 226812 371932 410610 263086 279108 442354 371814 37100 77190 202799 118817 250469 478086 307786 11617 132836 304380 25170...
output:
332719 438180 56551 203468 73105 158285 240655 143500 91566 464630 305703 98661 407474 362389 468098 249529 258607 225315 143280 258456 288358 294845 120530 466863 133919 325213 277317 225849 88336 408763 266100 420741 472255 5977 276006 298529 453506 381109 345805 16937 256977 326639 253304 262239 ...
result:
ok good job!
Test #33:
score: 0
Accepted
time: 372ms
memory: 142484kb
input:
500000 200 199 40000 27113 326978 70968 474916 390195 217639 467929 292659 58323 454399 169213 185253 114409 287912 251420 281315 94695 326310 237316 424237 79688 285918 43312 65978 450176 255930 425562 242907 198847 77977 135410 122795 349710 416624 428899 314932 135513 464911 286182 28508 268649 1...
output:
179165 69497 356406 247680 179958 188230 359887 219946 119456 157369 299255 239717 118039 116013 448796 234479 91584 129084 458786 412347 2665 59302 126076 381382 374494 456342 74557 128937 432196 74363 92614 156418 30711 417053 34272 220608 17960 355043 451162 178097 421647 282903 215339 183708 150...
result:
ok good job!
Test #34:
score: 0
Accepted
time: 381ms
memory: 143312kb
input:
500000 200 199 40000 158367 3349 98725 462635 71709 384166 328253 132679 334131 433401 352051 9045 188775 366068 218093 90403 193264 359869 432442 263881 154277 470908 470355 200679 36628 399310 359036 163322 404722 42891 12614 147023 421373 479199 71619 182994 443724 120532 217367 134309 221302 310...
output:
453590 316805 229898 314645 489684 16320 65412 403897 332656 241823 327627 428066 35214 406099 365594 30131 336148 388605 287002 373600 297185 316511 344417 127697 328633 413278 50683 166673 135632 353590 184569 397775 379505 149462 369623 414490 163877 22307 218826 456005 3509 117241 27679 382963 2...
result:
ok good job!
Test #35:
score: 0
Accepted
time: 372ms
memory: 145196kb
input:
500000 200 199 40000 487441 36354 395955 6882 385179 368092 7896 377902 329818 287628 224290 27427 439352 326593 43030 180557 361665 163 8128 233496 22632 367138 126510 64436 351877 190302 145137 17783 209795 411209 255585 72497 161599 407307 216969 128706 67358 261184 268088 304573 63115 386332 827...
output:
312084 228787 224146 291802 417671 486243 318511 413195 155730 105658 105519 23243 434254 485685 355585 316903 125863 314269 243979 6348 33542 333951 474975 468932 306068 368333 279269 31808 321709 297537 417763 394768 148867 418189 230386 24805 272093 142562 343405 397948 124317 359088 480475 19174...
result:
ok good job!
Test #36:
score: 0
Accepted
time: 407ms
memory: 144416kb
input:
500000 200 199 40000 234051 59729 19849 414190 183195 238559 189881 256369 97803 379735 363604 391055 490274 186114 46653 230044 14075 437112 279313 141334 478372 146753 310018 305921 464449 475813 132149 290804 21707 51493 249658 15019 151386 494305 468781 444714 318658 179510 283604 351846 110675 ...
output:
309977 478501 170618 485112 491885 213915 394646 219445 267180 77714 372248 359398 99823 191613 116459 147237 123166 263941 263679 368057 488904 122159 334212 155451 55027 74210 39603 58771 71162 245708 122588 145327 174099 341522 21011 318333 465841 232294 113243 473675 249560 423032 201669 174245 ...
result:
ok good job!
Subtask #4:
score: 22
Accepted
Test #37:
score: 22
Accepted
time: 1296ms
memory: 265148kb
input:
1000000 1000 999 100000 678746 439069 32542 85937 936926 284219 461661 203235 533462 940676 230275 621140 780674 254931 562355 229273 201341 493976 358955 963527 880412 91220 474599 160086 698841 591551 718276 844558 39859 765917 34722 401724 219774 443004 682244 545401 968419 968020 354030 411187 1...
output:
927453 737189 653885 840772 346403 780854 103601 49131 439139 486132 820231 177271 826206 982104 499097 409243 194435 293457 172618 662161 236859 473531 81188 533335 712368 462084 777243 239386 911529 829354 62098 492333 390487 523069 358162 163042 451543 653539 717744 885154 584533 11086 661366 952...
result:
ok good job!
Test #38:
score: 0
Accepted
time: 1284ms
memory: 265512kb
input:
1000000 1000 999 100000 530144 36744 762893 712555 181981 816257 634992 419372 362279 817260 80801 697008 163211 900947 207310 862766 871091 388529 304808 574011 609949 509094 682125 781230 431445 517909 578411 288003 874415 410542 327673 607230 278208 956997 60166 842448 708661 562761 996349 382922...
output:
70930 162711 104847 600658 547594 219142 447597 811056 140247 502224 659605 421892 389493 152949 636421 692108 137214 372169 804489 399568 586198 152111 43257 899797 878142 278025 996438 364577 750352 580921 589621 139136 802259 100210 987920 563289 985356 224651 422771 630597 972354 915562 97459 56...
result:
ok good job!
Test #39:
score: 0
Accepted
time: 813ms
memory: 157972kb
input:
1000000 1000 999 100000 184414 849676 938006 927343 390133 327580 229110 507237 712311 8816 414520 114671 637641 82050 586607 523821 775429 139792 129360 175687 202474 801377 53523 281419 268534 488983 371227 294280 754555 448802 474939 391153 68307 762784 972243 245396 471656 982894 891252 945526 5...
output:
799182 945626 721294 95621 400281 952258 313475 106882 100346 259609 762094 251796 406474 883995 734541 649964 610088 303768 523225 196702 261897 899266 994489 90733 904599 842390 96559 482577 575100 359235 574627 790102 100039 201217 106958 652608 876354 674545 889183 177833 402843 135849 113886 44...
result:
ok good job!
Test #40:
score: 0
Accepted
time: 803ms
memory: 157896kb
input:
1000000 1000 999 100000 279950 249721 597292 449885 16559 173928 771422 461514 392390 935006 401814 270115 877076 38286 665465 238399 632929 179581 685305 910549 211998 608701 352060 872741 888320 701449 144650 551823 899287 53420 994085 608934 941044 730655 818001 379877 176374 592364 165476 704855...
output:
716960 371877 587680 832792 716879 377365 244305 732894 671523 8280 444452 863876 611053 762719 607144 394569 993924 828258 398551 979874 879446 937670 305669 295612 710037 327463 274826 237521 637481 395551 703629 768694 29686 423982 174776 395670 986512 678914 280912 53470 393318 740035 453736 193...
result:
ok good job!
Test #41:
score: 0
Accepted
time: 855ms
memory: 161900kb
input:
1000000 1000 999 100000 20291 14699 561360 480484 286821 851537 642046 340254 362763 85475 567413 791788 145352 893579 253840 568256 281056 600506 834619 722257 570033 739505 158527 142792 475867 834583 85573 692242 107763 238427 749609 945275 238413 468714 75532 903433 452471 189579 134021 196949 2...
output:
458817 987845 600031 669584 394869 639088 329832 645816 335657 300124 79145 78540 697443 412093 283754 769748 548329 416435 872312 326489 358839 94097 121730 521022 758622 319329 351470 90 901791 410892 225546 420662 186697 843814 912528 408477 161613 762933 154119 901323 816212 680938 429610 538759...
result:
ok good job!
Test #42:
score: 0
Accepted
time: 1018ms
memory: 184784kb
input:
1000000 1000 999 100000 79586 680985 105418 485822 250996 367398 927624 781485 911744 133593 352104 588258 914821 421528 538901 315958 275633 856427 5509 935195 913751 92920 619111 848814 663965 45219 344279 165968 865619 154854 900710 774023 872807 340764 497215 631438 911663 879056 918477 890010 3...
output:
604066 224629 728976 687966 487632 870872 689770 233912 246763 714074 84247 84008 908770 370861 198150 400448 817590 930328 548863 856125 20649 268507 451947 19404 830294 482236 209825 889391 649320 688291 519650 570622 132752 764467 667224 933628 550198 196231 509719 207861 177229 238881 950071 887...
result:
ok good job!
Test #43:
score: 0
Accepted
time: 977ms
memory: 186352kb
input:
1000000 1000 999 100000 864268 381722 137834 585983 418961 493735 111546 74594 3531 508504 383125 609419 708077 928352 762197 141167 174341 418962 107812 631708 84967 770802 568509 276991 376328 909246 85244 453348 203444 298108 478742 824330 149959 297025 840543 296938 691263 894733 491791 319919 8...
output:
177673 436365 828674 312866 749791 328601 100623 621764 775412 487457 433833 559323 117961 93995 587806 44434 110787 797998 191918 470542 948966 512803 658277 786013 831445 660817 719563 292491 130026 341355 19172 318278 355277 610129 911600 27560 965859 524339 297638 45280 509491 964806 283180 1962...
result:
ok good job!
Test #44:
score: 0
Accepted
time: 975ms
memory: 185740kb
input:
1000000 1000 999 100000 845169 885017 493118 865999 3330 999692 653381 608408 419452 799529 98306 295418 755923 442503 85146 52116 980435 452773 633069 998249 788034 527181 418057 380217 158464 23015 364569 275325 675030 381121 889352 891866 203541 14657 69958 428476 4927 853670 908949 664221 936648...
output:
143052 247487 452229 525320 203052 196903 159973 414557 432698 225313 725764 878920 171955 343546 218405 133728 234254 54820 543708 87972 227869 267685 729152 352391 272337 508955 580348 791853 445644 48591 997630 496466 237874 680582 530030 955505 123362 948578 202430 527732 951595 797764 646214 35...
result:
ok good job!
Test #45:
score: 0
Accepted
time: 900ms
memory: 181232kb
input:
1000000 1000 999 100000 582602 618937 427880 217239 896256 608317 42018 91716 145269 277504 94008 601157 503365 892936 294525 477654 286441 721652 14541 805171 315688 615193 950960 232416 430226 299443 690527 317106 303199 277200 283069 268869 650167 725195 788623 817992 647261 671722 426903 453937 ...
output:
907968 494445 485194 979771 262012 334613 678872 825069 526434 996365 764555 755509 345289 166068 740719 861421 40691 38326 753375 906238 316567 206554 562518 178778 258456 949123 238830 649372 799958 698302 908584 230501 538308 241913 368165 636988 348721 135276 348976 341806 539036 563527 463253 8...
result:
ok good job!
Test #46:
score: 0
Accepted
time: 908ms
memory: 181996kb
input:
1000000 1000 999 100000 761086 125560 807519 496861 197173 671162 286468 361527 420830 337089 99902 928320 527383 162932 540385 255275 952224 668471 897966 186547 575192 315130 399856 441499 876295 462690 556218 167574 711101 146911 914260 296451 432034 722939 27102 687771 200204 636114 525983 59197...
output:
161395 489401 237220 751718 348617 924437 841840 898391 423147 642597 773420 213772 569767 988356 919222 452126 970293 792492 561138 100984 438841 838351 270258 797813 731064 340916 299783 774380 372148 323244 906344 298689 716548 148011 493423 163029 33621 770869 323167 721196 442337 697697 108369 ...
result:
ok good job!
Test #47:
score: 0
Accepted
time: 890ms
memory: 181776kb
input:
1000000 1000 999 100000 700422 705984 742655 297368 991331 273447 971924 235042 288410 226105 751213 71757 552545 234328 777224 460184 747354 483278 77275 960232 145343 677496 979573 598317 294693 762557 214101 155814 368037 345816 214266 272277 6667 461234 109578 330628 355557 16281 696921 633114 6...
output:
725841 908453 926179 698316 580159 731370 623446 290164 59619 498664 390844 952244 323513 335290 488037 423751 729518 358122 471437 743113 31529 827796 700142 413064 504287 385290 77963 888248 812682 421000 273659 534098 86145 270760 445847 408221 320084 349091 993066 894248 370766 860812 601194 723...
result:
ok good job!
Test #48:
score: 0
Accepted
time: 889ms
memory: 181060kb
input:
1000000 1000 999 100000 294979 912636 954626 984835 432393 676651 323592 496950 442003 287176 988897 310588 517194 868410 42913 165122 231552 13998 103334 502710 396538 590023 630061 530055 980426 628250 446184 451072 276133 424200 328584 26687 392134 766381 197139 174221 564083 149136 481705 457343...
output:
200644 598135 741798 826377 238968 202380 706160 187471 853507 368983 495980 214567 403294 199755 797292 311457 833081 246579 684006 820974 631312 774420 691790 496829 317182 807315 368076 931861 810984 798602 145998 777928 917238 465283 588104 990530 599185 132592 821002 312473 884205 28019 880299 ...
result:
ok good job!
Subtask #5:
score: 24
Accepted
Dependency #4:
100%
Accepted
Test #49:
score: 24
Accepted
time: 1387ms
memory: 316732kb
input:
1000000 91074 91073 100000 844855 360256 604500 520288 3402 603913 199722 732526 574997 429775 182518 190073 386932 693624 254661 333433 557929 350362 247817 201441 960948 519977 461212 493412 852908 455639 732827 432452 320916 223796 413293 969300 617038 438432 2369 51283 908991 374139 410798 19612...
output:
104349 170744 322298 943785 796710 500874 79937 976772 191057 27689 906009 603418 442795 561154 796064 292228 504787 249824 525843 435036 271618 183442 461251 6332 765553 582250 226179 860734 445334 729051 457570 772087 147634 119269 85940 899087 838934 714547 249430 419834 488759 535606 70064 74100...
result:
ok good job!
Test #50:
score: 0
Accepted
time: 1408ms
memory: 317920kb
input:
1000000 85406 85405 100000 243967 952129 483179 427670 241063 673465 936850 819488 932267 432087 168570 75516 427761 708350 579841 56944 327580 291932 619630 977053 424711 862203 360360 723933 64552 550800 399697 549936 425473 413499 431310 248361 149311 199196 247552 227202 676100 694069 347994 988...
output:
600691 665700 394186 920033 67110 282228 422563 424839 65617 886450 197532 463926 711771 581926 743376 860065 363944 619369 548813 448810 333494 514122 109376 269392 289634 194364 244306 322851 208595 223144 694693 3079 572346 25709 765912 66723 337394 544324 945673 108504 78758 851948 167958 84801 ...
result:
ok good job!
Test #51:
score: 0
Accepted
time: 924ms
memory: 206844kb
input:
1000000 62028 62027 100000 354774 944572 228278 449941 359325 57969 43031 616490 898916 61312 768136 892022 42765 227563 373737 241400 671641 155600 137082 803792 95473 30579 438130 496747 204238 57940 100124 47370 141803 745731 687568 952816 518284 677981 803613 28392 918299 517226 69867 69501 8590...
output:
576549 79839 682387 67288 695652 240501 383541 1263 977286 923722 60474 970768 894010 316340 318869 11468 452833 804029 273593 728998 591891 855786 710841 652989 729759 457370 28430 295268 227928 740544 206377 480310 984428 907263 861652 493606 874433 297089 864786 321292 585874 947711 129629 312989...
result:
ok good job!
Test #52:
score: 0
Accepted
time: 959ms
memory: 209388kb
input:
1000000 97415 97414 100000 453981 477203 689925 857434 241949 91494 993077 34954 605245 874902 893112 881129 576016 404784 870963 602740 1572 569897 624684 792962 189914 558522 191463 49120 326617 360379 162970 903046 277880 985508 419832 756246 978897 958038 74713 370260 67182 710992 829080 535448 ...
output:
639955 623008 181416 583539 84955 213855 315069 702086 693953 981980 967099 16749 615089 298064 953970 711434 174282 977178 391337 613902 566970 100565 740839 559891 337230 233444 240382 149326 548425 777752 52711 883749 641555 425084 834781 794626 981372 281903 634382 953075 514234 378710 772421 67...
result:
ok good job!
Test #53:
score: 0
Accepted
time: 901ms
memory: 207968kb
input:
1000000 54975 54974 100000 96952 319199 205229 785476 392425 909864 205985 81504 109636 164519 589106 373513 308062 898520 41603 88922 939415 189814 67267 237546 983306 247777 949797 339161 315551 248540 137128 344060 336465 199815 730843 44931 403415 657739 689755 660391 67077 940902 804294 104482 ...
output:
378982 883846 826985 918037 725415 220853 407019 237259 910844 694333 111095 808995 978051 355296 299321 386865 512827 607054 538312 470265 864861 567031 972519 334946 782556 455288 776034 948378 195937 487715 775650 878578 344805 329071 303811 351324 59573 314196 803689 556007 18051 210138 596917 9...
result:
ok good job!
Test #54:
score: 0
Accepted
time: 1171ms
memory: 232636kb
input:
1000000 93603 93602 100000 590581 384770 986471 380567 941542 676443 800265 713198 618948 485196 793122 992449 102071 504074 882555 246256 810300 783699 191498 938198 981235 862324 82689 856318 830003 553359 194501 448504 13262 81426 659762 358904 334920 884736 624654 360241 520224 491932 756589 684...
output:
767048 668375 298554 166481 720603 341375 783804 250392 346601 645839 289440 225282 56690 576042 7400 875734 553398 407168 105808 250061 269892 53497 364227 691463 229440 325054 661834 267612 338697 470215 223522 443596 915525 175799 252193 329165 545314 769136 182450 922988 772871 605695 69983 1897...
result:
ok good job!
Test #55:
score: 0
Accepted
time: 1090ms
memory: 231968kb
input:
1000000 56476 56475 100000 321806 617064 56801 469913 349501 226853 982685 953768 950260 773865 850920 494648 347845 472357 967459 307312 410773 669459 406948 398239 680315 58721 209614 422608 265050 904778 804303 548987 718504 941419 213137 647451 595973 781907 716699 248913 465529 100816 289739 43...
output:
504690 182337 459216 858681 712099 517053 457893 59626 117042 581454 37385 721001 736869 896328 370343 383213 340198 608043 787422 491289 633098 731064 620872 261765 629049 230721 501288 339580 550050 858273 931098 31059 35456 487395 312762 535719 71340 349962 637039 369046 673271 950627 112280 3870...
result:
ok good job!
Test #56:
score: 0
Accepted
time: 1126ms
memory: 231704kb
input:
1000000 77761 77760 100000 102141 89521 32208 995357 946428 638388 994079 200096 759506 415117 989818 157285 145299 619468 947456 343707 49714 479293 934090 399241 209616 459583 232400 34280 269169 429394 513182 447184 603 473746 92149 723284 310077 518197 800474 506674 796719 151664 380675 374791 4...
output:
631501 316089 923381 651551 698444 624464 348551 793328 394432 557510 663679 665334 780238 327691 676922 66776 949720 780351 574844 859386 584782 780492 144454 375492 117378 462918 71931 492054 623077 64226 583679 997698 557654 960950 842457 90669 305541 188156 463560 692681 465253 72650 329876 5197...
result:
ok good job!
Test #57:
score: 0
Accepted
time: 1039ms
memory: 226484kb
input:
1000000 74966 74965 100000 683534 239091 842267 16017 468005 568280 573610 693011 161069 706082 795227 151601 934006 479774 513858 109101 851525 331377 875016 70381 299813 706417 753015 505672 720335 650876 915187 738727 132896 784656 425639 867644 376143 733308 245383 783527 550113 526907 856694 48...
output:
607340 699593 753359 324338 275046 697318 229486 34919 776658 364253 395028 950963 749385 735331 75021 80474 371766 122580 356572 464608 395816 983007 575467 850033 794152 620724 929438 125324 324692 872419 401341 188995 182919 147795 142658 94836 520835 403802 664711 307203 677315 749256 831440 827...
result:
ok good job!
Test #58:
score: 0
Accepted
time: 1016ms
memory: 225836kb
input:
1000000 65730 65729 100000 389535 782666 938044 721678 849220 701060 181030 52406 234247 790969 174777 437888 55263 195566 435426 928800 69026 168462 766751 672961 454375 175149 710125 383627 736135 711434 433482 836973 541367 953192 986804 693441 444489 287176 517890 131648 879596 119420 264712 351...
output:
106777 765706 32016 63932 415693 628728 136871 793478 675595 224174 961477 89437 743582 213477 910453 553978 650492 619422 341908 869361 191508 125268 729176 416699 4485 495892 479346 370737 292368 75956 977648 667557 465458 884891 115644 233583 912814 546094 404974 386189 157050 463189 10262 824965...
result:
ok good job!
Test #59:
score: 0
Accepted
time: 1046ms
memory: 227748kb
input:
1000000 65817 65816 100000 51488 844164 68841 411983 904138 407472 718044 583532 651150 806564 830599 283691 887913 521795 183797 959816 140200 768090 936924 842275 478523 522794 333465 184430 825549 711686 617264 901453 971141 487698 621032 169621 843824 122780 528194 237041 140546 980298 46138 984...
output:
759077 662801 53208 916852 383121 243286 254722 43606 631306 201514 667532 906036 875630 545386 254150 700578 817755 292163 458611 632039 477899 58731 230519 258359 581766 779716 390967 934930 717691 321560 343941 66575 912775 298062 462996 538223 787911 154722 559956 915887 138076 896105 386713 838...
result:
ok good job!
Test #60:
score: 0
Accepted
time: 1075ms
memory: 227336kb
input:
1000000 84524 84523 100000 518841 510059 160070 674927 130615 180721 695363 700479 501744 933738 820766 543469 600830 488190 995734 515877 169413 488120 455582 27902 410480 323699 99289 522373 351735 903291 250384 153 678098 186046 396071 639296 608479 651025 672719 494101 85372 331436 954731 79292 ...
output:
653593 214753 836608 42235 620909 81396 93546 190817 477410 388054 655816 527371 698238 550839 200772 511631 842819 131418 5170 384606 389972 752225 754994 875043 819385 86021 201521 910521 893899 546202 25475 171903 487637 482473 121751 173270 197648 634105 666628 671059 594918 732824 685606 222602...
result:
ok good job!
Extra Test:
score: 0
Extra Test Passed