답안 #228006

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
228006 2020-04-29T13:48:09 Z win11905 철인 이종 경기 (APIO18_duathlon) C++14
100 / 100
359 ms 31584 KB
#include <bits/stdc++.h>
#define vi vector<int>
#define long long long 
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
 
const int N = 3e5+5;
 
long ans;
int n, m;
vector<vi> g, ccs;
 
int id[N], low[N], pre[N];
bitset<N> mark, art;
vi sz;
 
void find_component(int u, int p) {
	static int idx = 0;
	static stack<int> S;
	pre[u] = low[u] = ++idx;
	mark[u] = true;
	int cnt = 0;
	S.emplace(u);
	for(auto v : g[u]) if(!mark[v]) {
		++cnt;
		find_component(v, u);
		low[u] = min(low[u], low[v]);
		if(!p && cnt > 1 || p && low[v] >= pre[u]) art[u] = true;
		if(low[v] >= pre[u]) {
			ccs.emplace_back(vi());
			ccs.back().emplace_back(u);
			while(ccs.back().back() != v) ccs.back().emplace_back(S.top()), S.pop();
		}
	} else if(v != p) low[u] = min(low[u], pre[v]);
}
 
bitset<N> idart;
 
void gen_bctree() {
	g.emplace_back(vi());
	sz.emplace_back(0);
	for(int i = 1; i <= n; ++i) if(art[i]) {
		idart[id[i] = g.size()] = true;
		g.emplace_back(vi());
		sz.emplace_back(1);
	}
	for(auto &cc : ccs) {
		g.emplace_back(vi());
		sz.emplace_back(cc.size());
		for(auto v : cc) {
			if(art[v]) g[id[v]].emplace_back(g.size()-1), g.back().emplace_back(id[v]);
			else id[v] = g.size()-1;
		}
	}
}
 
bitset<N> chk;
int dp[N];
 
int find_centroid(int u, int p, int sz, pii &ret) {
	int mx = 0; dp[u] = 1;
	for(auto v : g[u]) if(v != p and !chk[v]) {
		dp[u] += find_centroid(v, u, sz, ret);
		mx = max(mx, dp[v]);
	}
	mx = max(mx, sz - dp[u]);
	if(ret.x > mx) ret = pii(mx, u);
	return dp[u];
}
 
int rsize[N];
 
long get(int u) {
	return sz[u] - 2 * (idart[u] ? 0 : 1);
} 
 
void fill_son(int u, int p, long &ret, long val, bool st, int &wanna) {
	if(st) ans += rsize[u] * (ret + wanna * (val - idart[u]));
	else {
		ret += rsize[u] * (val - idart[u]);
		wanna += rsize[u];
	}
	for(auto v : g[u]) if(v != p and !chk[v]) fill_son(v, u, ret, val + get(v), st, wanna);
}
 
void centroid_decompos(int u, int sz) {
	pii ret(sz, -1);
	find_centroid(u, 0, sz, ret); 
	chk[u = ret.y] = true;
	long val = (get(u) - idart[u]) * rsize[u];
	if(::sz[u] > 2) ans += (::sz[u] - 2ll) * ((rsize[u]) * (rsize[u]-1ll) / 2);
	int wanna = rsize[u];
	for(auto v : g[u]) if(!chk[v]) {
		fill_son(v, u, val, get(v), true, wanna), 
		fill_son(v, u, val, get(v) + get(u), false, wanna);
	}
	for(auto v : g[u]) if(!chk[v]) centroid_decompos(v, dp[v] < dp[u] ? dp[v] : sz - dp[u]);
}
 
int main() {
	scanf("%d %d", &n, &m);
	g.resize(n+1);
	for(int i = 0, u, v; i < m; ++i) {
		scanf("%d %d", &u, &v);
		g[u].emplace_back(v), g[v].emplace_back(u);
	}
	for(int i = 1; i <= n; ++i) if(!mark[i]) find_component(i, 0);
	g.clear();
	gen_bctree();
	for(int i = 1; i <= n; ++i) rsize[id[i]]++;
	pii temp;
	for(int i = 1; i < g.size(); ++i) if(!chk[i]) centroid_decompos(i, find_centroid(i, 0, 0, temp));
	printf("%lld\n", ans << 1);
}

Compilation message

count_triplets.cpp: In function 'void find_component(int, int)':
count_triplets.cpp:30:9: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   if(!p && cnt > 1 || p && low[v] >= pre[u]) art[u] = true;
      ~~~^~~~~~~~~~
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:114:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 1; i < g.size(); ++i) if(!chk[i]) centroid_decompos(i, find_centroid(i, 0, 0, temp));
                 ~~^~~~~~~~~~
count_triplets.cpp:103:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d %d", &n, &m);
  ~~~~~^~~~~~~~~~~~~~~~~
count_triplets.cpp:106:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d", &u, &v);
   ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Correct 5 ms 384 KB Output is correct
10 Correct 5 ms 384 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 5 ms 384 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 5 ms 384 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 5 ms 384 KB Output is correct
17 Correct 5 ms 384 KB Output is correct
18 Correct 5 ms 384 KB Output is correct
19 Correct 5 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 5 ms 384 KB Output is correct
22 Correct 5 ms 384 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 384 KB Output is correct
26 Correct 5 ms 384 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
28 Correct 5 ms 384 KB Output is correct
29 Correct 5 ms 384 KB Output is correct
30 Correct 5 ms 384 KB Output is correct
31 Correct 5 ms 384 KB Output is correct
32 Correct 5 ms 384 KB Output is correct
33 Correct 5 ms 384 KB Output is correct
34 Correct 5 ms 384 KB Output is correct
35 Correct 4 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Correct 5 ms 384 KB Output is correct
10 Correct 5 ms 384 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 5 ms 384 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 5 ms 384 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 5 ms 384 KB Output is correct
17 Correct 5 ms 384 KB Output is correct
18 Correct 5 ms 384 KB Output is correct
19 Correct 5 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 5 ms 384 KB Output is correct
22 Correct 5 ms 384 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 384 KB Output is correct
26 Correct 5 ms 384 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
28 Correct 5 ms 384 KB Output is correct
29 Correct 5 ms 384 KB Output is correct
30 Correct 5 ms 384 KB Output is correct
31 Correct 5 ms 384 KB Output is correct
32 Correct 5 ms 384 KB Output is correct
33 Correct 5 ms 384 KB Output is correct
34 Correct 5 ms 384 KB Output is correct
35 Correct 4 ms 384 KB Output is correct
36 Correct 5 ms 384 KB Output is correct
37 Correct 5 ms 384 KB Output is correct
38 Correct 5 ms 384 KB Output is correct
39 Correct 5 ms 384 KB Output is correct
40 Correct 5 ms 384 KB Output is correct
41 Correct 5 ms 384 KB Output is correct
42 Correct 5 ms 384 KB Output is correct
43 Correct 5 ms 384 KB Output is correct
44 Correct 5 ms 384 KB Output is correct
45 Correct 5 ms 384 KB Output is correct
46 Correct 4 ms 384 KB Output is correct
47 Correct 5 ms 384 KB Output is correct
48 Correct 5 ms 384 KB Output is correct
49 Correct 4 ms 384 KB Output is correct
50 Correct 5 ms 384 KB Output is correct
51 Correct 5 ms 384 KB Output is correct
52 Correct 5 ms 384 KB Output is correct
53 Correct 5 ms 384 KB Output is correct
54 Correct 5 ms 384 KB Output is correct
55 Correct 5 ms 384 KB Output is correct
56 Correct 5 ms 384 KB Output is correct
57 Correct 5 ms 384 KB Output is correct
58 Correct 5 ms 384 KB Output is correct
59 Correct 5 ms 384 KB Output is correct
60 Correct 5 ms 384 KB Output is correct
61 Correct 5 ms 384 KB Output is correct
62 Correct 5 ms 384 KB Output is correct
63 Correct 5 ms 384 KB Output is correct
64 Correct 5 ms 384 KB Output is correct
65 Correct 5 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 103 ms 20012 KB Output is correct
2 Correct 101 ms 20012 KB Output is correct
3 Correct 220 ms 20208 KB Output is correct
4 Correct 133 ms 19224 KB Output is correct
5 Correct 163 ms 15836 KB Output is correct
6 Correct 239 ms 19560 KB Output is correct
7 Correct 214 ms 17832 KB Output is correct
8 Correct 231 ms 18308 KB Output is correct
9 Correct 206 ms 16124 KB Output is correct
10 Correct 176 ms 16300 KB Output is correct
11 Correct 107 ms 11656 KB Output is correct
12 Correct 102 ms 11436 KB Output is correct
13 Correct 78 ms 11180 KB Output is correct
14 Correct 92 ms 10924 KB Output is correct
15 Correct 56 ms 10028 KB Output is correct
16 Correct 56 ms 9900 KB Output is correct
17 Correct 8 ms 4352 KB Output is correct
18 Correct 8 ms 4352 KB Output is correct
19 Correct 10 ms 4352 KB Output is correct
20 Correct 8 ms 4352 KB Output is correct
21 Correct 8 ms 4224 KB Output is correct
22 Correct 8 ms 4224 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 512 KB Output is correct
2 Correct 6 ms 512 KB Output is correct
3 Correct 6 ms 512 KB Output is correct
4 Correct 6 ms 768 KB Output is correct
5 Correct 6 ms 716 KB Output is correct
6 Correct 6 ms 640 KB Output is correct
7 Correct 6 ms 640 KB Output is correct
8 Correct 6 ms 640 KB Output is correct
9 Correct 6 ms 640 KB Output is correct
10 Correct 6 ms 512 KB Output is correct
11 Correct 6 ms 512 KB Output is correct
12 Correct 6 ms 512 KB Output is correct
13 Correct 6 ms 512 KB Output is correct
14 Correct 6 ms 512 KB Output is correct
15 Correct 5 ms 512 KB Output is correct
16 Correct 5 ms 512 KB Output is correct
17 Correct 5 ms 512 KB Output is correct
18 Correct 5 ms 512 KB Output is correct
19 Correct 5 ms 512 KB Output is correct
20 Correct 5 ms 512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 200 ms 18428 KB Output is correct
2 Correct 210 ms 18560 KB Output is correct
3 Correct 201 ms 18432 KB Output is correct
4 Correct 202 ms 18432 KB Output is correct
5 Correct 205 ms 18552 KB Output is correct
6 Correct 359 ms 31584 KB Output is correct
7 Correct 317 ms 26868 KB Output is correct
8 Correct 306 ms 26104 KB Output is correct
9 Correct 312 ms 23676 KB Output is correct
10 Correct 201 ms 18680 KB Output is correct
11 Correct 193 ms 18432 KB Output is correct
12 Correct 189 ms 18452 KB Output is correct
13 Correct 199 ms 18552 KB Output is correct
14 Correct 130 ms 17140 KB Output is correct
15 Correct 111 ms 15104 KB Output is correct
16 Correct 59 ms 10668 KB Output is correct
17 Correct 77 ms 15964 KB Output is correct
18 Correct 103 ms 17328 KB Output is correct
19 Correct 84 ms 17168 KB Output is correct
20 Correct 88 ms 17048 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 512 KB Output is correct
2 Correct 7 ms 640 KB Output is correct
3 Correct 6 ms 512 KB Output is correct
4 Correct 6 ms 512 KB Output is correct
5 Correct 6 ms 512 KB Output is correct
6 Correct 5 ms 512 KB Output is correct
7 Correct 5 ms 512 KB Output is correct
8 Correct 5 ms 512 KB Output is correct
9 Correct 5 ms 512 KB Output is correct
10 Correct 5 ms 512 KB Output is correct
11 Correct 5 ms 512 KB Output is correct
12 Correct 6 ms 640 KB Output is correct
13 Correct 6 ms 640 KB Output is correct
14 Correct 6 ms 640 KB Output is correct
15 Correct 6 ms 640 KB Output is correct
16 Correct 6 ms 512 KB Output is correct
17 Correct 6 ms 512 KB Output is correct
18 Correct 5 ms 512 KB Output is correct
19 Correct 5 ms 512 KB Output is correct
20 Correct 5 ms 512 KB Output is correct
21 Correct 5 ms 512 KB Output is correct
22 Correct 6 ms 512 KB Output is correct
23 Correct 5 ms 512 KB Output is correct
24 Correct 6 ms 512 KB Output is correct
25 Correct 5 ms 384 KB Output is correct
26 Correct 5 ms 384 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 217 ms 18432 KB Output is correct
2 Correct 218 ms 19068 KB Output is correct
3 Correct 218 ms 17268 KB Output is correct
4 Correct 178 ms 14764 KB Output is correct
5 Correct 140 ms 11180 KB Output is correct
6 Correct 114 ms 10544 KB Output is correct
7 Correct 118 ms 10168 KB Output is correct
8 Correct 94 ms 9780 KB Output is correct
9 Correct 91 ms 9524 KB Output is correct
10 Correct 87 ms 9464 KB Output is correct
11 Correct 97 ms 9208 KB Output is correct
12 Correct 74 ms 9336 KB Output is correct
13 Correct 76 ms 9340 KB Output is correct
14 Correct 78 ms 11896 KB Output is correct
15 Correct 292 ms 24956 KB Output is correct
16 Correct 289 ms 22188 KB Output is correct
17 Correct 240 ms 23156 KB Output is correct
18 Correct 246 ms 19448 KB Output is correct
19 Correct 172 ms 14764 KB Output is correct
20 Correct 176 ms 14764 KB Output is correct
21 Correct 176 ms 14764 KB Output is correct
22 Correct 121 ms 12204 KB Output is correct
23 Correct 91 ms 11052 KB Output is correct
24 Correct 121 ms 15968 KB Output is correct
25 Correct 124 ms 15972 KB Output is correct
26 Correct 116 ms 15364 KB Output is correct
27 Correct 125 ms 13960 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Correct 5 ms 384 KB Output is correct
10 Correct 5 ms 384 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 5 ms 384 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 5 ms 384 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 5 ms 384 KB Output is correct
17 Correct 5 ms 384 KB Output is correct
18 Correct 5 ms 384 KB Output is correct
19 Correct 5 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 5 ms 384 KB Output is correct
22 Correct 5 ms 384 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 384 KB Output is correct
26 Correct 5 ms 384 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
28 Correct 5 ms 384 KB Output is correct
29 Correct 5 ms 384 KB Output is correct
30 Correct 5 ms 384 KB Output is correct
31 Correct 5 ms 384 KB Output is correct
32 Correct 5 ms 384 KB Output is correct
33 Correct 5 ms 384 KB Output is correct
34 Correct 5 ms 384 KB Output is correct
35 Correct 4 ms 384 KB Output is correct
36 Correct 5 ms 384 KB Output is correct
37 Correct 5 ms 384 KB Output is correct
38 Correct 5 ms 384 KB Output is correct
39 Correct 5 ms 384 KB Output is correct
40 Correct 5 ms 384 KB Output is correct
41 Correct 5 ms 384 KB Output is correct
42 Correct 5 ms 384 KB Output is correct
43 Correct 5 ms 384 KB Output is correct
44 Correct 5 ms 384 KB Output is correct
45 Correct 5 ms 384 KB Output is correct
46 Correct 4 ms 384 KB Output is correct
47 Correct 5 ms 384 KB Output is correct
48 Correct 5 ms 384 KB Output is correct
49 Correct 4 ms 384 KB Output is correct
50 Correct 5 ms 384 KB Output is correct
51 Correct 5 ms 384 KB Output is correct
52 Correct 5 ms 384 KB Output is correct
53 Correct 5 ms 384 KB Output is correct
54 Correct 5 ms 384 KB Output is correct
55 Correct 5 ms 384 KB Output is correct
56 Correct 5 ms 384 KB Output is correct
57 Correct 5 ms 384 KB Output is correct
58 Correct 5 ms 384 KB Output is correct
59 Correct 5 ms 384 KB Output is correct
60 Correct 5 ms 384 KB Output is correct
61 Correct 5 ms 384 KB Output is correct
62 Correct 5 ms 384 KB Output is correct
63 Correct 5 ms 384 KB Output is correct
64 Correct 5 ms 384 KB Output is correct
65 Correct 5 ms 384 KB Output is correct
66 Correct 5 ms 384 KB Output is correct
67 Correct 5 ms 512 KB Output is correct
68 Correct 5 ms 512 KB Output is correct
69 Correct 6 ms 512 KB Output is correct
70 Correct 6 ms 512 KB Output is correct
71 Correct 5 ms 512 KB Output is correct
72 Correct 5 ms 512 KB Output is correct
73 Correct 6 ms 512 KB Output is correct
74 Correct 5 ms 512 KB Output is correct
75 Correct 5 ms 512 KB Output is correct
76 Correct 5 ms 384 KB Output is correct
77 Correct 6 ms 512 KB Output is correct
78 Correct 6 ms 640 KB Output is correct
79 Correct 5 ms 512 KB Output is correct
80 Correct 6 ms 416 KB Output is correct
81 Correct 5 ms 512 KB Output is correct
82 Correct 5 ms 512 KB Output is correct
83 Correct 5 ms 512 KB Output is correct
84 Correct 6 ms 512 KB Output is correct
85 Correct 6 ms 512 KB Output is correct
86 Correct 6 ms 512 KB Output is correct
87 Correct 5 ms 512 KB Output is correct
88 Correct 5 ms 512 KB Output is correct
89 Correct 5 ms 512 KB Output is correct
90 Correct 5 ms 512 KB Output is correct
91 Correct 5 ms 512 KB Output is correct
92 Correct 6 ms 512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 4 ms 384 KB Output is correct
5 Correct 5 ms 384 KB Output is correct
6 Correct 5 ms 384 KB Output is correct
7 Correct 4 ms 384 KB Output is correct
8 Correct 5 ms 384 KB Output is correct
9 Correct 5 ms 384 KB Output is correct
10 Correct 5 ms 384 KB Output is correct
11 Correct 5 ms 384 KB Output is correct
12 Correct 5 ms 384 KB Output is correct
13 Correct 5 ms 384 KB Output is correct
14 Correct 5 ms 384 KB Output is correct
15 Correct 5 ms 384 KB Output is correct
16 Correct 5 ms 384 KB Output is correct
17 Correct 5 ms 384 KB Output is correct
18 Correct 5 ms 384 KB Output is correct
19 Correct 5 ms 384 KB Output is correct
20 Correct 5 ms 384 KB Output is correct
21 Correct 5 ms 384 KB Output is correct
22 Correct 5 ms 384 KB Output is correct
23 Correct 5 ms 384 KB Output is correct
24 Correct 5 ms 384 KB Output is correct
25 Correct 5 ms 384 KB Output is correct
26 Correct 5 ms 384 KB Output is correct
27 Correct 5 ms 384 KB Output is correct
28 Correct 5 ms 384 KB Output is correct
29 Correct 5 ms 384 KB Output is correct
30 Correct 5 ms 384 KB Output is correct
31 Correct 5 ms 384 KB Output is correct
32 Correct 5 ms 384 KB Output is correct
33 Correct 5 ms 384 KB Output is correct
34 Correct 5 ms 384 KB Output is correct
35 Correct 4 ms 384 KB Output is correct
36 Correct 5 ms 384 KB Output is correct
37 Correct 5 ms 384 KB Output is correct
38 Correct 5 ms 384 KB Output is correct
39 Correct 5 ms 384 KB Output is correct
40 Correct 5 ms 384 KB Output is correct
41 Correct 5 ms 384 KB Output is correct
42 Correct 5 ms 384 KB Output is correct
43 Correct 5 ms 384 KB Output is correct
44 Correct 5 ms 384 KB Output is correct
45 Correct 5 ms 384 KB Output is correct
46 Correct 4 ms 384 KB Output is correct
47 Correct 5 ms 384 KB Output is correct
48 Correct 5 ms 384 KB Output is correct
49 Correct 4 ms 384 KB Output is correct
50 Correct 5 ms 384 KB Output is correct
51 Correct 5 ms 384 KB Output is correct
52 Correct 5 ms 384 KB Output is correct
53 Correct 5 ms 384 KB Output is correct
54 Correct 5 ms 384 KB Output is correct
55 Correct 5 ms 384 KB Output is correct
56 Correct 5 ms 384 KB Output is correct
57 Correct 5 ms 384 KB Output is correct
58 Correct 5 ms 384 KB Output is correct
59 Correct 5 ms 384 KB Output is correct
60 Correct 5 ms 384 KB Output is correct
61 Correct 5 ms 384 KB Output is correct
62 Correct 5 ms 384 KB Output is correct
63 Correct 5 ms 384 KB Output is correct
64 Correct 5 ms 384 KB Output is correct
65 Correct 5 ms 384 KB Output is correct
66 Correct 103 ms 20012 KB Output is correct
67 Correct 101 ms 20012 KB Output is correct
68 Correct 220 ms 20208 KB Output is correct
69 Correct 133 ms 19224 KB Output is correct
70 Correct 163 ms 15836 KB Output is correct
71 Correct 239 ms 19560 KB Output is correct
72 Correct 214 ms 17832 KB Output is correct
73 Correct 231 ms 18308 KB Output is correct
74 Correct 206 ms 16124 KB Output is correct
75 Correct 176 ms 16300 KB Output is correct
76 Correct 107 ms 11656 KB Output is correct
77 Correct 102 ms 11436 KB Output is correct
78 Correct 78 ms 11180 KB Output is correct
79 Correct 92 ms 10924 KB Output is correct
80 Correct 56 ms 10028 KB Output is correct
81 Correct 56 ms 9900 KB Output is correct
82 Correct 8 ms 4352 KB Output is correct
83 Correct 8 ms 4352 KB Output is correct
84 Correct 10 ms 4352 KB Output is correct
85 Correct 8 ms 4352 KB Output is correct
86 Correct 8 ms 4224 KB Output is correct
87 Correct 8 ms 4224 KB Output is correct
88 Correct 6 ms 512 KB Output is correct
89 Correct 6 ms 512 KB Output is correct
90 Correct 6 ms 512 KB Output is correct
91 Correct 6 ms 768 KB Output is correct
92 Correct 6 ms 716 KB Output is correct
93 Correct 6 ms 640 KB Output is correct
94 Correct 6 ms 640 KB Output is correct
95 Correct 6 ms 640 KB Output is correct
96 Correct 6 ms 640 KB Output is correct
97 Correct 6 ms 512 KB Output is correct
98 Correct 6 ms 512 KB Output is correct
99 Correct 6 ms 512 KB Output is correct
100 Correct 6 ms 512 KB Output is correct
101 Correct 6 ms 512 KB Output is correct
102 Correct 5 ms 512 KB Output is correct
103 Correct 5 ms 512 KB Output is correct
104 Correct 5 ms 512 KB Output is correct
105 Correct 5 ms 512 KB Output is correct
106 Correct 5 ms 512 KB Output is correct
107 Correct 5 ms 512 KB Output is correct
108 Correct 200 ms 18428 KB Output is correct
109 Correct 210 ms 18560 KB Output is correct
110 Correct 201 ms 18432 KB Output is correct
111 Correct 202 ms 18432 KB Output is correct
112 Correct 205 ms 18552 KB Output is correct
113 Correct 359 ms 31584 KB Output is correct
114 Correct 317 ms 26868 KB Output is correct
115 Correct 306 ms 26104 KB Output is correct
116 Correct 312 ms 23676 KB Output is correct
117 Correct 201 ms 18680 KB Output is correct
118 Correct 193 ms 18432 KB Output is correct
119 Correct 189 ms 18452 KB Output is correct
120 Correct 199 ms 18552 KB Output is correct
121 Correct 130 ms 17140 KB Output is correct
122 Correct 111 ms 15104 KB Output is correct
123 Correct 59 ms 10668 KB Output is correct
124 Correct 77 ms 15964 KB Output is correct
125 Correct 103 ms 17328 KB Output is correct
126 Correct 84 ms 17168 KB Output is correct
127 Correct 88 ms 17048 KB Output is correct
128 Correct 6 ms 512 KB Output is correct
129 Correct 7 ms 640 KB Output is correct
130 Correct 6 ms 512 KB Output is correct
131 Correct 6 ms 512 KB Output is correct
132 Correct 6 ms 512 KB Output is correct
133 Correct 5 ms 512 KB Output is correct
134 Correct 5 ms 512 KB Output is correct
135 Correct 5 ms 512 KB Output is correct
136 Correct 5 ms 512 KB Output is correct
137 Correct 5 ms 512 KB Output is correct
138 Correct 5 ms 512 KB Output is correct
139 Correct 6 ms 640 KB Output is correct
140 Correct 6 ms 640 KB Output is correct
141 Correct 6 ms 640 KB Output is correct
142 Correct 6 ms 640 KB Output is correct
143 Correct 6 ms 512 KB Output is correct
144 Correct 6 ms 512 KB Output is correct
145 Correct 5 ms 512 KB Output is correct
146 Correct 5 ms 512 KB Output is correct
147 Correct 5 ms 512 KB Output is correct
148 Correct 5 ms 512 KB Output is correct
149 Correct 6 ms 512 KB Output is correct
150 Correct 5 ms 512 KB Output is correct
151 Correct 6 ms 512 KB Output is correct
152 Correct 5 ms 384 KB Output is correct
153 Correct 5 ms 384 KB Output is correct
154 Correct 5 ms 384 KB Output is correct
155 Correct 217 ms 18432 KB Output is correct
156 Correct 218 ms 19068 KB Output is correct
157 Correct 218 ms 17268 KB Output is correct
158 Correct 178 ms 14764 KB Output is correct
159 Correct 140 ms 11180 KB Output is correct
160 Correct 114 ms 10544 KB Output is correct
161 Correct 118 ms 10168 KB Output is correct
162 Correct 94 ms 9780 KB Output is correct
163 Correct 91 ms 9524 KB Output is correct
164 Correct 87 ms 9464 KB Output is correct
165 Correct 97 ms 9208 KB Output is correct
166 Correct 74 ms 9336 KB Output is correct
167 Correct 76 ms 9340 KB Output is correct
168 Correct 78 ms 11896 KB Output is correct
169 Correct 292 ms 24956 KB Output is correct
170 Correct 289 ms 22188 KB Output is correct
171 Correct 240 ms 23156 KB Output is correct
172 Correct 246 ms 19448 KB Output is correct
173 Correct 172 ms 14764 KB Output is correct
174 Correct 176 ms 14764 KB Output is correct
175 Correct 176 ms 14764 KB Output is correct
176 Correct 121 ms 12204 KB Output is correct
177 Correct 91 ms 11052 KB Output is correct
178 Correct 121 ms 15968 KB Output is correct
179 Correct 124 ms 15972 KB Output is correct
180 Correct 116 ms 15364 KB Output is correct
181 Correct 125 ms 13960 KB Output is correct
182 Correct 5 ms 384 KB Output is correct
183 Correct 5 ms 512 KB Output is correct
184 Correct 5 ms 512 KB Output is correct
185 Correct 6 ms 512 KB Output is correct
186 Correct 6 ms 512 KB Output is correct
187 Correct 5 ms 512 KB Output is correct
188 Correct 5 ms 512 KB Output is correct
189 Correct 6 ms 512 KB Output is correct
190 Correct 5 ms 512 KB Output is correct
191 Correct 5 ms 512 KB Output is correct
192 Correct 5 ms 384 KB Output is correct
193 Correct 6 ms 512 KB Output is correct
194 Correct 6 ms 640 KB Output is correct
195 Correct 5 ms 512 KB Output is correct
196 Correct 6 ms 416 KB Output is correct
197 Correct 5 ms 512 KB Output is correct
198 Correct 5 ms 512 KB Output is correct
199 Correct 5 ms 512 KB Output is correct
200 Correct 6 ms 512 KB Output is correct
201 Correct 6 ms 512 KB Output is correct
202 Correct 6 ms 512 KB Output is correct
203 Correct 5 ms 512 KB Output is correct
204 Correct 5 ms 512 KB Output is correct
205 Correct 5 ms 512 KB Output is correct
206 Correct 5 ms 512 KB Output is correct
207 Correct 5 ms 512 KB Output is correct
208 Correct 6 ms 512 KB Output is correct
209 Correct 8 ms 3968 KB Output is correct
210 Correct 97 ms 10688 KB Output is correct
211 Correct 119 ms 13816 KB Output is correct
212 Correct 139 ms 16632 KB Output is correct
213 Correct 170 ms 18244 KB Output is correct
214 Correct 76 ms 11172 KB Output is correct
215 Correct 77 ms 10808 KB Output is correct
216 Correct 190 ms 13868 KB Output is correct
217 Correct 150 ms 11948 KB Output is correct
218 Correct 119 ms 9780 KB Output is correct
219 Correct 97 ms 9336 KB Output is correct
220 Correct 112 ms 9248 KB Output is correct
221 Correct 71 ms 9084 KB Output is correct
222 Correct 83 ms 10872 KB Output is correct
223 Correct 164 ms 15532 KB Output is correct
224 Correct 172 ms 15020 KB Output is correct
225 Correct 127 ms 11308 KB Output is correct
226 Correct 142 ms 11308 KB Output is correct
227 Correct 129 ms 11308 KB Output is correct
228 Correct 108 ms 10800 KB Output is correct
229 Correct 80 ms 10288 KB Output is correct
230 Correct 100 ms 11632 KB Output is correct
231 Correct 102 ms 11692 KB Output is correct