답안 #727709

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
727709 2023-04-21T06:37:28 Z SanguineChameleon 철인 이종 경기 (APIO18_duathlon) C++17
90 / 100
1000 ms 31800 KB
#include <bits/stdc++.h>
using namespace std;

void just_do_it();

int main() {
	#ifdef KAMIRULEZ
		freopen("kamirulez.inp", "r", stdin);
		freopen("kamirulez.out", "w", stdout);
	#endif
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	just_do_it();
	return 0;
}

#define int long long

const int maxn = 1e5 + 20;
vector<int> adj[maxn];
vector<int> ch_color[maxn];
vector<int> comp;
vector<int> comp_color[maxn];
int color[maxn];
int sz_color[maxn];
int sz_color_sub[maxn];
int sz_color_root[maxn];
long long sz_color_sum[maxn];
bool can[55][55][55];
bool bad[maxn];
bool flag[maxn];
int par[maxn];
int depth[maxn];
int high[maxn];
int sz[maxn];
int node_cnt = 0;
int edge_cnt = 0;
int n, m;

void dfs1(int x, int a, int b) {
	can[x][a][b] = true;
	for (auto c: adj[b]) {
		if (c != x && !can[x][a][c]) {
			dfs1(x, a, c);
		}
	}
}

void dfs2(int u, int p, bool sub7 = false) {
	color[u] = u;
	sz_color[u] = 1;
	par[u] = p;
	high[u] = depth[u];
	flag[u] = true;
	node_cnt++;
	edge_cnt += adj[u].size();
	sz[u] = 1;
	for (auto v: adj[u]) {
		if (v == p) {
			continue;
		}
		if (!flag[v]) {
			depth[v] = depth[u] + 1;
			dfs2(v, u, sub7);
			sz[u] += sz[v];
			high[u] = min(high[u], high[v]);
		}
		else {
			high[u] = min(high[u], depth[v]);
			if (depth[u] > depth[v] && sub7) {
				int cur = u;
				while (true) {
					sz_color[color[cur]]--;
					color[cur] = u;
					sz_color[color[cur]]++;
					if (cur == v) {
						break;
					}
					cur = par[cur];
				}
			}
		}
	}
	if (sub7) {
		for (auto v: adj[u]) {
			if (par[v] == u && color[v] != color[u]) {
				ch_color[u].push_back(v);
			}
		}
		comp_color[color[u]].push_back(u);
	}
}

void sub1() {
	for (int x = 1; x <= n; x++) {
		for (int a = 1; a <= n; a++) {
			if (a != x) {
				dfs1(x, a, a);
			}
		}
		bad[x] = false;
	}
	int res = 0;
	for (int a = 1; a <= n; a++) {
		for (int b = 1; b <= n; b++) {
			if (b == a) {
				continue;
			}
			for (int c = 1; c <= n; c++) {
				if (c == a || c == b) {
					continue;
				}
				bool ok = true;
				for (int x = 1; x <= n; x++) {
					if (x == b) {
						continue;
					}
					if (!can[x][a][b] && !can[x][b][c]) {
						ok = false;
						break;
					}
				}
				if (ok) {
					res++;
				}
			}
		}
	}
	cout << res;
}

void dfs4(int u) {
	comp.push_back(color[u]);
	sz_color_sub[color[u]] = sz_color[color[u]];
	int rem = node_cnt - sz_color[color[u]];
	for (auto v: comp_color[color[u]]) {
		for (auto x: ch_color[v]) {
			dfs4(x);
			sz_color_sub[color[u]] += sz_color_sub[color[x]];
			sz_color_root[v] += sz_color_sub[color[x]];
			sz_color_sum[v] -= 1LL * sz_color_sub[color[x]] * sz_color_sub[color[x]];
			rem -= sz_color_sub[color[x]];
		}
	}
	sz_color_root[u] += rem;
	sz_color_sum[u] -= 1LL * rem * rem;
	for (auto v: comp_color[color[u]]) {
		sz_color_sum[v] += 1LL * sz_color_root[v] * sz_color_root[v]; 
	}
}

long long solve(int root) {
	comp.clear();
	node_cnt = 0;
	edge_cnt = 0;
	dfs2(root, -1, true);
	edge_cnt /= 2;
	dfs4(root);
	long long res = 0;
	for (auto u: comp) {
		res += 1LL * sz_color[u] * (sz_color[u] - 1) * (sz_color[u] - 2);
		res += 1LL * (sz_color[u] - 1) * (sz_color[u] - 1) * (node_cnt - sz_color[u]) * 2;
		res += 1LL * sz_color[u] * (node_cnt - sz_color[u]) * (node_cnt - sz_color[u]);
		for (auto v: comp_color[u]) {
			res -= 1LL * sz_color[u] * sz_color_root[v] * sz_color_root[v];
			res += sz_color_sum[v];
		}
	}
	return res;
}

long long dfs3(int u) {
	int cnt = 1;
	for (auto v: adj[u]) {
		if (par[v] == u && high[v] >= depth[u]) {
			cnt += sz[v];
		}
	}
	long long res = 1LL * cnt * (cnt - 1);
	for (auto v: adj[u]) {
		if (par[v] == u && high[v] < depth[u]) {
			res += dfs3(v);
		}
	}
	return res;
}

void sub8() {
	long long res = 0;
	for (int u = 1; u <= n; u++) {
		node_cnt = 0;
		for (int i = 1; i <= n; i++) {
			flag[i] = false;
		}
		depth[u] = 0;
		dfs2(u, -1);
		res += 1LL * (node_cnt - 1) * (node_cnt - 2);
		for (auto v: adj[u]) {
			if (par[v] == u) {
				res -= dfs3(v);
			}
		}
	}
	cout << res;
}

void just_do_it() {
	cin >> n >> m;
	for (int i = 0; i < m; i++) {
		int u, v;
		cin >> u >> v;
		adj[u].push_back(v);
		adj[v].push_back(u);
	}
	if (n <= 50) {
		sub1();
		return;
	}
	if (n <= 1000) {
		sub8();
		return;
	}
	long long res = 0;
	for (int i = 1; i <= n; i++) {
		if (!flag[i]) {
			res += solve(i);
		}
	}
	cout << res;
	return;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 7380 KB Output is correct
2 Correct 3 ms 7380 KB Output is correct
3 Correct 4 ms 7272 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 3 ms 7380 KB Output is correct
6 Correct 4 ms 7380 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 3 ms 7380 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 3 ms 7380 KB Output is correct
17 Correct 4 ms 7388 KB Output is correct
18 Correct 4 ms 7380 KB Output is correct
19 Correct 4 ms 7380 KB Output is correct
20 Correct 3 ms 7380 KB Output is correct
21 Correct 4 ms 7380 KB Output is correct
22 Correct 4 ms 7408 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 3 ms 7380 KB Output is correct
26 Correct 4 ms 7408 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7380 KB Output is correct
29 Correct 4 ms 7380 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 5 ms 7380 KB Output is correct
33 Correct 3 ms 7380 KB Output is correct
34 Correct 4 ms 7404 KB Output is correct
35 Correct 4 ms 7380 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 7380 KB Output is correct
2 Correct 3 ms 7380 KB Output is correct
3 Correct 4 ms 7272 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 3 ms 7380 KB Output is correct
6 Correct 4 ms 7380 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 3 ms 7380 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 3 ms 7380 KB Output is correct
17 Correct 4 ms 7388 KB Output is correct
18 Correct 4 ms 7380 KB Output is correct
19 Correct 4 ms 7380 KB Output is correct
20 Correct 3 ms 7380 KB Output is correct
21 Correct 4 ms 7380 KB Output is correct
22 Correct 4 ms 7408 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 3 ms 7380 KB Output is correct
26 Correct 4 ms 7408 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7380 KB Output is correct
29 Correct 4 ms 7380 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 5 ms 7380 KB Output is correct
33 Correct 3 ms 7380 KB Output is correct
34 Correct 4 ms 7404 KB Output is correct
35 Correct 4 ms 7380 KB Output is correct
36 Correct 4 ms 7508 KB Output is correct
37 Correct 4 ms 7508 KB Output is correct
38 Correct 9 ms 7532 KB Output is correct
39 Correct 11 ms 7508 KB Output is correct
40 Correct 11 ms 7508 KB Output is correct
41 Correct 4 ms 7516 KB Output is correct
42 Correct 4 ms 7508 KB Output is correct
43 Correct 4 ms 7508 KB Output is correct
44 Correct 5 ms 7508 KB Output is correct
45 Correct 4 ms 7508 KB Output is correct
46 Correct 5 ms 7436 KB Output is correct
47 Correct 5 ms 7380 KB Output is correct
48 Correct 4 ms 7508 KB Output is correct
49 Correct 4 ms 7508 KB Output is correct
50 Correct 4 ms 7508 KB Output is correct
51 Correct 9 ms 7508 KB Output is correct
52 Correct 7 ms 7440 KB Output is correct
53 Correct 9 ms 7508 KB Output is correct
54 Correct 10 ms 7528 KB Output is correct
55 Correct 10 ms 7524 KB Output is correct
56 Correct 9 ms 7508 KB Output is correct
57 Correct 9 ms 7524 KB Output is correct
58 Correct 8 ms 7528 KB Output is correct
59 Correct 8 ms 7528 KB Output is correct
60 Correct 6 ms 7524 KB Output is correct
61 Correct 5 ms 7524 KB Output is correct
62 Correct 5 ms 7508 KB Output is correct
63 Correct 9 ms 7508 KB Output is correct
64 Correct 8 ms 7428 KB Output is correct
65 Correct 7 ms 7532 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 71 ms 29456 KB Output is correct
2 Correct 70 ms 29456 KB Output is correct
3 Correct 95 ms 28192 KB Output is correct
4 Correct 83 ms 29872 KB Output is correct
5 Correct 94 ms 25076 KB Output is correct
6 Correct 97 ms 26192 KB Output is correct
7 Correct 123 ms 24528 KB Output is correct
8 Correct 107 ms 25800 KB Output is correct
9 Correct 95 ms 23052 KB Output is correct
10 Correct 94 ms 23668 KB Output is correct
11 Correct 78 ms 20848 KB Output is correct
12 Correct 76 ms 20940 KB Output is correct
13 Correct 68 ms 20980 KB Output is correct
14 Correct 73 ms 20796 KB Output is correct
15 Correct 56 ms 20688 KB Output is correct
16 Correct 56 ms 20552 KB Output is correct
17 Correct 15 ms 17236 KB Output is correct
18 Correct 15 ms 17260 KB Output is correct
19 Correct 14 ms 17236 KB Output is correct
20 Correct 15 ms 17236 KB Output is correct
21 Correct 14 ms 17108 KB Output is correct
22 Correct 14 ms 17040 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 23 ms 7368 KB Output is correct
2 Correct 24 ms 7476 KB Output is correct
3 Correct 23 ms 7496 KB Output is correct
4 Correct 29 ms 7508 KB Output is correct
5 Correct 27 ms 7508 KB Output is correct
6 Correct 25 ms 7508 KB Output is correct
7 Correct 29 ms 7612 KB Output is correct
8 Correct 26 ms 7508 KB Output is correct
9 Correct 24 ms 7508 KB Output is correct
10 Correct 19 ms 7380 KB Output is correct
11 Correct 19 ms 7380 KB Output is correct
12 Correct 10 ms 7488 KB Output is correct
13 Correct 7 ms 7380 KB Output is correct
14 Correct 5 ms 7380 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 18 ms 7500 KB Output is correct
18 Correct 17 ms 7380 KB Output is correct
19 Correct 16 ms 7504 KB Output is correct
20 Correct 16 ms 7508 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 107 ms 24376 KB Output is correct
2 Correct 101 ms 24392 KB Output is correct
3 Correct 104 ms 24320 KB Output is correct
4 Correct 101 ms 24376 KB Output is correct
5 Correct 100 ms 24404 KB Output is correct
6 Correct 123 ms 31800 KB Output is correct
7 Correct 126 ms 29156 KB Output is correct
8 Correct 116 ms 27884 KB Output is correct
9 Correct 110 ms 26768 KB Output is correct
10 Correct 97 ms 23664 KB Output is correct
11 Correct 102 ms 23932 KB Output is correct
12 Correct 106 ms 23412 KB Output is correct
13 Correct 96 ms 23440 KB Output is correct
14 Correct 90 ms 22976 KB Output is correct
15 Correct 81 ms 22656 KB Output is correct
16 Correct 57 ms 21244 KB Output is correct
17 Correct 72 ms 23800 KB Output is correct
18 Correct 67 ms 23416 KB Output is correct
19 Correct 66 ms 23412 KB Output is correct
20 Correct 64 ms 23488 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 7380 KB Output is correct
2 Correct 23 ms 7496 KB Output is correct
3 Correct 25 ms 7380 KB Output is correct
4 Correct 28 ms 7380 KB Output is correct
5 Correct 30 ms 7380 KB Output is correct
6 Correct 27 ms 7500 KB Output is correct
7 Correct 28 ms 7508 KB Output is correct
8 Correct 27 ms 7508 KB Output is correct
9 Correct 28 ms 7508 KB Output is correct
10 Correct 29 ms 7504 KB Output is correct
11 Correct 29 ms 7508 KB Output is correct
12 Correct 28 ms 7508 KB Output is correct
13 Correct 28 ms 7540 KB Output is correct
14 Correct 29 ms 7564 KB Output is correct
15 Correct 28 ms 7508 KB Output is correct
16 Correct 21 ms 7500 KB Output is correct
17 Correct 19 ms 7380 KB Output is correct
18 Correct 11 ms 7504 KB Output is correct
19 Correct 4 ms 7496 KB Output is correct
20 Correct 5 ms 7380 KB Output is correct
21 Correct 24 ms 7496 KB Output is correct
22 Correct 26 ms 7380 KB Output is correct
23 Correct 25 ms 7380 KB Output is correct
24 Correct 25 ms 7504 KB Output is correct
25 Correct 4 ms 7380 KB Output is correct
26 Correct 4 ms 7380 KB Output is correct
27 Correct 3 ms 7400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 105 ms 24388 KB Output is correct
2 Correct 107 ms 24464 KB Output is correct
3 Correct 104 ms 23236 KB Output is correct
4 Correct 90 ms 21552 KB Output is correct
5 Correct 80 ms 20300 KB Output is correct
6 Correct 71 ms 19796 KB Output is correct
7 Correct 68 ms 19604 KB Output is correct
8 Correct 66 ms 19244 KB Output is correct
9 Correct 62 ms 19344 KB Output is correct
10 Correct 63 ms 19048 KB Output is correct
11 Correct 59 ms 18952 KB Output is correct
12 Correct 59 ms 18868 KB Output is correct
13 Correct 55 ms 18728 KB Output is correct
14 Correct 60 ms 20664 KB Output is correct
15 Correct 121 ms 28604 KB Output is correct
16 Correct 126 ms 26748 KB Output is correct
17 Correct 111 ms 26972 KB Output is correct
18 Correct 108 ms 25188 KB Output is correct
19 Correct 93 ms 21456 KB Output is correct
20 Correct 108 ms 21176 KB Output is correct
21 Correct 100 ms 21080 KB Output is correct
22 Correct 79 ms 20512 KB Output is correct
23 Correct 74 ms 21404 KB Output is correct
24 Correct 82 ms 24304 KB Output is correct
25 Correct 91 ms 24264 KB Output is correct
26 Correct 82 ms 23148 KB Output is correct
27 Correct 93 ms 22944 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 7380 KB Output is correct
2 Correct 3 ms 7380 KB Output is correct
3 Correct 4 ms 7272 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 3 ms 7380 KB Output is correct
6 Correct 4 ms 7380 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 3 ms 7380 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 3 ms 7380 KB Output is correct
17 Correct 4 ms 7388 KB Output is correct
18 Correct 4 ms 7380 KB Output is correct
19 Correct 4 ms 7380 KB Output is correct
20 Correct 3 ms 7380 KB Output is correct
21 Correct 4 ms 7380 KB Output is correct
22 Correct 4 ms 7408 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 3 ms 7380 KB Output is correct
26 Correct 4 ms 7408 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7380 KB Output is correct
29 Correct 4 ms 7380 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 5 ms 7380 KB Output is correct
33 Correct 3 ms 7380 KB Output is correct
34 Correct 4 ms 7404 KB Output is correct
35 Correct 4 ms 7380 KB Output is correct
36 Correct 4 ms 7508 KB Output is correct
37 Correct 4 ms 7508 KB Output is correct
38 Correct 9 ms 7532 KB Output is correct
39 Correct 11 ms 7508 KB Output is correct
40 Correct 11 ms 7508 KB Output is correct
41 Correct 4 ms 7516 KB Output is correct
42 Correct 4 ms 7508 KB Output is correct
43 Correct 4 ms 7508 KB Output is correct
44 Correct 5 ms 7508 KB Output is correct
45 Correct 4 ms 7508 KB Output is correct
46 Correct 5 ms 7436 KB Output is correct
47 Correct 5 ms 7380 KB Output is correct
48 Correct 4 ms 7508 KB Output is correct
49 Correct 4 ms 7508 KB Output is correct
50 Correct 4 ms 7508 KB Output is correct
51 Correct 9 ms 7508 KB Output is correct
52 Correct 7 ms 7440 KB Output is correct
53 Correct 9 ms 7508 KB Output is correct
54 Correct 10 ms 7528 KB Output is correct
55 Correct 10 ms 7524 KB Output is correct
56 Correct 9 ms 7508 KB Output is correct
57 Correct 9 ms 7524 KB Output is correct
58 Correct 8 ms 7528 KB Output is correct
59 Correct 8 ms 7528 KB Output is correct
60 Correct 6 ms 7524 KB Output is correct
61 Correct 5 ms 7524 KB Output is correct
62 Correct 5 ms 7508 KB Output is correct
63 Correct 9 ms 7508 KB Output is correct
64 Correct 8 ms 7428 KB Output is correct
65 Correct 7 ms 7532 KB Output is correct
66 Correct 4 ms 7452 KB Output is correct
67 Correct 4 ms 7380 KB Output is correct
68 Correct 31 ms 7508 KB Output is correct
69 Correct 67 ms 7552 KB Output is correct
70 Correct 89 ms 7580 KB Output is correct
71 Correct 5 ms 7380 KB Output is correct
72 Correct 5 ms 7380 KB Output is correct
73 Correct 4 ms 7380 KB Output is correct
74 Correct 4 ms 7380 KB Output is correct
75 Correct 4 ms 7380 KB Output is correct
76 Correct 4 ms 7380 KB Output is correct
77 Correct 26 ms 7500 KB Output is correct
78 Correct 27 ms 7380 KB Output is correct
79 Correct 28 ms 7500 KB Output is correct
80 Correct 27 ms 7380 KB Output is correct
81 Correct 29 ms 7380 KB Output is correct
82 Correct 35 ms 7576 KB Output is correct
83 Correct 43 ms 7508 KB Output is correct
84 Correct 29 ms 7508 KB Output is correct
85 Correct 30 ms 7508 KB Output is correct
86 Correct 26 ms 7380 KB Output is correct
87 Correct 14 ms 7380 KB Output is correct
88 Correct 12 ms 7488 KB Output is correct
89 Correct 5 ms 7496 KB Output is correct
90 Correct 4 ms 7380 KB Output is correct
91 Correct 28 ms 7508 KB Output is correct
92 Correct 27 ms 7512 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 7380 KB Output is correct
2 Correct 3 ms 7380 KB Output is correct
3 Correct 4 ms 7272 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 3 ms 7380 KB Output is correct
6 Correct 4 ms 7380 KB Output is correct
7 Correct 4 ms 7380 KB Output is correct
8 Correct 4 ms 7380 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7380 KB Output is correct
11 Correct 4 ms 7380 KB Output is correct
12 Correct 4 ms 7380 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 3 ms 7380 KB Output is correct
15 Correct 4 ms 7380 KB Output is correct
16 Correct 3 ms 7380 KB Output is correct
17 Correct 4 ms 7388 KB Output is correct
18 Correct 4 ms 7380 KB Output is correct
19 Correct 4 ms 7380 KB Output is correct
20 Correct 3 ms 7380 KB Output is correct
21 Correct 4 ms 7380 KB Output is correct
22 Correct 4 ms 7408 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 3 ms 7380 KB Output is correct
26 Correct 4 ms 7408 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7380 KB Output is correct
29 Correct 4 ms 7380 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 5 ms 7380 KB Output is correct
33 Correct 3 ms 7380 KB Output is correct
34 Correct 4 ms 7404 KB Output is correct
35 Correct 4 ms 7380 KB Output is correct
36 Correct 4 ms 7508 KB Output is correct
37 Correct 4 ms 7508 KB Output is correct
38 Correct 9 ms 7532 KB Output is correct
39 Correct 11 ms 7508 KB Output is correct
40 Correct 11 ms 7508 KB Output is correct
41 Correct 4 ms 7516 KB Output is correct
42 Correct 4 ms 7508 KB Output is correct
43 Correct 4 ms 7508 KB Output is correct
44 Correct 5 ms 7508 KB Output is correct
45 Correct 4 ms 7508 KB Output is correct
46 Correct 5 ms 7436 KB Output is correct
47 Correct 5 ms 7380 KB Output is correct
48 Correct 4 ms 7508 KB Output is correct
49 Correct 4 ms 7508 KB Output is correct
50 Correct 4 ms 7508 KB Output is correct
51 Correct 9 ms 7508 KB Output is correct
52 Correct 7 ms 7440 KB Output is correct
53 Correct 9 ms 7508 KB Output is correct
54 Correct 10 ms 7528 KB Output is correct
55 Correct 10 ms 7524 KB Output is correct
56 Correct 9 ms 7508 KB Output is correct
57 Correct 9 ms 7524 KB Output is correct
58 Correct 8 ms 7528 KB Output is correct
59 Correct 8 ms 7528 KB Output is correct
60 Correct 6 ms 7524 KB Output is correct
61 Correct 5 ms 7524 KB Output is correct
62 Correct 5 ms 7508 KB Output is correct
63 Correct 9 ms 7508 KB Output is correct
64 Correct 8 ms 7428 KB Output is correct
65 Correct 7 ms 7532 KB Output is correct
66 Correct 71 ms 29456 KB Output is correct
67 Correct 70 ms 29456 KB Output is correct
68 Correct 95 ms 28192 KB Output is correct
69 Correct 83 ms 29872 KB Output is correct
70 Correct 94 ms 25076 KB Output is correct
71 Correct 97 ms 26192 KB Output is correct
72 Correct 123 ms 24528 KB Output is correct
73 Correct 107 ms 25800 KB Output is correct
74 Correct 95 ms 23052 KB Output is correct
75 Correct 94 ms 23668 KB Output is correct
76 Correct 78 ms 20848 KB Output is correct
77 Correct 76 ms 20940 KB Output is correct
78 Correct 68 ms 20980 KB Output is correct
79 Correct 73 ms 20796 KB Output is correct
80 Correct 56 ms 20688 KB Output is correct
81 Correct 56 ms 20552 KB Output is correct
82 Correct 15 ms 17236 KB Output is correct
83 Correct 15 ms 17260 KB Output is correct
84 Correct 14 ms 17236 KB Output is correct
85 Correct 15 ms 17236 KB Output is correct
86 Correct 14 ms 17108 KB Output is correct
87 Correct 14 ms 17040 KB Output is correct
88 Correct 23 ms 7368 KB Output is correct
89 Correct 24 ms 7476 KB Output is correct
90 Correct 23 ms 7496 KB Output is correct
91 Correct 29 ms 7508 KB Output is correct
92 Correct 27 ms 7508 KB Output is correct
93 Correct 25 ms 7508 KB Output is correct
94 Correct 29 ms 7612 KB Output is correct
95 Correct 26 ms 7508 KB Output is correct
96 Correct 24 ms 7508 KB Output is correct
97 Correct 19 ms 7380 KB Output is correct
98 Correct 19 ms 7380 KB Output is correct
99 Correct 10 ms 7488 KB Output is correct
100 Correct 7 ms 7380 KB Output is correct
101 Correct 5 ms 7380 KB Output is correct
102 Correct 4 ms 7380 KB Output is correct
103 Correct 4 ms 7380 KB Output is correct
104 Correct 18 ms 7500 KB Output is correct
105 Correct 17 ms 7380 KB Output is correct
106 Correct 16 ms 7504 KB Output is correct
107 Correct 16 ms 7508 KB Output is correct
108 Correct 107 ms 24376 KB Output is correct
109 Correct 101 ms 24392 KB Output is correct
110 Correct 104 ms 24320 KB Output is correct
111 Correct 101 ms 24376 KB Output is correct
112 Correct 100 ms 24404 KB Output is correct
113 Correct 123 ms 31800 KB Output is correct
114 Correct 126 ms 29156 KB Output is correct
115 Correct 116 ms 27884 KB Output is correct
116 Correct 110 ms 26768 KB Output is correct
117 Correct 97 ms 23664 KB Output is correct
118 Correct 102 ms 23932 KB Output is correct
119 Correct 106 ms 23412 KB Output is correct
120 Correct 96 ms 23440 KB Output is correct
121 Correct 90 ms 22976 KB Output is correct
122 Correct 81 ms 22656 KB Output is correct
123 Correct 57 ms 21244 KB Output is correct
124 Correct 72 ms 23800 KB Output is correct
125 Correct 67 ms 23416 KB Output is correct
126 Correct 66 ms 23412 KB Output is correct
127 Correct 64 ms 23488 KB Output is correct
128 Correct 22 ms 7380 KB Output is correct
129 Correct 23 ms 7496 KB Output is correct
130 Correct 25 ms 7380 KB Output is correct
131 Correct 28 ms 7380 KB Output is correct
132 Correct 30 ms 7380 KB Output is correct
133 Correct 27 ms 7500 KB Output is correct
134 Correct 28 ms 7508 KB Output is correct
135 Correct 27 ms 7508 KB Output is correct
136 Correct 28 ms 7508 KB Output is correct
137 Correct 29 ms 7504 KB Output is correct
138 Correct 29 ms 7508 KB Output is correct
139 Correct 28 ms 7508 KB Output is correct
140 Correct 28 ms 7540 KB Output is correct
141 Correct 29 ms 7564 KB Output is correct
142 Correct 28 ms 7508 KB Output is correct
143 Correct 21 ms 7500 KB Output is correct
144 Correct 19 ms 7380 KB Output is correct
145 Correct 11 ms 7504 KB Output is correct
146 Correct 4 ms 7496 KB Output is correct
147 Correct 5 ms 7380 KB Output is correct
148 Correct 24 ms 7496 KB Output is correct
149 Correct 26 ms 7380 KB Output is correct
150 Correct 25 ms 7380 KB Output is correct
151 Correct 25 ms 7504 KB Output is correct
152 Correct 4 ms 7380 KB Output is correct
153 Correct 4 ms 7380 KB Output is correct
154 Correct 3 ms 7400 KB Output is correct
155 Correct 105 ms 24388 KB Output is correct
156 Correct 107 ms 24464 KB Output is correct
157 Correct 104 ms 23236 KB Output is correct
158 Correct 90 ms 21552 KB Output is correct
159 Correct 80 ms 20300 KB Output is correct
160 Correct 71 ms 19796 KB Output is correct
161 Correct 68 ms 19604 KB Output is correct
162 Correct 66 ms 19244 KB Output is correct
163 Correct 62 ms 19344 KB Output is correct
164 Correct 63 ms 19048 KB Output is correct
165 Correct 59 ms 18952 KB Output is correct
166 Correct 59 ms 18868 KB Output is correct
167 Correct 55 ms 18728 KB Output is correct
168 Correct 60 ms 20664 KB Output is correct
169 Correct 121 ms 28604 KB Output is correct
170 Correct 126 ms 26748 KB Output is correct
171 Correct 111 ms 26972 KB Output is correct
172 Correct 108 ms 25188 KB Output is correct
173 Correct 93 ms 21456 KB Output is correct
174 Correct 108 ms 21176 KB Output is correct
175 Correct 100 ms 21080 KB Output is correct
176 Correct 79 ms 20512 KB Output is correct
177 Correct 74 ms 21404 KB Output is correct
178 Correct 82 ms 24304 KB Output is correct
179 Correct 91 ms 24264 KB Output is correct
180 Correct 82 ms 23148 KB Output is correct
181 Correct 93 ms 22944 KB Output is correct
182 Correct 4 ms 7452 KB Output is correct
183 Correct 4 ms 7380 KB Output is correct
184 Correct 31 ms 7508 KB Output is correct
185 Correct 67 ms 7552 KB Output is correct
186 Correct 89 ms 7580 KB Output is correct
187 Correct 5 ms 7380 KB Output is correct
188 Correct 5 ms 7380 KB Output is correct
189 Correct 4 ms 7380 KB Output is correct
190 Correct 4 ms 7380 KB Output is correct
191 Correct 4 ms 7380 KB Output is correct
192 Correct 4 ms 7380 KB Output is correct
193 Correct 26 ms 7500 KB Output is correct
194 Correct 27 ms 7380 KB Output is correct
195 Correct 28 ms 7500 KB Output is correct
196 Correct 27 ms 7380 KB Output is correct
197 Correct 29 ms 7380 KB Output is correct
198 Correct 35 ms 7576 KB Output is correct
199 Correct 43 ms 7508 KB Output is correct
200 Correct 29 ms 7508 KB Output is correct
201 Correct 30 ms 7508 KB Output is correct
202 Correct 26 ms 7380 KB Output is correct
203 Correct 14 ms 7380 KB Output is correct
204 Correct 12 ms 7488 KB Output is correct
205 Correct 5 ms 7496 KB Output is correct
206 Correct 4 ms 7380 KB Output is correct
207 Correct 28 ms 7508 KB Output is correct
208 Correct 27 ms 7512 KB Output is correct
209 Correct 14 ms 16852 KB Output is correct
210 Correct 59 ms 21576 KB Output is correct
211 Execution timed out 1085 ms 21040 KB Time limit exceeded
212 Halted 0 ms 0 KB -