#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pll;
set<ll> adj[500010];
ll sz[2000010];
ll id[2000010];
void dfs(ll x, ll p, ll nw) {
id[x] = nw;
for (auto &y : adj[x]) {
if (y == p) continue;
dfs(y, x, nw);
}
}
ll getSize(ll x, ll p) {
ll ret = 1;
for (auto &y : adj[x]) {
if (y == p) continue;
ret += getSize(y, x);
}
return ret;
}
ll add[1500010];
int main() {
ios_base :: sync_with_stdio(false); cin.tie(NULL);
ll E;
cin >> E;
ll N, Q;
cin >> N >> Q;
for (ll i=1; i<=N; i++) {
id[i] = i;
sz[i] = 1;
}
ll pv = N;
ll prv = 0;
ll cur = 0;
for (ll q=1; q<=Q; q++) {
if (q != 1) add[q-1] = add[q-2];
ll cmd;
cin >> cmd;
if (cmd == 1) {
ll x, y;
cin >> x >> y;
if (E) {
x ^= prv;
y ^= prv;
}
if (sz[id[x]] < sz[id[y]]) swap(x, y);
cur -= sz[id[x]] * (sz[id[x]]-1) / 2;
cur -= sz[id[y]] * (sz[id[y]]-1) / 2;
sz[id[x]] += sz[id[y]];
cur += sz[id[x]] * (sz[id[x]]-1) / 2;
dfs(y, -1, id[x]);
adj[x].insert(y);
adj[y].insert(x);
}
else if (cmd == 2) {
ll x, y;
cin >> x >> y;
if (E) {
x ^= prv;
y ^= prv;
}
adj[x].erase(y);
adj[y].erase(x);
ll cnt = 1;
vector<array<ll,3>> stx, sty;
stx.push_back({x, -1, -1});
sty.push_back({y, -1, -1});
while (true) {
while (!stx.empty()) {
ll vtx = stx.back()[0];
ll par = stx.back()[1];
ll lo = stx.back()[2];
stx.pop_back();
auto it = adj[vtx].upper_bound(lo);
if (it == adj[vtx].end()) continue;
if (*it == par)
it = adj[vtx].upper_bound(par);
if (it == adj[vtx].end()) continue;
stx.push_back({vtx, par, *it});
stx.push_back({*it, vtx, -1});
break;
}
while (!sty.empty()) {
ll vtx = sty.back()[0];
ll par = sty.back()[1];
ll lo = sty.back()[2];
sty.pop_back();
auto it = adj[vtx].upper_bound(lo);
if (it == adj[vtx].end()) continue;
if (*it == par)
it = adj[vtx].upper_bound(par);
if (it == adj[vtx].end()) continue;
sty.push_back({vtx, par, *it});
sty.push_back({*it, vtx, -1});
break;
}
if (stx.empty() || sty.empty()) break;
cnt ++;
}
if (stx.empty()) {
swap(x, y);
}
ll szx = sz[id[x]] - cnt;
ll szy = cnt;
dfs(y, -1, ++pv);
sz[id[x]] = szx;
sz[id[y]] = szy;
add[q-1] += szx * szy;
cur -= szx * szy;
}
else {
ll t;
cin >> t;
if (E) {
t ^= prv;
}
ll ans = cur;
if (q-t == 0) ans += add[q-1];
else ans += add[q-1] - add[q-t-1];
cout << ans << '\n';
prv = ans;
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
29788 KB |
Output is correct |
2 |
Correct |
4 ms |
29788 KB |
Output is correct |
3 |
Correct |
4 ms |
29788 KB |
Output is correct |
4 |
Correct |
5 ms |
29788 KB |
Output is correct |
5 |
Correct |
4 ms |
29884 KB |
Output is correct |
6 |
Correct |
4 ms |
29788 KB |
Output is correct |
7 |
Correct |
4 ms |
29888 KB |
Output is correct |
8 |
Correct |
4 ms |
29868 KB |
Output is correct |
9 |
Correct |
4 ms |
29788 KB |
Output is correct |
10 |
Correct |
3 ms |
29788 KB |
Output is correct |
11 |
Correct |
4 ms |
29728 KB |
Output is correct |
12 |
Correct |
4 ms |
29788 KB |
Output is correct |
13 |
Correct |
4 ms |
29888 KB |
Output is correct |
14 |
Correct |
4 ms |
29888 KB |
Output is correct |
15 |
Correct |
4 ms |
29784 KB |
Output is correct |
16 |
Correct |
4 ms |
29788 KB |
Output is correct |
17 |
Correct |
4 ms |
29788 KB |
Output is correct |
18 |
Correct |
4 ms |
29660 KB |
Output is correct |
19 |
Correct |
4 ms |
29788 KB |
Output is correct |
20 |
Correct |
4 ms |
29788 KB |
Output is correct |
21 |
Correct |
3 ms |
29788 KB |
Output is correct |
22 |
Correct |
4 ms |
29788 KB |
Output is correct |
23 |
Correct |
3 ms |
29784 KB |
Output is correct |
24 |
Correct |
4 ms |
29788 KB |
Output is correct |
25 |
Correct |
4 ms |
29892 KB |
Output is correct |
26 |
Correct |
3 ms |
29788 KB |
Output is correct |
27 |
Correct |
3 ms |
29788 KB |
Output is correct |
28 |
Correct |
4 ms |
29788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
29656 KB |
Output is correct |
2 |
Correct |
3 ms |
29788 KB |
Output is correct |
3 |
Correct |
3 ms |
29656 KB |
Output is correct |
4 |
Correct |
4 ms |
29788 KB |
Output is correct |
5 |
Correct |
3 ms |
29788 KB |
Output is correct |
6 |
Correct |
3 ms |
29788 KB |
Output is correct |
7 |
Correct |
6 ms |
29788 KB |
Output is correct |
8 |
Correct |
4 ms |
29788 KB |
Output is correct |
9 |
Correct |
4 ms |
29876 KB |
Output is correct |
10 |
Correct |
4 ms |
29880 KB |
Output is correct |
11 |
Correct |
4 ms |
29788 KB |
Output is correct |
12 |
Correct |
3 ms |
29788 KB |
Output is correct |
13 |
Correct |
4 ms |
29868 KB |
Output is correct |
14 |
Correct |
4 ms |
29788 KB |
Output is correct |
15 |
Correct |
4 ms |
29884 KB |
Output is correct |
16 |
Correct |
4 ms |
29788 KB |
Output is correct |
17 |
Correct |
4 ms |
29788 KB |
Output is correct |
18 |
Correct |
4 ms |
29788 KB |
Output is correct |
19 |
Correct |
3 ms |
29788 KB |
Output is correct |
20 |
Correct |
4 ms |
29788 KB |
Output is correct |
21 |
Correct |
5 ms |
29788 KB |
Output is correct |
22 |
Correct |
4 ms |
29884 KB |
Output is correct |
23 |
Correct |
3 ms |
29788 KB |
Output is correct |
24 |
Correct |
3 ms |
29784 KB |
Output is correct |
25 |
Correct |
3 ms |
29648 KB |
Output is correct |
26 |
Correct |
3 ms |
29784 KB |
Output is correct |
27 |
Correct |
3 ms |
29788 KB |
Output is correct |
28 |
Correct |
4 ms |
29788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
29788 KB |
Output is correct |
2 |
Correct |
4 ms |
29788 KB |
Output is correct |
3 |
Correct |
4 ms |
29788 KB |
Output is correct |
4 |
Correct |
5 ms |
29788 KB |
Output is correct |
5 |
Correct |
4 ms |
29884 KB |
Output is correct |
6 |
Correct |
4 ms |
29788 KB |
Output is correct |
7 |
Correct |
4 ms |
29888 KB |
Output is correct |
8 |
Correct |
4 ms |
29868 KB |
Output is correct |
9 |
Correct |
4 ms |
29788 KB |
Output is correct |
10 |
Correct |
3 ms |
29788 KB |
Output is correct |
11 |
Correct |
4 ms |
29728 KB |
Output is correct |
12 |
Correct |
4 ms |
29788 KB |
Output is correct |
13 |
Correct |
4 ms |
29888 KB |
Output is correct |
14 |
Correct |
4 ms |
29888 KB |
Output is correct |
15 |
Correct |
4 ms |
29784 KB |
Output is correct |
16 |
Correct |
4 ms |
29788 KB |
Output is correct |
17 |
Correct |
4 ms |
29788 KB |
Output is correct |
18 |
Correct |
4 ms |
29660 KB |
Output is correct |
19 |
Correct |
4 ms |
29788 KB |
Output is correct |
20 |
Correct |
4 ms |
29788 KB |
Output is correct |
21 |
Correct |
3 ms |
29788 KB |
Output is correct |
22 |
Correct |
4 ms |
29788 KB |
Output is correct |
23 |
Correct |
3 ms |
29784 KB |
Output is correct |
24 |
Correct |
4 ms |
29788 KB |
Output is correct |
25 |
Correct |
4 ms |
29892 KB |
Output is correct |
26 |
Correct |
3 ms |
29788 KB |
Output is correct |
27 |
Correct |
3 ms |
29788 KB |
Output is correct |
28 |
Correct |
4 ms |
29788 KB |
Output is correct |
29 |
Correct |
5 ms |
30044 KB |
Output is correct |
30 |
Correct |
5 ms |
30040 KB |
Output is correct |
31 |
Correct |
6 ms |
30044 KB |
Output is correct |
32 |
Correct |
4 ms |
30044 KB |
Output is correct |
33 |
Correct |
6 ms |
30044 KB |
Output is correct |
34 |
Correct |
5 ms |
30040 KB |
Output is correct |
35 |
Correct |
4 ms |
30044 KB |
Output is correct |
36 |
Correct |
5 ms |
30044 KB |
Output is correct |
37 |
Correct |
6 ms |
30044 KB |
Output is correct |
38 |
Correct |
5 ms |
30044 KB |
Output is correct |
39 |
Correct |
5 ms |
30044 KB |
Output is correct |
40 |
Correct |
5 ms |
30044 KB |
Output is correct |
41 |
Correct |
5 ms |
30044 KB |
Output is correct |
42 |
Correct |
5 ms |
30048 KB |
Output is correct |
43 |
Correct |
5 ms |
30044 KB |
Output is correct |
44 |
Correct |
5 ms |
30044 KB |
Output is correct |
45 |
Correct |
5 ms |
30044 KB |
Output is correct |
46 |
Correct |
6 ms |
30044 KB |
Output is correct |
47 |
Correct |
5 ms |
30044 KB |
Output is correct |
48 |
Correct |
4 ms |
30044 KB |
Output is correct |
49 |
Correct |
5 ms |
30044 KB |
Output is correct |
50 |
Correct |
4 ms |
29788 KB |
Output is correct |
51 |
Correct |
4 ms |
29896 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
29656 KB |
Output is correct |
2 |
Correct |
3 ms |
29788 KB |
Output is correct |
3 |
Correct |
3 ms |
29656 KB |
Output is correct |
4 |
Correct |
4 ms |
29788 KB |
Output is correct |
5 |
Correct |
3 ms |
29788 KB |
Output is correct |
6 |
Correct |
3 ms |
29788 KB |
Output is correct |
7 |
Correct |
6 ms |
29788 KB |
Output is correct |
8 |
Correct |
4 ms |
29788 KB |
Output is correct |
9 |
Correct |
4 ms |
29876 KB |
Output is correct |
10 |
Correct |
4 ms |
29880 KB |
Output is correct |
11 |
Correct |
4 ms |
29788 KB |
Output is correct |
12 |
Correct |
3 ms |
29788 KB |
Output is correct |
13 |
Correct |
4 ms |
29868 KB |
Output is correct |
14 |
Correct |
4 ms |
29788 KB |
Output is correct |
15 |
Correct |
4 ms |
29884 KB |
Output is correct |
16 |
Correct |
4 ms |
29788 KB |
Output is correct |
17 |
Correct |
4 ms |
29788 KB |
Output is correct |
18 |
Correct |
4 ms |
29788 KB |
Output is correct |
19 |
Correct |
3 ms |
29788 KB |
Output is correct |
20 |
Correct |
4 ms |
29788 KB |
Output is correct |
21 |
Correct |
5 ms |
29788 KB |
Output is correct |
22 |
Correct |
4 ms |
29884 KB |
Output is correct |
23 |
Correct |
3 ms |
29788 KB |
Output is correct |
24 |
Correct |
3 ms |
29784 KB |
Output is correct |
25 |
Correct |
3 ms |
29648 KB |
Output is correct |
26 |
Correct |
3 ms |
29784 KB |
Output is correct |
27 |
Correct |
3 ms |
29788 KB |
Output is correct |
28 |
Correct |
4 ms |
29788 KB |
Output is correct |
29 |
Correct |
5 ms |
30044 KB |
Output is correct |
30 |
Correct |
5 ms |
30044 KB |
Output is correct |
31 |
Correct |
4 ms |
30044 KB |
Output is correct |
32 |
Correct |
5 ms |
30044 KB |
Output is correct |
33 |
Correct |
7 ms |
30044 KB |
Output is correct |
34 |
Correct |
6 ms |
29912 KB |
Output is correct |
35 |
Correct |
5 ms |
30044 KB |
Output is correct |
36 |
Correct |
8 ms |
30296 KB |
Output is correct |
37 |
Correct |
7 ms |
30044 KB |
Output is correct |
38 |
Correct |
5 ms |
30044 KB |
Output is correct |
39 |
Correct |
7 ms |
30096 KB |
Output is correct |
40 |
Correct |
5 ms |
30040 KB |
Output is correct |
41 |
Correct |
5 ms |
30044 KB |
Output is correct |
42 |
Correct |
5 ms |
29912 KB |
Output is correct |
43 |
Correct |
5 ms |
30044 KB |
Output is correct |
44 |
Correct |
5 ms |
30044 KB |
Output is correct |
45 |
Correct |
7 ms |
30040 KB |
Output is correct |
46 |
Correct |
5 ms |
30044 KB |
Output is correct |
47 |
Correct |
5 ms |
30044 KB |
Output is correct |
48 |
Correct |
5 ms |
30044 KB |
Output is correct |
49 |
Correct |
5 ms |
30040 KB |
Output is correct |
50 |
Correct |
4 ms |
29788 KB |
Output is correct |
51 |
Correct |
5 ms |
29788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
3 ms |
29788 KB |
Output is correct |
2 |
Correct |
4 ms |
29788 KB |
Output is correct |
3 |
Correct |
4 ms |
29788 KB |
Output is correct |
4 |
Correct |
5 ms |
29788 KB |
Output is correct |
5 |
Correct |
4 ms |
29884 KB |
Output is correct |
6 |
Correct |
4 ms |
29788 KB |
Output is correct |
7 |
Correct |
4 ms |
29888 KB |
Output is correct |
8 |
Correct |
4 ms |
29868 KB |
Output is correct |
9 |
Correct |
4 ms |
29788 KB |
Output is correct |
10 |
Correct |
3 ms |
29788 KB |
Output is correct |
11 |
Correct |
4 ms |
29728 KB |
Output is correct |
12 |
Correct |
4 ms |
29788 KB |
Output is correct |
13 |
Correct |
4 ms |
29888 KB |
Output is correct |
14 |
Correct |
4 ms |
29888 KB |
Output is correct |
15 |
Correct |
4 ms |
29784 KB |
Output is correct |
16 |
Correct |
4 ms |
29788 KB |
Output is correct |
17 |
Correct |
4 ms |
29788 KB |
Output is correct |
18 |
Correct |
4 ms |
29660 KB |
Output is correct |
19 |
Correct |
4 ms |
29788 KB |
Output is correct |
20 |
Correct |
4 ms |
29788 KB |
Output is correct |
21 |
Correct |
3 ms |
29788 KB |
Output is correct |
22 |
Correct |
4 ms |
29788 KB |
Output is correct |
23 |
Correct |
3 ms |
29784 KB |
Output is correct |
24 |
Correct |
4 ms |
29788 KB |
Output is correct |
25 |
Correct |
4 ms |
29892 KB |
Output is correct |
26 |
Correct |
3 ms |
29788 KB |
Output is correct |
27 |
Correct |
3 ms |
29788 KB |
Output is correct |
28 |
Correct |
4 ms |
29788 KB |
Output is correct |
29 |
Correct |
5 ms |
30044 KB |
Output is correct |
30 |
Correct |
5 ms |
30040 KB |
Output is correct |
31 |
Correct |
6 ms |
30044 KB |
Output is correct |
32 |
Correct |
4 ms |
30044 KB |
Output is correct |
33 |
Correct |
6 ms |
30044 KB |
Output is correct |
34 |
Correct |
5 ms |
30040 KB |
Output is correct |
35 |
Correct |
4 ms |
30044 KB |
Output is correct |
36 |
Correct |
5 ms |
30044 KB |
Output is correct |
37 |
Correct |
6 ms |
30044 KB |
Output is correct |
38 |
Correct |
5 ms |
30044 KB |
Output is correct |
39 |
Correct |
5 ms |
30044 KB |
Output is correct |
40 |
Correct |
5 ms |
30044 KB |
Output is correct |
41 |
Correct |
5 ms |
30044 KB |
Output is correct |
42 |
Correct |
5 ms |
30048 KB |
Output is correct |
43 |
Correct |
5 ms |
30044 KB |
Output is correct |
44 |
Correct |
5 ms |
30044 KB |
Output is correct |
45 |
Correct |
5 ms |
30044 KB |
Output is correct |
46 |
Correct |
6 ms |
30044 KB |
Output is correct |
47 |
Correct |
5 ms |
30044 KB |
Output is correct |
48 |
Correct |
4 ms |
30044 KB |
Output is correct |
49 |
Correct |
5 ms |
30044 KB |
Output is correct |
50 |
Correct |
4 ms |
29788 KB |
Output is correct |
51 |
Correct |
4 ms |
29896 KB |
Output is correct |
52 |
Correct |
73 ms |
49488 KB |
Output is correct |
53 |
Correct |
83 ms |
50736 KB |
Output is correct |
54 |
Correct |
78 ms |
46500 KB |
Output is correct |
55 |
Correct |
70 ms |
50260 KB |
Output is correct |
56 |
Correct |
109 ms |
50456 KB |
Output is correct |
57 |
Correct |
89 ms |
46728 KB |
Output is correct |
58 |
Correct |
81 ms |
50512 KB |
Output is correct |
59 |
Correct |
145 ms |
50504 KB |
Output is correct |
60 |
Correct |
99 ms |
45704 KB |
Output is correct |
61 |
Correct |
125 ms |
49068 KB |
Output is correct |
62 |
Correct |
118 ms |
49928 KB |
Output is correct |
63 |
Correct |
126 ms |
45640 KB |
Output is correct |
64 |
Correct |
86 ms |
50368 KB |
Output is correct |
65 |
Correct |
93 ms |
50060 KB |
Output is correct |
66 |
Correct |
147 ms |
47012 KB |
Output is correct |
67 |
Correct |
81 ms |
50640 KB |
Output is correct |
68 |
Correct |
123 ms |
50544 KB |
Output is correct |
69 |
Correct |
70 ms |
50720 KB |
Output is correct |
70 |
Correct |
125 ms |
50516 KB |
Output is correct |
71 |
Correct |
96 ms |
46620 KB |
Output is correct |
72 |
Correct |
82 ms |
46676 KB |
Output is correct |
73 |
Correct |
41 ms |
39760 KB |
Output is correct |
74 |
Correct |
38 ms |
38232 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
29656 KB |
Output is correct |
2 |
Correct |
3 ms |
29788 KB |
Output is correct |
3 |
Correct |
3 ms |
29656 KB |
Output is correct |
4 |
Correct |
4 ms |
29788 KB |
Output is correct |
5 |
Correct |
3 ms |
29788 KB |
Output is correct |
6 |
Correct |
3 ms |
29788 KB |
Output is correct |
7 |
Correct |
6 ms |
29788 KB |
Output is correct |
8 |
Correct |
4 ms |
29788 KB |
Output is correct |
9 |
Correct |
4 ms |
29876 KB |
Output is correct |
10 |
Correct |
4 ms |
29880 KB |
Output is correct |
11 |
Correct |
4 ms |
29788 KB |
Output is correct |
12 |
Correct |
3 ms |
29788 KB |
Output is correct |
13 |
Correct |
4 ms |
29868 KB |
Output is correct |
14 |
Correct |
4 ms |
29788 KB |
Output is correct |
15 |
Correct |
4 ms |
29884 KB |
Output is correct |
16 |
Correct |
4 ms |
29788 KB |
Output is correct |
17 |
Correct |
4 ms |
29788 KB |
Output is correct |
18 |
Correct |
4 ms |
29788 KB |
Output is correct |
19 |
Correct |
3 ms |
29788 KB |
Output is correct |
20 |
Correct |
4 ms |
29788 KB |
Output is correct |
21 |
Correct |
5 ms |
29788 KB |
Output is correct |
22 |
Correct |
4 ms |
29884 KB |
Output is correct |
23 |
Correct |
3 ms |
29788 KB |
Output is correct |
24 |
Correct |
3 ms |
29784 KB |
Output is correct |
25 |
Correct |
3 ms |
29648 KB |
Output is correct |
26 |
Correct |
3 ms |
29784 KB |
Output is correct |
27 |
Correct |
3 ms |
29788 KB |
Output is correct |
28 |
Correct |
4 ms |
29788 KB |
Output is correct |
29 |
Correct |
5 ms |
30044 KB |
Output is correct |
30 |
Correct |
5 ms |
30044 KB |
Output is correct |
31 |
Correct |
4 ms |
30044 KB |
Output is correct |
32 |
Correct |
5 ms |
30044 KB |
Output is correct |
33 |
Correct |
7 ms |
30044 KB |
Output is correct |
34 |
Correct |
6 ms |
29912 KB |
Output is correct |
35 |
Correct |
5 ms |
30044 KB |
Output is correct |
36 |
Correct |
8 ms |
30296 KB |
Output is correct |
37 |
Correct |
7 ms |
30044 KB |
Output is correct |
38 |
Correct |
5 ms |
30044 KB |
Output is correct |
39 |
Correct |
7 ms |
30096 KB |
Output is correct |
40 |
Correct |
5 ms |
30040 KB |
Output is correct |
41 |
Correct |
5 ms |
30044 KB |
Output is correct |
42 |
Correct |
5 ms |
29912 KB |
Output is correct |
43 |
Correct |
5 ms |
30044 KB |
Output is correct |
44 |
Correct |
5 ms |
30044 KB |
Output is correct |
45 |
Correct |
7 ms |
30040 KB |
Output is correct |
46 |
Correct |
5 ms |
30044 KB |
Output is correct |
47 |
Correct |
5 ms |
30044 KB |
Output is correct |
48 |
Correct |
5 ms |
30044 KB |
Output is correct |
49 |
Correct |
5 ms |
30040 KB |
Output is correct |
50 |
Correct |
4 ms |
29788 KB |
Output is correct |
51 |
Correct |
5 ms |
29788 KB |
Output is correct |
52 |
Correct |
173 ms |
50004 KB |
Output is correct |
53 |
Correct |
77 ms |
51536 KB |
Output is correct |
54 |
Correct |
71 ms |
46680 KB |
Output is correct |
55 |
Correct |
80 ms |
51540 KB |
Output is correct |
56 |
Correct |
112 ms |
51284 KB |
Output is correct |
57 |
Correct |
78 ms |
46760 KB |
Output is correct |
58 |
Correct |
102 ms |
51540 KB |
Output is correct |
59 |
Correct |
120 ms |
51284 KB |
Output is correct |
60 |
Correct |
94 ms |
46672 KB |
Output is correct |
61 |
Correct |
115 ms |
51540 KB |
Output is correct |
62 |
Correct |
125 ms |
51536 KB |
Output is correct |
63 |
Correct |
123 ms |
48148 KB |
Output is correct |
64 |
Correct |
81 ms |
51536 KB |
Output is correct |
65 |
Correct |
98 ms |
51540 KB |
Output is correct |
66 |
Correct |
115 ms |
47976 KB |
Output is correct |
67 |
Correct |
70 ms |
51456 KB |
Output is correct |
68 |
Correct |
113 ms |
50516 KB |
Output is correct |
69 |
Correct |
77 ms |
51748 KB |
Output is correct |
70 |
Correct |
129 ms |
51280 KB |
Output is correct |
71 |
Correct |
73 ms |
46848 KB |
Output is correct |
72 |
Correct |
85 ms |
46928 KB |
Output is correct |
73 |
Correct |
41 ms |
39764 KB |
Output is correct |
74 |
Correct |
37 ms |
38224 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
29656 KB |
Output is correct |
2 |
Correct |
3 ms |
29788 KB |
Output is correct |
3 |
Correct |
3 ms |
29656 KB |
Output is correct |
4 |
Correct |
4 ms |
29788 KB |
Output is correct |
5 |
Correct |
3 ms |
29788 KB |
Output is correct |
6 |
Correct |
3 ms |
29788 KB |
Output is correct |
7 |
Correct |
6 ms |
29788 KB |
Output is correct |
8 |
Correct |
4 ms |
29788 KB |
Output is correct |
9 |
Correct |
4 ms |
29876 KB |
Output is correct |
10 |
Correct |
4 ms |
29880 KB |
Output is correct |
11 |
Correct |
4 ms |
29788 KB |
Output is correct |
12 |
Correct |
3 ms |
29788 KB |
Output is correct |
13 |
Correct |
4 ms |
29868 KB |
Output is correct |
14 |
Correct |
4 ms |
29788 KB |
Output is correct |
15 |
Correct |
4 ms |
29884 KB |
Output is correct |
16 |
Correct |
4 ms |
29788 KB |
Output is correct |
17 |
Correct |
4 ms |
29788 KB |
Output is correct |
18 |
Correct |
4 ms |
29788 KB |
Output is correct |
19 |
Correct |
3 ms |
29788 KB |
Output is correct |
20 |
Correct |
4 ms |
29788 KB |
Output is correct |
21 |
Correct |
5 ms |
29788 KB |
Output is correct |
22 |
Correct |
4 ms |
29884 KB |
Output is correct |
23 |
Correct |
3 ms |
29788 KB |
Output is correct |
24 |
Correct |
3 ms |
29784 KB |
Output is correct |
25 |
Correct |
3 ms |
29648 KB |
Output is correct |
26 |
Correct |
3 ms |
29784 KB |
Output is correct |
27 |
Correct |
3 ms |
29788 KB |
Output is correct |
28 |
Correct |
4 ms |
29788 KB |
Output is correct |
29 |
Correct |
5 ms |
30044 KB |
Output is correct |
30 |
Correct |
5 ms |
30044 KB |
Output is correct |
31 |
Correct |
4 ms |
30044 KB |
Output is correct |
32 |
Correct |
5 ms |
30044 KB |
Output is correct |
33 |
Correct |
7 ms |
30044 KB |
Output is correct |
34 |
Correct |
6 ms |
29912 KB |
Output is correct |
35 |
Correct |
5 ms |
30044 KB |
Output is correct |
36 |
Correct |
8 ms |
30296 KB |
Output is correct |
37 |
Correct |
7 ms |
30044 KB |
Output is correct |
38 |
Correct |
5 ms |
30044 KB |
Output is correct |
39 |
Correct |
7 ms |
30096 KB |
Output is correct |
40 |
Correct |
5 ms |
30040 KB |
Output is correct |
41 |
Correct |
5 ms |
30044 KB |
Output is correct |
42 |
Correct |
5 ms |
29912 KB |
Output is correct |
43 |
Correct |
5 ms |
30044 KB |
Output is correct |
44 |
Correct |
5 ms |
30044 KB |
Output is correct |
45 |
Correct |
7 ms |
30040 KB |
Output is correct |
46 |
Correct |
5 ms |
30044 KB |
Output is correct |
47 |
Correct |
5 ms |
30044 KB |
Output is correct |
48 |
Correct |
5 ms |
30044 KB |
Output is correct |
49 |
Correct |
5 ms |
30040 KB |
Output is correct |
50 |
Correct |
4 ms |
29788 KB |
Output is correct |
51 |
Correct |
5 ms |
29788 KB |
Output is correct |
52 |
Correct |
173 ms |
50004 KB |
Output is correct |
53 |
Correct |
77 ms |
51536 KB |
Output is correct |
54 |
Correct |
71 ms |
46680 KB |
Output is correct |
55 |
Correct |
80 ms |
51540 KB |
Output is correct |
56 |
Correct |
112 ms |
51284 KB |
Output is correct |
57 |
Correct |
78 ms |
46760 KB |
Output is correct |
58 |
Correct |
102 ms |
51540 KB |
Output is correct |
59 |
Correct |
120 ms |
51284 KB |
Output is correct |
60 |
Correct |
94 ms |
46672 KB |
Output is correct |
61 |
Correct |
115 ms |
51540 KB |
Output is correct |
62 |
Correct |
125 ms |
51536 KB |
Output is correct |
63 |
Correct |
123 ms |
48148 KB |
Output is correct |
64 |
Correct |
81 ms |
51536 KB |
Output is correct |
65 |
Correct |
98 ms |
51540 KB |
Output is correct |
66 |
Correct |
115 ms |
47976 KB |
Output is correct |
67 |
Correct |
70 ms |
51456 KB |
Output is correct |
68 |
Correct |
113 ms |
50516 KB |
Output is correct |
69 |
Correct |
77 ms |
51748 KB |
Output is correct |
70 |
Correct |
129 ms |
51280 KB |
Output is correct |
71 |
Correct |
73 ms |
46848 KB |
Output is correct |
72 |
Correct |
85 ms |
46928 KB |
Output is correct |
73 |
Correct |
41 ms |
39764 KB |
Output is correct |
74 |
Correct |
37 ms |
38224 KB |
Output is correct |
75 |
Correct |
479 ms |
122316 KB |
Output is correct |
76 |
Correct |
485 ms |
120548 KB |
Output is correct |
77 |
Correct |
591 ms |
95592 KB |
Output is correct |
78 |
Correct |
455 ms |
121940 KB |
Output is correct |
79 |
Correct |
1071 ms |
118352 KB |
Output is correct |
80 |
Correct |
728 ms |
96704 KB |
Output is correct |
81 |
Correct |
502 ms |
121956 KB |
Output is correct |
82 |
Correct |
1041 ms |
120460 KB |
Output is correct |
83 |
Correct |
787 ms |
97156 KB |
Output is correct |
84 |
Correct |
529 ms |
121428 KB |
Output is correct |
85 |
Correct |
969 ms |
121120 KB |
Output is correct |
86 |
Correct |
872 ms |
98600 KB |
Output is correct |
87 |
Correct |
1102 ms |
121436 KB |
Output is correct |
88 |
Correct |
1117 ms |
120552 KB |
Output is correct |
89 |
Correct |
1138 ms |
101640 KB |
Output is correct |
90 |
Correct |
550 ms |
105568 KB |
Output is correct |
91 |
Correct |
610 ms |
105480 KB |
Output is correct |
92 |
Correct |
910 ms |
87376 KB |
Output is correct |
93 |
Correct |
447 ms |
105668 KB |
Output is correct |
94 |
Correct |
1052 ms |
105296 KB |
Output is correct |
95 |
Correct |
531 ms |
105520 KB |
Output is correct |
96 |
Correct |
1252 ms |
105300 KB |
Output is correct |
97 |
Correct |
597 ms |
85584 KB |
Output is correct |
98 |
Correct |
589 ms |
85588 KB |
Output is correct |
99 |
Correct |
186 ms |
60520 KB |
Output is correct |
100 |
Correct |
175 ms |
51352 KB |
Output is correct |
101 |
Correct |
4 ms |
29788 KB |
Output is correct |