#include "supertrees.h"
#include<bits/stdc++.h>
using namespace std;
int construct(vector<vector<int>>p){
int n = p.size();
bool is_sub1 = true, is_sub2 = true, is_sub3 = true;
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
if(p[i][j] != 1){
is_sub1 = false;
}
if(p[i][j] > 1){
is_sub2 = false;
}
if(p[i][j] != 0 && p[i][j] != 2){
is_sub3 = false;
}
}
}
if(is_sub1){
p = vector<vector<int>>(n, vector<int>(n, 0));
for(int i = 1; i < n; i++){
p[i][i - 1] = p[i - 1][i] = 1;
}
build(p);
return 1;
}
if(is_sub2){
vector<int>par(n);
iota(par.begin(), par.end(), 0);
function<int(int)>find_set;
find_set = [&] (int n){
return n == par[n] ? n : par[n] = find_set(par[n]);
};
function<void(int, int)>merge = [&] (int a, int b){
par[find_set(a)] = find_set(b);
};
vector<bool>vis(n, false);
vector<vector<int>>edge(n);
for(int i = 0; i < n; i++){
if(vis[i]){
for(int j = 0; j < n; j++){
if(i != j && int(find_set(i) == find_set(j)) != p[i][j]){
return 0;
}
}
continue;
}
for(int j = 0; j < n; j++){
if(i != j && p[i][j] == 0 && find_set(i) == find_set(j)){
return 0;
}
if(p[i][j] == 1){
merge(i, j);
vis[j] = true;
}
}
}
for(int i = 0; i < n; i++){
edge[find_set(i)].emplace_back(i);
}
p = vector<vector<int>>(n, vector<int>(n, 0));
for(int i = 0; i < n; i++){
for(int j = 1; j < edge[i].size(); j++){
p[edge[i][j]][edge[i][j - 1]] = p[edge[i][j - 1]][edge[i][j]] = 1;
}
}
build(p);
return 1;
}
if(is_sub3){
vector<int>par(n);
iota(par.begin(), par.end(), 0);
function<int(int)>find_set;
find_set = [&] (int n){
return n == par[n] ? n : par[n] = find_set(par[n]);
};
function<void(int, int)>merge = [&] (int a, int b){
par[find_set(a)] = find_set(b);
};
vector<bool>vis(n, false);
vector<vector<int>>edge(n);
for(int i = 0; i < n; i++){
if(vis[i]){
for(int j = 0; j < n; j++){
if(i != j && (find_set(i) == find_set(j)) != (p[i][j] == 2)){
return 0;
}
}
continue;
}
for(int j = 0; j < n; j++){
if(i != j && p[i][j] == 0 && find_set(i) == find_set(j)){
return 0;
}
if(p[i][j] == 2){
merge(i, j);
vis[j] = true;
}
}
}
for(int i = 0; i < n; i++){
edge[find_set(i)].emplace_back(i);
}
p = vector<vector<int>>(n, vector<int>(n, 0));
for(int i = 0; i < n; i++){
if(edge[i].size() == 2){
return 0;
}
if(edge[i].size() > 2){
edge[i].emplace_back(edge[i][0]);
for(int j = 1; j < edge[i].size(); j++){
p[edge[i][j]][edge[i][j - 1]] = p[edge[i][j - 1]][edge[i][j]] = 1;
}
}
}
build(p);
return 1;
}
vector<bool>vis(n, false);
vector<vector<int>>ans(n, vector<int>(n, 0));
for(int i = 0; i < n; i++){
if(!vis[i]){
vector<int>vertex;
for(int j = i; j < n; j++){
if(p[i][j] > 0){
vertex.emplace_back(j);
vis[j] = true;
}
}
vector<vector<int>>part;
for(int& u : vertex){
for(int& v : vertex){
if(p[u][v] == 0){
return 0;
}
}
if(vis[u]){
part.emplace_back(vector<int>());
for(int& v : vertex){
if(vis[v] && p[u][v] == 1){
part.back().emplace_back(v);
vis[v] = false;
}
}
}
}
if(part.size() == 2){
return 0;
}
for(int i = 0; i < part.size(); i++){
for(int j = i + 1; j < part.size(); j++){
assert(part[i][0] != part[j][0]);
}
}
for(auto& x : part){
for(auto& y : part){
for(int& i : x){
for(int& j : y){
if((x[0] != y[0]) != (p[i][j] == 2)){
return 0;
}
}
}
}
for(int i = 1; i < x.size(); i++){
ans[x[i]][x[i - 1]] = ans[x[i - 1]][x[i]] = 1;
}
}
for(int i = 0; i < part.size(); i++){
int u = part[i][0], v = part[(i + 1) % part.size()][0];
if(u != v){
ans[u][v] = ans[v][u] = 1;
}
}
for(int& i : vertex){
for(int j = 0; j < n; j++){
if(vis[j] && p[i][j] > 0){
return 0;
}
}
}
for(int& i : vertex){
vis[i] = true;
}
}
}
build(ans);
return 1;
}
Compilation message
supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:64:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
64 | for(int j = 1; j < edge[i].size(); j++){
| ~~^~~~~~~~~~~~~~~~
supertrees.cpp:112:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
112 | for(int j = 1; j < edge[i].size(); j++){
| ~~^~~~~~~~~~~~~~~~
supertrees.cpp:151:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
151 | for(int i = 0; i < part.size(); i++){
| ~~^~~~~~~~~~~~~
supertrees.cpp:152:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
152 | for(int j = i + 1; j < part.size(); j++){
| ~~^~~~~~~~~~~~~
supertrees.cpp:166:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
166 | for(int i = 1; i < x.size(); i++){
| ~~^~~~~~~~~~
supertrees.cpp:170:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
170 | for(int i = 0; i < part.size(); i++){
| ~~^~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
600 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
7 ms |
1116 KB |
Output is correct |
7 |
Correct |
146 ms |
18044 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
600 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
7 ms |
1116 KB |
Output is correct |
7 |
Correct |
146 ms |
18044 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
6 ms |
1116 KB |
Output is correct |
13 |
Correct |
158 ms |
18260 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
3 ms |
600 KB |
Output is correct |
17 |
Correct |
70 ms |
8212 KB |
Output is correct |
18 |
Correct |
1 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
41 ms |
4752 KB |
Output is correct |
21 |
Correct |
200 ms |
18060 KB |
Output is correct |
22 |
Correct |
164 ms |
18336 KB |
Output is correct |
23 |
Correct |
173 ms |
18252 KB |
Output is correct |
24 |
Correct |
159 ms |
18260 KB |
Output is correct |
25 |
Correct |
74 ms |
8200 KB |
Output is correct |
26 |
Correct |
71 ms |
8528 KB |
Output is correct |
27 |
Correct |
173 ms |
18244 KB |
Output is correct |
28 |
Correct |
160 ms |
18256 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
7 ms |
1116 KB |
Output is correct |
9 |
Correct |
158 ms |
18288 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
7 ms |
1116 KB |
Output is correct |
13 |
Correct |
150 ms |
22068 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
3 ms |
860 KB |
Output is correct |
17 |
Correct |
73 ms |
12060 KB |
Output is correct |
18 |
Correct |
1 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
38 ms |
6236 KB |
Output is correct |
22 |
Correct |
161 ms |
23636 KB |
Output is correct |
23 |
Correct |
155 ms |
23440 KB |
Output is correct |
24 |
Correct |
160 ms |
23452 KB |
Output is correct |
25 |
Correct |
71 ms |
13348 KB |
Output is correct |
26 |
Correct |
69 ms |
13392 KB |
Output is correct |
27 |
Correct |
157 ms |
23308 KB |
Output is correct |
28 |
Correct |
190 ms |
23408 KB |
Output is correct |
29 |
Correct |
69 ms |
13360 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
45 ms |
4752 KB |
Output is correct |
5 |
Correct |
202 ms |
18260 KB |
Output is correct |
6 |
Correct |
164 ms |
18444 KB |
Output is correct |
7 |
Correct |
196 ms |
18228 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
46 ms |
6144 KB |
Output is correct |
10 |
Correct |
155 ms |
23380 KB |
Output is correct |
11 |
Correct |
156 ms |
23440 KB |
Output is correct |
12 |
Correct |
160 ms |
23640 KB |
Output is correct |
13 |
Correct |
0 ms |
344 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
416 KB |
Output is correct |
16 |
Correct |
39 ms |
6236 KB |
Output is correct |
17 |
Correct |
161 ms |
23488 KB |
Output is correct |
18 |
Correct |
157 ms |
23368 KB |
Output is correct |
19 |
Correct |
156 ms |
23308 KB |
Output is correct |
20 |
Correct |
157 ms |
23632 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
600 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
7 ms |
1116 KB |
Output is correct |
7 |
Correct |
146 ms |
18044 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
6 ms |
1116 KB |
Output is correct |
13 |
Correct |
158 ms |
18260 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
3 ms |
600 KB |
Output is correct |
17 |
Correct |
70 ms |
8212 KB |
Output is correct |
18 |
Correct |
1 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
41 ms |
4752 KB |
Output is correct |
21 |
Correct |
200 ms |
18060 KB |
Output is correct |
22 |
Correct |
164 ms |
18336 KB |
Output is correct |
23 |
Correct |
173 ms |
18252 KB |
Output is correct |
24 |
Correct |
159 ms |
18260 KB |
Output is correct |
25 |
Correct |
74 ms |
8200 KB |
Output is correct |
26 |
Correct |
71 ms |
8528 KB |
Output is correct |
27 |
Correct |
173 ms |
18244 KB |
Output is correct |
28 |
Correct |
160 ms |
18256 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
7 ms |
1116 KB |
Output is correct |
37 |
Correct |
158 ms |
18288 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
7 ms |
1116 KB |
Output is correct |
41 |
Correct |
150 ms |
22068 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
3 ms |
860 KB |
Output is correct |
45 |
Correct |
73 ms |
12060 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
0 ms |
344 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
38 ms |
6236 KB |
Output is correct |
50 |
Correct |
161 ms |
23636 KB |
Output is correct |
51 |
Correct |
155 ms |
23440 KB |
Output is correct |
52 |
Correct |
160 ms |
23452 KB |
Output is correct |
53 |
Correct |
71 ms |
13348 KB |
Output is correct |
54 |
Correct |
69 ms |
13392 KB |
Output is correct |
55 |
Correct |
157 ms |
23308 KB |
Output is correct |
56 |
Correct |
190 ms |
23408 KB |
Output is correct |
57 |
Correct |
69 ms |
13360 KB |
Output is correct |
58 |
Correct |
0 ms |
348 KB |
Output is correct |
59 |
Correct |
0 ms |
348 KB |
Output is correct |
60 |
Correct |
3 ms |
928 KB |
Output is correct |
61 |
Correct |
76 ms |
13396 KB |
Output is correct |
62 |
Correct |
1 ms |
348 KB |
Output is correct |
63 |
Correct |
1 ms |
348 KB |
Output is correct |
64 |
Correct |
0 ms |
348 KB |
Output is correct |
65 |
Correct |
40 ms |
6228 KB |
Output is correct |
66 |
Correct |
70 ms |
13308 KB |
Output is correct |
67 |
Correct |
71 ms |
13556 KB |
Output is correct |
68 |
Correct |
78 ms |
13704 KB |
Output is correct |
69 |
Correct |
83 ms |
13392 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
600 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
7 ms |
1116 KB |
Output is correct |
7 |
Correct |
146 ms |
18044 KB |
Output is correct |
8 |
Correct |
1 ms |
344 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
6 ms |
1116 KB |
Output is correct |
13 |
Correct |
158 ms |
18260 KB |
Output is correct |
14 |
Correct |
1 ms |
344 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
3 ms |
600 KB |
Output is correct |
17 |
Correct |
70 ms |
8212 KB |
Output is correct |
18 |
Correct |
1 ms |
344 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
41 ms |
4752 KB |
Output is correct |
21 |
Correct |
200 ms |
18060 KB |
Output is correct |
22 |
Correct |
164 ms |
18336 KB |
Output is correct |
23 |
Correct |
173 ms |
18252 KB |
Output is correct |
24 |
Correct |
159 ms |
18260 KB |
Output is correct |
25 |
Correct |
74 ms |
8200 KB |
Output is correct |
26 |
Correct |
71 ms |
8528 KB |
Output is correct |
27 |
Correct |
173 ms |
18244 KB |
Output is correct |
28 |
Correct |
160 ms |
18256 KB |
Output is correct |
29 |
Correct |
1 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
348 KB |
Output is correct |
31 |
Correct |
0 ms |
348 KB |
Output is correct |
32 |
Correct |
0 ms |
348 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
0 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
348 KB |
Output is correct |
36 |
Correct |
7 ms |
1116 KB |
Output is correct |
37 |
Correct |
158 ms |
18288 KB |
Output is correct |
38 |
Correct |
1 ms |
344 KB |
Output is correct |
39 |
Correct |
0 ms |
348 KB |
Output is correct |
40 |
Correct |
7 ms |
1116 KB |
Output is correct |
41 |
Correct |
150 ms |
22068 KB |
Output is correct |
42 |
Correct |
0 ms |
348 KB |
Output is correct |
43 |
Correct |
0 ms |
348 KB |
Output is correct |
44 |
Correct |
3 ms |
860 KB |
Output is correct |
45 |
Correct |
73 ms |
12060 KB |
Output is correct |
46 |
Correct |
1 ms |
344 KB |
Output is correct |
47 |
Correct |
0 ms |
344 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
38 ms |
6236 KB |
Output is correct |
50 |
Correct |
161 ms |
23636 KB |
Output is correct |
51 |
Correct |
155 ms |
23440 KB |
Output is correct |
52 |
Correct |
160 ms |
23452 KB |
Output is correct |
53 |
Correct |
71 ms |
13348 KB |
Output is correct |
54 |
Correct |
69 ms |
13392 KB |
Output is correct |
55 |
Correct |
157 ms |
23308 KB |
Output is correct |
56 |
Correct |
190 ms |
23408 KB |
Output is correct |
57 |
Correct |
69 ms |
13360 KB |
Output is correct |
58 |
Correct |
1 ms |
344 KB |
Output is correct |
59 |
Correct |
1 ms |
348 KB |
Output is correct |
60 |
Correct |
0 ms |
348 KB |
Output is correct |
61 |
Correct |
45 ms |
4752 KB |
Output is correct |
62 |
Correct |
202 ms |
18260 KB |
Output is correct |
63 |
Correct |
164 ms |
18444 KB |
Output is correct |
64 |
Correct |
196 ms |
18228 KB |
Output is correct |
65 |
Correct |
0 ms |
348 KB |
Output is correct |
66 |
Correct |
46 ms |
6144 KB |
Output is correct |
67 |
Correct |
155 ms |
23380 KB |
Output is correct |
68 |
Correct |
156 ms |
23440 KB |
Output is correct |
69 |
Correct |
160 ms |
23640 KB |
Output is correct |
70 |
Correct |
0 ms |
344 KB |
Output is correct |
71 |
Correct |
1 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
416 KB |
Output is correct |
73 |
Correct |
39 ms |
6236 KB |
Output is correct |
74 |
Correct |
161 ms |
23488 KB |
Output is correct |
75 |
Correct |
157 ms |
23368 KB |
Output is correct |
76 |
Correct |
156 ms |
23308 KB |
Output is correct |
77 |
Correct |
157 ms |
23632 KB |
Output is correct |
78 |
Correct |
0 ms |
348 KB |
Output is correct |
79 |
Correct |
0 ms |
348 KB |
Output is correct |
80 |
Correct |
3 ms |
928 KB |
Output is correct |
81 |
Correct |
76 ms |
13396 KB |
Output is correct |
82 |
Correct |
1 ms |
348 KB |
Output is correct |
83 |
Correct |
1 ms |
348 KB |
Output is correct |
84 |
Correct |
0 ms |
348 KB |
Output is correct |
85 |
Correct |
40 ms |
6228 KB |
Output is correct |
86 |
Correct |
70 ms |
13308 KB |
Output is correct |
87 |
Correct |
71 ms |
13556 KB |
Output is correct |
88 |
Correct |
78 ms |
13704 KB |
Output is correct |
89 |
Correct |
83 ms |
13392 KB |
Output is correct |
90 |
Correct |
1 ms |
436 KB |
Output is correct |
91 |
Correct |
0 ms |
348 KB |
Output is correct |
92 |
Correct |
3 ms |
860 KB |
Output is correct |
93 |
Correct |
69 ms |
13400 KB |
Output is correct |
94 |
Correct |
1 ms |
348 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
17 ms |
3676 KB |
Output is correct |
98 |
Correct |
73 ms |
13424 KB |
Output is correct |
99 |
Correct |
70 ms |
13392 KB |
Output is correct |
100 |
Correct |
68 ms |
13396 KB |
Output is correct |
101 |
Correct |
69 ms |
13348 KB |
Output is correct |
102 |
Correct |
67 ms |
13396 KB |
Output is correct |
103 |
Correct |
68 ms |
13572 KB |
Output is correct |
104 |
Correct |
84 ms |
13392 KB |
Output is correct |
105 |
Correct |
72 ms |
13392 KB |
Output is correct |