QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#208192 | #5029. 在路上 | hos_lyric# | 40 | 819ms | 49436kb | C++14 | 6.6kb | 2023-10-09 09:59:42 | 2024-07-04 02:17:26 |
Judging History
answer
#include "path.h"
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
#include <random>
int centroid(int ID, int N, int M) {
mt19937_64 rng;
if (ID == 1 || ID == 3 || ID == 5) {
int l = 0, r = N;
vector<int> us(N);
for (int u = 1; u <= N; ++u) us[u - 1] = u;
for (; ; ) {
assert(l <= N / 2); assert(N / 2 < r);
auto sayuu = [&](int &s, int &t) -> void {
if (0 < l) {
const int res = ask(us[0], s, t);
if (res == s) {
//
} else if (res == t) {
swap(s, t);
} else {
assert(false);
}
} else if (r < N) {
const int res = ask(s, t, us[N - 1]);
if (res == s) {
swap(s, t);
} else if (res == t) {
//
} else {
assert(false);
}
} else {
//
}
};
if (r - l == 1) {
return us[N/2];
} else if (r - l == 2) {
assert(0 < l || r < N);
sayuu(us[l], us[l + 1]);
return us[N/2];
} else {
int s, t;
for (; ; ) {
s = us[l + rng() % (r - l)];
t = us[l + rng() % (r - l)];
if (s != t) break;
}
sayuu(s, t);
vector<int> vss[3];
for (int j = l; j < r; ++j) {
const int u = us[j];
if (s != u && t != u) {
const int res = ask(s, t, u);
if (res == s) {
vss[0].push_back(u);
} else if (res == t) {
vss[2].push_back(u);
} else if (res == u) {
vss[1].push_back(u);
} else {
assert(false);
}
}
}
int pos = l;
for (const int v : vss[0]) us[pos++] = v;
const int posS = pos; us[pos++] = s;
for (const int v : vss[1]) us[pos++] = v;
const int posT = pos; us[pos++] = t;
for (const int v : vss[2]) us[pos++] = v;
assert(pos == r);
const int cuts[6] = {l, posS, posS + 1, posT, posT + 1, r};
for (int k = 0; k < 6; ++k) {
assert(k < 5);
if (cuts[k] <= N/2 && N/2 < cuts[k + 1]) {
l = cuts[k];
r = cuts[k + 1];
break;
}
}
}
}
} else {
vector<int> sz(N + 1, 0);
for (int u = 1; u <= N; ++u) sz[u] = 1;
vector<int> us(N);
for (int u = 1; u <= N; ++u) us[u - 1] = u;
for (; ; ) {
// cerr<<"sz = "<<sz<<", us = "<<us<<endl;
assert(us.size() >= 2);
int s, t;
for (; ; ) {
s = us[rng() % us.size()];
t = us[rng() % us.size()];
if (s != t) break;
}
vector<int> uss[4];
for (const int u : us) if (s != u && t != u) {
const int res = ask(s, t, u);
uss[(res == s) ? 0 : (res == u) ? 1 : (res == t) ? 2 : 3].push_back(u);
}
int sums[4] = {};
for (int k = 0; k < 4; ++k) for (const int u : uss[k]) sums[k] += sz[u];
// cerr<<" s = "<<s<<", t = "<<t<<endl;
// cerr<<" uss = ";pv(uss,uss+4);
// cerr<<" sums = ";pv(sums,sums+4);
if (sums[0] > N/2) {
sz[s] += (sz[t] + sums[1] + sums[2] + sums[3]);
us = uss[0];
us.push_back(s);
} else if (sums[2] > N/2) {
sz[t] += (sz[s] + sums[0] + sums[1] + sums[3]);
us = uss[2];
us.push_back(t);
} else {
// TODO: ternary?
sort(uss[1].begin(), uss[1].end(), [&](int u, int v) -> bool {
return (ask(s, u, v) == u);
});
// !
uss[1].insert(uss[1].begin(), s);
uss[1].push_back(t);
const int len1 = uss[1].size();
vector<vector<int>> vss(len1);
for (const int v : uss[3]) {
int lo = 1, hi = len1 - 1;
for (; lo + 1 < hi; ) {
const int midL = lo + (hi - lo + 2) / 3;
const int midR = hi - (hi - lo + 2) / 3;
assert(lo < midL); assert(midL <= midR); assert(midR < hi);
const int res = ask(uss[1][midL - 1], uss[1][midR], v);
if (res == uss[1][midL - 1]) {
hi = midL;
} else if (res == 0) {
lo = midL;
hi = midR;
} else if (res == uss[1][midR]) {
lo = midR;
} else {
assert(false);
}
}
vss[lo].push_back(v);
}
// cerr<<" uss[1] = "<<uss[1]<<", vss = "<<vss<<endl;
vector<int> fs(len1, 0), gs(len1, 0);
vector<int> fsSum(len1 + 1, 0), gsSum(len1 + 1, 0);
for (int j = 0; j < len1; ++j) {
fs[j] = sz[uss[1][j]];
for (const int v : vss[j]) gs[j] += sz[v];
fsSum[j + 1] = fsSum[j] + fs[j];
gsSum[j + 1] = gsSum[j] + gs[j];
}
for (int j = 0; j < len1; ++j) {
int sumL = 0, sumR = 0;
sumL += sums[0];
sumL += fsSum[j];
sumL += gsSum[j];
sumR += sums[2];
sumR += (fsSum[len1] - fsSum[j + 1]);
sumR += (gsSum[len1] - gsSum[j + 1]);
if (sumL <= N/2 && sumR <= N/2) {
const int u = uss[1][j];
if (gs[j] <= N/2) {
return u;
} else {
sz[u] += (sumL + sumR);
us = vss[j];
us.push_back(u);
goto found;
}
}
}
assert(false);
found:{}
}
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 2
Accepted
Test #1:
score: 2
Accepted
time: 0ms
memory: 9956kb
input:
1 100 100 3 1 2 3 1 2 3 3 1 3 1 2 3 1 2 3 3 1 3 1 2 3 3 1 3 1 2 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 3 1 3 1 2 3 1 2 3 3 1 3 3 1 3 1 2 3 3 1 3 3 1 3 1 2 3 3 1 3 3 1 3 1 2 3 3 1 3 3 1 3 3 1 3 1 2 3 1 2 3 3 1 3 3 1 3 1 2 3 1 2 3 1 2 3 1 2 3 3 1 3 3 1 3 3 1 3 1 2 3 1 2 3 1 2 3 3 1 3 3 1 3 3 1 3 ...
result:
ok correct
Subtask #2:
score: 8
Accepted
Test #2:
score: 8
Accepted
time: 3ms
memory: 10336kb
input:
2 10 10000000 999 60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 104 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 12172kb
input:
2 10 10000000 999 60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 104 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 12068kb
input:
2 10 10000000 999 60 112 959 68 586 835 91 836 634 516 272 912 781 249 655 11 466 103 934 816 904 92 576 83 687 435 871 510 758 519 842 882 339 221 2 917 5 605 477 448 323 723 744 494 941 50 668 751 670 336 365 95 877 159 829 957 451 632 591 616 909 83 452 607 735 99 22 570 755 354 172 711 742 870 3...
result:
ok correct
Test #5:
score: 0
Accepted
time: 4ms
memory: 14020kb
input:
2 10 10000000 999 373 769 355 568 586 175 588 836 203 901 272 948 781 80 655 11 292 103 934 595 904 188 865 989 698 493 871 510 893 228 842 882 339 630 2 550 829 107 477 636 385 726 146 299 764 670 668 381 631 336 365 95 974 872 829 733 678 669 373 571 183 752 452 607 735 179 22 673 755 354 383 711 ...
result:
ok correct
Test #6:
score: 0
Accepted
time: 32ms
memory: 12116kb
input:
2 10 10000000 999 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 68...
result:
ok correct
Test #7:
score: 0
Accepted
time: 32ms
memory: 14020kb
input:
2 10 10000000 999 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 688 68...
result:
ok correct
Test #8:
score: 0
Accepted
time: 3ms
memory: 12108kb
input:
2 10 10000000 999 158 826 595 867 47 385 664 154 455 857 622 561 166 780 801 763 33 310 605 36 199 718 762 911 419 109 947 369 861 841 902 657 172 175 461 814 473 43 90 875 62 238 669 791 68 435 405 663 756 255 628 798 745 878 257 773 652 662 832 735 75 363 129 359 230 351 667 873 602 783 988 253 58...
result:
ok correct
Test #9:
score: 0
Accepted
time: 3ms
memory: 14332kb
input:
2 10 10000000 999 279 772 39 665 622 173 514 309 407 623 288 342 100 529 202 417 132 611 186 430 634 796 454 842 92 53 977 712 975 158 654 66 822 452 6 333 596 593 91 119 242 503 190 82 97 575 663 574 75 598 299 334 31 147 382 988 702 11 801 338 164 696 573 182 899 948 507 168 331 939 442 137 581 52...
result:
ok correct
Test #10:
score: 0
Accepted
time: 3ms
memory: 14124kb
input:
2 10 10000000 999 60 208 208 208 208 175 208 875 861 208 208 370 208 208 208 208 292 208 208 949 208 208 208 752 547 208 869 510 208 208 208 612 208 208 360 809 208 107 208 448 208 208 208 208 941 208 319 794 208 603 208 208 208 208 208 208 451 208 373 106 208 25 306 208 735 99 208 673 208 573 383 2...
result:
ok correct
Test #11:
score: 0
Accepted
time: 0ms
memory: 12052kb
input:
2 10 10000000 999 60 208 208 208 208 175 208 875 861 208 208 370 208 208 208 208 292 208 208 949 208 208 208 752 547 208 869 510 208 208 208 612 208 208 360 809 208 107 208 448 208 208 208 208 941 208 319 794 208 603 208 208 208 208 208 208 451 208 373 106 208 25 306 208 735 99 208 673 208 573 383 2...
result:
ok correct
Test #12:
score: 0
Accepted
time: 0ms
memory: 14032kb
input:
2 10 10000000 999 198 236 761 86 644 189 7 741 274 656 547 36 825 827 740 333 896 832 575 37 359 456 833 590 427 837 100 60 424 237 208 742 266 543 941 906 422 423 953 787 397 337 215 469 979 51 404 546 603 168 849 472 737 135 500 701 608 696 764 695 64 590 851 194 89 278 864 314 529 165 448 414 471...
result:
ok correct
Test #13:
score: 0
Accepted
time: 3ms
memory: 14020kb
input:
2 10 10000000 999 198 236 761 86 644 189 7 741 274 656 547 36 825 827 740 333 896 832 575 37 359 456 833 590 427 837 100 60 424 237 208 742 266 543 941 906 422 423 953 787 397 337 215 469 979 51 404 546 603 168 849 472 737 135 500 701 608 696 764 695 64 590 851 194 89 278 864 314 529 165 448 414 471...
result:
ok correct
Test #14:
score: 0
Accepted
time: 3ms
memory: 14032kb
input:
2 10 10000000 999 60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 338 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...
result:
ok correct
Test #15:
score: 0
Accepted
time: 3ms
memory: 12064kb
input:
2 10 10000000 999 60 112 98 509 586 175 588 875 861 516 920 370 781 249 999 649 292 308 934 949 437 92 506 752 547 866 869 510 984 228 991 612 202 630 360 809 56 107 566 448 940 726 146 299 941 50 319 794 670 603 365 492 728 872 829 942 451 632 373 106 909 25 306 995 735 99 568 673 75 573 383 407 56...
result:
ok correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 14152kb
input:
2 10 10000000 999 60 112 125 509 291 175 588 875 861 516 920 370 781 618 999 649 292 45 934 949 437 92 506 752 547 866 869 510 208 991 338 612 208 630 360 809 56 107 737 448 940 726 208 291 941 50 319 794 670 603 365 618 291 159 829 942 451 632 373 106 847 25 306 125 735 99 568 673 642 573 383 338 5...
result:
ok correct
Test #17:
score: 0
Accepted
time: 0ms
memory: 14116kb
input:
2 10 10000000 999 60 112 338 509 847 175 588 875 861 516 920 370 781 249 999 649 292 618 934 949 437 92 506 752 547 866 869 510 125 291 515 612 737 630 360 809 56 107 208 448 940 726 515 338 941 50 319 794 670 603 365 125 125 515 829 942 451 632 373 106 902 25 306 515 735 99 568 673 907 573 383 291 ...
result:
ok correct
Test #18:
score: 0
Accepted
time: 0ms
memory: 12032kb
input:
2 10 10000000 999 60 736 736 736 736 175 736 875 861 736 736 370 736 736 736 736 292 736 736 949 736 736 736 752 547 736 869 510 736 736 736 612 736 736 360 809 736 107 736 448 736 736 736 736 941 736 319 794 736 603 736 736 736 736 736 736 451 736 373 106 736 25 306 736 735 99 736 673 736 573 383 7...
result:
ok correct
Test #19:
score: 0
Accepted
time: 3ms
memory: 14076kb
input:
2 10 10000000 999 60 736 736 736 736 175 736 875 861 736 736 370 736 736 736 736 292 736 736 949 736 736 736 752 547 736 869 510 736 736 736 612 736 736 360 809 736 107 736 448 736 736 736 736 941 736 319 794 736 603 736 736 736 736 736 736 451 736 373 106 736 25 306 736 735 99 736 673 736 573 383 7...
result:
ok correct
Test #20:
score: 0
Accepted
time: 3ms
memory: 12320kb
input:
2 10 10000000 999 60 825 542 207 182 175 71 875 861 275 642 370 725 600 184 242 292 978 56 949 189 839 896 752 547 479 869 510 328 592 288 612 373 975 360 809 317 107 642 448 822 742 200 947 941 614 319 794 580 603 473 760 89 872 342 160 451 326 373 106 488 25 306 39 735 99 533 673 94 573 383 473 56...
result:
ok correct
Test #21:
score: 0
Accepted
time: 3ms
memory: 12048kb
input:
2 10 10000000 999 60 702 344 961 410 175 657 875 861 502 500 370 194 97 850 849 292 681 289 949 574 375 233 752 547 708 869 510 457 80 683 612 752 653 360 809 64 107 127 448 941 704 685 448 941 535 319 794 945 603 901 318 460 388 672 460 451 946 373 106 10 25 306 318 735 99 502 673 304 573 383 227 5...
result:
ok correct
Subtask #3:
score: 12
Accepted
Test #22:
score: 12
Accepted
time: 7ms
memory: 12040kb
input:
3 100 10000000 999 328 852 537 953 554 506 483 192 443 912 989 346 935 232 652 528 261 899 131 531 81 686 815 543 991 810 576 639 670 572 604 842 546 322 916 97 510 160 238 696 882 214 212 194 102 964 719 255 416 260 687 148 225 664 105 100 913 600 921 203 571 406 752 189 929 716 523 809 666 589 235...
result:
ok correct
Test #23:
score: 0
Accepted
time: 10ms
memory: 12112kb
input:
3 100 10000000 999 603 168 694 35 890 839 431 506 172 225 322 14 231 221 387 802 768 786 858 954 214 929 553 795 917 554 453 983 112 196 5 428 421 149 960 294 875 380 900 914 135 141 398 480 716 377 693 832 582 629 59 975 998 513 351 193 293 328 677 96 338 39 569 236 243 849 254 418 877 413 7 675 69...
result:
ok correct
Test #24:
score: 0
Accepted
time: 6ms
memory: 11996kb
input:
3 100 10000000 999 232 191 603 626 730 411 104 65 39 494 691 185 208 192 567 818 210 162 385 511 733 860 72 765 262 635 485 516 768 426 641 477 334 92 555 520 173 296 621 80 312 695 168 760 182 556 716 457 123 718 147 474 246 9 221 369 266 912 365 247 575 86 120 584 755 525 527 276 623 323 572 550 1...
result:
ok correct
Test #25:
score: 0
Accepted
time: 10ms
memory: 12152kb
input:
3 100 10000000 999 37 333 429 430 950 395 199 67 394 239 625 725 586 176 839 401 226 14 898 931 541 738 560 638 302 457 846 468 193 423 215 692 746 262 722 43 869 984 510 181 977 809 805 327 22 444 208 768 47 372 946 20 958 863 147 409 224 95 466 694 837 167 195 949 778 24 126 953 852 480 730 365 13...
result:
ok correct
Test #26:
score: 0
Accepted
time: 10ms
memory: 12380kb
input:
3 100 10000000 999 289 402 626 749 480 763 773 565 829 569 200 303 980 734 514 539 440 769 674 130 102 117 798 994 919 493 149 456 109 121 587 835 386 851 657 268 67 382 612 792 541 883 742 436 403 968 872 60 983 260 76 550 571 158 635 428 877 807 681 604 513 598 459 218 173 599 683 308 727 221 733 ...
result:
ok correct
Subtask #4:
score: 0
Wrong Answer
Test #27:
score: 17
Accepted
time: 14ms
memory: 14244kb
input:
4 100 10000000 999 710 227 715 954 623 585 538 236 363 913 540 3 897 998 726 919 976 843 796 69 415 705 647 707 201 696 993 545 325 375 47 260 490 385 828 162 29 278 867 593 395 219 178 518 999 685 307 772 224 187 557 89 575 524 1 157 230 341 708 978 473 995 15 179 743 416 263 640 4 851 520 719 679 ...
result:
ok correct
Test #28:
score: 0
Accepted
time: 11ms
memory: 14448kb
input:
4 100 10000000 999 714 793 831 566 274 202 861 272 583 533 805 725 138 636 832 242 737 219 191 168 939 364 439 770 290 84 581 419 991 431 892 387 487 753 368 627 900 476 934 316 854 802 898 48 741 182 950 684 121 881 996 120 917 311 386 63 377 300 734 333 789 257 797 134 668 490 649 843 795 198 462 ...
result:
ok correct
Test #29:
score: 0
Accepted
time: 19ms
memory: 12272kb
input:
4 100 10000000 999 118 434 443 62 975 789 284 936 885 652 937 50 912 733 854 532 772 709 407 312 535 589 419 247 190 474 469 905 165 889 13 159 189 746 837 603 181 335 880 513 496 897 887 442 498 656 838 342 522 93 771 816 178 541 788 215 586 794 267 297 938 853 244 255 640 654 101 470 621 232 162 8...
result:
ok correct
Test #30:
score: 0
Accepted
time: 18ms
memory: 12212kb
input:
4 100 10000000 999 418 71 357 515 696 936 943 436 645 53 344 262 706 201 896 877 732 738 433 684 891 641 264 615 32 659 990 529 219 165 81 420 22 61 35 704 233 339 201 42 816 126 522 561 960 673 452 720 99 328 222 423 804 226 266 652 291 939 981 503 209 275 653 525 812 886 693 343 881 353 218 227 28...
result:
ok correct
Test #31:
score: -17
Wrong Answer
time: 166ms
memory: 12088kb
input:
4 100 10000000 999 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 388 3...
result:
wrong answer too many queries
Subtask #5:
score: 18
Accepted
Test #47:
score: 18
Accepted
time: 614ms
memory: 48044kb
input:
5 100 25000000 49999 3753 28650 36024 8322 47241 9061 43764 6338 45160 16765 40294 43358 37214 37535 38561 1997 7478 9543 11661 1953 7391 41171 43559 9981 24218 13155 22152 45216 30123 1843 20703 23601 42707 6449 40356 3761 32284 34584 32674 44391 41031 324 14845 6935 37071 38330 48041 1824 41182 46...
result:
ok correct
Test #48:
score: 0
Accepted
time: 624ms
memory: 49124kb
input:
5 100 25000000 49999 4355 37348 38321 35425 21214 5083 45595 40224 33795 7313 23253 7272 29677 28728 35487 1991 44807 19910 7658 37652 35455 2514 34837 45354 38770 33373 22354 33923 553 32137 13158 39583 34278 32253 41652 2024 4250 27447 26990 40809 10542 48821 40099 43201 16468 13915 18394 17223 14...
result:
ok correct
Test #49:
score: 0
Accepted
time: 627ms
memory: 48484kb
input:
5 100 25000000 49999 35421 12483 27611 26116 3078 41676 32102 20450 46565 7259 31701 39279 7716 18095 574 6832 14245 45403 7403 28959 10895 7192 24221 15536 28096 37220 49443 18168 43803 27863 7445 1555 2310 26797 44390 32627 34653 10091 41373 19105 11758 6420 21895 2662 5651 5357 8564 30178 47283 3...
result:
ok correct
Test #50:
score: 0
Accepted
time: 623ms
memory: 47932kb
input:
5 100 25000000 49999 42046 19387 33162 23626 9528 41604 26357 27547 18587 20216 43658 5642 12752 36928 460 17925 6866 9380 29791 10256 12103 24116 39054 21861 14347 21118 23852 31261 10246 23316 46935 39281 41944 47820 43306 25162 42713 17257 29474 32926 12743 18125 14549 23818 22784 22008 37108 364...
result:
ok correct
Test #51:
score: 0
Accepted
time: 621ms
memory: 49436kb
input:
5 100 25000000 49999 47176 35953 43451 38072 40586 17234 18319 28218 37190 15923 25135 40310 27316 17131 2164 26393 41753 47710 22396 27790 22627 49297 10917 11986 44920 27629 27944 14780 16282 11016 36590 34850 43230 85 27951 1338 3203 33927 49761 49552 16274 3167 49305 34706 25494 47457 14679 2608...
result:
ok correct
Subtask #6:
score: 0
Wrong Answer
Test #52:
score: 12
Accepted
time: 150ms
memory: 19548kb
input:
6 100 40000000 9999 3929 7460 4617 7377 498 7572 4628 3661 2404 9179 755 4076 8531 6581 1929 9419 1498 4402 6412 712 4918 2628 798 6283 9427 9775 1472 5554 2146 9972 5228 5459 8417 6778 3121 7649 1031 7691 6270 2238 4885 6121 2099 3435 4615 9962 6384 8809 9169 4553 66 1939 8589 2029 4897 7334 2867 8...
result:
ok correct
Test #53:
score: 0
Accepted
time: 155ms
memory: 21228kb
input:
6 100 40000000 9999 3234 8857 2432 8719 9275 4386 9289 1618 6926 1459 2895 7304 8659 2496 301 2247 4005 3433 3746 8039 343 7038 7370 44 558 8034 5438 2934 1311 5743 2668 8493 8081 2248 968 4448 1148 6299 4078 8794 1317 5172 9487 6794 1184 1501 4564 7710 7754 7183 381 5002 2115 9361 7406 9929 3890 53...
result:
ok correct
Test #54:
score: 0
Accepted
time: 217ms
memory: 19016kb
input:
6 100 40000000 9999 8081 4107 1424 1165 6434 2326 5528 8697 6543 826 4274 210 1640 1277 1540 9677 5665 9386 1542 7906 1765 3085 7702 9076 7876 4395 1692 1342 6072 1247 517 4487 4463 8189 4891 4829 4775 3290 6530 9093 4119 5963 6310 7673 1873 4548 5578 9671 1418 1963 7601 9038 5798 1118 5482 6226 6 7...
result:
ok correct
Test #55:
score: 0
Accepted
time: 206ms
memory: 23156kb
input:
6 100 40000000 9999 9174 4736 9411 7268 2952 5267 5779 23 1147 8846 3476 7914 3821 986 4205 4730 2131 121 8423 3176 744 5917 65 7754 9258 6318 8799 1250 6630 7761 7956 8080 821 6801 5654 2608 3970 6701 3 1884 8942 9287 5900 8552 5783 5909 902 7080 8594 2359 7709 6834 2320 8287 956 1612 1250 7600 437...
result:
ok correct
Test #56:
score: -12
Wrong Answer
time: 638ms
memory: 20296kb
input:
6 100 40000000 9999 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 1465 ...
result:
wrong answer too many queries
Subtask #7:
score: 0
Wrong Answer
Test #72:
score: 19
Accepted
time: 290ms
memory: 27236kb
input:
7 50 40000000 29999 12447 18709 13054 17585 8337 14953 7985 1930 24383 1787 2543 26860 12198 2842 14256 8665 17034 6429 14773 8646 27093 6362 29357 18001 10667 8445 6671 21435 27163 14604 19875 745 20772 6696 16391 15560 16789 10983 6199 23133 13 13688 14547 8390 4398 21653 14460 690 24385 5358 2213...
result:
ok correct
Test #73:
score: 0
Accepted
time: 283ms
memory: 27752kb
input:
7 50 40000000 29999 18853 1170 5099 2983 22508 7615 3898 29334 11896 15475 25483 2740 17820 23902 1599 5947 24111 13870 1288 20548 4348 4969 667 24779 21291 13020 29038 21388 12182 14773 27707 18344 10290 23557 20131 708 567 12618 15853 20725 22483 17361 26356 20441 19667 11940 29712 13980 13544 221...
result:
ok correct
Test #74:
score: 0
Accepted
time: 364ms
memory: 26344kb
input:
7 50 40000000 29999 20280 25956 11258 14987 29660 27319 22202 21134 20288 22872 17199 29372 6706 1647 7845 1415 20253 23538 9292 1777 2078 18478 25820 2348 12758 3145 10532 15160 11372 10092 18898 1937 26444 24986 12037 15875 1507 19187 14731 4054 23232 5572 989 1732 11339 5294 27598 3247 22275 1580...
result:
ok correct
Test #75:
score: 0
Accepted
time: 373ms
memory: 24972kb
input:
7 50 40000000 29999 20450 14417 17450 16007 1997 2043 29165 24152 16307 4097 5876 22181 28340 9886 5138 12468 1348 6881 29796 7362 7994 5221 14804 10861 20089 1908 7168 22191 15533 21039 8546 16783 22671 10888 16236 8831 24638 5748 8770 23147 9905 13837 19069 26009 24232 11425 5143 18199 13890 18681...
result:
ok correct
Test #76:
score: -19
Wrong Answer
time: 662ms
memory: 25004kb
input:
7 50 40000000 29999 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 16575 1657...
result:
wrong answer too many queries
Subtask #8:
score: 0
Wrong Answer
Test #92:
score: 12
Accepted
time: 538ms
memory: 36052kb
input:
8 100 50000000 29999 8375 16777 16700 20953 11899 14682 20874 25860 28858 23241 5089 8044 25448 17746 5605 3087 9145 20179 1080 22944 27383 8384 19943 15371 27572 7882 23028 10474 18744 20202 15687 17001 7543 18709 23165 15713 17032 29011 22353 17455 26045 3484 20330 15159 21274 382 23927 20114 6303...
result:
ok correct
Test #93:
score: 0
Accepted
time: 592ms
memory: 36636kb
input:
8 100 50000000 29999 2128 17426 4451 448 11336 9326 20418 11167 17068 16547 3028 15925 15221 13503 28580 15199 5211 12929 8917 20639 7369 8551 24669 18017 16860 24191 25504 3855 340 20167 1085 4938 9413 5852 360 24570 23604 7723 20560 28875 12900 6532 26883 13473 19780 21660 13299 12284 71 17164 165...
result:
ok correct
Test #94:
score: 0
Accepted
time: 778ms
memory: 34160kb
input:
8 100 50000000 29999 7901 20661 29659 9428 14430 5189 29584 7154 9898 15802 16383 1877 4240 17890 19420 10730 7183 8795 23011 25809 9784 13484 6981 1228 8077 8089 22029 10153 19195 21336 1228 13868 16736 59 5374 17694 14052 58 18608 16275 19728 13890 17558 3178 24685 18860 9053 11152 1503 9853 13508...
result:
ok correct
Test #95:
score: 0
Accepted
time: 747ms
memory: 33372kb
input:
8 100 50000000 29999 1042 19160 15752 27895 21073 26710 20832 5703 6325 8917 18186 4790 20214 24043 9012 9993 16807 20448 15650 16490 16138 5011 13246 25803 18444 16775 10905 27059 6174 8773 22769 2230 15634 27940 2662 14278 9677 9762 303 7329 21813 5916 747 3426 20555 2608 10365 27645 17517 846 993...
result:
ok correct
Test #96:
score: -12
Wrong Answer
time: 819ms
memory: 32892kb
input:
8 100 50000000 29999 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 15852 158...
result:
wrong answer too many queries