Task: | Village |
Sender: | vgtcross |
Submission time: | 2023-04-20 18:43:03 +0300 |
Language: | C++ (C++11) |
Status: | READY |
Result: | 50 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 6 |
#2 | ACCEPTED | 19 |
#3 | ACCEPTED | 25 |
test | verdict | time | score | group | |
---|---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 6 | 1 | details |
#2 | ACCEPTED | 0.01 s | 6 | 1 | details |
#3 | ACCEPTED | 0.01 s | 12 | 1 | details |
#4 | ACCEPTED | 0.01 s | 6 | 1 | details |
#5 | ACCEPTED | 0.01 s | 6 | 1 | details |
#6 | ACCEPTED | 0.01 s | 6 | 1 | details |
#7 | ACCEPTED | 0.01 s | 6 | 1 | details |
#8 | ACCEPTED | 0.01 s | 6 | 1 | details |
#9 | ACCEPTED | 0.01 s | 6 | 1 | details |
#10 | ACCEPTED | 0.01 s | 6 | 1 | details |
#11 | ACCEPTED | 0.01 s | 6 | 1 | details |
#12 | ACCEPTED | 0.01 s | 6 | 1 | details |
#13 | ACCEPTED | 0.01 s | 6 | 1 | details |
#14 | ACCEPTED | 0.01 s | 6 | 1 | details |
#15 | ACCEPTED | 0.01 s | 6 | 1 | details |
#16 | ACCEPTED | 0.01 s | 6 | 1 | details |
#17 | ACCEPTED | 0.01 s | 6 | 1 | details |
#18 | ACCEPTED | 0.01 s | 19 | 2 | details |
#19 | ACCEPTED | 0.01 s | 19 | 2 | details |
#20 | ACCEPTED | 0.01 s | 19 | 2 | details |
#21 | ACCEPTED | 0.01 s | 19 | 2 | details |
#22 | ACCEPTED | 0.01 s | 19 | 2 | details |
#23 | ACCEPTED | 0.01 s | 19 | 2 | details |
#24 | ACCEPTED | 0.01 s | 19 | 2 | details |
#25 | ACCEPTED | 0.01 s | 19 | 2 | details |
#26 | ACCEPTED | 0.01 s | 19 | 2 | details |
#27 | ACCEPTED | 0.01 s | 19 | 2 | details |
#28 | ACCEPTED | 0.01 s | 19 | 2 | details |
#29 | ACCEPTED | 0.01 s | 19 | 2 | details |
#30 | ACCEPTED | 0.01 s | 19 | 2 | details |
#31 | ACCEPTED | 0.01 s | 19 | 2 | details |
#32 | ACCEPTED | 0.01 s | 19 | 2 | details |
#33 | ACCEPTED | 0.01 s | 19 | 2 | details |
#34 | ACCEPTED | 0.01 s | 19 | 2 | details |
#35 | ACCEPTED | 0.01 s | 19 | 2 | details |
#36 | ACCEPTED | 0.01 s | 19 | 2 | details |
#37 | ACCEPTED | 0.01 s | 19 | 2 | details |
#38 | ACCEPTED | 0.01 s | 19 | 2 | details |
#39 | ACCEPTED | 0.01 s | 19 | 2 | details |
#40 | ACCEPTED | 0.01 s | 19 | 2 | details |
#41 | ACCEPTED | 0.01 s | 19 | 2 | details |
#42 | ACCEPTED | 0.01 s | 19 | 2 | details |
#43 | ACCEPTED | 0.01 s | 19 | 2 | details |
#44 | ACCEPTED | 0.01 s | 19 | 2 | details |
#45 | ACCEPTED | 0.01 s | 19 | 2 | details |
#46 | ACCEPTED | 0.01 s | 19 | 2 | details |
#47 | ACCEPTED | 0.01 s | 19 | 2 | details |
#48 | ACCEPTED | 0.07 s | 25 | 3 | details |
#49 | ACCEPTED | 0.08 s | 25 | 3 | details |
#50 | ACCEPTED | 0.08 s | 25 | 3 | details |
#51 | ACCEPTED | 0.06 s | 25 | 3 | details |
#52 | ACCEPTED | 0.08 s | 25 | 3 | details |
#53 | ACCEPTED | 0.07 s | 25 | 3 | details |
#54 | ACCEPTED | 0.04 s | 25 | 3 | details |
#55 | ACCEPTED | 0.10 s | 25 | 3 | details |
#56 | ACCEPTED | 0.09 s | 25 | 3 | details |
#57 | ACCEPTED | 0.09 s | 25 | 3 | details |
#58 | ACCEPTED | 0.09 s | 25 | 3 | details |
#59 | ACCEPTED | 0.08 s | 25 | 3 | details |
#60 | ACCEPTED | 0.07 s | 25 | 3 | details |
#61 | ACCEPTED | 0.07 s | 25 | 3 | details |
#62 | ACCEPTED | 0.07 s | 25 | 3 | details |
#63 | ACCEPTED | 0.06 s | 25 | 3 | details |
#64 | ACCEPTED | 0.07 s | 25 | 3 | details |
#65 | ACCEPTED | 0.06 s | 25 | 3 | details |
#66 | ACCEPTED | 0.06 s | 25 | 3 | details |
#67 | ACCEPTED | 0.05 s | 25 | 3 | details |
#68 | ACCEPTED | 0.06 s | 25 | 3 | details |
#69 | ACCEPTED | 0.07 s | 25 | 3 | details |
#70 | ACCEPTED | 0.06 s | 25 | 3 | details |
#71 | ACCEPTED | 0.04 s | 25 | 3 | details |
#72 | ACCEPTED | 0.05 s | 25 | 3 | details |
#73 | ACCEPTED | 0.07 s | 25 | 3 | details |
#74 | ACCEPTED | 0.06 s | 25 | 3 | details |
#75 | ACCEPTED | 0.08 s | 25 | 3 | details |
#76 | ACCEPTED | 0.07 s | 25 | 3 | details |
#77 | ACCEPTED | 0.07 s | 25 | 3 | details |
#78 | ACCEPTED | 0.05 s | 25 | 3 | details |
#79 | ACCEPTED | 0.05 s | 25 | 3 | details |
#80 | ACCEPTED | 0.08 s | 25 | 3 | details |
#81 | ACCEPTED | 0.07 s | 25 | 3 | details |
#82 | ACCEPTED | 0.06 s | 25 | 3 | details |
Code
#include <bits/stdc++.h> #define debug(x) cout << #x << ": " << x << endl #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define fi first #define se second using namespace std; using ll = long long; using pii = pair<int, int>; const int N = 100100; vector<int> adj[N]; ll n, ans; vector<int> centr; bool isc[N]; int dfs(int u, int p) { ll sz = 1; bool good = 1; for (int v: adj[u]) if (v != p) { ll sbsz = dfs(v, u); if (sbsz > n/2) good = 0; sz += sbsz; } if (n-sz > n/2) good = 0; if (good) centr.push_back(u); isc[u] = good; ans += min(sz, n-sz); return sz; } vector<vector<int>> sets; void dfs2(int u, int p, int idx) { if (idx == -1) { sets.resize(adj[u].size()); for (int i = 0; i < (int)adj[u].size(); ++i) { dfs2(adj[u][i], u, i); } return; } sets[idx].push_back(u); for (int v: adj[u]) if (v != p) { dfs2(v, u, idx); } } bool cmp(vector<int> &a, vector<int> &b) { return a.size() < b.size(); } void solve() { cin >> n; if (n == 2) { cout << "2 2\n"; cout << "2 1\n"; cout << "2 1\n"; return; } for (int i = 0; i < n-1; ++i) { int u, v; cin >> u >> v; --u;--v; adj[u].push_back(v); adj[v].push_back(u); } dfs(0, -1); ans *= 2; vector<int> pos(n); if (centr.size() == 1) { int c = centr[0]; dfs2(c, -1, -1); sort(rall(sets), cmp); pii i = {0, 0}, j = {0, n/2}; while (j.se >= (int)sets[j.fi].size()) { j.se -= sets[j.fi].size(); ++j.fi; j.fi %= sets.size(); } while (j != make_pair(0, 0)) { pos[sets[i.fi][i.se]] = sets[j.fi][j.se]; pos[sets[j.fi][j.se]] = sets[i.fi][i.se]; ++i.se; if (i.se == (int)sets[i.fi].size()) { i.se = 0; ++i.fi; i.fi %= sets.size(); } ++j.se; if (j.se == (int)sets[j.fi].size()) { j.se = 0; ++j.fi; j.fi %= sets.size(); } } if (n&1) { pos[c] = c; swap(pos[c], pos[adj[c][0]]); } else { pos[c] = sets[i.fi][i.se]; pos[sets[i.fi][i.se]] = c; } } else { int c = centr[0]; dfs2(c, -1, -1); sort(rall(sets), cmp); sets[1].push_back(c); for (int i = 2; i < (int)sets.size(); ++i) { for (int j: sets[i]) { sets[1].push_back(j); } } for (int i = 0; i < n/2; ++i) { pos[sets[0][i]] = sets[1][i]; pos[sets[1][i]] = sets[0][i]; } } cout << "0 " << ans << '\n'; for (int i = 0; i < n; ++i) { cout << i+1 << ' '; } cout << '\n'; for (int i = 0; i < n; ++i) { cout << pos[i]+1 << ' '; } } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }
Test details
Test 1
Group: 1
Verdict: ACCEPTED
input |
---|
4 1 2 2 3 3 4 |
correct output |
---|
4 8 2 1 4 3 4 3 2 1 |
user output |
---|
0 8 1 2 3 4 3 4 1 2 |
Test 2
Group: 1
Verdict: ACCEPTED
input |
---|
7 4 2 5 7 3 4 6 3 ... |
correct output |
---|
8 18 3 4 6 2 7 1 5 2 7 4 1 3 5 6 |
user output |
---|
0 18 1 2 3 4 5 6 7 2 4 5 1 3 7 6 |
Test 3
Group: 1
Verdict: ACCEPTED
input |
---|
2 1 2 |
correct output |
---|
2 2 2 1 2 1 |
user output |
---|
2 2 2 1 2 1 |
Test 4
Group: 1
Verdict: ACCEPTED
input |
---|
7 4 1 7 6 7 5 1 3 ... |
correct output |
---|
8 20 6 3 2 1 7 4 5 4 5 6 7 1 2 3 |
user output |
---|
0 20 1 2 3 4 5 6 7 5 7 6 1 4 3 2 |
Test 5
Group: 1
Verdict: ACCEPTED
input |
---|
7 2 7 5 2 6 1 1 4 ... |
correct output |
---|
8 24 6 5 7 2 4 1 3 2 5 1 3 6 7 4 |
user output |
---|
0 24 1 2 3 4 5 6 7 7 5 6 2 4 3 1 |
Test 6
Group: 1
Verdict: ACCEPTED
input |
---|
7 5 3 3 6 3 1 1 7 ... |
correct output |
---|
8 18 7 5 6 1 2 3 4 2 3 7 5 1 4 6 |
user output |
---|
0 18 1 2 3 4 5 6 7 5 7 1 6 3 4 2 |
Test 7
Group: 1
Verdict: ACCEPTED
input |
---|
7 7 3 4 7 1 7 7 2 ... |
correct output |
---|
12 12 7 1 2 3 4 5 6 5 6 7 1 2 3 4 |
user output |
---|
0 12 1 2 3 4 5 6 7 6 3 7 5 4 1 2 |
Test 8
Group: 1
Verdict: ACCEPTED
input |
---|
8 4 8 5 2 6 2 3 8 ... |
correct output |
---|
10 22 2 6 8 7 1 5 4 3 8 3 2 6 7 4 5 1 |
user output |
---|
0 22 1 2 3 4 5 6 7 8 3 4 1 2 7 8 5 6 |
Test 9
Group: 1
Verdict: ACCEPTED
input |
---|
9 8 1 3 5 8 3 6 8 ... |
correct output |
---|
14 22 8 3 9 1 2 4 6 7 5 9 8 7 5 6 3 2 1 4 |
user output |
---|
0 22 1 2 3 4 5 6 7 8 9 8 4 1 2 6 5 9 3 7 |
Test 10
Group: 1
Verdict: ACCEPTED
input |
---|
10 9 8 1 3 7 5 8 6 ... |
correct output |
---|
10 30 3 10 1 6 7 4 5 9 8 2 8 7 9 10 6 5 2 1 3 4 |
user output |
---|
0 30 1 2 3 4 5 6 7 8 9 10 6 4 8 2 9 1 10 3 5 7 |
Test 11
Group: 1
Verdict: ACCEPTED
input |
---|
10 9 2 10 4 10 5 2 5 ... |
correct output |
---|
10 50 6 9 8 7 10 1 4 3 2 5 4 9 5 1 3 7 6 10 2 8 |
user output |
---|
0 50 1 2 3 4 5 6 7 8 9 10 2 1 4 3 9 7 6 10 5 8 |
Test 12
Group: 1
Verdict: ACCEPTED
input |
---|
10 5 7 4 1 10 5 9 3 ... |
correct output |
---|
10 42 4 7 9 1 10 8 2 6 3 5 5 3 2 7 1 9 4 10 6 8 |
user output |
---|
0 42 1 2 3 4 5 6 7 8 9 10 9 5 4 3 2 7 6 10 1 8 |
Test 13
Group: 1
Verdict: ACCEPTED
input |
---|
10 6 10 2 7 10 1 10 8 ... |
correct output |
---|
14 28 9 7 2 3 1 10 4 6 5 8 4 6 10 1 7 2 5 9 8 3 |
user output |
---|
0 28 1 2 3 4 5 6 7 8 9 10 10 5 8 6 2 4 9 3 7 1 |
Test 14
Group: 1
Verdict: ACCEPTED
input |
---|
10 5 6 3 5 8 5 5 7 ... |
correct output |
---|
18 18 5 1 2 3 10 4 6 7 8 9 7 8 9 10 6 5 1 2 3 4 |
user output |
---|
0 18 1 2 3 4 5 6 7 8 9 10 5 6 9 8 1 2 10 4 3 7 |
Test 15
Group: 1
Verdict: ACCEPTED
input |
---|
10 4 1 5 4 5 10 6 1 ... |
correct output |
---|
14 28 6 1 2 9 10 3 4 5 7 8 7 4 5 2 3 8 1 6 10 9 |
user output |
---|
0 28 1 2 3 4 5 6 7 8 9 10 10 7 9 5 4 8 2 6 3 1 |
Test 16
Group: 1
Verdict: ACCEPTED
input |
---|
10 10 2 4 10 1 10 5 10 ... |
correct output |
---|
16 22 8 10 2 3 4 1 5 6 7 9 5 9 8 6 1 4 10 3 2 7 |
user output |
---|
0 22 1 2 3 4 5 6 7 8 9 10 5 3 2 10 1 7 6 9 8 4 |
Test 17
Group: 1
Verdict: ACCEPTED
input |
---|
10 5 9 8 1 6 2 4 3 ... |
correct output |
---|
12 34 8 6 10 3 9 7 2 1 5 4 3 4 1 2 7 10 5 9 8 6 |
user output |
---|
0 34 1 2 3 4 5 6 7 8 9 10 3 5 1 8 2 10 9 4 7 6 |
Test 18
Group: 2
Verdict: ACCEPTED
input |
---|
256 229 81 255 131 55 23 79 6 ... |
correct output |
---|
316 2186 131 44 58 97 155 130 24 249 23... |
user output |
---|
0 2186 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 19
Group: 2
Verdict: ACCEPTED
input |
---|
500 223 499 155 198 156 203 423 438 ... |
correct output |
---|
636 5114 11 331 73 14 410 421 474 209 1... |
user output |
---|
0 5114 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 20
Group: 2
Verdict: ACCEPTED
input |
---|
499 239 23 393 140 346 79 261 477 ... |
correct output |
---|
614 4106 23 121 215 242 401 436 386 312... |
user output |
---|
0 4106 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 21
Group: 2
Verdict: ACCEPTED
input |
---|
1000 842 343 479 865 720 325 420 693 ... |
correct output |
---|
1294 14376 618 599 95 408 811 105 941 792... |
user output |
---|
0 14376 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 22
Group: 2
Verdict: ACCEPTED
input |
---|
999 731 687 673 842 221 812 673 902 ... |
correct output |
---|
1244 11674 810 616 295 861 537 942 187 49... |
user output |
---|
0 11674 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 23
Group: 2
Verdict: ACCEPTED
input |
---|
987 840 63 459 542 449 461 397 392 ... |
correct output |
---|
1266 11812 918 668 944 527 625 739 133 83... |
user output |
---|
0 11812 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 24
Group: 2
Verdict: ACCEPTED
input |
---|
1000 618 292 281 35 663 995 702 117 ... |
correct output |
---|
1000 500000 902 350 486 860 69 680 799 576... |
user output |
---|
0 500000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 25
Group: 2
Verdict: ACCEPTED
input |
---|
999 871 760 692 751 234 935 861 721 ... |
correct output |
---|
1140 91036 729 70 453 732 147 12 120 548 ... |
user output |
---|
0 91036 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 26
Group: 2
Verdict: ACCEPTED
input |
---|
909 140 106 583 520 460 181 523 659 ... |
correct output |
---|
1028 43956 64 732 571 357 39 754 803 474 ... |
user output |
---|
0 43956 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 27
Group: 2
Verdict: ACCEPTED
input |
---|
1000 322 537 402 605 63 899 250 892 ... |
correct output |
---|
1002 250998 407 494 686 447 924 434 742 70... |
user output |
---|
0 250998 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 28
Group: 2
Verdict: ACCEPTED
input |
---|
1000 944 65 357 755 504 31 900 759 ... |
correct output |
---|
1248 127496 521 650 857 129 876 904 507 81... |
user output |
---|
0 127496 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 29
Group: 2
Verdict: ACCEPTED
input |
---|
1000 275 786 275 833 193 275 948 275 ... |
correct output |
---|
1998 1998 275 1 2 3 4 5 6 7 8 9 10 11 12... |
user output |
---|
0 1998 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 30
Group: 2
Verdict: ACCEPTED
input |
---|
989 740 463 740 19 531 322 740 544 ... |
correct output |
---|
1974 2962 531 1 2 3 4 5 6 7 740 8 10 11 ... |
user output |
---|
0 2962 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 31
Group: 2
Verdict: ACCEPTED
input |
---|
1000 215 913 18 659 755 775 60 282 ... |
correct output |
---|
1940 7958 770 1000 81 425 282 4 3 7 755 ... |
user output |
---|
0 7958 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 32
Group: 2
Verdict: ACCEPTED
input |
---|
888 310 287 55 464 55 160 2 713 ... |
correct output |
---|
1756 4288 861 881 55 206 1 427 5 474 310... |
user output |
---|
0 4288 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 33
Group: 2
Verdict: ACCEPTED
input |
---|
1000 60 327 715 322 13 49 48 263 ... |
correct output |
---|
1392 9628 746 701 990 226 900 669 975 98... |
user output |
---|
0 9628 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 34
Group: 2
Verdict: ACCEPTED
input |
---|
987 543 539 482 744 58 699 322 99 ... |
correct output |
---|
1782 6554 138 754 474 99 129 4 769 41 6 ... |
user output |
---|
0 6554 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 35
Group: 2
Verdict: ACCEPTED
input |
---|
975 645 307 416 645 377 175 639 842 ... |
correct output |
---|
1874 5278 377 24 662 471 547 175 970 444... |
user output |
---|
0 5278 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 36
Group: 2
Verdict: ACCEPTED
input |
---|
1000 538 932 941 662 61 662 90 217 ... |
correct output |
---|
1980 3906 902 1 662 217 3 110 5 235 538 ... |
user output |
---|
0 3906 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 37
Group: 2
Verdict: ACCEPTED
input |
---|
1000 620 802 417 303 67 87 300 180 ... |
correct output |
---|
1890 6546 399 390 180 964 67 949 961 827... |
user output |
---|
0 6546 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 38
Group: 2
Verdict: ACCEPTED
input |
---|
1000 520 185 785 97 15 774 521 437 ... |
correct output |
---|
1938 4626 470 97 926 520 437 794 5 57 99... |
user output |
---|
0 4626 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 39
Group: 2
Verdict: ACCEPTED
input |
---|
999 683 443 89 76 60 664 625 39 ... |
correct output |
---|
1938 4914 9 290 811 443 984 664 154 75 9... |
user output |
---|
0 4914 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 40
Group: 2
Verdict: ACCEPTED
input |
---|
900 825 630 478 117 271 20 293 597 ... |
correct output |
---|
1066 7882 737 171 788 353 587 509 218 40... |
user output |
---|
0 7882 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 41
Group: 2
Verdict: ACCEPTED
input |
---|
888 235 292 649 771 880 641 57 46 ... |
correct output |
---|
1144 10654 46 790 366 272 782 547 664 473... |
user output |
---|
0 10654 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 42
Group: 2
Verdict: ACCEPTED
input |
---|
512 89 508 46 478 502 121 413 67 ... |
correct output |
---|
682 7190 223 488 460 487 386 8 271 308 ... |
user output |
---|
0 7190 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 43
Group: 2
Verdict: ACCEPTED
input |
---|
1000 749 604 537 255 155 171 608 433 ... |
correct output |
---|
1330 15930 183 467 569 740 53 89 290 279 ... |
user output |
---|
0 15930 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 44
Group: 2
Verdict: ACCEPTED
input |
---|
513 505 334 136 410 403 254 205 286 ... |
correct output |
---|
684 7206 228 159 189 313 322 95 511 84 ... |
user output |
---|
0 7206 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 45
Group: 2
Verdict: ACCEPTED
input |
---|
1000 814 905 347 904 611 989 779 507 ... |
correct output |
---|
1596 9094 730 366 507 989 690 11 927 694... |
user output |
---|
0 9094 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 46
Group: 2
Verdict: ACCEPTED
input |
---|
999 41 215 96 23 802 926 318 19 ... |
correct output |
---|
1814 5748 318 941 245 878 1 34 569 706 6... |
user output |
---|
0 5748 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 47
Group: 2
Verdict: ACCEPTED
input |
---|
1000 553 877 155 71 446 981 20 558 ... |
correct output |
---|
1980 3794 977 810 553 1 4 446 558 3 8 83... |
user output |
---|
0 3794 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 48
Group: 3
Verdict: ACCEPTED
input |
---|
90909 17758 575 3979 26221 88569 9552 14110 25350 ... |
correct output |
---|
111632 1514350 41502 67353 64675 18097 1061 8... |
user output |
---|
0 1514350 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 49
Group: 3
Verdict: ACCEPTED
input |
---|
99999 54092 13956 13184 61256 33359 49486 66333 35721 ... |
correct output |
---|
128320 2159862 92667 19776 6086 9042 87240 53... |
user output |
---|
0 2159862 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 50
Group: 3
Verdict: ACCEPTED
input |
---|
100000 8397 23570 15100 5651 49763 76387 86170 31489 ... |
correct output |
---|
123860 1952940 36635 15621 57549 48964 74168 ... |
user output |
---|
0 1952940 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 51
Group: 3
Verdict: ACCEPTED
input |
---|
77777 49943 35215 22761 10315 63949 60762 4297 59709 ... |
correct output |
---|
99504 1605682 34226 75028 56968 19310 6760 6... |
user output |
---|
0 1605682 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 52
Group: 3
Verdict: ACCEPTED
input |
---|
98765 26164 11043 13421 94996 26702 23597 51201 48250 ... |
correct output |
---|
121438 1740764 40273 18262 1663 22607 19920 6... |
user output |
---|
0 1740764 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 53
Group: 3
Verdict: ACCEPTED
input |
---|
88888 18007 20138 8462 60324 76528 52591 4898 80575 ... |
correct output |
---|
113806 1835832 28330 84550 48816 46565 27949 ... |
user output |
---|
0 1835832 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 54
Group: 3
Verdict: ACCEPTED
input |
---|
50000 14916 47169 33646 11209 38695 46961 47666 40483 ... |
correct output |
---|
50000 1250000000 17058 6776 22005 23828 45874 3... |
user output |
---|
0 1250000000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 55
Group: 3
Verdict: ACCEPTED
input |
---|
100000 34635 44783 29898 23005 11921 93048 26316 97267 ... |
correct output |
---|
100000 5000000000 16429 71778 52159 64739 78956 ... |
user output |
---|
0 5000000000 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 56
Group: 3
Verdict: ACCEPTED
input |
---|
100000 57874 74848 75513 33053 8252 73504 54317 83788 ... |
correct output |
---|
110618 2504160170 84815 1128 61528 30386 41409 6... |
user output |
---|
0 2504160170 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 57
Group: 3
Verdict: ACCEPTED
input |
---|
98765 81026 87591 95939 42505 22772 71253 58032 39973 ... |
correct output |
---|
110634 1634005140 69272 39075 21524 34064 84436 ... |
user output |
---|
0 1634005140 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 58
Group: 3
Verdict: ACCEPTED
input |
---|
100000 21659 3974 12194 694 75940 8912 96273 38672 ... |
correct output |
---|
112768 830383780 12719 90340 6638 65886 23745 3... |
user output |
---|
0 830383780 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 59
Group: 3
Verdict: ACCEPTED
input |
---|
100000 76978 82392 95351 80699 72534 98914 55636 92340 ... |
correct output |
---|
132516 81728820 56946 23337 52724 55695 83550 ... |
user output |
---|
0 81728820 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 60
Group: 3
Verdict: ACCEPTED
input |
---|
100000 6298 68124 6298 92167 43605 6298 20237 6298 ... |
correct output |
---|
199998 199998 6298 1 2 3 4 5 6 7 8 9 10 11 1... |
user output |
---|
0 199998 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 61
Group: 3
Verdict: ACCEPTED
input |
---|
100000 42523 18318 78023 33382 42523 74647 51119 93379 ... |
correct output |
---|
199990 359886 78023 73375 2 42523 1 31079 5 ... |
user output |
---|
0 359886 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 62
Group: 3
Verdict: ACCEPTED
input |
---|
100000 61154 13087 5895 20067 53687 86061 65229 2888 ... |
correct output |
---|
199800 932808 12021 1689 11626 4905 69081 13... |
user output |
---|
0 932808 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 63
Group: 3
Verdict: ACCEPTED
input |
---|
93829 47115 19407 23207 63386 17281 25733 40288 38302 ... |
correct output |
---|
187472 837534 10598 35631 75243 25733 22370 ... |
user output |
---|
0 837534 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 64
Group: 3
Verdict: ACCEPTED
input |
---|
100000 6074 30016 92873 16202 89382 94763 84451 61695 ... |
correct output |
---|
181934 1209576 92980 95205 23846 82330 21868 ... |
user output |
---|
0 1209576 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 65
Group: 3
Verdict: ACCEPTED
input |
---|
100000 62417 92075 9076 90574 1978 20625 80303 97502 ... |
correct output |
---|
197998 1179808 73039 50110 17058 11048 3 6061... |
user output |
---|
0 1179808 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 66
Group: 3
Verdict: ACCEPTED
input |
---|
93737 25805 12771 58579 81355 40517 64871 32105 61687 ... |
correct output |
---|
187266 676668 39 81355 12235 56251 17336 932... |
user output |
---|
0 676668 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 67
Group: 3
Verdict: ACCEPTED
input |
---|
73820 68064 38747 62935 55677 38747 58570 22710 4111 ... |
correct output |
---|
147618 308338 34638 1 56014 38747 38923 4 6 ... |
user output |
---|
0 308338 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 68
Group: 3
Verdict: ACCEPTED
input |
---|
84739 27645 6266 38069 44689 82910 62243 64459 18141 ... |
correct output |
---|
164500 943500 16626 57940 65305 4123 5623 25... |
user output |
---|
0 943500 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 69
Group: 3
Verdict: ACCEPTED
input |
---|
100000 36497 69443 57547 46832 48779 2175 24154 77660 ... |
correct output |
---|
199368 633508 24154 70740 64853 3 47989 5281... |
user output |
---|
0 633508 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 70
Group: 3
Verdict: ACCEPTED
input |
---|
93830 5353 89021 42613 10223 62115 81879 34643 18962 ... |
correct output |
---|
187052 572628 72397 38677 4519 93798 3 69167... |
user output |
---|
0 572628 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 71
Group: 3
Verdict: ACCEPTED
input |
---|
69696 66494 391 17982 64558 13321 10790 28456 6163 ... |
correct output |
---|
138866 431180 25641 26583 45359 65113 12282 ... |
user output |
---|
0 431180 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 72
Group: 3
Verdict: ACCEPTED
input |
---|
78987 50446 31217 10794 66216 18480 62852 70322 27242 ... |
correct output |
---|
157414 480886 78694 78045 78609 51617 39633 ... |
user output |
---|
0 480886 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 73
Group: 3
Verdict: ACCEPTED
input |
---|
99909 67987 37873 59438 18344 69248 60837 80284 72449 ... |
correct output |
---|
199190 621708 92195 44182 51753 99 31940 267... |
user output |
---|
0 621708 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 74
Group: 3
Verdict: ACCEPTED
input |
---|
91413 18433 23117 39518 88780 73634 8375 51086 79039 ... |
correct output |
---|
182222 564658 65997 30635 50995 3301 4 18546... |
user output |
---|
0 564658 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 75
Group: 3
Verdict: ACCEPTED
input |
---|
100000 19102 79795 15934 47159 11990 20192 16296 51154 ... |
correct output |
---|
133328 2875752 73315 96421 90669 82582 59186 ... |
user output |
---|
0 2875752 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 76
Group: 3
Verdict: ACCEPTED
input |
---|
100000 75186 63877 30682 67959 59008 68830 13637 63860 ... |
correct output |
---|
149996 1934292 26039 99185 72332 94984 9493 3... |
user output |
---|
0 1934292 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 77
Group: 3
Verdict: ACCEPTED
input |
---|
93930 41507 82962 74769 3770 72031 54394 13069 62632 ... |
correct output |
---|
169070 977694 72093 29177 49331 89412 46510 ... |
user output |
---|
0 977694 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 78
Group: 3
Verdict: ACCEPTED
input |
---|
66666 2708 28938 18111 55593 46507 60492 28211 60354 ... |
correct output |
---|
114280 798958 27643 1747 48563 55070 28938 3... |
user output |
---|
0 798958 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 79
Group: 3
Verdict: ACCEPTED
input |
---|
77777 49369 24449 54325 6946 35965 66783 76466 71203 ... |
correct output |
---|
136106 887574 72441 35809 52283 57383 46588 ... |
user output |
---|
0 887574 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 80
Group: 3
Verdict: ACCEPTED
input |
---|
99999 34134 31512 55415 48626 9899 98702 24742 36230 ... |
correct output |
---|
133328 2875718 15929 21115 32419 80377 17633 ... |
user output |
---|
0 2875718 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 81
Group: 3
Verdict: ACCEPTED
input |
---|
93792 74714 28726 23910 20740 3508 41621 37903 76011 ... |
correct output |
---|
177160 749346 39759 67623 88964 88219 91901 ... |
user output |
---|
0 749346 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |
Test 82
Group: 3
Verdict: ACCEPTED
input |
---|
99123 2797 6945 30658 68802 61712 84113 62236 90495 ... |
correct output |
---|
196644 563982 71164 2771 81375 70490 18100 1... |
user output |
---|
0 563982 1 2 3 4 5 6 7 8 9 10 11 12 13 ... Truncated |