답안 #371146

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
371146 2021-02-25T23:13:33 Z LucaDantas 철인 이종 경기 (APIO18_duathlon) C++17
100 / 100
256 ms 61676 KB
#include<bits/stdc++.h>
using namespace std;

#define pb push_back

constexpr int maxn = 3e5+10;

struct DSU
{
	int pai[maxn], peso[maxn];
	DSU() {for(int i = 0; i < maxn; i++) pai[i] = i, peso[i] = 1;}
	int find(int x) { return pai[x]==x?x:pai[x]=find(pai[x]); }
	void join(int a, int b) {
		a = find(a), b = find(b);
		if(a == b) return;
		if(peso[a] < peso[b])
			swap(a, b);
		pai[b] = a;
		peso[a] += peso[b];
	}
	int sz(int a) { return peso[find(a)]; }
	void add_sz(int a) { ++peso[find(a)]; }
} dsu;

int n, m;

vector<int> g[maxn];

int mark[2*maxn], low[maxn], depth[maxn], qtd = 0;

vector<int> cut[maxn], tree[2*maxn];

vector<int> here;

void dfs1(int u) {
	++qtd;
	mark[u] = 1;
	here.pb(u);
	for(int v : g[u]) {
		if(mark[v]) low[u] = min(low[u], depth[v]);
		else {
			depth[v] = depth[u] + 1;
			dfs1(v);
			low[u] = min(low[u], low[v]);
			if(low[v] < depth[u]) dsu.join(u, v);
			else cut[u].pb(dsu.find(v));
		}
	}
}

void dfs2(int u) {
	mark[u] = 1;
	for(int v : g[u])
		if(!mark[v]) dfs2(v);
	if(!cut[u].size()) return;
	int fam = dsu.find(u);
	if(u != 1) {
		tree[u+n].pb(fam);
		tree[fam].pb(u+n);
	}
	for(int v : cut[u]) {
		dsu.add_sz(v);
		tree[u+n].pb(v);
		tree[v].pb(u+n);
	}
}

long long ans = 0, dp[maxn]; // maneira de escolher 2 na msm subtree

int sz[maxn];

void rotate(int u, int v) {
	sz[u] -= sz[v];
	sz[v] += sz[u];
	if(u > n) {
		// u => cut, v => block
		dp[u] = (long long)sz[u] * (sz[u] - 1);
		dp[v] += dp[u];
	} else {
		dp[u] -= dp[v];
		dp[v] = (long long)sz[v] * (sz[v] - 1);
	}
}

void dfs4(int u, int p) {
	sz[u] += u<=n?dsu.sz(u)-(int)tree[u].size():1;
	for(int v : tree[u]) {
		if(v == p) continue;
		dfs4(v, u);
		sz[u] += sz[v];
		if(u<=n) dp[u] += dp[v];
	}
	if(u > n) dp[u] = (long long)sz[u] * (sz[u] - 1);
}

void dfs3(int u, int p) {
	bool b = u<=n?1:0; // 1 -> block, 0 -> cut
	if(b) {
		int tam = dsu.sz(u) - (int)tree[u].size();
		for(int v : tree[u])
			ans -= 1ll * tam * dp[v];
		for(int v : tree[u]) {
			if(v != p) {
				rotate(u, v);
				dfs3(v, u);
				rotate(v, u);
			}
		}
	} else {
		mark[u] = 1;
		for(int v : tree[u])
			ans -= dp[v];
		for(int v : tree[u]) {
			if(v != p) {
				rotate(u, v);
				dfs3(v, u);
				rotate(v, u);
			}
		}
	}
}

void root(int u) {
	mark[u] = 1; here = {u}; ++qtd;
	for(int v : g[u])
		if(!mark[v]) depth[v] = 1 , dfs1(v), cut[u].pb(dsu.find(v));
	if(cut[u].size() == 1)
		dsu.join(cut[u][0], u), cut[u].clear();
	for(int x : here)
		mark[x] = 0;
	dfs2(u); // comeco a dp no meu block
	for(int x : here)
		mark[x] = 1;
	here.clear();
}

void root_ans(int u) {
	dfs4(u, 0);
	dfs3(u, 0);
}

int main() {
	scanf("%d %d", &n, &m);
	for(int i = 0, a, b; i < m; i++)
		scanf("%d %d", &a, &b), g[a].pb(b), g[b].pb(a);
	for(int i = 0; i < maxn; i++)
		low[i] = maxn;
	auto choose3 = [](int a) {
		if(a < 3) return 0ll;
		return (1ll * a * (a-1) * (a-2));
	};
	for(int i = 1; i <= n; i++)
		if(!mark[i]) root(i), ans += choose3(qtd), qtd = 0;
	for(int i = n+1; i <= 2*n; i++)
		if(!mark[i] && tree[i].size()) root_ans(i);
	printf("%lld\n", ans);
}

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:143:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  143 |  scanf("%d %d", &n, &m);
      |  ~~~~~^~~~~~~~~~~~~~~~~
count_triplets.cpp:145:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  145 |   scanf("%d %d", &a, &b), g[a].pb(b), g[b].pb(a);
      |   ~~~~~^~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 32012 KB Output is correct
2 Correct 22 ms 31980 KB Output is correct
3 Correct 22 ms 31980 KB Output is correct
4 Correct 23 ms 32000 KB Output is correct
5 Correct 23 ms 31980 KB Output is correct
6 Correct 22 ms 31980 KB Output is correct
7 Correct 22 ms 32108 KB Output is correct
8 Correct 22 ms 32108 KB Output is correct
9 Correct 22 ms 31980 KB Output is correct
10 Correct 22 ms 32052 KB Output is correct
11 Correct 22 ms 32108 KB Output is correct
12 Correct 22 ms 32108 KB Output is correct
13 Correct 22 ms 32108 KB Output is correct
14 Correct 22 ms 32108 KB Output is correct
15 Correct 22 ms 32108 KB Output is correct
16 Correct 22 ms 32108 KB Output is correct
17 Correct 22 ms 32108 KB Output is correct
18 Correct 22 ms 32108 KB Output is correct
19 Correct 22 ms 32108 KB Output is correct
20 Correct 22 ms 31980 KB Output is correct
21 Correct 22 ms 31980 KB Output is correct
22 Correct 22 ms 32108 KB Output is correct
23 Correct 22 ms 32108 KB Output is correct
24 Correct 22 ms 32108 KB Output is correct
25 Correct 22 ms 32108 KB Output is correct
26 Correct 22 ms 32108 KB Output is correct
27 Correct 23 ms 32108 KB Output is correct
28 Correct 22 ms 32108 KB Output is correct
29 Correct 26 ms 32256 KB Output is correct
30 Correct 22 ms 32108 KB Output is correct
31 Correct 22 ms 32108 KB Output is correct
32 Correct 22 ms 32128 KB Output is correct
33 Correct 22 ms 32108 KB Output is correct
34 Correct 22 ms 32256 KB Output is correct
35 Correct 22 ms 31980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 32012 KB Output is correct
2 Correct 22 ms 31980 KB Output is correct
3 Correct 22 ms 31980 KB Output is correct
4 Correct 23 ms 32000 KB Output is correct
5 Correct 23 ms 31980 KB Output is correct
6 Correct 22 ms 31980 KB Output is correct
7 Correct 22 ms 32108 KB Output is correct
8 Correct 22 ms 32108 KB Output is correct
9 Correct 22 ms 31980 KB Output is correct
10 Correct 22 ms 32052 KB Output is correct
11 Correct 22 ms 32108 KB Output is correct
12 Correct 22 ms 32108 KB Output is correct
13 Correct 22 ms 32108 KB Output is correct
14 Correct 22 ms 32108 KB Output is correct
15 Correct 22 ms 32108 KB Output is correct
16 Correct 22 ms 32108 KB Output is correct
17 Correct 22 ms 32108 KB Output is correct
18 Correct 22 ms 32108 KB Output is correct
19 Correct 22 ms 32108 KB Output is correct
20 Correct 22 ms 31980 KB Output is correct
21 Correct 22 ms 31980 KB Output is correct
22 Correct 22 ms 32108 KB Output is correct
23 Correct 22 ms 32108 KB Output is correct
24 Correct 22 ms 32108 KB Output is correct
25 Correct 22 ms 32108 KB Output is correct
26 Correct 22 ms 32108 KB Output is correct
27 Correct 23 ms 32108 KB Output is correct
28 Correct 22 ms 32108 KB Output is correct
29 Correct 26 ms 32256 KB Output is correct
30 Correct 22 ms 32108 KB Output is correct
31 Correct 22 ms 32108 KB Output is correct
32 Correct 22 ms 32128 KB Output is correct
33 Correct 22 ms 32108 KB Output is correct
34 Correct 22 ms 32256 KB Output is correct
35 Correct 22 ms 31980 KB Output is correct
36 Correct 22 ms 32108 KB Output is correct
37 Correct 23 ms 32108 KB Output is correct
38 Correct 22 ms 32108 KB Output is correct
39 Correct 25 ms 32108 KB Output is correct
40 Correct 22 ms 32108 KB Output is correct
41 Correct 22 ms 32108 KB Output is correct
42 Correct 22 ms 32108 KB Output is correct
43 Correct 22 ms 32108 KB Output is correct
44 Correct 22 ms 32108 KB Output is correct
45 Correct 22 ms 32108 KB Output is correct
46 Correct 22 ms 32108 KB Output is correct
47 Correct 25 ms 32108 KB Output is correct
48 Correct 23 ms 32012 KB Output is correct
49 Correct 22 ms 32108 KB Output is correct
50 Correct 22 ms 32108 KB Output is correct
51 Correct 22 ms 32108 KB Output is correct
52 Correct 25 ms 32128 KB Output is correct
53 Correct 22 ms 32108 KB Output is correct
54 Correct 23 ms 32108 KB Output is correct
55 Correct 23 ms 32108 KB Output is correct
56 Correct 22 ms 32108 KB Output is correct
57 Correct 22 ms 32108 KB Output is correct
58 Correct 22 ms 32128 KB Output is correct
59 Correct 22 ms 32108 KB Output is correct
60 Correct 25 ms 32108 KB Output is correct
61 Correct 22 ms 32108 KB Output is correct
62 Correct 22 ms 32108 KB Output is correct
63 Correct 25 ms 32252 KB Output is correct
64 Correct 22 ms 32108 KB Output is correct
65 Correct 22 ms 32108 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 162 ms 55024 KB Output is correct
2 Correct 132 ms 55020 KB Output is correct
3 Correct 194 ms 53872 KB Output is correct
4 Correct 158 ms 55524 KB Output is correct
5 Correct 165 ms 49136 KB Output is correct
6 Correct 194 ms 52592 KB Output is correct
7 Correct 214 ms 49924 KB Output is correct
8 Correct 216 ms 50664 KB Output is correct
9 Correct 187 ms 47852 KB Output is correct
10 Correct 187 ms 48108 KB Output is correct
11 Correct 129 ms 43116 KB Output is correct
12 Correct 120 ms 43116 KB Output is correct
13 Correct 108 ms 42476 KB Output is correct
14 Correct 118 ms 42488 KB Output is correct
15 Correct 97 ms 40868 KB Output is correct
16 Correct 85 ms 40812 KB Output is correct
17 Correct 25 ms 32876 KB Output is correct
18 Correct 25 ms 32748 KB Output is correct
19 Correct 30 ms 32748 KB Output is correct
20 Correct 26 ms 32748 KB Output is correct
21 Correct 25 ms 32748 KB Output is correct
22 Correct 29 ms 32620 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 32236 KB Output is correct
2 Correct 23 ms 32236 KB Output is correct
3 Correct 23 ms 32256 KB Output is correct
4 Correct 23 ms 32364 KB Output is correct
5 Correct 23 ms 32364 KB Output is correct
6 Correct 26 ms 32236 KB Output is correct
7 Correct 23 ms 32364 KB Output is correct
8 Correct 23 ms 32236 KB Output is correct
9 Correct 23 ms 32236 KB Output is correct
10 Correct 23 ms 32236 KB Output is correct
11 Correct 26 ms 32236 KB Output is correct
12 Correct 23 ms 32236 KB Output is correct
13 Correct 23 ms 32236 KB Output is correct
14 Correct 22 ms 32236 KB Output is correct
15 Correct 22 ms 32236 KB Output is correct
16 Correct 22 ms 32108 KB Output is correct
17 Correct 22 ms 32156 KB Output is correct
18 Correct 23 ms 32236 KB Output is correct
19 Correct 23 ms 32236 KB Output is correct
20 Correct 22 ms 32236 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 212 ms 46948 KB Output is correct
2 Correct 220 ms 46948 KB Output is correct
3 Correct 206 ms 46948 KB Output is correct
4 Correct 201 ms 46848 KB Output is correct
5 Correct 210 ms 46820 KB Output is correct
6 Correct 247 ms 61676 KB Output is correct
7 Correct 245 ms 56164 KB Output is correct
8 Correct 242 ms 55396 KB Output is correct
9 Correct 256 ms 52604 KB Output is correct
10 Correct 203 ms 46980 KB Output is correct
11 Correct 217 ms 47332 KB Output is correct
12 Correct 209 ms 46572 KB Output is correct
13 Correct 199 ms 46828 KB Output is correct
14 Correct 171 ms 45932 KB Output is correct
15 Correct 157 ms 45164 KB Output is correct
16 Correct 95 ms 41708 KB Output is correct
17 Correct 107 ms 43364 KB Output is correct
18 Correct 138 ms 43148 KB Output is correct
19 Correct 103 ms 43428 KB Output is correct
20 Correct 105 ms 43284 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 32236 KB Output is correct
2 Correct 25 ms 32236 KB Output is correct
3 Correct 22 ms 32236 KB Output is correct
4 Correct 23 ms 32236 KB Output is correct
5 Correct 24 ms 32108 KB Output is correct
6 Correct 22 ms 32108 KB Output is correct
7 Correct 22 ms 32108 KB Output is correct
8 Correct 22 ms 32108 KB Output is correct
9 Correct 22 ms 32236 KB Output is correct
10 Correct 22 ms 32108 KB Output is correct
11 Correct 21 ms 32108 KB Output is correct
12 Correct 23 ms 32236 KB Output is correct
13 Correct 23 ms 32236 KB Output is correct
14 Correct 22 ms 32236 KB Output is correct
15 Correct 22 ms 32236 KB Output is correct
16 Correct 23 ms 32140 KB Output is correct
17 Correct 25 ms 32236 KB Output is correct
18 Correct 22 ms 32236 KB Output is correct
19 Correct 22 ms 32236 KB Output is correct
20 Correct 22 ms 32108 KB Output is correct
21 Correct 24 ms 32236 KB Output is correct
22 Correct 24 ms 32236 KB Output is correct
23 Correct 22 ms 32236 KB Output is correct
24 Correct 22 ms 32236 KB Output is correct
25 Correct 22 ms 32108 KB Output is correct
26 Correct 22 ms 32108 KB Output is correct
27 Correct 21 ms 32108 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 211 ms 47036 KB Output is correct
2 Correct 208 ms 47680 KB Output is correct
3 Correct 217 ms 46820 KB Output is correct
4 Correct 190 ms 45540 KB Output is correct
5 Correct 169 ms 43536 KB Output is correct
6 Correct 172 ms 42596 KB Output is correct
7 Correct 149 ms 42108 KB Output is correct
8 Correct 131 ms 41692 KB Output is correct
9 Correct 141 ms 41316 KB Output is correct
10 Correct 133 ms 41264 KB Output is correct
11 Correct 140 ms 40924 KB Output is correct
12 Correct 119 ms 41076 KB Output is correct
13 Correct 114 ms 40944 KB Output is correct
14 Correct 124 ms 43004 KB Output is correct
15 Correct 237 ms 55872 KB Output is correct
16 Correct 217 ms 52708 KB Output is correct
17 Correct 235 ms 55344 KB Output is correct
18 Correct 213 ms 50916 KB Output is correct
19 Correct 224 ms 45284 KB Output is correct
20 Correct 192 ms 45160 KB Output is correct
21 Correct 189 ms 45032 KB Output is correct
22 Correct 145 ms 44012 KB Output is correct
23 Correct 132 ms 42732 KB Output is correct
24 Correct 178 ms 45924 KB Output is correct
25 Correct 183 ms 46016 KB Output is correct
26 Correct 185 ms 45284 KB Output is correct
27 Correct 188 ms 45316 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 32012 KB Output is correct
2 Correct 22 ms 31980 KB Output is correct
3 Correct 22 ms 31980 KB Output is correct
4 Correct 23 ms 32000 KB Output is correct
5 Correct 23 ms 31980 KB Output is correct
6 Correct 22 ms 31980 KB Output is correct
7 Correct 22 ms 32108 KB Output is correct
8 Correct 22 ms 32108 KB Output is correct
9 Correct 22 ms 31980 KB Output is correct
10 Correct 22 ms 32052 KB Output is correct
11 Correct 22 ms 32108 KB Output is correct
12 Correct 22 ms 32108 KB Output is correct
13 Correct 22 ms 32108 KB Output is correct
14 Correct 22 ms 32108 KB Output is correct
15 Correct 22 ms 32108 KB Output is correct
16 Correct 22 ms 32108 KB Output is correct
17 Correct 22 ms 32108 KB Output is correct
18 Correct 22 ms 32108 KB Output is correct
19 Correct 22 ms 32108 KB Output is correct
20 Correct 22 ms 31980 KB Output is correct
21 Correct 22 ms 31980 KB Output is correct
22 Correct 22 ms 32108 KB Output is correct
23 Correct 22 ms 32108 KB Output is correct
24 Correct 22 ms 32108 KB Output is correct
25 Correct 22 ms 32108 KB Output is correct
26 Correct 22 ms 32108 KB Output is correct
27 Correct 23 ms 32108 KB Output is correct
28 Correct 22 ms 32108 KB Output is correct
29 Correct 26 ms 32256 KB Output is correct
30 Correct 22 ms 32108 KB Output is correct
31 Correct 22 ms 32108 KB Output is correct
32 Correct 22 ms 32128 KB Output is correct
33 Correct 22 ms 32108 KB Output is correct
34 Correct 22 ms 32256 KB Output is correct
35 Correct 22 ms 31980 KB Output is correct
36 Correct 22 ms 32108 KB Output is correct
37 Correct 23 ms 32108 KB Output is correct
38 Correct 22 ms 32108 KB Output is correct
39 Correct 25 ms 32108 KB Output is correct
40 Correct 22 ms 32108 KB Output is correct
41 Correct 22 ms 32108 KB Output is correct
42 Correct 22 ms 32108 KB Output is correct
43 Correct 22 ms 32108 KB Output is correct
44 Correct 22 ms 32108 KB Output is correct
45 Correct 22 ms 32108 KB Output is correct
46 Correct 22 ms 32108 KB Output is correct
47 Correct 25 ms 32108 KB Output is correct
48 Correct 23 ms 32012 KB Output is correct
49 Correct 22 ms 32108 KB Output is correct
50 Correct 22 ms 32108 KB Output is correct
51 Correct 22 ms 32108 KB Output is correct
52 Correct 25 ms 32128 KB Output is correct
53 Correct 22 ms 32108 KB Output is correct
54 Correct 23 ms 32108 KB Output is correct
55 Correct 23 ms 32108 KB Output is correct
56 Correct 22 ms 32108 KB Output is correct
57 Correct 22 ms 32108 KB Output is correct
58 Correct 22 ms 32128 KB Output is correct
59 Correct 22 ms 32108 KB Output is correct
60 Correct 25 ms 32108 KB Output is correct
61 Correct 22 ms 32108 KB Output is correct
62 Correct 22 ms 32108 KB Output is correct
63 Correct 25 ms 32252 KB Output is correct
64 Correct 22 ms 32108 KB Output is correct
65 Correct 22 ms 32108 KB Output is correct
66 Correct 22 ms 32108 KB Output is correct
67 Correct 24 ms 32108 KB Output is correct
68 Correct 23 ms 32236 KB Output is correct
69 Correct 23 ms 32236 KB Output is correct
70 Correct 23 ms 32236 KB Output is correct
71 Correct 24 ms 32236 KB Output is correct
72 Correct 23 ms 32108 KB Output is correct
73 Correct 22 ms 32108 KB Output is correct
74 Correct 22 ms 32108 KB Output is correct
75 Correct 22 ms 32108 KB Output is correct
76 Correct 22 ms 32108 KB Output is correct
77 Correct 23 ms 32236 KB Output is correct
78 Correct 23 ms 32236 KB Output is correct
79 Correct 25 ms 32236 KB Output is correct
80 Correct 23 ms 32108 KB Output is correct
81 Correct 25 ms 32108 KB Output is correct
82 Correct 22 ms 32236 KB Output is correct
83 Correct 22 ms 32236 KB Output is correct
84 Correct 24 ms 32364 KB Output is correct
85 Correct 51 ms 32236 KB Output is correct
86 Correct 22 ms 32108 KB Output is correct
87 Correct 23 ms 32108 KB Output is correct
88 Correct 23 ms 32108 KB Output is correct
89 Correct 23 ms 32108 KB Output is correct
90 Correct 23 ms 32108 KB Output is correct
91 Correct 22 ms 32108 KB Output is correct
92 Correct 23 ms 32108 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 32012 KB Output is correct
2 Correct 22 ms 31980 KB Output is correct
3 Correct 22 ms 31980 KB Output is correct
4 Correct 23 ms 32000 KB Output is correct
5 Correct 23 ms 31980 KB Output is correct
6 Correct 22 ms 31980 KB Output is correct
7 Correct 22 ms 32108 KB Output is correct
8 Correct 22 ms 32108 KB Output is correct
9 Correct 22 ms 31980 KB Output is correct
10 Correct 22 ms 32052 KB Output is correct
11 Correct 22 ms 32108 KB Output is correct
12 Correct 22 ms 32108 KB Output is correct
13 Correct 22 ms 32108 KB Output is correct
14 Correct 22 ms 32108 KB Output is correct
15 Correct 22 ms 32108 KB Output is correct
16 Correct 22 ms 32108 KB Output is correct
17 Correct 22 ms 32108 KB Output is correct
18 Correct 22 ms 32108 KB Output is correct
19 Correct 22 ms 32108 KB Output is correct
20 Correct 22 ms 31980 KB Output is correct
21 Correct 22 ms 31980 KB Output is correct
22 Correct 22 ms 32108 KB Output is correct
23 Correct 22 ms 32108 KB Output is correct
24 Correct 22 ms 32108 KB Output is correct
25 Correct 22 ms 32108 KB Output is correct
26 Correct 22 ms 32108 KB Output is correct
27 Correct 23 ms 32108 KB Output is correct
28 Correct 22 ms 32108 KB Output is correct
29 Correct 26 ms 32256 KB Output is correct
30 Correct 22 ms 32108 KB Output is correct
31 Correct 22 ms 32108 KB Output is correct
32 Correct 22 ms 32128 KB Output is correct
33 Correct 22 ms 32108 KB Output is correct
34 Correct 22 ms 32256 KB Output is correct
35 Correct 22 ms 31980 KB Output is correct
36 Correct 22 ms 32108 KB Output is correct
37 Correct 23 ms 32108 KB Output is correct
38 Correct 22 ms 32108 KB Output is correct
39 Correct 25 ms 32108 KB Output is correct
40 Correct 22 ms 32108 KB Output is correct
41 Correct 22 ms 32108 KB Output is correct
42 Correct 22 ms 32108 KB Output is correct
43 Correct 22 ms 32108 KB Output is correct
44 Correct 22 ms 32108 KB Output is correct
45 Correct 22 ms 32108 KB Output is correct
46 Correct 22 ms 32108 KB Output is correct
47 Correct 25 ms 32108 KB Output is correct
48 Correct 23 ms 32012 KB Output is correct
49 Correct 22 ms 32108 KB Output is correct
50 Correct 22 ms 32108 KB Output is correct
51 Correct 22 ms 32108 KB Output is correct
52 Correct 25 ms 32128 KB Output is correct
53 Correct 22 ms 32108 KB Output is correct
54 Correct 23 ms 32108 KB Output is correct
55 Correct 23 ms 32108 KB Output is correct
56 Correct 22 ms 32108 KB Output is correct
57 Correct 22 ms 32108 KB Output is correct
58 Correct 22 ms 32128 KB Output is correct
59 Correct 22 ms 32108 KB Output is correct
60 Correct 25 ms 32108 KB Output is correct
61 Correct 22 ms 32108 KB Output is correct
62 Correct 22 ms 32108 KB Output is correct
63 Correct 25 ms 32252 KB Output is correct
64 Correct 22 ms 32108 KB Output is correct
65 Correct 22 ms 32108 KB Output is correct
66 Correct 162 ms 55024 KB Output is correct
67 Correct 132 ms 55020 KB Output is correct
68 Correct 194 ms 53872 KB Output is correct
69 Correct 158 ms 55524 KB Output is correct
70 Correct 165 ms 49136 KB Output is correct
71 Correct 194 ms 52592 KB Output is correct
72 Correct 214 ms 49924 KB Output is correct
73 Correct 216 ms 50664 KB Output is correct
74 Correct 187 ms 47852 KB Output is correct
75 Correct 187 ms 48108 KB Output is correct
76 Correct 129 ms 43116 KB Output is correct
77 Correct 120 ms 43116 KB Output is correct
78 Correct 108 ms 42476 KB Output is correct
79 Correct 118 ms 42488 KB Output is correct
80 Correct 97 ms 40868 KB Output is correct
81 Correct 85 ms 40812 KB Output is correct
82 Correct 25 ms 32876 KB Output is correct
83 Correct 25 ms 32748 KB Output is correct
84 Correct 30 ms 32748 KB Output is correct
85 Correct 26 ms 32748 KB Output is correct
86 Correct 25 ms 32748 KB Output is correct
87 Correct 29 ms 32620 KB Output is correct
88 Correct 23 ms 32236 KB Output is correct
89 Correct 23 ms 32236 KB Output is correct
90 Correct 23 ms 32256 KB Output is correct
91 Correct 23 ms 32364 KB Output is correct
92 Correct 23 ms 32364 KB Output is correct
93 Correct 26 ms 32236 KB Output is correct
94 Correct 23 ms 32364 KB Output is correct
95 Correct 23 ms 32236 KB Output is correct
96 Correct 23 ms 32236 KB Output is correct
97 Correct 23 ms 32236 KB Output is correct
98 Correct 26 ms 32236 KB Output is correct
99 Correct 23 ms 32236 KB Output is correct
100 Correct 23 ms 32236 KB Output is correct
101 Correct 22 ms 32236 KB Output is correct
102 Correct 22 ms 32236 KB Output is correct
103 Correct 22 ms 32108 KB Output is correct
104 Correct 22 ms 32156 KB Output is correct
105 Correct 23 ms 32236 KB Output is correct
106 Correct 23 ms 32236 KB Output is correct
107 Correct 22 ms 32236 KB Output is correct
108 Correct 212 ms 46948 KB Output is correct
109 Correct 220 ms 46948 KB Output is correct
110 Correct 206 ms 46948 KB Output is correct
111 Correct 201 ms 46848 KB Output is correct
112 Correct 210 ms 46820 KB Output is correct
113 Correct 247 ms 61676 KB Output is correct
114 Correct 245 ms 56164 KB Output is correct
115 Correct 242 ms 55396 KB Output is correct
116 Correct 256 ms 52604 KB Output is correct
117 Correct 203 ms 46980 KB Output is correct
118 Correct 217 ms 47332 KB Output is correct
119 Correct 209 ms 46572 KB Output is correct
120 Correct 199 ms 46828 KB Output is correct
121 Correct 171 ms 45932 KB Output is correct
122 Correct 157 ms 45164 KB Output is correct
123 Correct 95 ms 41708 KB Output is correct
124 Correct 107 ms 43364 KB Output is correct
125 Correct 138 ms 43148 KB Output is correct
126 Correct 103 ms 43428 KB Output is correct
127 Correct 105 ms 43284 KB Output is correct
128 Correct 22 ms 32236 KB Output is correct
129 Correct 25 ms 32236 KB Output is correct
130 Correct 22 ms 32236 KB Output is correct
131 Correct 23 ms 32236 KB Output is correct
132 Correct 24 ms 32108 KB Output is correct
133 Correct 22 ms 32108 KB Output is correct
134 Correct 22 ms 32108 KB Output is correct
135 Correct 22 ms 32108 KB Output is correct
136 Correct 22 ms 32236 KB Output is correct
137 Correct 22 ms 32108 KB Output is correct
138 Correct 21 ms 32108 KB Output is correct
139 Correct 23 ms 32236 KB Output is correct
140 Correct 23 ms 32236 KB Output is correct
141 Correct 22 ms 32236 KB Output is correct
142 Correct 22 ms 32236 KB Output is correct
143 Correct 23 ms 32140 KB Output is correct
144 Correct 25 ms 32236 KB Output is correct
145 Correct 22 ms 32236 KB Output is correct
146 Correct 22 ms 32236 KB Output is correct
147 Correct 22 ms 32108 KB Output is correct
148 Correct 24 ms 32236 KB Output is correct
149 Correct 24 ms 32236 KB Output is correct
150 Correct 22 ms 32236 KB Output is correct
151 Correct 22 ms 32236 KB Output is correct
152 Correct 22 ms 32108 KB Output is correct
153 Correct 22 ms 32108 KB Output is correct
154 Correct 21 ms 32108 KB Output is correct
155 Correct 211 ms 47036 KB Output is correct
156 Correct 208 ms 47680 KB Output is correct
157 Correct 217 ms 46820 KB Output is correct
158 Correct 190 ms 45540 KB Output is correct
159 Correct 169 ms 43536 KB Output is correct
160 Correct 172 ms 42596 KB Output is correct
161 Correct 149 ms 42108 KB Output is correct
162 Correct 131 ms 41692 KB Output is correct
163 Correct 141 ms 41316 KB Output is correct
164 Correct 133 ms 41264 KB Output is correct
165 Correct 140 ms 40924 KB Output is correct
166 Correct 119 ms 41076 KB Output is correct
167 Correct 114 ms 40944 KB Output is correct
168 Correct 124 ms 43004 KB Output is correct
169 Correct 237 ms 55872 KB Output is correct
170 Correct 217 ms 52708 KB Output is correct
171 Correct 235 ms 55344 KB Output is correct
172 Correct 213 ms 50916 KB Output is correct
173 Correct 224 ms 45284 KB Output is correct
174 Correct 192 ms 45160 KB Output is correct
175 Correct 189 ms 45032 KB Output is correct
176 Correct 145 ms 44012 KB Output is correct
177 Correct 132 ms 42732 KB Output is correct
178 Correct 178 ms 45924 KB Output is correct
179 Correct 183 ms 46016 KB Output is correct
180 Correct 185 ms 45284 KB Output is correct
181 Correct 188 ms 45316 KB Output is correct
182 Correct 22 ms 32108 KB Output is correct
183 Correct 24 ms 32108 KB Output is correct
184 Correct 23 ms 32236 KB Output is correct
185 Correct 23 ms 32236 KB Output is correct
186 Correct 23 ms 32236 KB Output is correct
187 Correct 24 ms 32236 KB Output is correct
188 Correct 23 ms 32108 KB Output is correct
189 Correct 22 ms 32108 KB Output is correct
190 Correct 22 ms 32108 KB Output is correct
191 Correct 22 ms 32108 KB Output is correct
192 Correct 22 ms 32108 KB Output is correct
193 Correct 23 ms 32236 KB Output is correct
194 Correct 23 ms 32236 KB Output is correct
195 Correct 25 ms 32236 KB Output is correct
196 Correct 23 ms 32108 KB Output is correct
197 Correct 25 ms 32108 KB Output is correct
198 Correct 22 ms 32236 KB Output is correct
199 Correct 22 ms 32236 KB Output is correct
200 Correct 24 ms 32364 KB Output is correct
201 Correct 51 ms 32236 KB Output is correct
202 Correct 22 ms 32108 KB Output is correct
203 Correct 23 ms 32108 KB Output is correct
204 Correct 23 ms 32108 KB Output is correct
205 Correct 23 ms 32108 KB Output is correct
206 Correct 23 ms 32108 KB Output is correct
207 Correct 22 ms 32108 KB Output is correct
208 Correct 23 ms 32108 KB Output is correct
209 Correct 25 ms 32492 KB Output is correct
210 Correct 108 ms 41708 KB Output is correct
211 Correct 201 ms 47460 KB Output is correct
212 Correct 174 ms 50792 KB Output is correct
213 Correct 196 ms 53228 KB Output is correct
214 Correct 91 ms 42860 KB Output is correct
215 Correct 81 ms 42220 KB Output is correct
216 Correct 193 ms 45208 KB Output is correct
217 Correct 185 ms 43620 KB Output is correct
218 Correct 140 ms 41572 KB Output is correct
219 Correct 126 ms 40996 KB Output is correct
220 Correct 127 ms 40844 KB Output is correct
221 Correct 128 ms 40688 KB Output is correct
222 Correct 126 ms 40684 KB Output is correct
223 Correct 194 ms 48820 KB Output is correct
224 Correct 200 ms 47716 KB Output is correct
225 Correct 179 ms 43236 KB Output is correct
226 Correct 171 ms 43112 KB Output is correct
227 Correct 183 ms 43112 KB Output is correct
228 Correct 140 ms 42348 KB Output is correct
229 Correct 114 ms 41416 KB Output is correct
230 Correct 135 ms 41316 KB Output is correct
231 Correct 141 ms 41444 KB Output is correct