Task: | Graph Ordering |
Sender: | wakaka |
Submission time: | 2023-12-31 22:08:58 +0200 |
Language: | C++ (C++20) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 7 |
#2 | ACCEPTED | 29 |
#3 | ACCEPTED | 18 |
#4 | ACCEPTED | 21 |
#5 | ACCEPTED | 25 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.27 s | 1, 4, 5 | details |
#2 | ACCEPTED | 0.26 s | 1, 5 | details |
#3 | ACCEPTED | 0.11 s | 1, 5 | details |
#4 | ACCEPTED | 0.18 s | 1, 5 | details |
#5 | ACCEPTED | 0.19 s | 1, 5 | details |
#6 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#7 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#8 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#9 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#10 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#11 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#12 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#13 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#14 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#15 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#16 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#17 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#18 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#19 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#20 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#21 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#22 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#23 | ACCEPTED | 0.01 s | 3, 5 | details |
#24 | ACCEPTED | 0.01 s | 3, 5 | details |
#25 | ACCEPTED | 0.01 s | 3, 5 | details |
#26 | ACCEPTED | 0.01 s | 3, 5 | details |
#27 | ACCEPTED | 0.01 s | 3, 5 | details |
#28 | ACCEPTED | 0.30 s | 5 | details |
#29 | ACCEPTED | 0.27 s | 5 | details |
#30 | ACCEPTED | 0.30 s | 4, 5 | details |
#31 | ACCEPTED | 0.27 s | 4, 5 | details |
#32 | ACCEPTED | 0.27 s | 4, 5 | details |
#33 | ACCEPTED | 0.29 s | 4, 5 | details |
#34 | ACCEPTED | 0.24 s | 5 | details |
#35 | ACCEPTED | 0.23 s | 5 | details |
#36 | ACCEPTED | 0.23 s | 5 | details |
#37 | ACCEPTED | 0.00 s | 1, 2, 3, 4, 5 | details |
#38 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#39 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#40 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#41 | ACCEPTED | 0.00 s | 1, 2, 3, 5 | details |
#42 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#43 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#44 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#45 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#46 | ACCEPTED | 0.00 s | 2, 3, 4, 5 | details |
#47 | ACCEPTED | 0.00 s | 2, 3, 5 | details |
#48 | ACCEPTED | 0.01 s | 3, 4, 5 | details |
#49 | ACCEPTED | 0.01 s | 4, 5 | details |
Compiler report
input/code.cpp: In function 'std::tuple<std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<int, std::allocator<int> >, int> blockCutTrees(const std::vector<std::array<int, 2> >&, int)': input/code.cpp:82:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::array<int, 2> >::size_type' {aka 'long unsigned int'} [-Wsign-compare] 82 | for (int i = 0; i < edges.size(); ++i) { | ~~^~~~~~~~~~~~~~
Code
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL string to_string(string s) { return '"' + s + '"'; } string to_string(const char* s) { return to_string(string(s)); } string to_string(bool b) { return to_string(int(b)); } string to_string(vector<bool>::reference b) { return to_string(int(b)); } string to_string(char b) { return "'" + string(1, b) + "'"; } template <typename A, typename B> string to_string(pair<A, B> p) { return "(" + to_string(p.first) + ", " + to_string(p.second) + ")"; } template <typename A, typename B, typename C> string to_string(tuple<A, B, C> p) { return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")"; } template <typename A, typename T = typename A::value_type> string to_string(A v) { string res = "{"; for (const auto& x : v) res += (res == "{" ? "" : ", ") + to_string(x); return res + "}"; } void debug() { cerr << endl; } template <typename Head, typename... Tail> void debug(Head H, Tail... T) { cerr << " " << to_string(H); debug(T...); } #define db(...) cerr << "[" << #__VA_ARGS__ << "]:", debug(__VA_ARGS__) #else #define db(...) 42 #endif using ll = long long; using ld = long double; pair<vector<int>, int> getBiconnv(const vector<array<int, 2>>& edges, int n) { assert(n > 0); int m = edges.size(); vector<vector<int>> E(n); for (auto& e : edges) { assert(e[0] != e[1]); E[e[0]].push_back(e[1]); E[e[1]].push_back(e[0]); } vector<int> low(n, -1), H(n), pv(n, -1), order; int numComps = 0; for (int i = 0; i < n; ++i) { if (low[i] != -1) continue; bool isolated = true; function<void(int)> dfs = [&](int x) { order.push_back(x); low[x] = H[x]; for (int y : E[x]) { if (low[y] == -1) { isolated = false; H[y] = H[x] + 1; pv[y] = x; dfs(y); low[x] = min(low[x], low[y]); } else if (H[y] < H[x] - 1) { // xy is a backedge. low[x] = min(low[x], H[y]); } } }; dfs(i); if (isolated) numComps++; // Isolated vertex forms a block on its own. } vector<int> vcomp(n, -1), ecomp(m); // block of parent-edge, block of edge for (int x : order) { if (pv[x] == -1) continue; if (low[x] >= H[pv[x]]) vcomp[x] = numComps++; else vcomp[x] = vcomp[pv[x]]; } for (int i = 0; i < m; ++i) { auto& e = edges[i]; int deeper = H[e[0]] > H[e[1]] ? e[0] : e[1]; ecomp[i] = vcomp[deeper]; } return {ecomp, numComps}; } tuple<vector<vector<int>>, vector<int>, int> blockCutTrees(const vector<array<int, 2>>& edges, int n) { auto [eblock, numBlocks] = getBiconnv(edges, n); vector<vector<int>> vblocks(n); // blocks v is contained in for (int i = 0; i < edges.size(); ++i) { vblocks[edges[i][0]].push_back(eblock[i]); vblocks[edges[i][1]].push_back(eblock[i]); } vector<vector<int>> adj(numBlocks); vector<int> treeId(n); for (int v = 0, blockId = 0; v < n; ++v) if (vblocks[v].empty()) treeId[v] = blockId++; for (int v = 0; v < n; ++v) { if (vblocks[v].empty()) continue; sort(vblocks[v].begin(), vblocks[v].end()); vblocks[v].erase(unique(vblocks[v].begin(), vblocks[v].end()), vblocks[v].end()); if (vblocks[v].size() > 1) { // Cut vertex. int cutId = adj.size(); treeId[v] = cutId; adj.emplace_back(); for (int blockId : vblocks[v]) { adj[cutId].push_back(blockId); adj[blockId].push_back(cutId); } } else { // Vertex is in a single block. treeId[v] = vblocks[v][0]; } } return {adj, treeId, numBlocks}; } struct BipolarOrientation { vector<vector<int>> E; vector<array<int, 2>> edges; // Do not rely on following intermediate variables publicly! vector<int> depth, low; vector<bool> vis, isBefore; vector<list<int>::iterator> vpos; list<int> ordering; BipolarOrientation(int n) : E(n), depth(n), low(n), vis(n), isBefore(n), vpos(n) {} void addEdge(int u, int v) { E[u].push_back(v); E[v].push_back(u); edges.push_back({u, v}); } void dfs(int x) { low[x] = x; for (auto y : E[x]) { if (depth[y] == -1) { depth[y] = depth[x] + 1; dfs(y); if (depth[low[y]] < depth[low[x]]) low[x] = low[y]; } else if (depth[y] < depth[x] - 1) { // This is a backedge that is not to the parent if (depth[y] < depth[low[x]]) low[x] = y; } } } void dfsOrder(int x, int p = -1) { vis[x] = true; if (p != -1) { assert(low[x] != x); if (isBefore[low[x]]) { vpos[x] = ordering.insert(vpos[p], x); } else { vpos[x] = ordering.insert(next(vpos[p]), x); } // Update isBefore for relation (parent[x], x) isBefore[p] = !isBefore[low[x]]; } for (auto y : E[x]) if (!vis[y]) dfsOrder(y, x); } /* Assumes non-empty graph has a bipolar orientation for s, t: for n >= 2, graph after adding edge st is 2-vertex-connected. Returns st-numbering in O(n+m): {s,...,t}. Can be run multiple times per BipolarOrientation instance. */ vector<int> getOrdering(int s, int t) { int n = E.size(); assert(0 <= s && s < n && 0 <= t && t < n); if (n == 1) return {s}; assert(s != t); if (n == 2) return {s, t}; fill(depth.begin(), depth.end(), -1); fill(vis.begin(), vis.end(), false); ordering.clear(); depth[s] = 0; // Make sure t is first neighbor of s E[s].insert(E[s].begin(), t); E[t].push_back(s); dfs(s); isBefore[s] = false; vpos[s] = ordering.insert(ordering.end(), s); dfsOrder(s); E[s].erase(E[s].begin()); E[t].pop_back(); return vector<int>(ordering.begin(), ordering.end()); } /* Returns st-numbering for non-empty graph if there is s,t that works, else return {}. List will have size n: {s,...,t}. Can be run multiple times per BipolarOrientation instance. O(n + m log m). */ vector<int> getOrdering() { int n = E.size(); assert(n > 0); if (n == 1) return getOrdering(0, 0); auto [bcAdj, bcId, numBlocks] = blockCutTrees(edges, n); // Graph is biconnected, so any s,t works. if (numBlocks == 1) return getOrdering(0, 1); // There should be one non-trivial block-cut tree that is a line; s,t must belong to the blocks at two ends. vector<int> ends; bool hasDeg0 = false; for (int i = 0; i < numBlocks; ++i) { if (bcAdj[i].size() == 1) ends.push_back(i); else if (bcAdj[i].empty()) hasDeg0 = true; } if (hasDeg0 || ends.size() != 2) return {}; int s = find(bcId.begin(), bcId.end(), ends[0]) - bcId.begin(); int t = find(bcId.begin(), bcId.end(), ends[1]) - bcId.begin(); return getOrdering(s, t); } }; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n, m; cin >> n >> m; BipolarOrientation g(n); for (int i = 0; i < m; ++i) { int a, b; cin >> a >> b; --a; --b; g.addEdge(a, b); } auto order = g.getOrdering(); // or g.getOrdering(s, t) for fixed s,t if (order.empty()) { cout << "IMPOSSIBLE\n"; return 0; } for (int x : order) cout << x + 1 << " \n"[x == *order.rbegin()]; }
Test details
Test 1
Group: 1, 4, 5
Verdict: ACCEPTED
input |
---|
100000 99999 8326 74462 11810 58064 21677 73087 62986 25005 ... |
correct output |
---|
1 44159 25721 84659 90058 9960... |
user output |
---|
1 44159 25721 84659 90058 9960... Truncated |
Test 2
Group: 1, 5
Verdict: ACCEPTED
input |
---|
100000 99999 28990 31200 86271 56882 61089 18658 52422 57504 ... |
correct output |
---|
68068 86325 91398 75677 51068 ... |
user output |
---|
75520 37121 89333 44052 51784 ... Truncated |
Test 3
Group: 1, 5
Verdict: ACCEPTED
input |
---|
100000 99999 29378 80094 12282 29378 96138 29378 61870 29378 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 4
Group: 1, 5
Verdict: ACCEPTED
input |
---|
100000 99999 97935 71091 9181 31715 73649 47675 45394 25464 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 5
Group: 1, 5
Verdict: ACCEPTED
input |
---|
100000 99999 2897 55594 11759 89041 56061 8717 69672 73046 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 6
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
100 200 55 10 33 57 68 39 29 27 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 7
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
100 175 71 86 100 88 83 92 25 73 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 8
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 200 26 58 49 25 66 20 20 85 ... |
correct output |
---|
1 2 86 60 34 92 23 4 44 89 76 ... |
user output |
---|
1 29 18 69 14 5 57 19 8 63 21 ... Truncated |
Test 9
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 195 19 28 63 48 1 57 1 20 ... |
correct output |
---|
12 97 18 74 36 10 78 50 61 95 ... |
user output |
---|
1 13 95 25 69 6 83 37 43 4 9 4... Truncated |
Test 10
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
100 193 48 66 15 67 32 14 36 78 ... |
correct output |
---|
1 56 13 32 14 49 75 93 18 6 54... |
user output |
---|
1 56 13 32 80 14 22 49 75 93 1... Truncated |
Test 11
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
100 195 47 68 57 61 45 17 80 61 ... |
correct output |
---|
57 20 83 41 25 33 60 91 59 7 7... |
user output |
---|
1 50 70 17 51 18 62 44 48 15 5... Truncated |
Test 12
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
100 185 43 78 76 99 78 39 83 61 ... |
correct output |
---|
78 43 32 88 26 28 64 81 7 72 2... |
user output |
---|
23 40 52 59 92 65 74 14 80 70 ... Truncated |
Test 13
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
99 132 96 16 18 89 98 50 66 26 ... |
correct output |
---|
1 12 45 71 97 22 35 9 60 27 20... |
user output |
---|
1 12 45 71 97 22 35 9 60 27 20... Truncated |
Test 14
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
98 144 25 6 30 34 58 25 31 41 ... |
correct output |
---|
32 7 92 1 63 86 87 14 90 17 81... |
user output |
---|
1 92 7 32 63 86 87 14 90 17 81... Truncated |
Test 15
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
96 145 19 70 72 92 27 72 17 85 ... |
correct output |
---|
1 50 30 4 10 48 42 5 70 19 29 ... |
user output |
---|
1 50 30 4 10 48 42 5 70 19 29 ... Truncated |
Test 16
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
96 158 79 74 41 70 8 5 73 90 ... |
correct output |
---|
7 59 44 27 1 30 49 28 80 52 15... |
user output |
---|
1 27 44 59 7 30 49 28 80 52 15... Truncated |
Test 17
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
96 142 95 35 67 89 91 70 48 21 ... |
correct output |
---|
13 20 81 33 1 51 19 69 16 85 6... |
user output |
---|
1 20 81 33 13 51 19 69 16 85 6... Truncated |
Test 18
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
72 111 70 17 25 3 58 24 52 9 ... |
correct output |
---|
21 59 48 8 1 2 31 10 11 41 4 5... |
user output |
---|
1 8 48 59 21 2 31 10 11 41 4 5... Truncated |
Test 19
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
988 1563 402 701 830 801 50 578 8 144 ... |
correct output |
---|
1 136 368 683 447 304 131 53 8... |
user output |
---|
1 136 368 683 447 304 131 53 8... Truncated |
Test 20
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
994 1555 171 541 66 915 330 350 494 251 ... |
correct output |
---|
1 164 205 151 951 797 4 654 14... |
user output |
---|
1 164 205 151 951 797 4 654 14... Truncated |
Test 21
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
1000 2000 711 947 775 441 691 471 844 28 ... |
correct output |
---|
1 676 731 662 248 31 165 558 8... |
user output |
---|
1 676 731 248 31 662 788 207 6... Truncated |
Test 22
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
1000 2000 811 889 873 984 83 52 144 511 ... |
correct output |
---|
60 909 522 568 40 77 181 441 8... |
user output |
---|
1 46 651 903 478 67 600 60 909... Truncated |
Test 23
Group: 3, 5
Verdict: ACCEPTED
input |
---|
1000 1869 625 715 448 714 110 927 432 1000 ... |
correct output |
---|
224 326 221 30 76 475 666 694 ... |
user output |
---|
16 605 920 565 801 944 177 822... Truncated |
Test 24
Group: 3, 5
Verdict: ACCEPTED
input |
---|
1000 1783 709 1 182 768 355 40 786 260 ... |
correct output |
---|
230 6 135 678 346 19 470 960 3... |
user output |
---|
834 39 929 141 732 770 612 556... Truncated |
Test 25
Group: 3, 5
Verdict: ACCEPTED
input |
---|
1000 2000 92 876 273 598 287 535 526 972 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 26
Group: 3, 5
Verdict: ACCEPTED
input |
---|
1000 1910 789 821 553 740 889 527 488 730 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 27
Group: 3, 5
Verdict: ACCEPTED
input |
---|
1000 1608 910 416 503 898 928 14 412 903 ... |
correct output |
---|
140 404 739 563 63 794 623 948... |
user output |
---|
63 794 563 739 404 140 623 948... Truncated |
Test 28
Group: 5
Verdict: ACCEPTED
input |
---|
100000 198666 5659 89691 91040 53375 96642 56177 28768 57001 ... |
correct output |
---|
45598 74078 1039 83702 16344 8... |
user output |
---|
157 18219 83307 82655 27891 46... Truncated |
Test 29
Group: 5
Verdict: ACCEPTED
input |
---|
100000 197194 41636 91770 63018 23827 39207 93713 67765 47715 ... |
correct output |
---|
79054 61855 53279 55546 60860 ... |
user output |
---|
1721 7241 18523 86069 96207 52... Truncated |
Test 30
Group: 4, 5
Verdict: ACCEPTED
input |
---|
100000 199985 13674 42886 51349 6858 78502 18751 13628 65936 ... |
correct output |
---|
17857 81664 4369 61462 79754 8... |
user output |
---|
1 47064 44643 17857 73639 8166... Truncated |
Test 31
Group: 4, 5
Verdict: ACCEPTED
input |
---|
100000 200000 27666 33166 7161 81452 73134 30281 5106 29308 ... |
correct output |
---|
76869 5635 23236 12666 61633 8... |
user output |
---|
1 73905 50785 14730 66904 9004... Truncated |
Test 32
Group: 4, 5
Verdict: ACCEPTED
input |
---|
100000 200000 62814 54729 98407 26888 91808 70132 58916 49730 ... |
correct output |
---|
19788 11202 3496 24237 68564 5... |
user output |
---|
1 87874 11202 3496 24237 33785... Truncated |
Test 33
Group: 4, 5
Verdict: ACCEPTED
input |
---|
100000 200000 2299 91653 21125 75544 54029 94067 86513 45051 ... |
correct output |
---|
1 20339 9304 40427 67694 95656... |
user output |
---|
1 67687 2467 66521 2098 1694 5... Truncated |
Test 34
Group: 5
Verdict: ACCEPTED
input |
---|
100000 200000 34688 93668 78127 18902 55150 33116 273 88797 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 35
Group: 5
Verdict: ACCEPTED
input |
---|
100000 200000 21026 14630 5605 59639 25604 78683 55713 70513 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 36
Group: 5
Verdict: ACCEPTED
input |
---|
100000 200000 63190 73606 52072 54105 22092 31495 9189 37924 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 37
Group: 1, 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
2 1 2 1 |
correct output |
---|
1 2 |
user output |
---|
1 2 |
Test 38
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
7 9 1 2 1 3 2 3 1 4 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 39
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
9 12 1 2 2 3 3 1 4 5 ... |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 40
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
5 5 4 2 4 3 2 1 3 1 ... |
correct output |
---|
4 2 3 1 5 |
user output |
---|
2 4 3 1 5 |
Test 41
Group: 1, 2, 3, 5
Verdict: ACCEPTED
input |
---|
4 3 1 2 3 2 4 2 |
correct output |
---|
IMPOSSIBLE |
user output |
---|
IMPOSSIBLE |
Test 42
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
17 30 4 1 3 14 6 16 13 6 ... |
correct output |
---|
7 8 11 15 1 2 9 3 14 13 5 10 1... |
user output |
---|
2 5 9 3 13 14 10 17 12 16 6 4 ... |
Test 43
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
992 1712 377 709 847 640 261 902 761 693 ... |
correct output |
---|
870 1 925 928 950 257 766 520 ... |
user output |
---|
1 870 925 928 90 552 366 826 6... Truncated |
Test 44
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
990 1672 305 445 800 155 365 779 824 247 ... |
correct output |
---|
108 461 160 696 895 655 376 21... |
user output |
---|
1 326 88 160 461 213 376 655 8... Truncated |
Test 45
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
99 169 35 32 97 43 22 62 33 7 ... |
correct output |
---|
19 70 62 22 54 78 25 14 3 81 1... |
user output |
---|
1 19 70 62 22 3 81 17 54 78 25... Truncated |
Test 46
Group: 2, 3, 4, 5
Verdict: ACCEPTED
input |
---|
99 164 62 73 19 35 55 92 79 91 ... |
correct output |
---|
21 25 64 90 17 15 89 95 70 33 ... |
user output |
---|
1 75 38 96 42 16 33 70 95 89 1... Truncated |
Test 47
Group: 2, 3, 5
Verdict: ACCEPTED
input |
---|
53 68 7 46 51 14 3 18 8 40 ... |
correct output |
---|
32 30 38 33 27 12 8 20 2 34 45... |
user output |
---|
1 51 14 17 53 36 13 52 43 47 3... Truncated |
Test 48
Group: 3, 4, 5
Verdict: ACCEPTED
input |
---|
996 1902 661 201 19 613 895 438 180 32 ... |
correct output |
---|
220 795 198 239 40 164 773 834... |
user output |
---|
1 384 31 711 80 486 13 873 533... Truncated |
Test 49
Group: 4, 5
Verdict: ACCEPTED
input |
---|
6110 11528 3366 4718 3226 2188 5022 1186 3205 5349 ... |
correct output |
---|
1 2527 2211 554 4201 4522 1494... |
user output |
---|
1 2527 2211 554 4201 4522 1494... Truncated |