#include <stdio.h>
#define N 500000
#define Q 1500000
int tt[N + 1][2], pp[N + 1], sz[N + 1], sz_[N + 1]; char lz[N + 1];
int dir(int u) {
return tt[pp[u]][0] == u ? 0 : 1;
}
int is_root(int u) {
return tt[pp[u]][dir(u)] != u;
}
void put(int u) {
if (u) {
int tmp;
tmp = tt[u][0], tt[u][0] = tt[u][1], tt[u][1] = tmp;
lz[u] ^= 1;
}
}
void pus(int u) {
if (lz[u])
put(tt[u][0]), put(tt[u][1]), lz[u] = 0;
}
void pul(int u) {
sz[u] = sz[tt[u][0]] + sz_[u] + sz[tt[u][1]];
}
void attach(int u, int v, int d) {
if (u)
tt[u][d] = v, pul(u);
if (v)
pp[v] = u;
}
void rotate(int u) {
int v, w, du, dv, isrt;
v = pp[u], w = pp[v];
pus(w), pus(v), pus(u);
du = dir(u), dv = dir(v), isrt = is_root(v);
attach(v, tt[u][du ^ 1], du);
attach(u, v, du ^ 1);
if (isrt)
pp[u] = w;
else
attach(w, u, dv);
}
void splay(int u) {
while (!is_root(u)) {
int v = pp[u];
if (!is_root(v))
pus(v), rotate(dir(u) == dir(v) ? v : u);
rotate(u);
}
pus(u);
}
void expose(int u) {
int v, w;
for (v = u, w = 0; v; w = v, v = pp[v]) {
splay(v);
sz_[v] += sz[tt[v][1]], attach(v, w, 1), sz_[v] -= sz[w];
pul(v);
}
splay(u), put(u), pus(u);
}
long long m;
void link(int u, int v) {
expose(u), expose(v);
m += (long long) sz[u] * sz[v];
sz_[u] += sz[tt[u][1]], attach(u, v, 1), pul(u);
}
void cut(int u, int v) {
expose(u), expose(v);
m -= (long long) sz_[v] * (sz[v] - sz_[v]);
attach(v, 0, 1), pp[u] = 0;
}
int main() {
static long long mm[Q + 1], ss[Q + 1];
int n, q, h, encrypted, i, j, d, t;
long long i_, j_, d_, ans;
scanf("%d%d%d", &encrypted, &n, &q);
for (i = 1; i <= n; i++)
sz_[i] = 1;
mm[0] = 0;
ans = 0;
for (h = 1; h <= q; h++) {
scanf("%d", &t);
if (t == 1) {
scanf("%lld%lld", &i_, &j_);
if (!encrypted)
i = i_, j = j_;
else
i = i_ ^ ans, j = j_ ^ ans;
link(i, j);
mm[h] = m, ss[h] = ss[h - 1];
} else if (t == 2) {
scanf("%lld%lld", &i_, &j_);
if (!encrypted)
i = i_, j = j_;
else
i = i_ ^ ans, j = j_ ^ ans;
cut(i, j);
mm[h] = m, ss[h] = ss[h - 1] + mm[h - 1] - mm[h];
} else {
scanf("%lld", &d_);
if (!encrypted)
d = d_;
else
d = d_ ^ ans;
mm[h] = m, ss[h] = ss[h - 1];
printf("%lld\n", ans = mm[h] + ss[h] - ss[h - d]);
}
}
return 0;
}
Compilation message
Main.c: In function 'main':
Main.c:96:2: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
96 | scanf("%d%d%d", &encrypted, &n, &q);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.c:102:3: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
102 | scanf("%d", &t);
| ^~~~~~~~~~~~~~~
Main.c:104:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
104 | scanf("%lld%lld", &i_, &j_);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.c:112:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
112 | scanf("%lld%lld", &i_, &j_);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Main.c:120:4: warning: ignoring return value of 'scanf' declared with attribute 'warn_unused_result' [-Wunused-result]
120 | scanf("%lld", &d_);
| ^~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
372 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
372 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
2 ms |
600 KB |
Output is correct |
30 |
Correct |
2 ms |
604 KB |
Output is correct |
31 |
Correct |
2 ms |
392 KB |
Output is correct |
32 |
Correct |
2 ms |
536 KB |
Output is correct |
33 |
Correct |
2 ms |
612 KB |
Output is correct |
34 |
Correct |
2 ms |
604 KB |
Output is correct |
35 |
Correct |
2 ms |
604 KB |
Output is correct |
36 |
Correct |
2 ms |
616 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
2 ms |
604 KB |
Output is correct |
39 |
Correct |
1 ms |
604 KB |
Output is correct |
40 |
Correct |
2 ms |
616 KB |
Output is correct |
41 |
Correct |
2 ms |
600 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
540 KB |
Output is correct |
45 |
Correct |
2 ms |
856 KB |
Output is correct |
46 |
Correct |
3 ms |
604 KB |
Output is correct |
47 |
Correct |
2 ms |
604 KB |
Output is correct |
48 |
Correct |
2 ms |
604 KB |
Output is correct |
49 |
Correct |
2 ms |
536 KB |
Output is correct |
50 |
Correct |
2 ms |
348 KB |
Output is correct |
51 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
2 ms |
604 KB |
Output is correct |
30 |
Correct |
2 ms |
604 KB |
Output is correct |
31 |
Correct |
2 ms |
604 KB |
Output is correct |
32 |
Correct |
2 ms |
604 KB |
Output is correct |
33 |
Correct |
2 ms |
604 KB |
Output is correct |
34 |
Correct |
2 ms |
528 KB |
Output is correct |
35 |
Correct |
2 ms |
604 KB |
Output is correct |
36 |
Correct |
1 ms |
604 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
1 ms |
604 KB |
Output is correct |
39 |
Correct |
2 ms |
512 KB |
Output is correct |
40 |
Correct |
2 ms |
604 KB |
Output is correct |
41 |
Correct |
2 ms |
604 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
520 KB |
Output is correct |
44 |
Correct |
2 ms |
600 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
4 ms |
584 KB |
Output is correct |
47 |
Correct |
2 ms |
600 KB |
Output is correct |
48 |
Correct |
2 ms |
604 KB |
Output is correct |
49 |
Correct |
2 ms |
604 KB |
Output is correct |
50 |
Correct |
1 ms |
604 KB |
Output is correct |
51 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
344 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
344 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
372 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
2 ms |
600 KB |
Output is correct |
30 |
Correct |
2 ms |
604 KB |
Output is correct |
31 |
Correct |
2 ms |
392 KB |
Output is correct |
32 |
Correct |
2 ms |
536 KB |
Output is correct |
33 |
Correct |
2 ms |
612 KB |
Output is correct |
34 |
Correct |
2 ms |
604 KB |
Output is correct |
35 |
Correct |
2 ms |
604 KB |
Output is correct |
36 |
Correct |
2 ms |
616 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
2 ms |
604 KB |
Output is correct |
39 |
Correct |
1 ms |
604 KB |
Output is correct |
40 |
Correct |
2 ms |
616 KB |
Output is correct |
41 |
Correct |
2 ms |
600 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
604 KB |
Output is correct |
44 |
Correct |
2 ms |
540 KB |
Output is correct |
45 |
Correct |
2 ms |
856 KB |
Output is correct |
46 |
Correct |
3 ms |
604 KB |
Output is correct |
47 |
Correct |
2 ms |
604 KB |
Output is correct |
48 |
Correct |
2 ms |
604 KB |
Output is correct |
49 |
Correct |
2 ms |
536 KB |
Output is correct |
50 |
Correct |
2 ms |
348 KB |
Output is correct |
51 |
Correct |
1 ms |
348 KB |
Output is correct |
52 |
Correct |
73 ms |
8020 KB |
Output is correct |
53 |
Correct |
94 ms |
11600 KB |
Output is correct |
54 |
Correct |
81 ms |
11092 KB |
Output is correct |
55 |
Correct |
91 ms |
11600 KB |
Output is correct |
56 |
Correct |
77 ms |
11600 KB |
Output is correct |
57 |
Correct |
83 ms |
11264 KB |
Output is correct |
58 |
Correct |
80 ms |
11728 KB |
Output is correct |
59 |
Correct |
71 ms |
11604 KB |
Output is correct |
60 |
Correct |
83 ms |
11344 KB |
Output is correct |
61 |
Correct |
74 ms |
11656 KB |
Output is correct |
62 |
Correct |
72 ms |
11604 KB |
Output is correct |
63 |
Correct |
75 ms |
11348 KB |
Output is correct |
64 |
Correct |
65 ms |
11600 KB |
Output is correct |
65 |
Correct |
76 ms |
11604 KB |
Output is correct |
66 |
Correct |
82 ms |
11604 KB |
Output is correct |
67 |
Correct |
71 ms |
11684 KB |
Output is correct |
68 |
Correct |
86 ms |
11604 KB |
Output is correct |
69 |
Correct |
257 ms |
11600 KB |
Output is correct |
70 |
Correct |
151 ms |
11624 KB |
Output is correct |
71 |
Correct |
82 ms |
11348 KB |
Output is correct |
72 |
Correct |
81 ms |
11344 KB |
Output is correct |
73 |
Correct |
59 ms |
11344 KB |
Output is correct |
74 |
Correct |
67 ms |
8356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
2 ms |
604 KB |
Output is correct |
30 |
Correct |
2 ms |
604 KB |
Output is correct |
31 |
Correct |
2 ms |
604 KB |
Output is correct |
32 |
Correct |
2 ms |
604 KB |
Output is correct |
33 |
Correct |
2 ms |
604 KB |
Output is correct |
34 |
Correct |
2 ms |
528 KB |
Output is correct |
35 |
Correct |
2 ms |
604 KB |
Output is correct |
36 |
Correct |
1 ms |
604 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
1 ms |
604 KB |
Output is correct |
39 |
Correct |
2 ms |
512 KB |
Output is correct |
40 |
Correct |
2 ms |
604 KB |
Output is correct |
41 |
Correct |
2 ms |
604 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
520 KB |
Output is correct |
44 |
Correct |
2 ms |
600 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
4 ms |
584 KB |
Output is correct |
47 |
Correct |
2 ms |
600 KB |
Output is correct |
48 |
Correct |
2 ms |
604 KB |
Output is correct |
49 |
Correct |
2 ms |
604 KB |
Output is correct |
50 |
Correct |
1 ms |
604 KB |
Output is correct |
51 |
Correct |
1 ms |
348 KB |
Output is correct |
52 |
Correct |
81 ms |
8020 KB |
Output is correct |
53 |
Correct |
92 ms |
13904 KB |
Output is correct |
54 |
Correct |
84 ms |
11600 KB |
Output is correct |
55 |
Correct |
106 ms |
13824 KB |
Output is correct |
56 |
Correct |
96 ms |
13652 KB |
Output is correct |
57 |
Correct |
85 ms |
11864 KB |
Output is correct |
58 |
Correct |
87 ms |
13908 KB |
Output is correct |
59 |
Correct |
88 ms |
13556 KB |
Output is correct |
60 |
Correct |
88 ms |
11856 KB |
Output is correct |
61 |
Correct |
79 ms |
13848 KB |
Output is correct |
62 |
Correct |
92 ms |
13844 KB |
Output is correct |
63 |
Correct |
76 ms |
13864 KB |
Output is correct |
64 |
Correct |
77 ms |
13904 KB |
Output is correct |
65 |
Correct |
85 ms |
13828 KB |
Output is correct |
66 |
Correct |
91 ms |
13512 KB |
Output is correct |
67 |
Correct |
81 ms |
13836 KB |
Output is correct |
68 |
Correct |
91 ms |
13592 KB |
Output is correct |
69 |
Correct |
253 ms |
13884 KB |
Output is correct |
70 |
Correct |
167 ms |
13648 KB |
Output is correct |
71 |
Correct |
98 ms |
11800 KB |
Output is correct |
72 |
Correct |
88 ms |
11860 KB |
Output is correct |
73 |
Correct |
70 ms |
11856 KB |
Output is correct |
74 |
Correct |
57 ms |
8496 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
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 |
348 KB |
Output is correct |
5 |
Correct |
0 ms |
348 KB |
Output is correct |
6 |
Correct |
1 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
360 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
1 ms |
348 KB |
Output is correct |
15 |
Correct |
0 ms |
344 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
0 ms |
348 KB |
Output is correct |
19 |
Correct |
0 ms |
348 KB |
Output is correct |
20 |
Correct |
0 ms |
344 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
1 ms |
348 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
1 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
2 ms |
604 KB |
Output is correct |
30 |
Correct |
2 ms |
604 KB |
Output is correct |
31 |
Correct |
2 ms |
604 KB |
Output is correct |
32 |
Correct |
2 ms |
604 KB |
Output is correct |
33 |
Correct |
2 ms |
604 KB |
Output is correct |
34 |
Correct |
2 ms |
528 KB |
Output is correct |
35 |
Correct |
2 ms |
604 KB |
Output is correct |
36 |
Correct |
1 ms |
604 KB |
Output is correct |
37 |
Correct |
2 ms |
604 KB |
Output is correct |
38 |
Correct |
1 ms |
604 KB |
Output is correct |
39 |
Correct |
2 ms |
512 KB |
Output is correct |
40 |
Correct |
2 ms |
604 KB |
Output is correct |
41 |
Correct |
2 ms |
604 KB |
Output is correct |
42 |
Correct |
2 ms |
604 KB |
Output is correct |
43 |
Correct |
2 ms |
520 KB |
Output is correct |
44 |
Correct |
2 ms |
600 KB |
Output is correct |
45 |
Correct |
2 ms |
604 KB |
Output is correct |
46 |
Correct |
4 ms |
584 KB |
Output is correct |
47 |
Correct |
2 ms |
600 KB |
Output is correct |
48 |
Correct |
2 ms |
604 KB |
Output is correct |
49 |
Correct |
2 ms |
604 KB |
Output is correct |
50 |
Correct |
1 ms |
604 KB |
Output is correct |
51 |
Correct |
1 ms |
348 KB |
Output is correct |
52 |
Correct |
81 ms |
8020 KB |
Output is correct |
53 |
Correct |
92 ms |
13904 KB |
Output is correct |
54 |
Correct |
84 ms |
11600 KB |
Output is correct |
55 |
Correct |
106 ms |
13824 KB |
Output is correct |
56 |
Correct |
96 ms |
13652 KB |
Output is correct |
57 |
Correct |
85 ms |
11864 KB |
Output is correct |
58 |
Correct |
87 ms |
13908 KB |
Output is correct |
59 |
Correct |
88 ms |
13556 KB |
Output is correct |
60 |
Correct |
88 ms |
11856 KB |
Output is correct |
61 |
Correct |
79 ms |
13848 KB |
Output is correct |
62 |
Correct |
92 ms |
13844 KB |
Output is correct |
63 |
Correct |
76 ms |
13864 KB |
Output is correct |
64 |
Correct |
77 ms |
13904 KB |
Output is correct |
65 |
Correct |
85 ms |
13828 KB |
Output is correct |
66 |
Correct |
91 ms |
13512 KB |
Output is correct |
67 |
Correct |
81 ms |
13836 KB |
Output is correct |
68 |
Correct |
91 ms |
13592 KB |
Output is correct |
69 |
Correct |
253 ms |
13884 KB |
Output is correct |
70 |
Correct |
167 ms |
13648 KB |
Output is correct |
71 |
Correct |
98 ms |
11800 KB |
Output is correct |
72 |
Correct |
88 ms |
11860 KB |
Output is correct |
73 |
Correct |
70 ms |
11856 KB |
Output is correct |
74 |
Correct |
57 ms |
8496 KB |
Output is correct |
75 |
Correct |
462 ms |
72820 KB |
Output is correct |
76 |
Correct |
556 ms |
73024 KB |
Output is correct |
77 |
Correct |
473 ms |
58704 KB |
Output is correct |
78 |
Correct |
600 ms |
73108 KB |
Output is correct |
79 |
Correct |
505 ms |
70936 KB |
Output is correct |
80 |
Correct |
474 ms |
59428 KB |
Output is correct |
81 |
Correct |
518 ms |
73044 KB |
Output is correct |
82 |
Correct |
453 ms |
70884 KB |
Output is correct |
83 |
Correct |
488 ms |
61008 KB |
Output is correct |
84 |
Correct |
449 ms |
72936 KB |
Output is correct |
85 |
Correct |
430 ms |
70988 KB |
Output is correct |
86 |
Correct |
513 ms |
63332 KB |
Output is correct |
87 |
Correct |
429 ms |
73104 KB |
Output is correct |
88 |
Correct |
424 ms |
73048 KB |
Output is correct |
89 |
Correct |
411 ms |
71760 KB |
Output is correct |
90 |
Correct |
444 ms |
73040 KB |
Output is correct |
91 |
Correct |
451 ms |
71888 KB |
Output is correct |
92 |
Correct |
451 ms |
70308 KB |
Output is correct |
93 |
Correct |
478 ms |
72996 KB |
Output is correct |
94 |
Correct |
512 ms |
70972 KB |
Output is correct |
95 |
Correct |
1472 ms |
73000 KB |
Output is correct |
96 |
Correct |
968 ms |
70908 KB |
Output is correct |
97 |
Correct |
531 ms |
59216 KB |
Output is correct |
98 |
Correct |
549 ms |
59240 KB |
Output is correct |
99 |
Correct |
367 ms |
60244 KB |
Output is correct |
100 |
Correct |
317 ms |
41556 KB |
Output is correct |
101 |
Correct |
0 ms |
348 KB |
Output is correct |