Submission #483403

# Submission time Handle Problem Language Result Execution time Memory
483403 2021-10-29T07:58:24 Z 8e7 Duathlon (APIO18_duathlon) C++17
100 / 100
149 ms 48124 KB
//Challenge: Accepted
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <bitset>
#include <deque>
#include <stack>
#include <assert.h>
using namespace std;
void debug(){cout << endl;};
template<class T, class ...U> void debug(T a, U ... b){cout << a << " ", debug(b ...);};
template<class T> void pary(T l, T r) {
	while (l != r) cout << *l << " ", l++;
	cout << endl;
};
#define ll long long
#define maxn 200005
#define mod 1000000007
#define pii pair<int, int>
#define ff first
#define ss second
#define io ios_base::sync_with_stdio(0);cin.tie(0);
vector<int> adj[maxn], tree[maxn], bcc[maxn];
int ti[maxn], low[maxn], cnt, t, id[maxn], siz[maxn], sub[maxn], artcnt[maxn], pa[maxn], root[maxn];
ll val[maxn];
bool art[maxn];
vector<int> stk;
void dfs(int n, int par) {
	low[n] = ti[n] = t++;
	stk.push_back(n);
	for (int v:adj[n]) {
		if (v != par) {
			if (ti[v]) low[n] = min(low[n], ti[v]);
			else {
				dfs(v, n);
				if (low[v] >= ti[n]) {
					cnt++;
					int x;
					do{
						x = stk.back(), stk.pop_back();
						bcc[x].push_back(cnt);
					} while (x != v);
					bcc[n].push_back(cnt);
				}
				low[n] = min(low[n], low[v]);
			}
		}
	}
}
bool vis[maxn];
void build(int n, int par, int r) {
	vis[n] = 1;
	root[n] = r;
	if (art[n]) sub[n] = 1;
	else sub[n] = siz[n];
	pa[n] = par;
	for (int v:tree[n]) {
		if (v != par) {
			build(v, n, r);
			sub[n] += sub[v] - 1;
		}
	}
	//debug(n, sub[n]);
}
int main() {
	io
	int n, m;
	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);
	}
	t = 1;
	for (int i = 1;i <= n;i++) {
		if (!ti[i]) stk.clear(), dfs(i, 0);
	}
	for (int i = 1;i <= n;i++) {
		if (!bcc[i].size()) continue;
		if (bcc[i].size() > 1) {
			cnt++;
			for (int v:bcc[i]) {
				tree[v].push_back(cnt);
				tree[cnt].push_back(v);	
				siz[v]++, artcnt[v]++;
			}
			id[i] = cnt;
			art[id[i]] = 1;
		} else {
			id[i] = bcc[i].back();	
			siz[bcc[i].back()]++;
		}
		//debug("id", i, id[i]);
	}
	for (int i = 1;i <= cnt;i++) {
		if (!vis[i]) build(i, 0, i);
	}
	for (int i = 1;i <= cnt;i++) {
		if (art[i]) continue;
		for (int v:tree[i]) {
			ll s = (v == pa[i] ? (sub[root[i]] - sub[i] + 1) : sub[v]);
			val[i] += s * (s - 1);
		}
	}
	ll ans = 0, prv = 0;
	for (int i = 1;i <= n;i++) {
		if (!bcc[i].size()) continue;
		int cur = id[i];
		ll tot = sub[root[cur]];
		ans += (tot - 1) * (tot - 2);
		if (art[cur]) {
			for (int v:tree[cur]) { 
				ll s = (v == pa[cur] ? sub[cur] : (tot - sub[v] + 1));
				ans -= val[v] - (s * (s - 1));
			}
		} else {
			ans -= val[cur];
		}
		//debug(i, ans - prv);
		prv = ans;
	}	
	cout << ans << endl;
}
/*
4 3
1 2
2 3
3 4

4 4
1 2
2 3
3 4
4 2

5 4
1 2
2 3
3 4
4 5
5 2
*/

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:107:14: warning: variable 'prv' set but not used [-Wunused-but-set-variable]
  107 |  ll ans = 0, prv = 0;
      |              ^~~
# Verdict Execution time Memory Grader output
1 Correct 7 ms 14412 KB Output is correct
2 Correct 7 ms 14408 KB Output is correct
3 Correct 8 ms 14412 KB Output is correct
4 Correct 8 ms 14416 KB Output is correct
5 Correct 9 ms 14412 KB Output is correct
6 Correct 8 ms 14412 KB Output is correct
7 Correct 8 ms 14436 KB Output is correct
8 Correct 8 ms 14412 KB Output is correct
9 Correct 10 ms 14412 KB Output is correct
10 Correct 7 ms 14412 KB Output is correct
11 Correct 7 ms 14412 KB Output is correct
12 Correct 8 ms 14412 KB Output is correct
13 Correct 8 ms 14392 KB Output is correct
14 Correct 7 ms 14420 KB Output is correct
15 Correct 7 ms 14420 KB Output is correct
16 Correct 7 ms 14412 KB Output is correct
17 Correct 7 ms 14412 KB Output is correct
18 Correct 7 ms 14412 KB Output is correct
19 Correct 7 ms 14416 KB Output is correct
20 Correct 7 ms 14388 KB Output is correct
21 Correct 9 ms 14412 KB Output is correct
22 Correct 9 ms 14412 KB Output is correct
23 Correct 7 ms 14448 KB Output is correct
24 Correct 8 ms 14416 KB Output is correct
25 Correct 8 ms 14392 KB Output is correct
26 Correct 7 ms 14412 KB Output is correct
27 Correct 7 ms 14412 KB Output is correct
28 Correct 10 ms 14412 KB Output is correct
29 Correct 7 ms 14420 KB Output is correct
30 Correct 7 ms 14348 KB Output is correct
31 Correct 7 ms 14412 KB Output is correct
32 Correct 7 ms 14412 KB Output is correct
33 Correct 7 ms 14408 KB Output is correct
34 Correct 10 ms 14428 KB Output is correct
35 Correct 9 ms 14416 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 14412 KB Output is correct
2 Correct 7 ms 14408 KB Output is correct
3 Correct 8 ms 14412 KB Output is correct
4 Correct 8 ms 14416 KB Output is correct
5 Correct 9 ms 14412 KB Output is correct
6 Correct 8 ms 14412 KB Output is correct
7 Correct 8 ms 14436 KB Output is correct
8 Correct 8 ms 14412 KB Output is correct
9 Correct 10 ms 14412 KB Output is correct
10 Correct 7 ms 14412 KB Output is correct
11 Correct 7 ms 14412 KB Output is correct
12 Correct 8 ms 14412 KB Output is correct
13 Correct 8 ms 14392 KB Output is correct
14 Correct 7 ms 14420 KB Output is correct
15 Correct 7 ms 14420 KB Output is correct
16 Correct 7 ms 14412 KB Output is correct
17 Correct 7 ms 14412 KB Output is correct
18 Correct 7 ms 14412 KB Output is correct
19 Correct 7 ms 14416 KB Output is correct
20 Correct 7 ms 14388 KB Output is correct
21 Correct 9 ms 14412 KB Output is correct
22 Correct 9 ms 14412 KB Output is correct
23 Correct 7 ms 14448 KB Output is correct
24 Correct 8 ms 14416 KB Output is correct
25 Correct 8 ms 14392 KB Output is correct
26 Correct 7 ms 14412 KB Output is correct
27 Correct 7 ms 14412 KB Output is correct
28 Correct 10 ms 14412 KB Output is correct
29 Correct 7 ms 14420 KB Output is correct
30 Correct 7 ms 14348 KB Output is correct
31 Correct 7 ms 14412 KB Output is correct
32 Correct 7 ms 14412 KB Output is correct
33 Correct 7 ms 14408 KB Output is correct
34 Correct 10 ms 14428 KB Output is correct
35 Correct 9 ms 14416 KB Output is correct
36 Correct 7 ms 14412 KB Output is correct
37 Correct 7 ms 14384 KB Output is correct
38 Correct 7 ms 14412 KB Output is correct
39 Correct 7 ms 14412 KB Output is correct
40 Correct 7 ms 14412 KB Output is correct
41 Correct 7 ms 14412 KB Output is correct
42 Correct 7 ms 14412 KB Output is correct
43 Correct 7 ms 14352 KB Output is correct
44 Correct 8 ms 14412 KB Output is correct
45 Correct 7 ms 14412 KB Output is correct
46 Correct 8 ms 14412 KB Output is correct
47 Correct 8 ms 14412 KB Output is correct
48 Correct 7 ms 14412 KB Output is correct
49 Correct 7 ms 14412 KB Output is correct
50 Correct 7 ms 14412 KB Output is correct
51 Correct 9 ms 14380 KB Output is correct
52 Correct 8 ms 14456 KB Output is correct
53 Correct 9 ms 14420 KB Output is correct
54 Correct 8 ms 14396 KB Output is correct
55 Correct 8 ms 14416 KB Output is correct
56 Correct 7 ms 14412 KB Output is correct
57 Correct 7 ms 14356 KB Output is correct
58 Correct 7 ms 14412 KB Output is correct
59 Correct 7 ms 14412 KB Output is correct
60 Correct 9 ms 14436 KB Output is correct
61 Correct 7 ms 14476 KB Output is correct
62 Correct 7 ms 14412 KB Output is correct
63 Correct 7 ms 14412 KB Output is correct
64 Correct 7 ms 14412 KB Output is correct
65 Correct 10 ms 14416 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 81 ms 31592 KB Output is correct
2 Correct 63 ms 31652 KB Output is correct
3 Correct 97 ms 35036 KB Output is correct
4 Correct 83 ms 31736 KB Output is correct
5 Correct 83 ms 30584 KB Output is correct
6 Correct 126 ms 36400 KB Output is correct
7 Correct 124 ms 31364 KB Output is correct
8 Correct 105 ms 33864 KB Output is correct
9 Correct 103 ms 29820 KB Output is correct
10 Correct 111 ms 29880 KB Output is correct
11 Correct 70 ms 25376 KB Output is correct
12 Correct 67 ms 25284 KB Output is correct
13 Correct 58 ms 24612 KB Output is correct
14 Correct 60 ms 24440 KB Output is correct
15 Correct 49 ms 22724 KB Output is correct
16 Correct 44 ms 22596 KB Output is correct
17 Correct 8 ms 15564 KB Output is correct
18 Correct 8 ms 15564 KB Output is correct
19 Correct 9 ms 15564 KB Output is correct
20 Correct 9 ms 15564 KB Output is correct
21 Correct 9 ms 15572 KB Output is correct
22 Correct 8 ms 15456 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 14540 KB Output is correct
2 Correct 7 ms 14540 KB Output is correct
3 Correct 8 ms 14588 KB Output is correct
4 Correct 8 ms 14676 KB Output is correct
5 Correct 7 ms 14668 KB Output is correct
6 Correct 7 ms 14616 KB Output is correct
7 Correct 8 ms 14668 KB Output is correct
8 Correct 8 ms 14644 KB Output is correct
9 Correct 8 ms 14540 KB Output is correct
10 Correct 8 ms 14584 KB Output is correct
11 Correct 7 ms 14540 KB Output is correct
12 Correct 8 ms 14540 KB Output is correct
13 Correct 7 ms 14580 KB Output is correct
14 Correct 8 ms 14596 KB Output is correct
15 Correct 8 ms 14540 KB Output is correct
16 Correct 7 ms 14540 KB Output is correct
17 Correct 7 ms 14540 KB Output is correct
18 Correct 8 ms 14540 KB Output is correct
19 Correct 8 ms 14540 KB Output is correct
20 Correct 8 ms 14540 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 107 ms 30324 KB Output is correct
2 Correct 108 ms 30344 KB Output is correct
3 Correct 109 ms 30356 KB Output is correct
4 Correct 112 ms 30396 KB Output is correct
5 Correct 106 ms 30404 KB Output is correct
6 Correct 149 ms 48124 KB Output is correct
7 Correct 130 ms 37048 KB Output is correct
8 Correct 135 ms 35300 KB Output is correct
9 Correct 128 ms 33788 KB Output is correct
10 Correct 104 ms 30320 KB Output is correct
11 Correct 103 ms 30368 KB Output is correct
12 Correct 107 ms 30404 KB Output is correct
13 Correct 112 ms 30404 KB Output is correct
14 Correct 95 ms 29380 KB Output is correct
15 Correct 83 ms 28212 KB Output is correct
16 Correct 47 ms 23748 KB Output is correct
17 Correct 58 ms 29020 KB Output is correct
18 Correct 57 ms 28948 KB Output is correct
19 Correct 58 ms 29124 KB Output is correct
20 Correct 65 ms 29012 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14540 KB Output is correct
2 Correct 8 ms 14548 KB Output is correct
3 Correct 7 ms 14540 KB Output is correct
4 Correct 8 ms 14552 KB Output is correct
5 Correct 8 ms 14540 KB Output is correct
6 Correct 7 ms 14540 KB Output is correct
7 Correct 7 ms 14540 KB Output is correct
8 Correct 8 ms 14540 KB Output is correct
9 Correct 7 ms 14540 KB Output is correct
10 Correct 8 ms 14540 KB Output is correct
11 Correct 8 ms 14556 KB Output is correct
12 Correct 8 ms 14676 KB Output is correct
13 Correct 8 ms 14668 KB Output is correct
14 Correct 8 ms 14540 KB Output is correct
15 Correct 8 ms 14556 KB Output is correct
16 Correct 7 ms 14540 KB Output is correct
17 Correct 8 ms 14540 KB Output is correct
18 Correct 9 ms 14668 KB Output is correct
19 Correct 9 ms 14540 KB Output is correct
20 Correct 7 ms 14540 KB Output is correct
21 Correct 8 ms 14540 KB Output is correct
22 Correct 8 ms 14540 KB Output is correct
23 Correct 7 ms 14540 KB Output is correct
24 Correct 9 ms 14552 KB Output is correct
25 Correct 8 ms 14456 KB Output is correct
26 Correct 7 ms 14420 KB Output is correct
27 Correct 7 ms 14412 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 107 ms 30420 KB Output is correct
2 Correct 122 ms 30736 KB Output is correct
3 Correct 143 ms 29544 KB Output is correct
4 Correct 125 ms 28956 KB Output is correct
5 Correct 87 ms 26564 KB Output is correct
6 Correct 78 ms 25580 KB Output is correct
7 Correct 75 ms 25020 KB Output is correct
8 Correct 81 ms 24388 KB Output is correct
9 Correct 112 ms 24184 KB Output is correct
10 Correct 84 ms 23876 KB Output is correct
11 Correct 68 ms 23620 KB Output is correct
12 Correct 77 ms 23492 KB Output is correct
13 Correct 66 ms 23512 KB Output is correct
14 Correct 67 ms 25808 KB Output is correct
15 Correct 132 ms 37532 KB Output is correct
16 Correct 140 ms 35152 KB Output is correct
17 Correct 123 ms 35372 KB Output is correct
18 Correct 118 ms 33476 KB Output is correct
19 Correct 101 ms 29124 KB Output is correct
20 Correct 113 ms 29000 KB Output is correct
21 Correct 100 ms 28996 KB Output is correct
22 Correct 88 ms 27592 KB Output is correct
23 Correct 81 ms 25872 KB Output is correct
24 Correct 94 ms 30380 KB Output is correct
25 Correct 99 ms 30404 KB Output is correct
26 Correct 90 ms 29376 KB Output is correct
27 Correct 95 ms 29392 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 14412 KB Output is correct
2 Correct 7 ms 14408 KB Output is correct
3 Correct 8 ms 14412 KB Output is correct
4 Correct 8 ms 14416 KB Output is correct
5 Correct 9 ms 14412 KB Output is correct
6 Correct 8 ms 14412 KB Output is correct
7 Correct 8 ms 14436 KB Output is correct
8 Correct 8 ms 14412 KB Output is correct
9 Correct 10 ms 14412 KB Output is correct
10 Correct 7 ms 14412 KB Output is correct
11 Correct 7 ms 14412 KB Output is correct
12 Correct 8 ms 14412 KB Output is correct
13 Correct 8 ms 14392 KB Output is correct
14 Correct 7 ms 14420 KB Output is correct
15 Correct 7 ms 14420 KB Output is correct
16 Correct 7 ms 14412 KB Output is correct
17 Correct 7 ms 14412 KB Output is correct
18 Correct 7 ms 14412 KB Output is correct
19 Correct 7 ms 14416 KB Output is correct
20 Correct 7 ms 14388 KB Output is correct
21 Correct 9 ms 14412 KB Output is correct
22 Correct 9 ms 14412 KB Output is correct
23 Correct 7 ms 14448 KB Output is correct
24 Correct 8 ms 14416 KB Output is correct
25 Correct 8 ms 14392 KB Output is correct
26 Correct 7 ms 14412 KB Output is correct
27 Correct 7 ms 14412 KB Output is correct
28 Correct 10 ms 14412 KB Output is correct
29 Correct 7 ms 14420 KB Output is correct
30 Correct 7 ms 14348 KB Output is correct
31 Correct 7 ms 14412 KB Output is correct
32 Correct 7 ms 14412 KB Output is correct
33 Correct 7 ms 14408 KB Output is correct
34 Correct 10 ms 14428 KB Output is correct
35 Correct 9 ms 14416 KB Output is correct
36 Correct 7 ms 14412 KB Output is correct
37 Correct 7 ms 14384 KB Output is correct
38 Correct 7 ms 14412 KB Output is correct
39 Correct 7 ms 14412 KB Output is correct
40 Correct 7 ms 14412 KB Output is correct
41 Correct 7 ms 14412 KB Output is correct
42 Correct 7 ms 14412 KB Output is correct
43 Correct 7 ms 14352 KB Output is correct
44 Correct 8 ms 14412 KB Output is correct
45 Correct 7 ms 14412 KB Output is correct
46 Correct 8 ms 14412 KB Output is correct
47 Correct 8 ms 14412 KB Output is correct
48 Correct 7 ms 14412 KB Output is correct
49 Correct 7 ms 14412 KB Output is correct
50 Correct 7 ms 14412 KB Output is correct
51 Correct 9 ms 14380 KB Output is correct
52 Correct 8 ms 14456 KB Output is correct
53 Correct 9 ms 14420 KB Output is correct
54 Correct 8 ms 14396 KB Output is correct
55 Correct 8 ms 14416 KB Output is correct
56 Correct 7 ms 14412 KB Output is correct
57 Correct 7 ms 14356 KB Output is correct
58 Correct 7 ms 14412 KB Output is correct
59 Correct 7 ms 14412 KB Output is correct
60 Correct 9 ms 14436 KB Output is correct
61 Correct 7 ms 14476 KB Output is correct
62 Correct 7 ms 14412 KB Output is correct
63 Correct 7 ms 14412 KB Output is correct
64 Correct 7 ms 14412 KB Output is correct
65 Correct 10 ms 14416 KB Output is correct
66 Correct 7 ms 14412 KB Output is correct
67 Correct 7 ms 14484 KB Output is correct
68 Correct 8 ms 14588 KB Output is correct
69 Correct 9 ms 14540 KB Output is correct
70 Correct 8 ms 14540 KB Output is correct
71 Correct 8 ms 14540 KB Output is correct
72 Correct 7 ms 14540 KB Output is correct
73 Correct 8 ms 14540 KB Output is correct
74 Correct 7 ms 14516 KB Output is correct
75 Correct 8 ms 14560 KB Output is correct
76 Correct 7 ms 14412 KB Output is correct
77 Correct 8 ms 14540 KB Output is correct
78 Correct 8 ms 14556 KB Output is correct
79 Correct 7 ms 14540 KB Output is correct
80 Correct 8 ms 14556 KB Output is correct
81 Correct 8 ms 14556 KB Output is correct
82 Correct 8 ms 14568 KB Output is correct
83 Correct 7 ms 14620 KB Output is correct
84 Correct 7 ms 14540 KB Output is correct
85 Correct 7 ms 14572 KB Output is correct
86 Correct 8 ms 14540 KB Output is correct
87 Correct 8 ms 14468 KB Output is correct
88 Correct 8 ms 14556 KB Output is correct
89 Correct 8 ms 14552 KB Output is correct
90 Correct 8 ms 14488 KB Output is correct
91 Correct 7 ms 14572 KB Output is correct
92 Correct 8 ms 14556 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 14412 KB Output is correct
2 Correct 7 ms 14408 KB Output is correct
3 Correct 8 ms 14412 KB Output is correct
4 Correct 8 ms 14416 KB Output is correct
5 Correct 9 ms 14412 KB Output is correct
6 Correct 8 ms 14412 KB Output is correct
7 Correct 8 ms 14436 KB Output is correct
8 Correct 8 ms 14412 KB Output is correct
9 Correct 10 ms 14412 KB Output is correct
10 Correct 7 ms 14412 KB Output is correct
11 Correct 7 ms 14412 KB Output is correct
12 Correct 8 ms 14412 KB Output is correct
13 Correct 8 ms 14392 KB Output is correct
14 Correct 7 ms 14420 KB Output is correct
15 Correct 7 ms 14420 KB Output is correct
16 Correct 7 ms 14412 KB Output is correct
17 Correct 7 ms 14412 KB Output is correct
18 Correct 7 ms 14412 KB Output is correct
19 Correct 7 ms 14416 KB Output is correct
20 Correct 7 ms 14388 KB Output is correct
21 Correct 9 ms 14412 KB Output is correct
22 Correct 9 ms 14412 KB Output is correct
23 Correct 7 ms 14448 KB Output is correct
24 Correct 8 ms 14416 KB Output is correct
25 Correct 8 ms 14392 KB Output is correct
26 Correct 7 ms 14412 KB Output is correct
27 Correct 7 ms 14412 KB Output is correct
28 Correct 10 ms 14412 KB Output is correct
29 Correct 7 ms 14420 KB Output is correct
30 Correct 7 ms 14348 KB Output is correct
31 Correct 7 ms 14412 KB Output is correct
32 Correct 7 ms 14412 KB Output is correct
33 Correct 7 ms 14408 KB Output is correct
34 Correct 10 ms 14428 KB Output is correct
35 Correct 9 ms 14416 KB Output is correct
36 Correct 7 ms 14412 KB Output is correct
37 Correct 7 ms 14384 KB Output is correct
38 Correct 7 ms 14412 KB Output is correct
39 Correct 7 ms 14412 KB Output is correct
40 Correct 7 ms 14412 KB Output is correct
41 Correct 7 ms 14412 KB Output is correct
42 Correct 7 ms 14412 KB Output is correct
43 Correct 7 ms 14352 KB Output is correct
44 Correct 8 ms 14412 KB Output is correct
45 Correct 7 ms 14412 KB Output is correct
46 Correct 8 ms 14412 KB Output is correct
47 Correct 8 ms 14412 KB Output is correct
48 Correct 7 ms 14412 KB Output is correct
49 Correct 7 ms 14412 KB Output is correct
50 Correct 7 ms 14412 KB Output is correct
51 Correct 9 ms 14380 KB Output is correct
52 Correct 8 ms 14456 KB Output is correct
53 Correct 9 ms 14420 KB Output is correct
54 Correct 8 ms 14396 KB Output is correct
55 Correct 8 ms 14416 KB Output is correct
56 Correct 7 ms 14412 KB Output is correct
57 Correct 7 ms 14356 KB Output is correct
58 Correct 7 ms 14412 KB Output is correct
59 Correct 7 ms 14412 KB Output is correct
60 Correct 9 ms 14436 KB Output is correct
61 Correct 7 ms 14476 KB Output is correct
62 Correct 7 ms 14412 KB Output is correct
63 Correct 7 ms 14412 KB Output is correct
64 Correct 7 ms 14412 KB Output is correct
65 Correct 10 ms 14416 KB Output is correct
66 Correct 81 ms 31592 KB Output is correct
67 Correct 63 ms 31652 KB Output is correct
68 Correct 97 ms 35036 KB Output is correct
69 Correct 83 ms 31736 KB Output is correct
70 Correct 83 ms 30584 KB Output is correct
71 Correct 126 ms 36400 KB Output is correct
72 Correct 124 ms 31364 KB Output is correct
73 Correct 105 ms 33864 KB Output is correct
74 Correct 103 ms 29820 KB Output is correct
75 Correct 111 ms 29880 KB Output is correct
76 Correct 70 ms 25376 KB Output is correct
77 Correct 67 ms 25284 KB Output is correct
78 Correct 58 ms 24612 KB Output is correct
79 Correct 60 ms 24440 KB Output is correct
80 Correct 49 ms 22724 KB Output is correct
81 Correct 44 ms 22596 KB Output is correct
82 Correct 8 ms 15564 KB Output is correct
83 Correct 8 ms 15564 KB Output is correct
84 Correct 9 ms 15564 KB Output is correct
85 Correct 9 ms 15564 KB Output is correct
86 Correct 9 ms 15572 KB Output is correct
87 Correct 8 ms 15456 KB Output is correct
88 Correct 9 ms 14540 KB Output is correct
89 Correct 7 ms 14540 KB Output is correct
90 Correct 8 ms 14588 KB Output is correct
91 Correct 8 ms 14676 KB Output is correct
92 Correct 7 ms 14668 KB Output is correct
93 Correct 7 ms 14616 KB Output is correct
94 Correct 8 ms 14668 KB Output is correct
95 Correct 8 ms 14644 KB Output is correct
96 Correct 8 ms 14540 KB Output is correct
97 Correct 8 ms 14584 KB Output is correct
98 Correct 7 ms 14540 KB Output is correct
99 Correct 8 ms 14540 KB Output is correct
100 Correct 7 ms 14580 KB Output is correct
101 Correct 8 ms 14596 KB Output is correct
102 Correct 8 ms 14540 KB Output is correct
103 Correct 7 ms 14540 KB Output is correct
104 Correct 7 ms 14540 KB Output is correct
105 Correct 8 ms 14540 KB Output is correct
106 Correct 8 ms 14540 KB Output is correct
107 Correct 8 ms 14540 KB Output is correct
108 Correct 107 ms 30324 KB Output is correct
109 Correct 108 ms 30344 KB Output is correct
110 Correct 109 ms 30356 KB Output is correct
111 Correct 112 ms 30396 KB Output is correct
112 Correct 106 ms 30404 KB Output is correct
113 Correct 149 ms 48124 KB Output is correct
114 Correct 130 ms 37048 KB Output is correct
115 Correct 135 ms 35300 KB Output is correct
116 Correct 128 ms 33788 KB Output is correct
117 Correct 104 ms 30320 KB Output is correct
118 Correct 103 ms 30368 KB Output is correct
119 Correct 107 ms 30404 KB Output is correct
120 Correct 112 ms 30404 KB Output is correct
121 Correct 95 ms 29380 KB Output is correct
122 Correct 83 ms 28212 KB Output is correct
123 Correct 47 ms 23748 KB Output is correct
124 Correct 58 ms 29020 KB Output is correct
125 Correct 57 ms 28948 KB Output is correct
126 Correct 58 ms 29124 KB Output is correct
127 Correct 65 ms 29012 KB Output is correct
128 Correct 8 ms 14540 KB Output is correct
129 Correct 8 ms 14548 KB Output is correct
130 Correct 7 ms 14540 KB Output is correct
131 Correct 8 ms 14552 KB Output is correct
132 Correct 8 ms 14540 KB Output is correct
133 Correct 7 ms 14540 KB Output is correct
134 Correct 7 ms 14540 KB Output is correct
135 Correct 8 ms 14540 KB Output is correct
136 Correct 7 ms 14540 KB Output is correct
137 Correct 8 ms 14540 KB Output is correct
138 Correct 8 ms 14556 KB Output is correct
139 Correct 8 ms 14676 KB Output is correct
140 Correct 8 ms 14668 KB Output is correct
141 Correct 8 ms 14540 KB Output is correct
142 Correct 8 ms 14556 KB Output is correct
143 Correct 7 ms 14540 KB Output is correct
144 Correct 8 ms 14540 KB Output is correct
145 Correct 9 ms 14668 KB Output is correct
146 Correct 9 ms 14540 KB Output is correct
147 Correct 7 ms 14540 KB Output is correct
148 Correct 8 ms 14540 KB Output is correct
149 Correct 8 ms 14540 KB Output is correct
150 Correct 7 ms 14540 KB Output is correct
151 Correct 9 ms 14552 KB Output is correct
152 Correct 8 ms 14456 KB Output is correct
153 Correct 7 ms 14420 KB Output is correct
154 Correct 7 ms 14412 KB Output is correct
155 Correct 107 ms 30420 KB Output is correct
156 Correct 122 ms 30736 KB Output is correct
157 Correct 143 ms 29544 KB Output is correct
158 Correct 125 ms 28956 KB Output is correct
159 Correct 87 ms 26564 KB Output is correct
160 Correct 78 ms 25580 KB Output is correct
161 Correct 75 ms 25020 KB Output is correct
162 Correct 81 ms 24388 KB Output is correct
163 Correct 112 ms 24184 KB Output is correct
164 Correct 84 ms 23876 KB Output is correct
165 Correct 68 ms 23620 KB Output is correct
166 Correct 77 ms 23492 KB Output is correct
167 Correct 66 ms 23512 KB Output is correct
168 Correct 67 ms 25808 KB Output is correct
169 Correct 132 ms 37532 KB Output is correct
170 Correct 140 ms 35152 KB Output is correct
171 Correct 123 ms 35372 KB Output is correct
172 Correct 118 ms 33476 KB Output is correct
173 Correct 101 ms 29124 KB Output is correct
174 Correct 113 ms 29000 KB Output is correct
175 Correct 100 ms 28996 KB Output is correct
176 Correct 88 ms 27592 KB Output is correct
177 Correct 81 ms 25872 KB Output is correct
178 Correct 94 ms 30380 KB Output is correct
179 Correct 99 ms 30404 KB Output is correct
180 Correct 90 ms 29376 KB Output is correct
181 Correct 95 ms 29392 KB Output is correct
182 Correct 7 ms 14412 KB Output is correct
183 Correct 7 ms 14484 KB Output is correct
184 Correct 8 ms 14588 KB Output is correct
185 Correct 9 ms 14540 KB Output is correct
186 Correct 8 ms 14540 KB Output is correct
187 Correct 8 ms 14540 KB Output is correct
188 Correct 7 ms 14540 KB Output is correct
189 Correct 8 ms 14540 KB Output is correct
190 Correct 7 ms 14516 KB Output is correct
191 Correct 8 ms 14560 KB Output is correct
192 Correct 7 ms 14412 KB Output is correct
193 Correct 8 ms 14540 KB Output is correct
194 Correct 8 ms 14556 KB Output is correct
195 Correct 7 ms 14540 KB Output is correct
196 Correct 8 ms 14556 KB Output is correct
197 Correct 8 ms 14556 KB Output is correct
198 Correct 8 ms 14568 KB Output is correct
199 Correct 7 ms 14620 KB Output is correct
200 Correct 7 ms 14540 KB Output is correct
201 Correct 7 ms 14572 KB Output is correct
202 Correct 8 ms 14540 KB Output is correct
203 Correct 8 ms 14468 KB Output is correct
204 Correct 8 ms 14556 KB Output is correct
205 Correct 8 ms 14552 KB Output is correct
206 Correct 8 ms 14488 KB Output is correct
207 Correct 7 ms 14572 KB Output is correct
208 Correct 8 ms 14556 KB Output is correct
209 Correct 9 ms 15180 KB Output is correct
210 Correct 53 ms 24128 KB Output is correct
211 Correct 79 ms 28484 KB Output is correct
212 Correct 95 ms 30216 KB Output is correct
213 Correct 103 ms 31752 KB Output is correct
214 Correct 46 ms 26052 KB Output is correct
215 Correct 49 ms 25268 KB Output is correct
216 Correct 101 ms 29280 KB Output is correct
217 Correct 93 ms 27040 KB Output is correct
218 Correct 73 ms 24564 KB Output is correct
219 Correct 68 ms 23788 KB Output is correct
220 Correct 69 ms 23620 KB Output is correct
221 Correct 71 ms 23476 KB Output is correct
222 Correct 64 ms 24644 KB Output is correct
223 Correct 100 ms 30096 KB Output is correct
224 Correct 96 ms 29120 KB Output is correct
225 Correct 91 ms 26584 KB Output is correct
226 Correct 92 ms 26660 KB Output is correct
227 Correct 87 ms 26616 KB Output is correct
228 Correct 77 ms 25744 KB Output is correct
229 Correct 69 ms 24616 KB Output is correct
230 Correct 78 ms 26620 KB Output is correct
231 Correct 80 ms 26652 KB Output is correct