답안 #1058049

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1058049 2024-08-14T08:07:12 Z d(#11114) Telephone Plans (CCO24_day2problem3) C++17
25 / 25
902 ms 39760 KB
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...)
#endif
using ll=long long;
using pii=array<int,2>;
using tii=array<int,3>;
using ti4=array<int,4>;
const int N=1500005;
struct node {
  int p = 0, c[2] = {0, 0}, pp = 0;
  bool flip = 0;
  int sz = 0, ssz = 0, vsz = 0; // sz -> aux tree size, ssz = subtree size in rep tree, vsz = virtual tree size
  node() {}
  node(int x) {
    sz = 1;
  }
};
struct LCT {
  vector<node> t;
  LCT() {}
  LCT(int n) : t(n + 1) {}
  int dir(int x, int y) { return t[x].c[1] == y; }
  void set(int x, int d, int y) {
    if (x) t[x].c[d] = y, pull(x);
    if (y) t[y].p = x;
  }
  void pull(int x) {
    if (!x) return;
    int &l = t[x].c[0], &r = t[x].c[1];
    t[x].sz = t[l].sz + t[r].sz + 1;
    t[x].ssz = t[l].ssz + t[r].ssz + t[x].vsz + 1;
  }
  void push(int x) { 
    if (!x) return;
    int &l = t[x].c[0], &r = t[x].c[1];
    if (t[x].flip) {
      swap(l, r); 
      if (l) t[l].flip ^= 1; 
      if (r) t[r].flip ^= 1;
      t[x].flip = 0;
    }
  }
  void rotate(int x, int d) { 
    int y = t[x].p, z = t[y].p, w = t[x].c[d];
    swap(t[x].pp, t[y].pp);
    set(y, !d, w); set(x, d, y); set(z, dir(z, y), x);
  }
  void splay(int x) { 
    for (push(x); t[x].p;) {
      int y = t[x].p, z = t[y].p;
      push(z); push(y); push(x);
      int dx = dir(y, x), dy = dir(z, y);
      if (!z) rotate(x, !dx); 
      else if (dx == dy) rotate(y, !dx), rotate(x, !dx); 
      else rotate(x, dy), rotate(x, dx);
    }
  }
  // making it a root in the rep. tree
  void make_root(int u) {
    access(u); int l = t[u].c[0];
    t[l].flip ^= 1; swap(t[l].p, t[l].pp);
    t[u].vsz += t[l].ssz;
    set(u, 0, 0);
  }
  // make the path from root to u a preferred path
  // returns last path-parent of a node as it moves up the tree
  int access(int _u) {
    int last = _u;
    for (int v = 0, u = _u; u; u = t[v = u].pp) {
      splay(u); splay(v);
      t[u].vsz -= t[v].ssz;
      int r = t[u].c[1]; t[u].vsz += t[r].ssz;
      t[v].pp = 0;
      swap(t[r].p, t[r].pp); set(u, 1, v);
      last = u;
    }
    splay(_u); return last;
  }
  void link(int u, int v) { // u -> v
    // assert(!connected(u, v));
    make_root(v);
    access(u); splay(u);
    t[v].pp = u; t[u].vsz += t[v].ssz;
  }
  void cut(int u) { // cut par[u] -> u, u is non root vertex
    access(u); assert(t[u].c[0] != 0);
    t[t[u].c[0]].p = 0; t[u].c[0] = 0; pull(u);
  }
  // parent of u in the rep. tree
  int get_parent(int u) {
    access(u); splay(u); push(u);
    u = t[u].c[0]; push(u);
    while (t[u].c[1]) { u = t[u].c[1]; push(u); }
    splay(u); return u;
  }
  // root of the rep. tree containing this node
  int find_root(int u) {
    access(u); splay(u); push(u);
    while (t[u].c[0]) { u = t[u].c[0]; push(u); }
    splay(u); return u;
  }
  int size(int u) { return t[find_root(u)].ssz; }
}t;
int n,q,e;
ll prv;
ll C,S[N];
int main(){
	ios::sync_with_stdio(false); cin.tie(0);
	cin>>e>>n>>q;
	t=LCT(n);
	for(int i=1;i<=n;i++) t.t[i]=node(i);
	for(int op,i=1;i<=q;i++){
		if(i>=2) S[i-1]=S[i-2];
		cin>>op;
		if(op==1){
			ll x,y;
			cin>>x>>y;
			if(e){
				x^=prv;
				y^=prv;
			}
			ll sz1=t.size(x),sz2=t.size(y);
			C-=sz1*(sz1-1)/2+sz2*(sz2-1)/2;
			C+=(sz1+sz2)*(sz1+sz2-1)/2;
			t.link(x,y);
		} else if(op==2){
			ll x,y;
			cin>>x>>y;
			if(e){
				x^=prv;
				y^=prv;
			}
			t.make_root(x);
			t.cut(y);
			ll sz1=t.size(x),sz2=t.size(y);
			C-=sz1*sz2;
			S[i-1]+=sz1*sz2;
		} else{
			ll t;
			cin>>t;
			if(e) t^=prv;
			ll ans=C+S[i-1]-(i==t?0:S[i-t-1]);
			cout<<ans<<"\n";
			prv=ans;
		}
	}
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 600 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 348 KB Output is correct
12 Correct 1 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 1 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 344 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 344 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 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 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 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 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 504 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 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 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
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 600 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 348 KB Output is correct
12 Correct 1 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 1 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 344 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 344 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 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 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 2 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 2 ms 344 KB Output is correct
33 Correct 2 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 2 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 2 ms 348 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 2 ms 348 KB Output is correct
42 Correct 2 ms 348 KB Output is correct
43 Correct 2 ms 344 KB Output is correct
44 Correct 2 ms 348 KB Output is correct
45 Correct 2 ms 584 KB Output is correct
46 Correct 3 ms 348 KB Output is correct
47 Correct 2 ms 348 KB Output is correct
48 Correct 3 ms 348 KB Output is correct
49 Correct 1 ms 600 KB Output is correct
50 Correct 2 ms 348 KB Output is correct
51 Correct 2 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 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 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 504 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 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 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 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 2 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 2 ms 348 KB Output is correct
37 Correct 2 ms 348 KB Output is correct
38 Correct 2 ms 344 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 2 ms 348 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 2 ms 348 KB Output is correct
43 Correct 1 ms 548 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 2 ms 348 KB Output is correct
46 Correct 2 ms 348 KB Output is correct
47 Correct 3 ms 348 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 2 ms 604 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 600 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 348 KB Output is correct
12 Correct 1 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 1 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 344 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 344 KB Output is correct
20 Correct 0 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 0 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 0 ms 348 KB Output is correct
27 Correct 0 ms 344 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 2 ms 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 2 ms 344 KB Output is correct
33 Correct 2 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 2 ms 348 KB Output is correct
36 Correct 1 ms 348 KB Output is correct
37 Correct 1 ms 348 KB Output is correct
38 Correct 1 ms 348 KB Output is correct
39 Correct 2 ms 348 KB Output is correct
40 Correct 1 ms 348 KB Output is correct
41 Correct 2 ms 348 KB Output is correct
42 Correct 2 ms 348 KB Output is correct
43 Correct 2 ms 344 KB Output is correct
44 Correct 2 ms 348 KB Output is correct
45 Correct 2 ms 584 KB Output is correct
46 Correct 3 ms 348 KB Output is correct
47 Correct 2 ms 348 KB Output is correct
48 Correct 3 ms 348 KB Output is correct
49 Correct 1 ms 600 KB Output is correct
50 Correct 2 ms 348 KB Output is correct
51 Correct 2 ms 348 KB Output is correct
52 Correct 92 ms 8848 KB Output is correct
53 Correct 77 ms 8784 KB Output is correct
54 Correct 83 ms 8276 KB Output is correct
55 Correct 86 ms 8784 KB Output is correct
56 Correct 84 ms 8796 KB Output is correct
57 Correct 70 ms 8532 KB Output is correct
58 Correct 75 ms 8688 KB Output is correct
59 Correct 64 ms 8792 KB Output is correct
60 Correct 101 ms 8448 KB Output is correct
61 Correct 83 ms 8784 KB Output is correct
62 Correct 78 ms 8696 KB Output is correct
63 Correct 93 ms 8784 KB Output is correct
64 Correct 57 ms 8788 KB Output is correct
65 Correct 59 ms 8720 KB Output is correct
66 Correct 82 ms 8784 KB Output is correct
67 Correct 83 ms 8784 KB Output is correct
68 Correct 80 ms 8652 KB Output is correct
69 Correct 190 ms 8784 KB Output is correct
70 Correct 123 ms 8788 KB Output is correct
71 Correct 90 ms 8424 KB Output is correct
72 Correct 84 ms 8392 KB Output is correct
73 Correct 55 ms 9732 KB Output is correct
74 Correct 49 ms 8312 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 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 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 504 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 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 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 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 2 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 2 ms 348 KB Output is correct
37 Correct 2 ms 348 KB Output is correct
38 Correct 2 ms 344 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 2 ms 348 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 2 ms 348 KB Output is correct
43 Correct 1 ms 548 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 2 ms 348 KB Output is correct
46 Correct 2 ms 348 KB Output is correct
47 Correct 3 ms 348 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 2 ms 604 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 86 ms 8888 KB Output is correct
53 Correct 76 ms 8784 KB Output is correct
54 Correct 74 ms 8384 KB Output is correct
55 Correct 109 ms 8740 KB Output is correct
56 Correct 115 ms 8744 KB Output is correct
57 Correct 76 ms 8452 KB Output is correct
58 Correct 85 ms 8788 KB Output is correct
59 Correct 81 ms 8844 KB Output is correct
60 Correct 82 ms 8432 KB Output is correct
61 Correct 89 ms 8840 KB Output is correct
62 Correct 79 ms 8788 KB Output is correct
63 Correct 94 ms 8872 KB Output is correct
64 Correct 90 ms 8888 KB Output is correct
65 Correct 123 ms 8784 KB Output is correct
66 Correct 101 ms 8676 KB Output is correct
67 Correct 88 ms 8788 KB Output is correct
68 Correct 91 ms 8808 KB Output is correct
69 Correct 164 ms 8728 KB Output is correct
70 Correct 143 ms 8784 KB Output is correct
71 Correct 88 ms 8528 KB Output is correct
72 Correct 75 ms 8496 KB Output is correct
73 Correct 39 ms 9808 KB Output is correct
74 Correct 42 ms 8276 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 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 1 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 344 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 0 ms 504 KB Output is correct
16 Correct 0 ms 348 KB Output is correct
17 Correct 1 ms 348 KB Output is correct
18 Correct 0 ms 344 KB Output is correct
19 Correct 0 ms 348 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 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 348 KB Output is correct
30 Correct 1 ms 348 KB Output is correct
31 Correct 1 ms 348 KB Output is correct
32 Correct 2 ms 348 KB Output is correct
33 Correct 1 ms 348 KB Output is correct
34 Correct 1 ms 348 KB Output is correct
35 Correct 1 ms 348 KB Output is correct
36 Correct 2 ms 348 KB Output is correct
37 Correct 2 ms 348 KB Output is correct
38 Correct 2 ms 344 KB Output is correct
39 Correct 1 ms 348 KB Output is correct
40 Correct 2 ms 348 KB Output is correct
41 Correct 1 ms 348 KB Output is correct
42 Correct 2 ms 348 KB Output is correct
43 Correct 1 ms 548 KB Output is correct
44 Correct 1 ms 348 KB Output is correct
45 Correct 2 ms 348 KB Output is correct
46 Correct 2 ms 348 KB Output is correct
47 Correct 3 ms 348 KB Output is correct
48 Correct 1 ms 348 KB Output is correct
49 Correct 1 ms 348 KB Output is correct
50 Correct 2 ms 604 KB Output is correct
51 Correct 1 ms 348 KB Output is correct
52 Correct 86 ms 8888 KB Output is correct
53 Correct 76 ms 8784 KB Output is correct
54 Correct 74 ms 8384 KB Output is correct
55 Correct 109 ms 8740 KB Output is correct
56 Correct 115 ms 8744 KB Output is correct
57 Correct 76 ms 8452 KB Output is correct
58 Correct 85 ms 8788 KB Output is correct
59 Correct 81 ms 8844 KB Output is correct
60 Correct 82 ms 8432 KB Output is correct
61 Correct 89 ms 8840 KB Output is correct
62 Correct 79 ms 8788 KB Output is correct
63 Correct 94 ms 8872 KB Output is correct
64 Correct 90 ms 8888 KB Output is correct
65 Correct 123 ms 8784 KB Output is correct
66 Correct 101 ms 8676 KB Output is correct
67 Correct 88 ms 8788 KB Output is correct
68 Correct 91 ms 8808 KB Output is correct
69 Correct 164 ms 8728 KB Output is correct
70 Correct 143 ms 8784 KB Output is correct
71 Correct 88 ms 8528 KB Output is correct
72 Correct 75 ms 8496 KB Output is correct
73 Correct 39 ms 9808 KB Output is correct
74 Correct 42 ms 8276 KB Output is correct
75 Correct 481 ms 33876 KB Output is correct
76 Correct 582 ms 33872 KB Output is correct
77 Correct 490 ms 31472 KB Output is correct
78 Correct 666 ms 33872 KB Output is correct
79 Correct 596 ms 33496 KB Output is correct
80 Correct 572 ms 31492 KB Output is correct
81 Correct 567 ms 33816 KB Output is correct
82 Correct 576 ms 33536 KB Output is correct
83 Correct 461 ms 31764 KB Output is correct
84 Correct 503 ms 33836 KB Output is correct
85 Correct 470 ms 33504 KB Output is correct
86 Correct 504 ms 32248 KB Output is correct
87 Correct 500 ms 33804 KB Output is correct
88 Correct 473 ms 33872 KB Output is correct
89 Correct 477 ms 33692 KB Output is correct
90 Correct 440 ms 33952 KB Output is correct
91 Correct 456 ms 33620 KB Output is correct
92 Correct 450 ms 33332 KB Output is correct
93 Correct 379 ms 33960 KB Output is correct
94 Correct 438 ms 33620 KB Output is correct
95 Correct 902 ms 33868 KB Output is correct
96 Correct 636 ms 33620 KB Output is correct
97 Correct 364 ms 31600 KB Output is correct
98 Correct 353 ms 31484 KB Output is correct
99 Correct 186 ms 39760 KB Output is correct
100 Correct 175 ms 30800 KB Output is correct
101 Correct 1 ms 344 KB Output is correct