#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll N, S, T;
vector<pair<ll,ll>> adj[200010];
int deg[200010];
int cnt[200010];
int num[200010];
int ori[200010];
int vis[200010];
vector<vector<int>> ans;
void dnc(int s, int e, vector<vector<int>> a) {
if (s == e) {
for (int i=0; i<N; i++) {
ans[i][s] = a[i][0];
}
return;
}
int mid = s + e >> 1;
vector<vector<int>> l(N), r(N);
vector<int> D;
int pv = 0;
vector<int> used;
for (int i=0; i<N; i++) {
for (auto &x : a[i]) {
cnt[x] ++;
}
vector<int> one;
for (auto &x : a[i]) {
if (cnt[x] == 0) continue;
for (int j=0; j<cnt[x] / 2; j++) {
l[i].push_back(x);
r[i].push_back(x);
}
if (cnt[x] % 2 == 1) {
one.push_back(x);
}
cnt[x] = 0;
}
assert(one.size() % 2 == 0);
for (int j=0; j<one.size(); j+=2) {
if (num[one[j]] == 0) {
used.push_back(one[j]);
}
if (num[one[j+1]] == 0) {
used.push_back(one[j+1]);
}
int node1, node2;
if (num[one[j]] == 0 || deg[num[one[j]]] == 2) {
num[one[j]] = ++ pv;
ori[pv] = one[j];
}
deg[num[one[j]]] ++;
node1 = num[one[j]];
if (num[one[j+1]] == 0 || deg[num[one[j+1]]] == 2) {
num[one[j+1]] = ++ pv;
ori[pv] = one[j+1];
}
deg[num[one[j+1]]] ++;
node2 = num[one[j+1]];
adj[node1].push_back({node2, i});
adj[node2].push_back({node1, i});
}
}
int ppv = pv;
for (int i=1; i<=ppv; i++) {
if (deg[i] == 1) {
if (ppv == pv || deg[pv] == 2) pv ++;
adj[pv].push_back({i, -1});
adj[i].push_back({pv, -1});
deg[pv] ++;
}
}
for (int i=1; i<=pv; i++) {
if (vis[i] || adj[i].empty()) continue;
int p = -1;
int x = i;
vector<int> vtx, edg;
while (true) {
vtx.push_back(x);
vis[x] = 1;
if (adj[x][0].first == p) swap(adj[x][0], adj[x][1]);
edg.push_back(adj[x][0].second);
p = x;
x = adj[x][0].first;
if (x == i) break;
}
for (ll j=0; j<vtx.size(); j++) {
if (edg[j] == -1) continue;
l[edg[j]].push_back(ori[vtx[j]]);
r[edg[j]].push_back(ori[vtx[(j+1)%vtx.size()]]);
}
}
for (int i=1; i<=pv; i++) {
vis[i] = 0;
deg[i] = 0;
ori[i] = 0;
adj[i].clear();
}
for (auto &x : used) {
num[x] = 0;
}
dnc(s, mid, l);
dnc(mid+1, e, r);
}
int main() {
ios_base :: sync_with_stdio(false); cin.tie(NULL);
cin >> N >> S >> T;
ans.resize(N, vector<int>(S));
for (ll i=0; i<N; i++) {
for (ll j=0; j<S; j++) {
cin >> ans[i][j];
}
}
dnc(0, S-1, ans);
for (ll i=0; i<N; i++) {
for (ll j=0; j<S; j++) {
cout << ans[i][j] << ' ';
}
cout << '\n';
}
}
Compilation message
balance.cpp: In function 'void dnc(int, int, std::vector<std::vector<int> >)':
balance.cpp:22:17: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
22 | int mid = s + e >> 1;
| ~~^~~
balance.cpp:44:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
44 | for (int j=0; j<one.size(); j+=2) {
| ~^~~~~~~~~~~
balance.cpp:91:23: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
91 | for (ll j=0; j<vtx.size(); j++) {
| ~^~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Correct |
2 |
Correct |
1 ms |
6748 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Correct |
2 |
Correct |
1 ms |
6748 KB |
Correct |
3 |
Correct |
1 ms |
6748 KB |
Correct |
4 |
Correct |
1 ms |
6836 KB |
Correct |
5 |
Correct |
1 ms |
6744 KB |
Correct |
6 |
Correct |
1 ms |
6748 KB |
Correct |
7 |
Correct |
1 ms |
6748 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
77 ms |
40344 KB |
Correct |
2 |
Correct |
72 ms |
39840 KB |
Correct |
3 |
Correct |
76 ms |
36556 KB |
Correct |
4 |
Correct |
57 ms |
38740 KB |
Correct |
5 |
Correct |
73 ms |
40376 KB |
Correct |
6 |
Correct |
72 ms |
40620 KB |
Correct |
7 |
Correct |
95 ms |
40396 KB |
Correct |
8 |
Correct |
64 ms |
40336 KB |
Correct |
9 |
Correct |
59 ms |
41024 KB |
Correct |
10 |
Correct |
53 ms |
40520 KB |
Correct |
11 |
Correct |
52 ms |
40256 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
77 ms |
40344 KB |
Correct |
2 |
Correct |
72 ms |
39840 KB |
Correct |
3 |
Correct |
76 ms |
36556 KB |
Correct |
4 |
Correct |
57 ms |
38740 KB |
Correct |
5 |
Correct |
73 ms |
40376 KB |
Correct |
6 |
Correct |
72 ms |
40620 KB |
Correct |
7 |
Correct |
95 ms |
40396 KB |
Correct |
8 |
Correct |
64 ms |
40336 KB |
Correct |
9 |
Correct |
59 ms |
41024 KB |
Correct |
10 |
Correct |
53 ms |
40520 KB |
Correct |
11 |
Correct |
52 ms |
40256 KB |
Correct |
12 |
Correct |
83 ms |
40348 KB |
Correct |
13 |
Correct |
71 ms |
39720 KB |
Correct |
14 |
Correct |
74 ms |
36612 KB |
Correct |
15 |
Correct |
50 ms |
38736 KB |
Correct |
16 |
Correct |
76 ms |
40404 KB |
Correct |
17 |
Correct |
79 ms |
40568 KB |
Correct |
18 |
Correct |
92 ms |
40392 KB |
Correct |
19 |
Correct |
60 ms |
40336 KB |
Correct |
20 |
Correct |
63 ms |
41024 KB |
Correct |
21 |
Correct |
52 ms |
40484 KB |
Correct |
22 |
Correct |
53 ms |
40256 KB |
Correct |
23 |
Correct |
86 ms |
43288 KB |
Correct |
24 |
Correct |
65 ms |
39764 KB |
Correct |
25 |
Correct |
82 ms |
41872 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Correct |
2 |
Correct |
1 ms |
6748 KB |
Correct |
3 |
Correct |
1 ms |
6748 KB |
Correct |
4 |
Correct |
1 ms |
6836 KB |
Correct |
5 |
Correct |
1 ms |
6744 KB |
Correct |
6 |
Correct |
1 ms |
6748 KB |
Correct |
7 |
Correct |
1 ms |
6748 KB |
Correct |
8 |
Correct |
77 ms |
40344 KB |
Correct |
9 |
Correct |
72 ms |
39840 KB |
Correct |
10 |
Correct |
76 ms |
36556 KB |
Correct |
11 |
Correct |
57 ms |
38740 KB |
Correct |
12 |
Correct |
73 ms |
40376 KB |
Correct |
13 |
Correct |
72 ms |
40620 KB |
Correct |
14 |
Correct |
95 ms |
40396 KB |
Correct |
15 |
Correct |
64 ms |
40336 KB |
Correct |
16 |
Correct |
59 ms |
41024 KB |
Correct |
17 |
Correct |
53 ms |
40520 KB |
Correct |
18 |
Correct |
52 ms |
40256 KB |
Correct |
19 |
Correct |
83 ms |
40348 KB |
Correct |
20 |
Correct |
71 ms |
39720 KB |
Correct |
21 |
Correct |
74 ms |
36612 KB |
Correct |
22 |
Correct |
50 ms |
38736 KB |
Correct |
23 |
Correct |
76 ms |
40404 KB |
Correct |
24 |
Correct |
79 ms |
40568 KB |
Correct |
25 |
Correct |
92 ms |
40392 KB |
Correct |
26 |
Correct |
60 ms |
40336 KB |
Correct |
27 |
Correct |
63 ms |
41024 KB |
Correct |
28 |
Correct |
52 ms |
40484 KB |
Correct |
29 |
Correct |
53 ms |
40256 KB |
Correct |
30 |
Correct |
86 ms |
43288 KB |
Correct |
31 |
Correct |
65 ms |
39764 KB |
Correct |
32 |
Correct |
82 ms |
41872 KB |
Correct |
33 |
Correct |
1 ms |
6744 KB |
Correct |
34 |
Correct |
1 ms |
6748 KB |
Correct |
35 |
Correct |
1 ms |
6748 KB |
Correct |
36 |
Correct |
1 ms |
6748 KB |
Correct |
37 |
Correct |
1 ms |
6748 KB |
Correct |
38 |
Correct |
1 ms |
6748 KB |
Correct |
39 |
Correct |
1 ms |
6748 KB |
Correct |
40 |
Correct |
76 ms |
41524 KB |
Correct |
41 |
Correct |
86 ms |
40852 KB |
Correct |
42 |
Correct |
69 ms |
37384 KB |
Correct |
43 |
Correct |
56 ms |
39200 KB |
Correct |
44 |
Correct |
72 ms |
41440 KB |
Correct |
45 |
Correct |
79 ms |
41592 KB |
Correct |
46 |
Correct |
78 ms |
41672 KB |
Correct |
47 |
Correct |
62 ms |
41288 KB |
Correct |
48 |
Correct |
66 ms |
42052 KB |
Correct |
49 |
Correct |
54 ms |
41540 KB |
Correct |
50 |
Correct |
55 ms |
40888 KB |
Correct |
51 |
Correct |
84 ms |
44568 KB |
Correct |
52 |
Correct |
65 ms |
39764 KB |
Correct |
53 |
Correct |
82 ms |
41868 KB |
Correct |
54 |
Correct |
41 ms |
26536 KB |
Correct |
55 |
Correct |
3 ms |
7516 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Correct |
2 |
Correct |
5 ms |
7260 KB |
Correct |
3 |
Correct |
4 ms |
7004 KB |
Correct |
4 |
Correct |
4 ms |
8028 KB |
Correct |
5 |
Correct |
3 ms |
8284 KB |
Correct |
6 |
Correct |
6 ms |
8436 KB |
Correct |
7 |
Correct |
4 ms |
8180 KB |
Correct |
8 |
Correct |
5 ms |
7772 KB |
Correct |
9 |
Correct |
4 ms |
7980 KB |
Correct |
10 |
Correct |
5 ms |
8284 KB |
Correct |
11 |
Correct |
4 ms |
8028 KB |
Correct |
12 |
Correct |
3 ms |
8540 KB |
Correct |
13 |
Correct |
4 ms |
8536 KB |
Correct |
14 |
Correct |
4 ms |
8460 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Correct |
2 |
Correct |
5 ms |
7260 KB |
Correct |
3 |
Correct |
4 ms |
7004 KB |
Correct |
4 |
Correct |
4 ms |
8028 KB |
Correct |
5 |
Correct |
3 ms |
8284 KB |
Correct |
6 |
Correct |
6 ms |
8436 KB |
Correct |
7 |
Correct |
4 ms |
8180 KB |
Correct |
8 |
Correct |
5 ms |
7772 KB |
Correct |
9 |
Correct |
4 ms |
7980 KB |
Correct |
10 |
Correct |
5 ms |
8284 KB |
Correct |
11 |
Correct |
4 ms |
8028 KB |
Correct |
12 |
Correct |
3 ms |
8540 KB |
Correct |
13 |
Correct |
4 ms |
8536 KB |
Correct |
14 |
Correct |
4 ms |
8460 KB |
Correct |
15 |
Correct |
1 ms |
6744 KB |
Correct |
16 |
Correct |
7 ms |
7336 KB |
Correct |
17 |
Correct |
4 ms |
7004 KB |
Correct |
18 |
Correct |
4 ms |
8016 KB |
Correct |
19 |
Correct |
3 ms |
8284 KB |
Correct |
20 |
Correct |
4 ms |
8420 KB |
Correct |
21 |
Correct |
4 ms |
8180 KB |
Correct |
22 |
Correct |
5 ms |
7772 KB |
Correct |
23 |
Correct |
5 ms |
7772 KB |
Correct |
24 |
Correct |
4 ms |
8284 KB |
Correct |
25 |
Correct |
5 ms |
8120 KB |
Correct |
26 |
Correct |
4 ms |
8540 KB |
Correct |
27 |
Correct |
3 ms |
8408 KB |
Correct |
28 |
Correct |
4 ms |
8464 KB |
Correct |
29 |
Correct |
5 ms |
7260 KB |
Correct |
30 |
Correct |
9 ms |
8284 KB |
Correct |
31 |
Correct |
5 ms |
8024 KB |
Correct |
32 |
Correct |
5 ms |
8280 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Correct |
2 |
Correct |
5 ms |
7260 KB |
Correct |
3 |
Correct |
4 ms |
7004 KB |
Correct |
4 |
Correct |
4 ms |
8028 KB |
Correct |
5 |
Correct |
3 ms |
8284 KB |
Correct |
6 |
Correct |
6 ms |
8436 KB |
Correct |
7 |
Correct |
4 ms |
8180 KB |
Correct |
8 |
Correct |
5 ms |
7772 KB |
Correct |
9 |
Correct |
4 ms |
7980 KB |
Correct |
10 |
Correct |
5 ms |
8284 KB |
Correct |
11 |
Correct |
4 ms |
8028 KB |
Correct |
12 |
Correct |
3 ms |
8540 KB |
Correct |
13 |
Correct |
4 ms |
8536 KB |
Correct |
14 |
Correct |
4 ms |
8460 KB |
Correct |
15 |
Correct |
1 ms |
6744 KB |
Correct |
16 |
Correct |
7 ms |
7336 KB |
Correct |
17 |
Correct |
4 ms |
7004 KB |
Correct |
18 |
Correct |
4 ms |
8016 KB |
Correct |
19 |
Correct |
3 ms |
8284 KB |
Correct |
20 |
Correct |
4 ms |
8420 KB |
Correct |
21 |
Correct |
4 ms |
8180 KB |
Correct |
22 |
Correct |
5 ms |
7772 KB |
Correct |
23 |
Correct |
5 ms |
7772 KB |
Correct |
24 |
Correct |
4 ms |
8284 KB |
Correct |
25 |
Correct |
5 ms |
8120 KB |
Correct |
26 |
Correct |
4 ms |
8540 KB |
Correct |
27 |
Correct |
3 ms |
8408 KB |
Correct |
28 |
Correct |
4 ms |
8464 KB |
Correct |
29 |
Correct |
5 ms |
7260 KB |
Correct |
30 |
Correct |
9 ms |
8284 KB |
Correct |
31 |
Correct |
5 ms |
8024 KB |
Correct |
32 |
Correct |
5 ms |
8280 KB |
Correct |
33 |
Correct |
1 ms |
6744 KB |
Correct |
34 |
Correct |
5 ms |
7256 KB |
Correct |
35 |
Correct |
4 ms |
7004 KB |
Correct |
36 |
Correct |
6 ms |
8116 KB |
Correct |
37 |
Correct |
4 ms |
8280 KB |
Correct |
38 |
Correct |
4 ms |
8420 KB |
Correct |
39 |
Correct |
9 ms |
8176 KB |
Correct |
40 |
Correct |
4 ms |
7768 KB |
Correct |
41 |
Correct |
5 ms |
8024 KB |
Correct |
42 |
Correct |
4 ms |
8284 KB |
Correct |
43 |
Correct |
4 ms |
8024 KB |
Correct |
44 |
Correct |
4 ms |
8596 KB |
Correct |
45 |
Correct |
4 ms |
8464 KB |
Correct |
46 |
Correct |
3 ms |
8540 KB |
Correct |
47 |
Correct |
5 ms |
7256 KB |
Correct |
48 |
Correct |
5 ms |
8284 KB |
Correct |
49 |
Correct |
5 ms |
8028 KB |
Correct |
50 |
Correct |
5 ms |
8284 KB |
Correct |
51 |
Correct |
1 ms |
6848 KB |
Correct |
52 |
Correct |
1 ms |
6748 KB |
Correct |
53 |
Correct |
1 ms |
6748 KB |
Correct |
54 |
Correct |
1 ms |
6748 KB |
Correct |
55 |
Correct |
1 ms |
6748 KB |
Correct |
56 |
Correct |
1 ms |
6748 KB |
Correct |
57 |
Correct |
1 ms |
6748 KB |
Correct |
58 |
Correct |
10 ms |
8280 KB |
Correct |
59 |
Correct |
11 ms |
8028 KB |
Correct |
60 |
Correct |
6 ms |
8284 KB |
Correct |
61 |
Correct |
5 ms |
8540 KB |
Correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
77 ms |
40344 KB |
Correct |
2 |
Correct |
72 ms |
39840 KB |
Correct |
3 |
Correct |
76 ms |
36556 KB |
Correct |
4 |
Correct |
57 ms |
38740 KB |
Correct |
5 |
Correct |
73 ms |
40376 KB |
Correct |
6 |
Correct |
72 ms |
40620 KB |
Correct |
7 |
Correct |
95 ms |
40396 KB |
Correct |
8 |
Correct |
64 ms |
40336 KB |
Correct |
9 |
Correct |
59 ms |
41024 KB |
Correct |
10 |
Correct |
53 ms |
40520 KB |
Correct |
11 |
Correct |
52 ms |
40256 KB |
Correct |
12 |
Correct |
1 ms |
6748 KB |
Correct |
13 |
Correct |
5 ms |
7260 KB |
Correct |
14 |
Correct |
4 ms |
7004 KB |
Correct |
15 |
Correct |
4 ms |
8028 KB |
Correct |
16 |
Correct |
3 ms |
8284 KB |
Correct |
17 |
Correct |
6 ms |
8436 KB |
Correct |
18 |
Correct |
4 ms |
8180 KB |
Correct |
19 |
Correct |
5 ms |
7772 KB |
Correct |
20 |
Correct |
4 ms |
7980 KB |
Correct |
21 |
Correct |
5 ms |
8284 KB |
Correct |
22 |
Correct |
4 ms |
8028 KB |
Correct |
23 |
Correct |
3 ms |
8540 KB |
Correct |
24 |
Correct |
4 ms |
8536 KB |
Correct |
25 |
Correct |
4 ms |
8460 KB |
Correct |
26 |
Correct |
80 ms |
41140 KB |
Correct |
27 |
Correct |
78 ms |
40852 KB |
Correct |
28 |
Correct |
107 ms |
37384 KB |
Correct |
29 |
Correct |
53 ms |
39228 KB |
Correct |
30 |
Correct |
84 ms |
41444 KB |
Correct |
31 |
Correct |
83 ms |
41660 KB |
Correct |
32 |
Correct |
74 ms |
41424 KB |
Correct |
33 |
Correct |
57 ms |
41616 KB |
Correct |
34 |
Correct |
92 ms |
41284 KB |
Correct |
35 |
Correct |
52 ms |
41548 KB |
Correct |
36 |
Correct |
51 ms |
41412 KB |
Correct |
37 |
Correct |
1 ms |
6748 KB |
Correct |
38 |
Correct |
9 ms |
7260 KB |
Correct |
39 |
Correct |
7 ms |
7256 KB |
Correct |
40 |
Correct |
4 ms |
8028 KB |
Correct |
41 |
Correct |
3 ms |
8284 KB |
Correct |
42 |
Correct |
4 ms |
8540 KB |
Correct |
43 |
Correct |
5 ms |
8180 KB |
Correct |
44 |
Correct |
5 ms |
7884 KB |
Correct |
45 |
Correct |
8 ms |
8028 KB |
Correct |
46 |
Correct |
5 ms |
8284 KB |
Correct |
47 |
Correct |
4 ms |
8024 KB |
Correct |
48 |
Correct |
4 ms |
8540 KB |
Correct |
49 |
Correct |
5 ms |
8540 KB |
Correct |
50 |
Correct |
4 ms |
8540 KB |
Correct |
51 |
Runtime error |
70 ms |
60764 KB |
Execution killed with signal 11 |
52 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
77 ms |
40344 KB |
Correct |
2 |
Correct |
72 ms |
39840 KB |
Correct |
3 |
Correct |
76 ms |
36556 KB |
Correct |
4 |
Correct |
57 ms |
38740 KB |
Correct |
5 |
Correct |
73 ms |
40376 KB |
Correct |
6 |
Correct |
72 ms |
40620 KB |
Correct |
7 |
Correct |
95 ms |
40396 KB |
Correct |
8 |
Correct |
64 ms |
40336 KB |
Correct |
9 |
Correct |
59 ms |
41024 KB |
Correct |
10 |
Correct |
53 ms |
40520 KB |
Correct |
11 |
Correct |
52 ms |
40256 KB |
Correct |
12 |
Correct |
83 ms |
40348 KB |
Correct |
13 |
Correct |
71 ms |
39720 KB |
Correct |
14 |
Correct |
74 ms |
36612 KB |
Correct |
15 |
Correct |
50 ms |
38736 KB |
Correct |
16 |
Correct |
76 ms |
40404 KB |
Correct |
17 |
Correct |
79 ms |
40568 KB |
Correct |
18 |
Correct |
92 ms |
40392 KB |
Correct |
19 |
Correct |
60 ms |
40336 KB |
Correct |
20 |
Correct |
63 ms |
41024 KB |
Correct |
21 |
Correct |
52 ms |
40484 KB |
Correct |
22 |
Correct |
53 ms |
40256 KB |
Correct |
23 |
Correct |
86 ms |
43288 KB |
Correct |
24 |
Correct |
65 ms |
39764 KB |
Correct |
25 |
Correct |
82 ms |
41872 KB |
Correct |
26 |
Correct |
1 ms |
6748 KB |
Correct |
27 |
Correct |
5 ms |
7260 KB |
Correct |
28 |
Correct |
4 ms |
7004 KB |
Correct |
29 |
Correct |
4 ms |
8028 KB |
Correct |
30 |
Correct |
3 ms |
8284 KB |
Correct |
31 |
Correct |
6 ms |
8436 KB |
Correct |
32 |
Correct |
4 ms |
8180 KB |
Correct |
33 |
Correct |
5 ms |
7772 KB |
Correct |
34 |
Correct |
4 ms |
7980 KB |
Correct |
35 |
Correct |
5 ms |
8284 KB |
Correct |
36 |
Correct |
4 ms |
8028 KB |
Correct |
37 |
Correct |
3 ms |
8540 KB |
Correct |
38 |
Correct |
4 ms |
8536 KB |
Correct |
39 |
Correct |
4 ms |
8460 KB |
Correct |
40 |
Correct |
1 ms |
6744 KB |
Correct |
41 |
Correct |
7 ms |
7336 KB |
Correct |
42 |
Correct |
4 ms |
7004 KB |
Correct |
43 |
Correct |
4 ms |
8016 KB |
Correct |
44 |
Correct |
3 ms |
8284 KB |
Correct |
45 |
Correct |
4 ms |
8420 KB |
Correct |
46 |
Correct |
4 ms |
8180 KB |
Correct |
47 |
Correct |
5 ms |
7772 KB |
Correct |
48 |
Correct |
5 ms |
7772 KB |
Correct |
49 |
Correct |
4 ms |
8284 KB |
Correct |
50 |
Correct |
5 ms |
8120 KB |
Correct |
51 |
Correct |
4 ms |
8540 KB |
Correct |
52 |
Correct |
3 ms |
8408 KB |
Correct |
53 |
Correct |
4 ms |
8464 KB |
Correct |
54 |
Correct |
5 ms |
7260 KB |
Correct |
55 |
Correct |
9 ms |
8284 KB |
Correct |
56 |
Correct |
5 ms |
8024 KB |
Correct |
57 |
Correct |
5 ms |
8280 KB |
Correct |
58 |
Correct |
80 ms |
41140 KB |
Correct |
59 |
Correct |
78 ms |
40852 KB |
Correct |
60 |
Correct |
107 ms |
37384 KB |
Correct |
61 |
Correct |
53 ms |
39228 KB |
Correct |
62 |
Correct |
84 ms |
41444 KB |
Correct |
63 |
Correct |
83 ms |
41660 KB |
Correct |
64 |
Correct |
74 ms |
41424 KB |
Correct |
65 |
Correct |
57 ms |
41616 KB |
Correct |
66 |
Correct |
92 ms |
41284 KB |
Correct |
67 |
Correct |
52 ms |
41548 KB |
Correct |
68 |
Correct |
51 ms |
41412 KB |
Correct |
69 |
Correct |
1 ms |
6748 KB |
Correct |
70 |
Correct |
9 ms |
7260 KB |
Correct |
71 |
Correct |
7 ms |
7256 KB |
Correct |
72 |
Correct |
4 ms |
8028 KB |
Correct |
73 |
Correct |
3 ms |
8284 KB |
Correct |
74 |
Correct |
4 ms |
8540 KB |
Correct |
75 |
Correct |
5 ms |
8180 KB |
Correct |
76 |
Correct |
5 ms |
7884 KB |
Correct |
77 |
Correct |
8 ms |
8028 KB |
Correct |
78 |
Correct |
5 ms |
8284 KB |
Correct |
79 |
Correct |
4 ms |
8024 KB |
Correct |
80 |
Correct |
4 ms |
8540 KB |
Correct |
81 |
Correct |
5 ms |
8540 KB |
Correct |
82 |
Correct |
4 ms |
8540 KB |
Correct |
83 |
Runtime error |
70 ms |
60764 KB |
Execution killed with signal 11 |
84 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
6748 KB |
Correct |
2 |
Correct |
1 ms |
6748 KB |
Correct |
3 |
Correct |
1 ms |
6748 KB |
Correct |
4 |
Correct |
1 ms |
6748 KB |
Correct |
5 |
Correct |
1 ms |
6748 KB |
Correct |
6 |
Correct |
1 ms |
6836 KB |
Correct |
7 |
Correct |
1 ms |
6744 KB |
Correct |
8 |
Correct |
1 ms |
6748 KB |
Correct |
9 |
Correct |
1 ms |
6748 KB |
Correct |
10 |
Correct |
77 ms |
40344 KB |
Correct |
11 |
Correct |
72 ms |
39840 KB |
Correct |
12 |
Correct |
76 ms |
36556 KB |
Correct |
13 |
Correct |
57 ms |
38740 KB |
Correct |
14 |
Correct |
73 ms |
40376 KB |
Correct |
15 |
Correct |
72 ms |
40620 KB |
Correct |
16 |
Correct |
95 ms |
40396 KB |
Correct |
17 |
Correct |
64 ms |
40336 KB |
Correct |
18 |
Correct |
59 ms |
41024 KB |
Correct |
19 |
Correct |
53 ms |
40520 KB |
Correct |
20 |
Correct |
52 ms |
40256 KB |
Correct |
21 |
Correct |
83 ms |
40348 KB |
Correct |
22 |
Correct |
71 ms |
39720 KB |
Correct |
23 |
Correct |
74 ms |
36612 KB |
Correct |
24 |
Correct |
50 ms |
38736 KB |
Correct |
25 |
Correct |
76 ms |
40404 KB |
Correct |
26 |
Correct |
79 ms |
40568 KB |
Correct |
27 |
Correct |
92 ms |
40392 KB |
Correct |
28 |
Correct |
60 ms |
40336 KB |
Correct |
29 |
Correct |
63 ms |
41024 KB |
Correct |
30 |
Correct |
52 ms |
40484 KB |
Correct |
31 |
Correct |
53 ms |
40256 KB |
Correct |
32 |
Correct |
86 ms |
43288 KB |
Correct |
33 |
Correct |
65 ms |
39764 KB |
Correct |
34 |
Correct |
82 ms |
41872 KB |
Correct |
35 |
Correct |
1 ms |
6744 KB |
Correct |
36 |
Correct |
1 ms |
6748 KB |
Correct |
37 |
Correct |
1 ms |
6748 KB |
Correct |
38 |
Correct |
1 ms |
6748 KB |
Correct |
39 |
Correct |
1 ms |
6748 KB |
Correct |
40 |
Correct |
1 ms |
6748 KB |
Correct |
41 |
Correct |
1 ms |
6748 KB |
Correct |
42 |
Correct |
76 ms |
41524 KB |
Correct |
43 |
Correct |
86 ms |
40852 KB |
Correct |
44 |
Correct |
69 ms |
37384 KB |
Correct |
45 |
Correct |
56 ms |
39200 KB |
Correct |
46 |
Correct |
72 ms |
41440 KB |
Correct |
47 |
Correct |
79 ms |
41592 KB |
Correct |
48 |
Correct |
78 ms |
41672 KB |
Correct |
49 |
Correct |
62 ms |
41288 KB |
Correct |
50 |
Correct |
66 ms |
42052 KB |
Correct |
51 |
Correct |
54 ms |
41540 KB |
Correct |
52 |
Correct |
55 ms |
40888 KB |
Correct |
53 |
Correct |
84 ms |
44568 KB |
Correct |
54 |
Correct |
65 ms |
39764 KB |
Correct |
55 |
Correct |
82 ms |
41868 KB |
Correct |
56 |
Correct |
41 ms |
26536 KB |
Correct |
57 |
Correct |
3 ms |
7516 KB |
Correct |
58 |
Correct |
1 ms |
6748 KB |
Correct |
59 |
Correct |
5 ms |
7260 KB |
Correct |
60 |
Correct |
4 ms |
7004 KB |
Correct |
61 |
Correct |
4 ms |
8028 KB |
Correct |
62 |
Correct |
3 ms |
8284 KB |
Correct |
63 |
Correct |
6 ms |
8436 KB |
Correct |
64 |
Correct |
4 ms |
8180 KB |
Correct |
65 |
Correct |
5 ms |
7772 KB |
Correct |
66 |
Correct |
4 ms |
7980 KB |
Correct |
67 |
Correct |
5 ms |
8284 KB |
Correct |
68 |
Correct |
4 ms |
8028 KB |
Correct |
69 |
Correct |
3 ms |
8540 KB |
Correct |
70 |
Correct |
4 ms |
8536 KB |
Correct |
71 |
Correct |
4 ms |
8460 KB |
Correct |
72 |
Correct |
1 ms |
6744 KB |
Correct |
73 |
Correct |
7 ms |
7336 KB |
Correct |
74 |
Correct |
4 ms |
7004 KB |
Correct |
75 |
Correct |
4 ms |
8016 KB |
Correct |
76 |
Correct |
3 ms |
8284 KB |
Correct |
77 |
Correct |
4 ms |
8420 KB |
Correct |
78 |
Correct |
4 ms |
8180 KB |
Correct |
79 |
Correct |
5 ms |
7772 KB |
Correct |
80 |
Correct |
5 ms |
7772 KB |
Correct |
81 |
Correct |
4 ms |
8284 KB |
Correct |
82 |
Correct |
5 ms |
8120 KB |
Correct |
83 |
Correct |
4 ms |
8540 KB |
Correct |
84 |
Correct |
3 ms |
8408 KB |
Correct |
85 |
Correct |
4 ms |
8464 KB |
Correct |
86 |
Correct |
5 ms |
7260 KB |
Correct |
87 |
Correct |
9 ms |
8284 KB |
Correct |
88 |
Correct |
5 ms |
8024 KB |
Correct |
89 |
Correct |
5 ms |
8280 KB |
Correct |
90 |
Correct |
1 ms |
6744 KB |
Correct |
91 |
Correct |
5 ms |
7256 KB |
Correct |
92 |
Correct |
4 ms |
7004 KB |
Correct |
93 |
Correct |
6 ms |
8116 KB |
Correct |
94 |
Correct |
4 ms |
8280 KB |
Correct |
95 |
Correct |
4 ms |
8420 KB |
Correct |
96 |
Correct |
9 ms |
8176 KB |
Correct |
97 |
Correct |
4 ms |
7768 KB |
Correct |
98 |
Correct |
5 ms |
8024 KB |
Correct |
99 |
Correct |
4 ms |
8284 KB |
Correct |
100 |
Correct |
4 ms |
8024 KB |
Correct |
101 |
Correct |
4 ms |
8596 KB |
Correct |
102 |
Correct |
4 ms |
8464 KB |
Correct |
103 |
Correct |
3 ms |
8540 KB |
Correct |
104 |
Correct |
5 ms |
7256 KB |
Correct |
105 |
Correct |
5 ms |
8284 KB |
Correct |
106 |
Correct |
5 ms |
8028 KB |
Correct |
107 |
Correct |
5 ms |
8284 KB |
Correct |
108 |
Correct |
1 ms |
6848 KB |
Correct |
109 |
Correct |
1 ms |
6748 KB |
Correct |
110 |
Correct |
1 ms |
6748 KB |
Correct |
111 |
Correct |
1 ms |
6748 KB |
Correct |
112 |
Correct |
1 ms |
6748 KB |
Correct |
113 |
Correct |
1 ms |
6748 KB |
Correct |
114 |
Correct |
1 ms |
6748 KB |
Correct |
115 |
Correct |
10 ms |
8280 KB |
Correct |
116 |
Correct |
11 ms |
8028 KB |
Correct |
117 |
Correct |
6 ms |
8284 KB |
Correct |
118 |
Correct |
5 ms |
8540 KB |
Correct |
119 |
Correct |
80 ms |
41140 KB |
Correct |
120 |
Correct |
78 ms |
40852 KB |
Correct |
121 |
Correct |
107 ms |
37384 KB |
Correct |
122 |
Correct |
53 ms |
39228 KB |
Correct |
123 |
Correct |
84 ms |
41444 KB |
Correct |
124 |
Correct |
83 ms |
41660 KB |
Correct |
125 |
Correct |
74 ms |
41424 KB |
Correct |
126 |
Correct |
57 ms |
41616 KB |
Correct |
127 |
Correct |
92 ms |
41284 KB |
Correct |
128 |
Correct |
52 ms |
41548 KB |
Correct |
129 |
Correct |
51 ms |
41412 KB |
Correct |
130 |
Correct |
1 ms |
6748 KB |
Correct |
131 |
Correct |
9 ms |
7260 KB |
Correct |
132 |
Correct |
7 ms |
7256 KB |
Correct |
133 |
Correct |
4 ms |
8028 KB |
Correct |
134 |
Correct |
3 ms |
8284 KB |
Correct |
135 |
Correct |
4 ms |
8540 KB |
Correct |
136 |
Correct |
5 ms |
8180 KB |
Correct |
137 |
Correct |
5 ms |
7884 KB |
Correct |
138 |
Correct |
8 ms |
8028 KB |
Correct |
139 |
Correct |
5 ms |
8284 KB |
Correct |
140 |
Correct |
4 ms |
8024 KB |
Correct |
141 |
Correct |
4 ms |
8540 KB |
Correct |
142 |
Correct |
5 ms |
8540 KB |
Correct |
143 |
Correct |
4 ms |
8540 KB |
Correct |
144 |
Runtime error |
70 ms |
60764 KB |
Execution killed with signal 11 |
145 |
Halted |
0 ms |
0 KB |
- |