# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
636603 |
2022-08-29T16:47:58 Z |
rainboy |
Jail (JOI22_jail) |
C |
|
1032 ms |
235816 KB |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define N 120000
#define M N
#define L 17 /* L = ceil(log2(N)) */
#define N_ (M + N * L * 2)
int *ej[N], eo[N], *ej_[N_], eo_[N_], fo_[N_], n, m, n_;
void append(int i, int j) {
int o = eo[i]++;
if (o >= 2 && (o & o - 1) == 0)
ej[i] = (int *) realloc(ej[i], o * 2 * sizeof *ej[i]);
ej[i][o] = j;
}
void append_(int i, int j) {
int o = eo_[i]++;
if (o >= 2 && (o & o - 1) == 0)
ej_[i] = (int *) realloc(ej_[i], o * 2 * sizeof *ej_[i]);
ej_[i][o] = j, fo_[j]++;
}
int dd[N], pp[N][L];
void dfs1(int p, int i, int d) {
int o, l;
dd[i] = d;
pp[i][0] = p;
for (l = 1; l < L; l++)
pp[i][l] = pp[i][l - 1] == -1 ? -1 : pp[pp[i][l - 1]][l - 1];
for (o = eo[i]; o--; ) {
int j = ej[i][o];
if (j != p)
dfs1(i, j, d + 1);
}
}
int lca(int i, int j) {
int tmp, l;
if (dd[i] < dd[j])
tmp = i, i = j, j = tmp;
for (l = L - 1; l >= 0; l--)
if (dd[i] - dd[j] >= 1 << l)
i = pp[i][l];
if (i == j)
return i;
for (l = L - 1; l >= 0; l--)
if (dd[i] >= 1 << l && pp[i][l] != pp[j][l])
i = pp[i][l], j = pp[j][l];
return pp[i][0];
}
void dfs2(int i) {
int o;
if (fo_[i])
return;
fo_[i] = -1;
for (o = eo_[i]; o--; ) {
int j = ej_[i][o];
fo_[j]--, dfs2(j);
}
}
void add(int h, int i, int d, int t) {
int l;
for (l = L - 1; l >= 0; l--)
if (dd[i] - d >= 1 << l) {
if (t == 0)
append_(m + (i * L + l << 1 | 0), h);
else
append_(h, m + (i * L + l << 1 | 1));
i = pp[i][l];
}
}
int main() {
int t;
scanf("%d", &t);
while (t--) {
static int ii[M], jj[M], hhi[N], hhj[N];
int h, i, j, l, a, yes;
scanf("%d", &n);
for (i = 0; i < n; i++)
ej[i] = (int *) malloc(2 * sizeof *ej[i]), eo[i] = 0;
for (h = 0; h < n - 1; h++) {
scanf("%d%d", &i, &j), i--, j--;
append(i, j), append(j, i);
}
scanf("%d", &m);
memset(hhi, -1, n * sizeof *hhi), memset(hhj, -1, n * sizeof *hhj);
for (h = 0; h < m; h++) {
scanf("%d%d", &i, &j), i--, j--;
ii[h] = i, jj[h] = j;
hhi[i] = hhj[j] = h;
}
dfs1(-1, 0, 0);
n_ = m + n * L * 2;
for (i = 0; i < n_; i++)
ej_[i] = (int *) malloc(2 * sizeof *ej_[i]), eo_[i] = fo_[i] = 0;
for (i = 0; i < n; i++) {
if ((h = hhi[i]) != -1)
append_(h, m + (i * L + 0 << 1 | 0));
if ((h = hhj[i]) != -1)
append_(m + (i * L + 0 << 1 | 1), h);
}
for (l = 0; l + 1 < L; l++)
for (i = 0; i < n; i++) {
append_(m + (i * L + l << 1 | 0), m + (i * L + l + 1 << 1 | 0));
append_(m + (i * L + l + 1 << 1 | 1), m + (i * L + l << 1 | 1));
if ((j = pp[i][l]) != -1) {
append_(m + (j * L + l << 1 | 0), m + (i * L + l + 1 << 1 | 0));
append_(m + (i * L + l + 1 << 1 | 1), m + (j * L + l << 1 | 1));
}
}
for (h = 0; h < m; h++) {
i = ii[h], j = jj[h], a = lca(i, j);
if (dd[i] - dd[a] > 1)
add(h, pp[i][0], dd[a], 0);
if (i != a)
add(h, i, dd[a], 1);
if (j != a)
add(h, j, dd[a], 0);
if (dd[j] - dd[a] > 1)
add(h, pp[j][0], dd[a], 1);
if (a != i)
append_(m + (a * L + 0 << 1 | 0), h);
if (a != j)
append_(h, m + (a * L + 0 << 1 | 1));
}
for (i = 0; i < n_; i++)
dfs2(i);
yes = 1;
for (i = 0; i < n_; i++)
if (fo_[i] > 0) {
yes = 0;
break;
}
printf(yes ? "Yes\n" : "No\n");
for (i = 0; i < n; i++)
free(ej[i]);
for (i = 0; i < n_; i++)
free(ej_[i]);
}
return 0;
}
Compilation message
jail.c: In function 'append':
jail.c:15:23: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
15 | if (o >= 2 && (o & o - 1) == 0)
| ~~^~~
jail.c: In function 'append_':
jail.c:23:23: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
23 | if (o >= 2 && (o & o - 1) == 0)
| ~~^~~
jail.c: In function 'add':
jail.c:80:24: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
80 | append_(m + (i * L + l << 1 | 0), h);
| ~~~~~~^~~
jail.c:82:27: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
82 | append_(h, m + (i * L + l << 1 | 1));
| ~~~~~~^~~
jail.c: In function 'main':
jail.c:115:27: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
115 | append_(h, m + (i * L + 0 << 1 | 0));
| ~~~~~~^~~
jail.c:117:24: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
117 | append_(m + (i * L + 0 << 1 | 1), h);
| ~~~~~~^~~
jail.c:121:24: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
121 | append_(m + (i * L + l << 1 | 0), m + (i * L + l + 1 << 1 | 0));
| ~~~~~~^~~
jail.c:121:54: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
121 | append_(m + (i * L + l << 1 | 0), m + (i * L + l + 1 << 1 | 0));
| ~~~~~~~~~~^~~
jail.c:122:28: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
122 | append_(m + (i * L + l + 1 << 1 | 1), m + (i * L + l << 1 | 1));
| ~~~~~~~~~~^~~
jail.c:122:54: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
122 | append_(m + (i * L + l + 1 << 1 | 1), m + (i * L + l << 1 | 1));
| ~~~~~~^~~
jail.c:124:25: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
124 | append_(m + (j * L + l << 1 | 0), m + (i * L + l + 1 << 1 | 0));
| ~~~~~~^~~
jail.c:124:55: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
124 | append_(m + (j * L + l << 1 | 0), m + (i * L + l + 1 << 1 | 0));
| ~~~~~~~~~~^~~
jail.c:125:29: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
125 | append_(m + (i * L + l + 1 << 1 | 1), m + (j * L + l << 1 | 1));
| ~~~~~~~~~~^~~
jail.c:125:55: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
125 | append_(m + (i * L + l + 1 << 1 | 1), m + (j * L + l << 1 | 1));
| ~~~~~~^~~
jail.c:139:24: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
139 | append_(m + (a * L + 0 << 1 | 0), h);
| ~~~~~~^~~
jail.c:141:27: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
141 | append_(h, m + (a * L + 0 << 1 | 1));
| ~~~~~~^~~
jail.c:90:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
90 | scanf("%d", &t);
| ^~~~~~~~~~~~~~~
jail.c:95:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
95 | scanf("%d", &n);
| ^~~~~~~~~~~~~~~
jail.c:99:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
99 | scanf("%d%d", &i, &j), i--, j--;
| ^~~~~~~~~~~~~~~~~~~~~
jail.c:102:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
102 | scanf("%d", &m);
| ^~~~~~~~~~~~~~~
jail.c:105:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
105 | scanf("%d%d", &i, &j), i--, j--;
| ^~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
288 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
99 ms |
632 KB |
Output is correct |
5 |
Correct |
206 ms |
688 KB |
Output is correct |
6 |
Correct |
9 ms |
820 KB |
Output is correct |
7 |
Correct |
10 ms |
812 KB |
Output is correct |
8 |
Correct |
13 ms |
856 KB |
Output is correct |
9 |
Correct |
435 ms |
11268 KB |
Output is correct |
10 |
Correct |
826 ms |
216140 KB |
Output is correct |
11 |
Correct |
39 ms |
468 KB |
Output is correct |
12 |
Correct |
243 ms |
572 KB |
Output is correct |
13 |
Correct |
941 ms |
219744 KB |
Output is correct |
14 |
Correct |
801 ms |
219516 KB |
Output is correct |
15 |
Correct |
722 ms |
221160 KB |
Output is correct |
16 |
Correct |
972 ms |
229184 KB |
Output is correct |
17 |
Correct |
937 ms |
222200 KB |
Output is correct |
18 |
Correct |
856 ms |
224428 KB |
Output is correct |
19 |
Correct |
888 ms |
222196 KB |
Output is correct |
20 |
Correct |
774 ms |
222192 KB |
Output is correct |
21 |
Correct |
641 ms |
221744 KB |
Output is correct |
22 |
Correct |
804 ms |
219340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
292 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
10 ms |
840 KB |
Output is correct |
4 |
Correct |
10 ms |
820 KB |
Output is correct |
5 |
Correct |
10 ms |
828 KB |
Output is correct |
6 |
Correct |
10 ms |
724 KB |
Output is correct |
7 |
Correct |
11 ms |
824 KB |
Output is correct |
8 |
Correct |
11 ms |
724 KB |
Output is correct |
9 |
Correct |
12 ms |
824 KB |
Output is correct |
10 |
Correct |
11 ms |
824 KB |
Output is correct |
11 |
Correct |
9 ms |
724 KB |
Output is correct |
12 |
Correct |
5 ms |
724 KB |
Output is correct |
13 |
Correct |
5 ms |
824 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
292 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
10 ms |
840 KB |
Output is correct |
4 |
Correct |
10 ms |
820 KB |
Output is correct |
5 |
Correct |
10 ms |
828 KB |
Output is correct |
6 |
Correct |
10 ms |
724 KB |
Output is correct |
7 |
Correct |
11 ms |
824 KB |
Output is correct |
8 |
Correct |
11 ms |
724 KB |
Output is correct |
9 |
Correct |
12 ms |
824 KB |
Output is correct |
10 |
Correct |
11 ms |
824 KB |
Output is correct |
11 |
Correct |
9 ms |
724 KB |
Output is correct |
12 |
Correct |
5 ms |
724 KB |
Output is correct |
13 |
Correct |
5 ms |
824 KB |
Output is correct |
14 |
Correct |
0 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
11 ms |
724 KB |
Output is correct |
17 |
Correct |
10 ms |
832 KB |
Output is correct |
18 |
Correct |
10 ms |
828 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
11 ms |
724 KB |
Output is correct |
21 |
Correct |
11 ms |
828 KB |
Output is correct |
22 |
Correct |
11 ms |
860 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
468 KB |
Output is correct |
25 |
Correct |
11 ms |
724 KB |
Output is correct |
26 |
Correct |
2 ms |
724 KB |
Output is correct |
27 |
Correct |
11 ms |
724 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
292 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
10 ms |
840 KB |
Output is correct |
4 |
Correct |
10 ms |
820 KB |
Output is correct |
5 |
Correct |
10 ms |
828 KB |
Output is correct |
6 |
Correct |
10 ms |
724 KB |
Output is correct |
7 |
Correct |
11 ms |
824 KB |
Output is correct |
8 |
Correct |
11 ms |
724 KB |
Output is correct |
9 |
Correct |
12 ms |
824 KB |
Output is correct |
10 |
Correct |
11 ms |
824 KB |
Output is correct |
11 |
Correct |
9 ms |
724 KB |
Output is correct |
12 |
Correct |
5 ms |
724 KB |
Output is correct |
13 |
Correct |
5 ms |
824 KB |
Output is correct |
14 |
Correct |
0 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
11 ms |
724 KB |
Output is correct |
17 |
Correct |
10 ms |
832 KB |
Output is correct |
18 |
Correct |
10 ms |
828 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
11 ms |
724 KB |
Output is correct |
21 |
Correct |
11 ms |
828 KB |
Output is correct |
22 |
Correct |
11 ms |
860 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
468 KB |
Output is correct |
25 |
Correct |
11 ms |
724 KB |
Output is correct |
26 |
Correct |
2 ms |
724 KB |
Output is correct |
27 |
Correct |
11 ms |
724 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
11 ms |
816 KB |
Output is correct |
30 |
Correct |
10 ms |
844 KB |
Output is correct |
31 |
Correct |
11 ms |
724 KB |
Output is correct |
32 |
Correct |
12 ms |
724 KB |
Output is correct |
33 |
Correct |
11 ms |
832 KB |
Output is correct |
34 |
Correct |
9 ms |
724 KB |
Output is correct |
35 |
Correct |
10 ms |
724 KB |
Output is correct |
36 |
Correct |
8 ms |
768 KB |
Output is correct |
37 |
Correct |
6 ms |
724 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
292 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
10 ms |
840 KB |
Output is correct |
4 |
Correct |
10 ms |
820 KB |
Output is correct |
5 |
Correct |
10 ms |
828 KB |
Output is correct |
6 |
Correct |
10 ms |
724 KB |
Output is correct |
7 |
Correct |
11 ms |
824 KB |
Output is correct |
8 |
Correct |
11 ms |
724 KB |
Output is correct |
9 |
Correct |
12 ms |
824 KB |
Output is correct |
10 |
Correct |
11 ms |
824 KB |
Output is correct |
11 |
Correct |
9 ms |
724 KB |
Output is correct |
12 |
Correct |
5 ms |
724 KB |
Output is correct |
13 |
Correct |
5 ms |
824 KB |
Output is correct |
14 |
Correct |
0 ms |
340 KB |
Output is correct |
15 |
Correct |
1 ms |
340 KB |
Output is correct |
16 |
Correct |
11 ms |
724 KB |
Output is correct |
17 |
Correct |
10 ms |
832 KB |
Output is correct |
18 |
Correct |
10 ms |
828 KB |
Output is correct |
19 |
Correct |
1 ms |
340 KB |
Output is correct |
20 |
Correct |
11 ms |
724 KB |
Output is correct |
21 |
Correct |
11 ms |
828 KB |
Output is correct |
22 |
Correct |
11 ms |
860 KB |
Output is correct |
23 |
Correct |
1 ms |
340 KB |
Output is correct |
24 |
Correct |
1 ms |
468 KB |
Output is correct |
25 |
Correct |
11 ms |
724 KB |
Output is correct |
26 |
Correct |
2 ms |
724 KB |
Output is correct |
27 |
Correct |
11 ms |
724 KB |
Output is correct |
28 |
Correct |
1 ms |
340 KB |
Output is correct |
29 |
Correct |
11 ms |
816 KB |
Output is correct |
30 |
Correct |
10 ms |
844 KB |
Output is correct |
31 |
Correct |
11 ms |
724 KB |
Output is correct |
32 |
Correct |
12 ms |
724 KB |
Output is correct |
33 |
Correct |
11 ms |
832 KB |
Output is correct |
34 |
Correct |
9 ms |
724 KB |
Output is correct |
35 |
Correct |
10 ms |
724 KB |
Output is correct |
36 |
Correct |
8 ms |
768 KB |
Output is correct |
37 |
Correct |
6 ms |
724 KB |
Output is correct |
38 |
Correct |
445 ms |
11388 KB |
Output is correct |
39 |
Correct |
814 ms |
216020 KB |
Output is correct |
40 |
Correct |
396 ms |
11608 KB |
Output is correct |
41 |
Correct |
366 ms |
11324 KB |
Output is correct |
42 |
Correct |
351 ms |
11444 KB |
Output is correct |
43 |
Correct |
466 ms |
11352 KB |
Output is correct |
44 |
Correct |
47 ms |
2392 KB |
Output is correct |
45 |
Correct |
546 ms |
210836 KB |
Output is correct |
46 |
Correct |
568 ms |
210768 KB |
Output is correct |
47 |
Correct |
741 ms |
212164 KB |
Output is correct |
48 |
Correct |
802 ms |
212100 KB |
Output is correct |
49 |
Correct |
607 ms |
213868 KB |
Output is correct |
50 |
Correct |
641 ms |
213920 KB |
Output is correct |
51 |
Correct |
658 ms |
219536 KB |
Output is correct |
52 |
Correct |
653 ms |
219608 KB |
Output is correct |
53 |
Correct |
88 ms |
15036 KB |
Output is correct |
54 |
Correct |
748 ms |
210692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
340 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
0 ms |
340 KB |
Output is correct |
5 |
Correct |
41 ms |
432 KB |
Output is correct |
6 |
Correct |
6 ms |
724 KB |
Output is correct |
7 |
Correct |
5 ms |
724 KB |
Output is correct |
8 |
Correct |
2 ms |
340 KB |
Output is correct |
9 |
Correct |
1 ms |
340 KB |
Output is correct |
10 |
Correct |
1 ms |
468 KB |
Output is correct |
11 |
Correct |
2 ms |
340 KB |
Output is correct |
12 |
Correct |
7 ms |
684 KB |
Output is correct |
13 |
Correct |
137 ms |
708 KB |
Output is correct |
14 |
Correct |
261 ms |
844 KB |
Output is correct |
15 |
Correct |
210 ms |
956 KB |
Output is correct |
16 |
Correct |
550 ms |
210740 KB |
Output is correct |
17 |
Correct |
597 ms |
216652 KB |
Output is correct |
18 |
Correct |
666 ms |
222848 KB |
Output is correct |
19 |
Correct |
595 ms |
212596 KB |
Output is correct |
20 |
Correct |
557 ms |
212624 KB |
Output is correct |
21 |
Correct |
622 ms |
212560 KB |
Output is correct |
22 |
Correct |
669 ms |
216652 KB |
Output is correct |
23 |
Correct |
639 ms |
216376 KB |
Output is correct |
24 |
Correct |
743 ms |
216364 KB |
Output is correct |
25 |
Correct |
703 ms |
216792 KB |
Output is correct |
26 |
Correct |
762 ms |
216556 KB |
Output is correct |
27 |
Correct |
721 ms |
227536 KB |
Output is correct |
28 |
Correct |
555 ms |
217852 KB |
Output is correct |
29 |
Correct |
560 ms |
217848 KB |
Output is correct |
30 |
Correct |
695 ms |
220256 KB |
Output is correct |
31 |
Correct |
511 ms |
213172 KB |
Output is correct |
32 |
Correct |
657 ms |
218788 KB |
Output is correct |
33 |
Correct |
518 ms |
213108 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
288 KB |
Output is correct |
2 |
Correct |
0 ms |
340 KB |
Output is correct |
3 |
Correct |
0 ms |
340 KB |
Output is correct |
4 |
Correct |
99 ms |
632 KB |
Output is correct |
5 |
Correct |
206 ms |
688 KB |
Output is correct |
6 |
Correct |
9 ms |
820 KB |
Output is correct |
7 |
Correct |
10 ms |
812 KB |
Output is correct |
8 |
Correct |
13 ms |
856 KB |
Output is correct |
9 |
Correct |
435 ms |
11268 KB |
Output is correct |
10 |
Correct |
826 ms |
216140 KB |
Output is correct |
11 |
Correct |
39 ms |
468 KB |
Output is correct |
12 |
Correct |
243 ms |
572 KB |
Output is correct |
13 |
Correct |
941 ms |
219744 KB |
Output is correct |
14 |
Correct |
801 ms |
219516 KB |
Output is correct |
15 |
Correct |
722 ms |
221160 KB |
Output is correct |
16 |
Correct |
972 ms |
229184 KB |
Output is correct |
17 |
Correct |
937 ms |
222200 KB |
Output is correct |
18 |
Correct |
856 ms |
224428 KB |
Output is correct |
19 |
Correct |
888 ms |
222196 KB |
Output is correct |
20 |
Correct |
774 ms |
222192 KB |
Output is correct |
21 |
Correct |
641 ms |
221744 KB |
Output is correct |
22 |
Correct |
804 ms |
219340 KB |
Output is correct |
23 |
Correct |
1 ms |
292 KB |
Output is correct |
24 |
Correct |
0 ms |
340 KB |
Output is correct |
25 |
Correct |
10 ms |
840 KB |
Output is correct |
26 |
Correct |
10 ms |
820 KB |
Output is correct |
27 |
Correct |
10 ms |
828 KB |
Output is correct |
28 |
Correct |
10 ms |
724 KB |
Output is correct |
29 |
Correct |
11 ms |
824 KB |
Output is correct |
30 |
Correct |
11 ms |
724 KB |
Output is correct |
31 |
Correct |
12 ms |
824 KB |
Output is correct |
32 |
Correct |
11 ms |
824 KB |
Output is correct |
33 |
Correct |
9 ms |
724 KB |
Output is correct |
34 |
Correct |
5 ms |
724 KB |
Output is correct |
35 |
Correct |
5 ms |
824 KB |
Output is correct |
36 |
Correct |
0 ms |
340 KB |
Output is correct |
37 |
Correct |
1 ms |
340 KB |
Output is correct |
38 |
Correct |
11 ms |
724 KB |
Output is correct |
39 |
Correct |
10 ms |
832 KB |
Output is correct |
40 |
Correct |
10 ms |
828 KB |
Output is correct |
41 |
Correct |
1 ms |
340 KB |
Output is correct |
42 |
Correct |
11 ms |
724 KB |
Output is correct |
43 |
Correct |
11 ms |
828 KB |
Output is correct |
44 |
Correct |
11 ms |
860 KB |
Output is correct |
45 |
Correct |
1 ms |
340 KB |
Output is correct |
46 |
Correct |
1 ms |
468 KB |
Output is correct |
47 |
Correct |
11 ms |
724 KB |
Output is correct |
48 |
Correct |
2 ms |
724 KB |
Output is correct |
49 |
Correct |
11 ms |
724 KB |
Output is correct |
50 |
Correct |
1 ms |
340 KB |
Output is correct |
51 |
Correct |
11 ms |
816 KB |
Output is correct |
52 |
Correct |
10 ms |
844 KB |
Output is correct |
53 |
Correct |
11 ms |
724 KB |
Output is correct |
54 |
Correct |
12 ms |
724 KB |
Output is correct |
55 |
Correct |
11 ms |
832 KB |
Output is correct |
56 |
Correct |
9 ms |
724 KB |
Output is correct |
57 |
Correct |
10 ms |
724 KB |
Output is correct |
58 |
Correct |
8 ms |
768 KB |
Output is correct |
59 |
Correct |
6 ms |
724 KB |
Output is correct |
60 |
Correct |
445 ms |
11388 KB |
Output is correct |
61 |
Correct |
814 ms |
216020 KB |
Output is correct |
62 |
Correct |
396 ms |
11608 KB |
Output is correct |
63 |
Correct |
366 ms |
11324 KB |
Output is correct |
64 |
Correct |
351 ms |
11444 KB |
Output is correct |
65 |
Correct |
466 ms |
11352 KB |
Output is correct |
66 |
Correct |
47 ms |
2392 KB |
Output is correct |
67 |
Correct |
546 ms |
210836 KB |
Output is correct |
68 |
Correct |
568 ms |
210768 KB |
Output is correct |
69 |
Correct |
741 ms |
212164 KB |
Output is correct |
70 |
Correct |
802 ms |
212100 KB |
Output is correct |
71 |
Correct |
607 ms |
213868 KB |
Output is correct |
72 |
Correct |
641 ms |
213920 KB |
Output is correct |
73 |
Correct |
658 ms |
219536 KB |
Output is correct |
74 |
Correct |
653 ms |
219608 KB |
Output is correct |
75 |
Correct |
88 ms |
15036 KB |
Output is correct |
76 |
Correct |
748 ms |
210692 KB |
Output is correct |
77 |
Correct |
0 ms |
340 KB |
Output is correct |
78 |
Correct |
0 ms |
340 KB |
Output is correct |
79 |
Correct |
0 ms |
340 KB |
Output is correct |
80 |
Correct |
0 ms |
340 KB |
Output is correct |
81 |
Correct |
41 ms |
432 KB |
Output is correct |
82 |
Correct |
6 ms |
724 KB |
Output is correct |
83 |
Correct |
5 ms |
724 KB |
Output is correct |
84 |
Correct |
2 ms |
340 KB |
Output is correct |
85 |
Correct |
1 ms |
340 KB |
Output is correct |
86 |
Correct |
1 ms |
468 KB |
Output is correct |
87 |
Correct |
2 ms |
340 KB |
Output is correct |
88 |
Correct |
7 ms |
684 KB |
Output is correct |
89 |
Correct |
137 ms |
708 KB |
Output is correct |
90 |
Correct |
261 ms |
844 KB |
Output is correct |
91 |
Correct |
210 ms |
956 KB |
Output is correct |
92 |
Correct |
550 ms |
210740 KB |
Output is correct |
93 |
Correct |
597 ms |
216652 KB |
Output is correct |
94 |
Correct |
666 ms |
222848 KB |
Output is correct |
95 |
Correct |
595 ms |
212596 KB |
Output is correct |
96 |
Correct |
557 ms |
212624 KB |
Output is correct |
97 |
Correct |
622 ms |
212560 KB |
Output is correct |
98 |
Correct |
669 ms |
216652 KB |
Output is correct |
99 |
Correct |
639 ms |
216376 KB |
Output is correct |
100 |
Correct |
743 ms |
216364 KB |
Output is correct |
101 |
Correct |
703 ms |
216792 KB |
Output is correct |
102 |
Correct |
762 ms |
216556 KB |
Output is correct |
103 |
Correct |
721 ms |
227536 KB |
Output is correct |
104 |
Correct |
555 ms |
217852 KB |
Output is correct |
105 |
Correct |
560 ms |
217848 KB |
Output is correct |
106 |
Correct |
695 ms |
220256 KB |
Output is correct |
107 |
Correct |
511 ms |
213172 KB |
Output is correct |
108 |
Correct |
657 ms |
218788 KB |
Output is correct |
109 |
Correct |
518 ms |
213108 KB |
Output is correct |
110 |
Correct |
253 ms |
1748 KB |
Output is correct |
111 |
Correct |
202 ms |
1224 KB |
Output is correct |
112 |
Correct |
797 ms |
225112 KB |
Output is correct |
113 |
Correct |
851 ms |
217088 KB |
Output is correct |
114 |
Correct |
648 ms |
220484 KB |
Output is correct |
115 |
Correct |
416 ms |
208844 KB |
Output is correct |
116 |
Correct |
823 ms |
216760 KB |
Output is correct |
117 |
Correct |
841 ms |
224168 KB |
Output is correct |
118 |
Correct |
758 ms |
211776 KB |
Output is correct |
119 |
Correct |
732 ms |
211768 KB |
Output is correct |
120 |
Correct |
57 ms |
18380 KB |
Output is correct |
121 |
Correct |
903 ms |
218416 KB |
Output is correct |
122 |
Correct |
917 ms |
218276 KB |
Output is correct |
123 |
Correct |
941 ms |
217544 KB |
Output is correct |
124 |
Correct |
700 ms |
217424 KB |
Output is correct |
125 |
Correct |
954 ms |
218008 KB |
Output is correct |
126 |
Correct |
1012 ms |
234204 KB |
Output is correct |
127 |
Correct |
748 ms |
225336 KB |
Output is correct |
128 |
Correct |
718 ms |
224844 KB |
Output is correct |
129 |
Correct |
1032 ms |
235816 KB |
Output is correct |
130 |
Correct |
727 ms |
225380 KB |
Output is correct |