#ifndef LOCAL
#include "mars.h"
#endif
#include <bits/stdc++.h>
using namespace std;
struct dsu {
vector<int> ds;
dsu(int n) {
ds.assign(n, -1);
}
const int& operator[](int i) {
return ds[i];
}
int find(int i) {
return ds[i] < 0 ? i : ds[i] = find(ds[i]);
}
int size(int i) {
return -ds[find(i)];
}
bool same(int i, int j) {
return find(i) == find(j);
}
bool join(int i, int j) {
i = find(i), j = find(j);
if (i == j)
return false;
if (ds[i] > ds[j])
swap(i, j);
ds[i] += ds[j], ds[j] = i;
return true;
}
};
string fill(string s) {
while (s.size() < 100)
s += "0";
return s;
}
string process(vector<vector<string>> ss, int i, int j, int k, int n) {
int b = 2 * (n - k - 1), n_ = (k + 1) * 2 + 1;
if (i < b && j < b)
return ss[0][0];
else if (i == b && j != b) {
swap(ss[0][1], ss[1][0]);
swap(ss[0][2], ss[2][0]);
swap(ss[1][2], ss[2][1]);
string s;
for (int i1 = 0; i1 < 2; i1++) {
for (int j1 = 0; j1 < 2; j1++)
s += ss[i1][j1][0];
for (int j1 = 0; j1 < n_ - 2; j1++)
s += ss[i1][2][j1];
}
return fill(s);
} else if (i != b && j == b) {
string s;
for (int i1 = 0; i1 < 2; i1++) {
for (int j1 = 0; j1 < 2; j1++)
s += ss[i1][j1][0];
for (int j1 = 0; j1 < n_ - 2; j1++)
s += ss[i1][2][j1];
}
return fill(s);
} else {
if (k == 0) {
dsu ds(n_ * n_);
for (int i1 = 0; i1 < n_; i1++)
for (int j1 = 0; j1 < n_; j1++)
if (ss[i1][j1][0] == '1') {
if (i1 > 0 && ss[i1 - 1][j1][0] == '1')
ds.join(i1 * n_ + j1, (i1 - 1) * n_ + j1);
if (j1 > 0 && ss[i1][j1 - 1][0] == '1')
ds.join(i1 * n_ + j1, i1 * n_ + (j1 - 1));
}
int c = 0;
for (int i1 = 0; i1 < n_; i1++)
for (int j1 = 0; j1 < n_; j1++)
if (ss[i1][j1][0] == '1' && ds[i1 * n_ + j1] < 0)
c++;
if (n == 1) {
string s(100, '0');
for (int x = 0; x < 10; x++)
s[x] = '0' + (c >> x & 1);
return s;
}
vector<int> ii;
for (int i1 = 2; i1 >= 0; i1--)
if (ss[0][i1][0] == '1' && (i1 == 2 || ss[0][i1 + 1][0] == '0'))
ii.push_back(ds.find(0 * n_ + i1));
for (int i1 = 1; i1 < 3; i1++)
if (ss[i1][0][0] == '1' && ss[i1 - 1][0][0] == '0')
ii.push_back(ds.find(i1 * n_ + 0));
vector<int> stack, marked(n_ * n_);
string s(100, '0');
for (int i1 = 0; i1 < (int) ii.size(); i1++)
if (!stack.empty() && marked[ii[i1]]) {
while (ii[stack.back()] != ii[i1]) {
s[stack.back() << 1 | 1] = '1';
stack.pop_back();
}
stack.pop_back();
stack.push_back(i1);
} else {
s[i1 << 1 | 0] = '1';
marked[ii[i1]] = 1, stack.push_back(i1);
}
while (!stack.empty()) {
s[stack.back() << 1 | 1] = '1';
stack.pop_back();
}
for (int x = 0; x < 10; x++)
s[90 + x] = '0' + (c >> x & 1);
return s;
} else {
vector<vector<int>> gr(n_, vector<int>(n_, 0));
for (int i1 = 0; i1 < 2; i1++)
for (int j1 = 0; j1 < 2; j1++)
gr[i1][j1] = ss[i1][j1][0] - '0';
for (int i1 = 0; i1 < n_ - 2; i1++)
for (int j1 = 0; j1 < 2; j1++) {
gr[j1][i1 + 2] = ss[0][2][j1 * (n_ - 2) + i1] - '0';
gr[i1 + 2][j1] = ss[2][0][j1 * (n_ - 2) + i1] - '0';
}
for (int i1 = 0; i1 < n_ - 2; i1++) {
gr[2][i1 + 2] = ss[1][2][n_ - 2 + i1] - '0';
gr[i1 + 2][2] = ss[2][1][n_ - 2 + i1] - '0';
}
int c = 0;
for (int x = 0; x < 10; x++)
if (ss[2][2][90 + x] == '1')
c |= 1 << x;
for (int i1 = 0; i1 < n_; i1++)
for (int j1 = 0; j1 < 2; j1++)
c += gr[i1][j1] + gr[j1][i1];
c -= gr[0][0];
c -= gr[0][1];
c -= gr[1][0];
c -= gr[1][1];
dsu ds(n_ * n_);
for (int i1 = 0; i1 < n_; i1++) {
if (gr[0][i1] && gr[1][i1] && ds.join(0 * n_ + i1, 1 * n_ + i1))
c--;
if (gr[i1][0] && gr[i1][1] && ds.join(i1 * n_ + 0, i1 * n_ + 1))
c--;
for (int j1 = 0; j1 < 2; j1++) {
if (i1 < n_ - 1 && gr[i1][j1] && gr[i1 + 1][j1] && ds.join(i1 * n_ + j1, (i1 + 1) * n_ + j1))
c--;
if (i1 < n_ - 1 && gr[j1][i1] && gr[j1][i1 + 1] && ds.join(j1 * n_ + i1, j1 * n_ + (i1 + 1)))
c--;
}
}
for (int i1 = n_ - 2; i1 >= 2; i1--)
if (gr[2][i1] && gr[2][i1 + 1])
ds.join(2 * n_ + i1, 2 * n_ + (i1 + 1));
for (int i1 = 3; i1 < n_; i1++)
if (gr[i1][2] && gr[i1 - 1][2])
ds.join(i1 * n_ + 2, (i1 - 1) * n_ + 2);
vector<int> ii;
for (int i1 = n_ - 1; i1 >= 2; i1--)
if (gr[2][i1] && (i1 == n_ - 1 || !gr[2][i1 + 1]))
ii.push_back(ds.find(2 * n_ + i1));
for (int i1 = 3; i1 < n_; i1++)
if (gr[i1][2] && !gr[i1 - 1][2])
ii.push_back(ds.find(i1 * n_ + 2));
vector<int> stack, mark(ii.size());
for (int i1 = 0; i1 < (int) ii.size(); i1++) {
if (ss[2][2][i1 << 1 | 0] == '1')
stack.push_back(i1);
mark[i1] = stack.back();
for (int j1 = 0; j1 < i1; j1++)
if (mark[j1] == mark[i1])
ds.join(ii[i1], ii[j1]);
if (ss[2][2][i1 << 1 | 1] == '1')
stack.pop_back();
}
for (int i1 = 2; i1 < n_; i1++) {
if (gr[1][i1] && gr[2][i1] && ds.join(1 * n_ + i1, 2 * n_ + i1))
c--;
if (gr[i1][1] && gr[i1][2] && ds.join(i1 * n_ + 1, i1 * n_ + 2))
c--;
}
ii.clear();
for (int i1 = n_ - 1; i1 >= 0; i1--)
if (gr[0][i1] && (i1 == n_ - 1 || !gr[0][i1 + 1]))
ii.push_back(ds.find(0 * n_ + i1));
for (int i1 = 1; i1 < n_; i1++)
if (gr[i1][0] && !gr[i1 - 1][0])
ii.push_back(ds.find(i1 * n_ + 0));
vector<int> marked(n_ * n_);
string s(100, '0');
if (k == n - 1) {
for (int x = 0; x < 10; x++)
s[x] = '0' + (c >> x & 1);
return s;
}
for (int i1 = 0; i1 < (int) ii.size(); i1++)
if (!stack.empty() && marked[ii[i1]]) {
while (ii[stack.back()] != ii[i1]) {
s[stack.back() << 1 | 1] = '1';
stack.pop_back();
}
stack.pop_back();
stack.push_back(i1);
} else {
s[i1 << 1 | 0] = '1';
marked[ii[i1]] = 1, stack.push_back(i1);
}
while (!stack.empty()) {
s[stack.back() << 1 | 1] = '1';
stack.pop_back();
}
for (int x = 0; x < 10; x++)
s[90 + x] = '0' + (c >> x & 1);
return s;
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
21 |
Correct |
60 ms |
2948 KB |
Output is correct |
22 |
Correct |
89 ms |
2644 KB |
Output is correct |
23 |
Correct |
85 ms |
2680 KB |
Output is correct |
24 |
Correct |
87 ms |
2668 KB |
Output is correct |
25 |
Correct |
90 ms |
2620 KB |
Output is correct |
26 |
Correct |
84 ms |
2712 KB |
Output is correct |
27 |
Correct |
87 ms |
2660 KB |
Output is correct |
28 |
Correct |
87 ms |
2680 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
21 |
Correct |
60 ms |
2948 KB |
Output is correct |
22 |
Correct |
89 ms |
2644 KB |
Output is correct |
23 |
Correct |
85 ms |
2680 KB |
Output is correct |
24 |
Correct |
87 ms |
2668 KB |
Output is correct |
25 |
Correct |
90 ms |
2620 KB |
Output is correct |
26 |
Correct |
84 ms |
2712 KB |
Output is correct |
27 |
Correct |
87 ms |
2660 KB |
Output is correct |
28 |
Correct |
87 ms |
2680 KB |
Output is correct |
29 |
Correct |
111 ms |
2748 KB |
Output is correct |
30 |
Correct |
167 ms |
2836 KB |
Output is correct |
31 |
Correct |
158 ms |
2868 KB |
Output is correct |
32 |
Correct |
170 ms |
2820 KB |
Output is correct |
33 |
Correct |
157 ms |
2832 KB |
Output is correct |
34 |
Correct |
168 ms |
2956 KB |
Output is correct |
35 |
Correct |
164 ms |
2876 KB |
Output is correct |
36 |
Correct |
158 ms |
2832 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
21 |
Correct |
60 ms |
2948 KB |
Output is correct |
22 |
Correct |
89 ms |
2644 KB |
Output is correct |
23 |
Correct |
85 ms |
2680 KB |
Output is correct |
24 |
Correct |
87 ms |
2668 KB |
Output is correct |
25 |
Correct |
90 ms |
2620 KB |
Output is correct |
26 |
Correct |
84 ms |
2712 KB |
Output is correct |
27 |
Correct |
87 ms |
2660 KB |
Output is correct |
28 |
Correct |
87 ms |
2680 KB |
Output is correct |
29 |
Correct |
111 ms |
2748 KB |
Output is correct |
30 |
Correct |
167 ms |
2836 KB |
Output is correct |
31 |
Correct |
158 ms |
2868 KB |
Output is correct |
32 |
Correct |
170 ms |
2820 KB |
Output is correct |
33 |
Correct |
157 ms |
2832 KB |
Output is correct |
34 |
Correct |
168 ms |
2956 KB |
Output is correct |
35 |
Correct |
164 ms |
2876 KB |
Output is correct |
36 |
Correct |
158 ms |
2832 KB |
Output is correct |
37 |
Correct |
217 ms |
3164 KB |
Output is correct |
38 |
Correct |
262 ms |
3268 KB |
Output is correct |
39 |
Correct |
276 ms |
3376 KB |
Output is correct |
40 |
Correct |
285 ms |
3284 KB |
Output is correct |
41 |
Correct |
293 ms |
3276 KB |
Output is correct |
42 |
Correct |
267 ms |
3228 KB |
Output is correct |
43 |
Correct |
271 ms |
3236 KB |
Output is correct |
44 |
Correct |
268 ms |
3364 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
21 |
Correct |
60 ms |
2948 KB |
Output is correct |
22 |
Correct |
89 ms |
2644 KB |
Output is correct |
23 |
Correct |
85 ms |
2680 KB |
Output is correct |
24 |
Correct |
87 ms |
2668 KB |
Output is correct |
25 |
Correct |
90 ms |
2620 KB |
Output is correct |
26 |
Correct |
84 ms |
2712 KB |
Output is correct |
27 |
Correct |
87 ms |
2660 KB |
Output is correct |
28 |
Correct |
87 ms |
2680 KB |
Output is correct |
29 |
Correct |
111 ms |
2748 KB |
Output is correct |
30 |
Correct |
167 ms |
2836 KB |
Output is correct |
31 |
Correct |
158 ms |
2868 KB |
Output is correct |
32 |
Correct |
170 ms |
2820 KB |
Output is correct |
33 |
Correct |
157 ms |
2832 KB |
Output is correct |
34 |
Correct |
168 ms |
2956 KB |
Output is correct |
35 |
Correct |
164 ms |
2876 KB |
Output is correct |
36 |
Correct |
158 ms |
2832 KB |
Output is correct |
37 |
Correct |
217 ms |
3164 KB |
Output is correct |
38 |
Correct |
262 ms |
3268 KB |
Output is correct |
39 |
Correct |
276 ms |
3376 KB |
Output is correct |
40 |
Correct |
285 ms |
3284 KB |
Output is correct |
41 |
Correct |
293 ms |
3276 KB |
Output is correct |
42 |
Correct |
267 ms |
3228 KB |
Output is correct |
43 |
Correct |
271 ms |
3236 KB |
Output is correct |
44 |
Correct |
268 ms |
3364 KB |
Output is correct |
45 |
Correct |
352 ms |
3256 KB |
Output is correct |
46 |
Correct |
437 ms |
3448 KB |
Output is correct |
47 |
Correct |
446 ms |
3432 KB |
Output is correct |
48 |
Correct |
438 ms |
3416 KB |
Output is correct |
49 |
Correct |
433 ms |
3480 KB |
Output is correct |
50 |
Correct |
438 ms |
3352 KB |
Output is correct |
51 |
Correct |
433 ms |
3368 KB |
Output is correct |
52 |
Correct |
434 ms |
3448 KB |
Output is correct |
53 |
Correct |
437 ms |
3556 KB |
Output is correct |
54 |
Correct |
429 ms |
3436 KB |
Output is correct |
55 |
Correct |
414 ms |
3536 KB |
Output is correct |
56 |
Correct |
439 ms |
3540 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
21 |
Correct |
60 ms |
2948 KB |
Output is correct |
22 |
Correct |
89 ms |
2644 KB |
Output is correct |
23 |
Correct |
85 ms |
2680 KB |
Output is correct |
24 |
Correct |
87 ms |
2668 KB |
Output is correct |
25 |
Correct |
90 ms |
2620 KB |
Output is correct |
26 |
Correct |
84 ms |
2712 KB |
Output is correct |
27 |
Correct |
87 ms |
2660 KB |
Output is correct |
28 |
Correct |
87 ms |
2680 KB |
Output is correct |
29 |
Correct |
111 ms |
2748 KB |
Output is correct |
30 |
Correct |
167 ms |
2836 KB |
Output is correct |
31 |
Correct |
158 ms |
2868 KB |
Output is correct |
32 |
Correct |
170 ms |
2820 KB |
Output is correct |
33 |
Correct |
157 ms |
2832 KB |
Output is correct |
34 |
Correct |
168 ms |
2956 KB |
Output is correct |
35 |
Correct |
164 ms |
2876 KB |
Output is correct |
36 |
Correct |
158 ms |
2832 KB |
Output is correct |
37 |
Correct |
217 ms |
3164 KB |
Output is correct |
38 |
Correct |
262 ms |
3268 KB |
Output is correct |
39 |
Correct |
276 ms |
3376 KB |
Output is correct |
40 |
Correct |
285 ms |
3284 KB |
Output is correct |
41 |
Correct |
293 ms |
3276 KB |
Output is correct |
42 |
Correct |
267 ms |
3228 KB |
Output is correct |
43 |
Correct |
271 ms |
3236 KB |
Output is correct |
44 |
Correct |
268 ms |
3364 KB |
Output is correct |
45 |
Correct |
352 ms |
3256 KB |
Output is correct |
46 |
Correct |
437 ms |
3448 KB |
Output is correct |
47 |
Correct |
446 ms |
3432 KB |
Output is correct |
48 |
Correct |
438 ms |
3416 KB |
Output is correct |
49 |
Correct |
433 ms |
3480 KB |
Output is correct |
50 |
Correct |
438 ms |
3352 KB |
Output is correct |
51 |
Correct |
433 ms |
3368 KB |
Output is correct |
52 |
Correct |
434 ms |
3448 KB |
Output is correct |
53 |
Correct |
437 ms |
3556 KB |
Output is correct |
54 |
Correct |
429 ms |
3436 KB |
Output is correct |
55 |
Correct |
414 ms |
3536 KB |
Output is correct |
56 |
Correct |
439 ms |
3540 KB |
Output is correct |
57 |
Correct |
551 ms |
3940 KB |
Output is correct |
58 |
Correct |
650 ms |
4172 KB |
Output is correct |
59 |
Correct |
655 ms |
4160 KB |
Output is correct |
60 |
Correct |
647 ms |
3888 KB |
Output is correct |
61 |
Correct |
657 ms |
3996 KB |
Output is correct |
62 |
Correct |
645 ms |
4096 KB |
Output is correct |
63 |
Correct |
639 ms |
4084 KB |
Output is correct |
64 |
Correct |
666 ms |
4116 KB |
Output is correct |
65 |
Correct |
666 ms |
4228 KB |
Output is correct |
66 |
Correct |
644 ms |
3844 KB |
Output is correct |
67 |
Correct |
647 ms |
4120 KB |
Output is correct |
68 |
Correct |
636 ms |
4080 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
21 |
Correct |
60 ms |
2948 KB |
Output is correct |
22 |
Correct |
89 ms |
2644 KB |
Output is correct |
23 |
Correct |
85 ms |
2680 KB |
Output is correct |
24 |
Correct |
87 ms |
2668 KB |
Output is correct |
25 |
Correct |
90 ms |
2620 KB |
Output is correct |
26 |
Correct |
84 ms |
2712 KB |
Output is correct |
27 |
Correct |
87 ms |
2660 KB |
Output is correct |
28 |
Correct |
87 ms |
2680 KB |
Output is correct |
29 |
Correct |
111 ms |
2748 KB |
Output is correct |
30 |
Correct |
167 ms |
2836 KB |
Output is correct |
31 |
Correct |
158 ms |
2868 KB |
Output is correct |
32 |
Correct |
170 ms |
2820 KB |
Output is correct |
33 |
Correct |
157 ms |
2832 KB |
Output is correct |
34 |
Correct |
168 ms |
2956 KB |
Output is correct |
35 |
Correct |
164 ms |
2876 KB |
Output is correct |
36 |
Correct |
158 ms |
2832 KB |
Output is correct |
37 |
Correct |
217 ms |
3164 KB |
Output is correct |
38 |
Correct |
262 ms |
3268 KB |
Output is correct |
39 |
Correct |
276 ms |
3376 KB |
Output is correct |
40 |
Correct |
285 ms |
3284 KB |
Output is correct |
41 |
Correct |
293 ms |
3276 KB |
Output is correct |
42 |
Correct |
267 ms |
3228 KB |
Output is correct |
43 |
Correct |
271 ms |
3236 KB |
Output is correct |
44 |
Correct |
268 ms |
3364 KB |
Output is correct |
45 |
Correct |
352 ms |
3256 KB |
Output is correct |
46 |
Correct |
437 ms |
3448 KB |
Output is correct |
47 |
Correct |
446 ms |
3432 KB |
Output is correct |
48 |
Correct |
438 ms |
3416 KB |
Output is correct |
49 |
Correct |
433 ms |
3480 KB |
Output is correct |
50 |
Correct |
438 ms |
3352 KB |
Output is correct |
51 |
Correct |
433 ms |
3368 KB |
Output is correct |
52 |
Correct |
434 ms |
3448 KB |
Output is correct |
53 |
Correct |
437 ms |
3556 KB |
Output is correct |
54 |
Correct |
429 ms |
3436 KB |
Output is correct |
55 |
Correct |
414 ms |
3536 KB |
Output is correct |
56 |
Correct |
439 ms |
3540 KB |
Output is correct |
57 |
Correct |
551 ms |
3940 KB |
Output is correct |
58 |
Correct |
650 ms |
4172 KB |
Output is correct |
59 |
Correct |
655 ms |
4160 KB |
Output is correct |
60 |
Correct |
647 ms |
3888 KB |
Output is correct |
61 |
Correct |
657 ms |
3996 KB |
Output is correct |
62 |
Correct |
645 ms |
4096 KB |
Output is correct |
63 |
Correct |
639 ms |
4084 KB |
Output is correct |
64 |
Correct |
666 ms |
4116 KB |
Output is correct |
65 |
Correct |
666 ms |
4228 KB |
Output is correct |
66 |
Correct |
644 ms |
3844 KB |
Output is correct |
67 |
Correct |
647 ms |
4120 KB |
Output is correct |
68 |
Correct |
636 ms |
4080 KB |
Output is correct |
69 |
Correct |
787 ms |
4148 KB |
Output is correct |
70 |
Correct |
915 ms |
4328 KB |
Output is correct |
71 |
Correct |
921 ms |
4316 KB |
Output is correct |
72 |
Correct |
928 ms |
4520 KB |
Output is correct |
73 |
Correct |
928 ms |
4192 KB |
Output is correct |
74 |
Correct |
943 ms |
4244 KB |
Output is correct |
75 |
Correct |
903 ms |
4272 KB |
Output is correct |
76 |
Correct |
902 ms |
4304 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
1700 KB |
Output is correct |
2 |
Correct |
8 ms |
1988 KB |
Output is correct |
3 |
Correct |
8 ms |
1776 KB |
Output is correct |
4 |
Correct |
8 ms |
2024 KB |
Output is correct |
5 |
Correct |
8 ms |
2080 KB |
Output is correct |
6 |
Correct |
8 ms |
1884 KB |
Output is correct |
7 |
Correct |
9 ms |
2148 KB |
Output is correct |
8 |
Correct |
15 ms |
1948 KB |
Output is correct |
9 |
Correct |
18 ms |
1924 KB |
Output is correct |
10 |
Correct |
16 ms |
2256 KB |
Output is correct |
11 |
Correct |
16 ms |
1884 KB |
Output is correct |
12 |
Correct |
16 ms |
2152 KB |
Output is correct |
13 |
Correct |
16 ms |
2156 KB |
Output is correct |
14 |
Correct |
32 ms |
2364 KB |
Output is correct |
15 |
Correct |
41 ms |
2548 KB |
Output is correct |
16 |
Correct |
41 ms |
2608 KB |
Output is correct |
17 |
Correct |
41 ms |
2560 KB |
Output is correct |
18 |
Correct |
40 ms |
2508 KB |
Output is correct |
19 |
Correct |
41 ms |
2724 KB |
Output is correct |
20 |
Correct |
40 ms |
2596 KB |
Output is correct |
21 |
Correct |
60 ms |
2948 KB |
Output is correct |
22 |
Correct |
89 ms |
2644 KB |
Output is correct |
23 |
Correct |
85 ms |
2680 KB |
Output is correct |
24 |
Correct |
87 ms |
2668 KB |
Output is correct |
25 |
Correct |
90 ms |
2620 KB |
Output is correct |
26 |
Correct |
84 ms |
2712 KB |
Output is correct |
27 |
Correct |
87 ms |
2660 KB |
Output is correct |
28 |
Correct |
87 ms |
2680 KB |
Output is correct |
29 |
Correct |
111 ms |
2748 KB |
Output is correct |
30 |
Correct |
167 ms |
2836 KB |
Output is correct |
31 |
Correct |
158 ms |
2868 KB |
Output is correct |
32 |
Correct |
170 ms |
2820 KB |
Output is correct |
33 |
Correct |
157 ms |
2832 KB |
Output is correct |
34 |
Correct |
168 ms |
2956 KB |
Output is correct |
35 |
Correct |
164 ms |
2876 KB |
Output is correct |
36 |
Correct |
158 ms |
2832 KB |
Output is correct |
37 |
Correct |
217 ms |
3164 KB |
Output is correct |
38 |
Correct |
262 ms |
3268 KB |
Output is correct |
39 |
Correct |
276 ms |
3376 KB |
Output is correct |
40 |
Correct |
285 ms |
3284 KB |
Output is correct |
41 |
Correct |
293 ms |
3276 KB |
Output is correct |
42 |
Correct |
267 ms |
3228 KB |
Output is correct |
43 |
Correct |
271 ms |
3236 KB |
Output is correct |
44 |
Correct |
268 ms |
3364 KB |
Output is correct |
45 |
Correct |
352 ms |
3256 KB |
Output is correct |
46 |
Correct |
437 ms |
3448 KB |
Output is correct |
47 |
Correct |
446 ms |
3432 KB |
Output is correct |
48 |
Correct |
438 ms |
3416 KB |
Output is correct |
49 |
Correct |
433 ms |
3480 KB |
Output is correct |
50 |
Correct |
438 ms |
3352 KB |
Output is correct |
51 |
Correct |
433 ms |
3368 KB |
Output is correct |
52 |
Correct |
434 ms |
3448 KB |
Output is correct |
53 |
Correct |
437 ms |
3556 KB |
Output is correct |
54 |
Correct |
429 ms |
3436 KB |
Output is correct |
55 |
Correct |
414 ms |
3536 KB |
Output is correct |
56 |
Correct |
439 ms |
3540 KB |
Output is correct |
57 |
Correct |
551 ms |
3940 KB |
Output is correct |
58 |
Correct |
650 ms |
4172 KB |
Output is correct |
59 |
Correct |
655 ms |
4160 KB |
Output is correct |
60 |
Correct |
647 ms |
3888 KB |
Output is correct |
61 |
Correct |
657 ms |
3996 KB |
Output is correct |
62 |
Correct |
645 ms |
4096 KB |
Output is correct |
63 |
Correct |
639 ms |
4084 KB |
Output is correct |
64 |
Correct |
666 ms |
4116 KB |
Output is correct |
65 |
Correct |
666 ms |
4228 KB |
Output is correct |
66 |
Correct |
644 ms |
3844 KB |
Output is correct |
67 |
Correct |
647 ms |
4120 KB |
Output is correct |
68 |
Correct |
636 ms |
4080 KB |
Output is correct |
69 |
Correct |
787 ms |
4148 KB |
Output is correct |
70 |
Correct |
915 ms |
4328 KB |
Output is correct |
71 |
Correct |
921 ms |
4316 KB |
Output is correct |
72 |
Correct |
928 ms |
4520 KB |
Output is correct |
73 |
Correct |
928 ms |
4192 KB |
Output is correct |
74 |
Correct |
943 ms |
4244 KB |
Output is correct |
75 |
Correct |
903 ms |
4272 KB |
Output is correct |
76 |
Correct |
902 ms |
4304 KB |
Output is correct |
77 |
Correct |
954 ms |
4152 KB |
Output is correct |
78 |
Correct |
1277 ms |
4628 KB |
Output is correct |
79 |
Correct |
1262 ms |
4760 KB |
Output is correct |
80 |
Correct |
1269 ms |
4668 KB |
Output is correct |
81 |
Correct |
1250 ms |
4560 KB |
Output is correct |
82 |
Correct |
1253 ms |
4604 KB |
Output is correct |
83 |
Correct |
1243 ms |
4820 KB |
Output is correct |
84 |
Correct |
1265 ms |
4540 KB |
Output is correct |