Submission #732433

# Submission time Handle Problem Language Result Execution time Memory
732433 2023-04-29T04:14:15 Z minhcool Duathlon (APIO18_duathlon) C++17
62 / 100
1000 ms 23404 KB
#include<bits/stdc++.h>
using namespace std;

#define int long long
#define size sizee
#define fi first
#define se second
#define pb push_back
#define mp make_pair

typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;

const int N = 3e5 + 5;

const int oo = 1e18 + 7, mod = 1e9 + 7;

/*
Ini algo: 
s, c, f is okay
- find the nearest arculation point from s->c
- erase that point
- check if c and f is the same component
*/

int n, m;

vector<int> Adj[N];

bool arcu[N];
int cnt, tim[N], low[N];

void dfs(int u, int p, int root){
	cnt++;
	tim[u] = low[u] = cnt;
	int child = 0;
	for(auto v : Adj[u]){
		if(!tim[v]){
			child++;
			dfs(v, u, root);
			low[u] = min(low[u], low[v]);
			if(u != root && low[v] >= tim[u]) arcu[u] = 1;
		}
		else low[u] = min(low[u], tim[v]);
	}
	if(u == root && child > 1) arcu[u] = 1;
//	cout << u << " " << arcu[u] << "\n";
}

bool vis[N];
int p[N];

int ans = 0;

int where[3005][3005];

int ban;
bool viss[N];
void dfs(int u){
	viss[u] = 1;
	for(auto v : Adj[u]){
		if(viss[v] || v == ban) continue;
		dfs(v);
	}
}

int sz = 0, lst[N];

void dfs2(int u){
	sz++;
	vis[u] = 1;
	for(auto v : Adj[u]){
		if(vis[v]) continue;
		p[v] = u;
		dfs2(v);
	}
}

int tol[3005][3005];

void prep(int u, int root, int cnt){
	tol[root][cnt]++;
	where[root][u] = cnt;
	for(auto v : Adj[u]){
		if(v == root || where[root][v]) continue;
		prep(v, root, cnt);
	}
}

void solve_small(){
	for(int i = 1; i <= n; i++) if(!tim[i]) dfs(i, i, i);
	for(int i = 1; i <= n; i++){
		if(!arcu[i]) continue;
		int cnt = 0;
		for(auto it : Adj[i]){
			if(where[i][it]) continue;
			cnt++;
			prep(it, i, cnt);
		}
	}
	for(int s = 1; s <= n; s++){
		for(int i = 1; i <= n; i++) vis[i] = p[i] = 0;
		sz = 0;
		dfs2(s);
		for(int c = 1; c <= n; c++){
			if(!vis[c]) continue;
			if(c == s) continue;
			//vector<int> path;
			int cc = p[c];
			while(cc != s && where[cc][s] == where[cc][c]) cc = p[cc];
			if(!arcu[cc]){
				ban = -1;
				//cout << 1 << " " << sz << "\n";
				ans += sz - 2;
			//	for(int i = 1; i <= n; i++) viss[i] = 0;
			//	dfs(c);
			}
			else{
				ban = cc; 
				//cout << 2 << " " << tol[cc][where[cc][c]] << "\n";
				ans += tol[cc][where[cc][c]] - 1;
			//	for(int i = 1; i <= n; i++) viss[i] = 0;
			//	dfs(c);
			}
			//cout << s << " " << c << " " << ans << "\n";
		}
	}
}

int size[N];

bool cyc = 0;

void dfss(int u, int p){
	size[u] = 1;
	for(auto v : Adj[u]){
		if(v == p || size[v]){
			if(size[v] && v != p) cyc = 1;
			continue;	
		}
		dfss(v, u);
		size[u] += size[v];
	}
}

void cal(int u, int p, int root){
	for(auto v : Adj[u]){
		if(v == p) continue;
		cal(v, u, root);
	}
	int temp = size[root];
	for(auto v : Adj[u]){
		int x = (v == p ? (size[u] - 1) : size[v]);
		ans += (temp - x - 1) * x;
	}
}

void process(){
	cin >> n >> m;
	for(int i = 1; i <= m; i++){
		int x, y;
		cin >> x >> y;
		Adj[x].pb(y);
		Adj[y].pb(x);
	}	
	if(n <= 1000) solve_small();
	else{
		for(int i = 1; i <= n; i++){
			if(size[i]) continue;
			cyc = 0;
			dfss(i, i);
			if(!cyc) cal(i, i, i);
			else{
				ans += size[i] * (size[i] - 1) * (size[i] - 2);
			}
		}
		//cout << ans << "\n";
	}
	//exit(0);
	//arc::process();
	cout << ans;
}

signed main(){
	ios_base::sync_with_stdio(0);
	process();
}

Compilation message

count_triplets.cpp: In function 'void solve_small()':
count_triplets.cpp:103:45: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
  103 |   for(int i = 1; i <= n; i++) vis[i] = p[i] = 0;
      |                                        ~~~~~^~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7340 KB Output is correct
6 Correct 4 ms 7372 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 4 ms 7324 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7376 KB Output is correct
11 Correct 4 ms 7400 KB Output is correct
12 Correct 3 ms 7372 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 5 ms 7324 KB Output is correct
15 Correct 6 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 4 ms 7380 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 6 ms 7380 KB Output is correct
20 Correct 4 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 4 ms 7380 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 4 ms 7372 KB Output is correct
26 Correct 4 ms 7380 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7376 KB Output is correct
29 Correct 5 ms 7456 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7372 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 4 ms 7404 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7340 KB Output is correct
6 Correct 4 ms 7372 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 4 ms 7324 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7376 KB Output is correct
11 Correct 4 ms 7400 KB Output is correct
12 Correct 3 ms 7372 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 5 ms 7324 KB Output is correct
15 Correct 6 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 4 ms 7380 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 6 ms 7380 KB Output is correct
20 Correct 4 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 4 ms 7380 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 4 ms 7372 KB Output is correct
26 Correct 4 ms 7380 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7376 KB Output is correct
29 Correct 5 ms 7456 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7372 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 4 ms 7404 KB Output is correct
36 Correct 4 ms 7380 KB Output is correct
37 Correct 4 ms 7500 KB Output is correct
38 Correct 4 ms 7504 KB Output is correct
39 Correct 4 ms 7504 KB Output is correct
40 Correct 4 ms 7380 KB Output is correct
41 Correct 4 ms 7376 KB Output is correct
42 Correct 5 ms 7508 KB Output is correct
43 Correct 4 ms 7500 KB Output is correct
44 Correct 4 ms 7500 KB Output is correct
45 Correct 4 ms 7380 KB Output is correct
46 Correct 4 ms 7376 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 5 ms 7380 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 5 ms 7564 KB Output is correct
52 Correct 4 ms 7508 KB Output is correct
53 Correct 4 ms 7380 KB Output is correct
54 Correct 4 ms 7376 KB Output is correct
55 Correct 4 ms 7376 KB Output is correct
56 Correct 5 ms 7380 KB Output is correct
57 Correct 4 ms 7508 KB Output is correct
58 Correct 5 ms 7504 KB Output is correct
59 Correct 4 ms 7380 KB Output is correct
60 Correct 4 ms 7380 KB Output is correct
61 Correct 4 ms 7472 KB Output is correct
62 Correct 4 ms 7380 KB Output is correct
63 Correct 4 ms 7380 KB Output is correct
64 Correct 4 ms 7380 KB Output is correct
65 Correct 4 ms 7508 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 53 ms 18772 KB Output is correct
2 Correct 54 ms 18760 KB Output is correct
3 Correct 61 ms 15652 KB Output is correct
4 Correct 51 ms 17212 KB Output is correct
5 Correct 60 ms 14584 KB Output is correct
6 Correct 54 ms 14560 KB Output is correct
7 Correct 62 ms 13768 KB Output is correct
8 Correct 73 ms 14156 KB Output is correct
9 Correct 48 ms 13100 KB Output is correct
10 Correct 53 ms 13724 KB Output is correct
11 Correct 38 ms 12244 KB Output is correct
12 Correct 53 ms 12100 KB Output is correct
13 Correct 48 ms 12100 KB Output is correct
14 Correct 49 ms 11872 KB Output is correct
15 Correct 29 ms 11332 KB Output is correct
16 Correct 27 ms 11252 KB Output is correct
17 Correct 6 ms 8148 KB Output is correct
18 Correct 6 ms 8140 KB Output is correct
19 Correct 5 ms 8172 KB Output is correct
20 Correct 5 ms 8148 KB Output is correct
21 Correct 5 ms 8148 KB Output is correct
22 Correct 5 ms 8148 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 34 ms 15356 KB Output is correct
2 Correct 35 ms 15636 KB Output is correct
3 Correct 33 ms 15188 KB Output is correct
4 Correct 70 ms 23384 KB Output is correct
5 Correct 58 ms 19412 KB Output is correct
6 Correct 49 ms 18900 KB Output is correct
7 Correct 67 ms 23404 KB Output is correct
8 Correct 64 ms 19532 KB Output is correct
9 Correct 60 ms 18632 KB Output is correct
10 Correct 31 ms 15444 KB Output is correct
11 Correct 29 ms 15484 KB Output is correct
12 Correct 21 ms 15448 KB Output is correct
13 Correct 18 ms 15352 KB Output is correct
14 Correct 12 ms 14456 KB Output is correct
15 Correct 11 ms 13268 KB Output is correct
16 Correct 7 ms 9812 KB Output is correct
17 Correct 14 ms 7524 KB Output is correct
18 Correct 13 ms 7512 KB Output is correct
19 Correct 13 ms 7512 KB Output is correct
20 Correct 12 ms 7516 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 13132 KB Output is correct
2 Correct 64 ms 13084 KB Output is correct
3 Correct 66 ms 13144 KB Output is correct
4 Correct 47 ms 13028 KB Output is correct
5 Correct 47 ms 13036 KB Output is correct
6 Correct 64 ms 15932 KB Output is correct
7 Correct 71 ms 15320 KB Output is correct
8 Correct 57 ms 14620 KB Output is correct
9 Correct 80 ms 14144 KB Output is correct
10 Correct 55 ms 13124 KB Output is correct
11 Correct 48 ms 13072 KB Output is correct
12 Correct 51 ms 13144 KB Output is correct
13 Correct 54 ms 13108 KB Output is correct
14 Correct 62 ms 12696 KB Output is correct
15 Correct 49 ms 12376 KB Output is correct
16 Correct 28 ms 11220 KB Output is correct
17 Correct 35 ms 13288 KB Output is correct
18 Correct 36 ms 13264 KB Output is correct
19 Correct 34 ms 13260 KB Output is correct
20 Correct 38 ms 13320 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 41 ms 15356 KB Output is correct
2 Correct 47 ms 17128 KB Output is correct
3 Correct 54 ms 16412 KB Output is correct
4 Correct 50 ms 14292 KB Output is correct
5 Correct 58 ms 11988 KB Output is correct
6 Correct 68 ms 10804 KB Output is correct
7 Correct 74 ms 10072 KB Output is correct
8 Correct 79 ms 9556 KB Output is correct
9 Correct 87 ms 8788 KB Output is correct
10 Correct 94 ms 8532 KB Output is correct
11 Correct 139 ms 8248 KB Output is correct
12 Correct 55 ms 18360 KB Output is correct
13 Correct 52 ms 17280 KB Output is correct
14 Correct 57 ms 16468 KB Output is correct
15 Correct 57 ms 16340 KB Output is correct
16 Correct 42 ms 14292 KB Output is correct
17 Correct 36 ms 14736 KB Output is correct
18 Correct 24 ms 14292 KB Output is correct
19 Correct 10 ms 12628 KB Output is correct
20 Correct 8 ms 10184 KB Output is correct
21 Correct 32 ms 12752 KB Output is correct
22 Correct 32 ms 13144 KB Output is correct
23 Correct 38 ms 12240 KB Output is correct
24 Correct 36 ms 12392 KB Output is correct
25 Correct 5 ms 7508 KB Output is correct
26 Correct 5 ms 7500 KB Output is correct
27 Correct 5 ms 7376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 61 ms 13132 KB Output is correct
2 Correct 72 ms 13004 KB Output is correct
3 Incorrect 62 ms 13648 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7340 KB Output is correct
6 Correct 4 ms 7372 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 4 ms 7324 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7376 KB Output is correct
11 Correct 4 ms 7400 KB Output is correct
12 Correct 3 ms 7372 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 5 ms 7324 KB Output is correct
15 Correct 6 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 4 ms 7380 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 6 ms 7380 KB Output is correct
20 Correct 4 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 4 ms 7380 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 4 ms 7372 KB Output is correct
26 Correct 4 ms 7380 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7376 KB Output is correct
29 Correct 5 ms 7456 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7372 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 4 ms 7404 KB Output is correct
36 Correct 4 ms 7380 KB Output is correct
37 Correct 4 ms 7500 KB Output is correct
38 Correct 4 ms 7504 KB Output is correct
39 Correct 4 ms 7504 KB Output is correct
40 Correct 4 ms 7380 KB Output is correct
41 Correct 4 ms 7376 KB Output is correct
42 Correct 5 ms 7508 KB Output is correct
43 Correct 4 ms 7500 KB Output is correct
44 Correct 4 ms 7500 KB Output is correct
45 Correct 4 ms 7380 KB Output is correct
46 Correct 4 ms 7376 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 5 ms 7380 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 5 ms 7564 KB Output is correct
52 Correct 4 ms 7508 KB Output is correct
53 Correct 4 ms 7380 KB Output is correct
54 Correct 4 ms 7376 KB Output is correct
55 Correct 4 ms 7376 KB Output is correct
56 Correct 5 ms 7380 KB Output is correct
57 Correct 4 ms 7508 KB Output is correct
58 Correct 5 ms 7504 KB Output is correct
59 Correct 4 ms 7380 KB Output is correct
60 Correct 4 ms 7380 KB Output is correct
61 Correct 4 ms 7472 KB Output is correct
62 Correct 4 ms 7380 KB Output is correct
63 Correct 4 ms 7380 KB Output is correct
64 Correct 4 ms 7380 KB Output is correct
65 Correct 4 ms 7508 KB Output is correct
66 Correct 6 ms 7380 KB Output is correct
67 Correct 8 ms 11092 KB Output is correct
68 Correct 186 ms 12372 KB Output is correct
69 Correct 546 ms 10068 KB Output is correct
70 Correct 770 ms 8788 KB Output is correct
71 Correct 6 ms 9428 KB Output is correct
72 Correct 7 ms 9556 KB Output is correct
73 Correct 7 ms 9324 KB Output is correct
74 Correct 7 ms 9176 KB Output is correct
75 Correct 8 ms 8660 KB Output is correct
76 Correct 5 ms 7380 KB Output is correct
77 Correct 44 ms 12016 KB Output is correct
78 Correct 44 ms 10708 KB Output is correct
79 Correct 60 ms 9088 KB Output is correct
80 Correct 76 ms 8360 KB Output is correct
81 Correct 85 ms 8152 KB Output is correct
82 Correct 421 ms 7648 KB Output is correct
83 Execution timed out 1041 ms 7508 KB Time limit exceeded
84 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 7380 KB Output is correct
2 Correct 4 ms 7380 KB Output is correct
3 Correct 4 ms 7380 KB Output is correct
4 Correct 4 ms 7380 KB Output is correct
5 Correct 4 ms 7340 KB Output is correct
6 Correct 4 ms 7372 KB Output is correct
7 Correct 5 ms 7380 KB Output is correct
8 Correct 4 ms 7324 KB Output is correct
9 Correct 4 ms 7380 KB Output is correct
10 Correct 4 ms 7376 KB Output is correct
11 Correct 4 ms 7400 KB Output is correct
12 Correct 3 ms 7372 KB Output is correct
13 Correct 4 ms 7380 KB Output is correct
14 Correct 5 ms 7324 KB Output is correct
15 Correct 6 ms 7380 KB Output is correct
16 Correct 4 ms 7380 KB Output is correct
17 Correct 4 ms 7380 KB Output is correct
18 Correct 5 ms 7380 KB Output is correct
19 Correct 6 ms 7380 KB Output is correct
20 Correct 4 ms 7380 KB Output is correct
21 Correct 5 ms 7380 KB Output is correct
22 Correct 4 ms 7380 KB Output is correct
23 Correct 4 ms 7380 KB Output is correct
24 Correct 4 ms 7380 KB Output is correct
25 Correct 4 ms 7372 KB Output is correct
26 Correct 4 ms 7380 KB Output is correct
27 Correct 4 ms 7380 KB Output is correct
28 Correct 4 ms 7376 KB Output is correct
29 Correct 5 ms 7456 KB Output is correct
30 Correct 4 ms 7380 KB Output is correct
31 Correct 4 ms 7380 KB Output is correct
32 Correct 4 ms 7380 KB Output is correct
33 Correct 4 ms 7372 KB Output is correct
34 Correct 4 ms 7380 KB Output is correct
35 Correct 4 ms 7404 KB Output is correct
36 Correct 4 ms 7380 KB Output is correct
37 Correct 4 ms 7500 KB Output is correct
38 Correct 4 ms 7504 KB Output is correct
39 Correct 4 ms 7504 KB Output is correct
40 Correct 4 ms 7380 KB Output is correct
41 Correct 4 ms 7376 KB Output is correct
42 Correct 5 ms 7508 KB Output is correct
43 Correct 4 ms 7500 KB Output is correct
44 Correct 4 ms 7500 KB Output is correct
45 Correct 4 ms 7380 KB Output is correct
46 Correct 4 ms 7376 KB Output is correct
47 Correct 4 ms 7380 KB Output is correct
48 Correct 4 ms 7380 KB Output is correct
49 Correct 5 ms 7380 KB Output is correct
50 Correct 4 ms 7380 KB Output is correct
51 Correct 5 ms 7564 KB Output is correct
52 Correct 4 ms 7508 KB Output is correct
53 Correct 4 ms 7380 KB Output is correct
54 Correct 4 ms 7376 KB Output is correct
55 Correct 4 ms 7376 KB Output is correct
56 Correct 5 ms 7380 KB Output is correct
57 Correct 4 ms 7508 KB Output is correct
58 Correct 5 ms 7504 KB Output is correct
59 Correct 4 ms 7380 KB Output is correct
60 Correct 4 ms 7380 KB Output is correct
61 Correct 4 ms 7472 KB Output is correct
62 Correct 4 ms 7380 KB Output is correct
63 Correct 4 ms 7380 KB Output is correct
64 Correct 4 ms 7380 KB Output is correct
65 Correct 4 ms 7508 KB Output is correct
66 Correct 53 ms 18772 KB Output is correct
67 Correct 54 ms 18760 KB Output is correct
68 Correct 61 ms 15652 KB Output is correct
69 Correct 51 ms 17212 KB Output is correct
70 Correct 60 ms 14584 KB Output is correct
71 Correct 54 ms 14560 KB Output is correct
72 Correct 62 ms 13768 KB Output is correct
73 Correct 73 ms 14156 KB Output is correct
74 Correct 48 ms 13100 KB Output is correct
75 Correct 53 ms 13724 KB Output is correct
76 Correct 38 ms 12244 KB Output is correct
77 Correct 53 ms 12100 KB Output is correct
78 Correct 48 ms 12100 KB Output is correct
79 Correct 49 ms 11872 KB Output is correct
80 Correct 29 ms 11332 KB Output is correct
81 Correct 27 ms 11252 KB Output is correct
82 Correct 6 ms 8148 KB Output is correct
83 Correct 6 ms 8140 KB Output is correct
84 Correct 5 ms 8172 KB Output is correct
85 Correct 5 ms 8148 KB Output is correct
86 Correct 5 ms 8148 KB Output is correct
87 Correct 5 ms 8148 KB Output is correct
88 Correct 34 ms 15356 KB Output is correct
89 Correct 35 ms 15636 KB Output is correct
90 Correct 33 ms 15188 KB Output is correct
91 Correct 70 ms 23384 KB Output is correct
92 Correct 58 ms 19412 KB Output is correct
93 Correct 49 ms 18900 KB Output is correct
94 Correct 67 ms 23404 KB Output is correct
95 Correct 64 ms 19532 KB Output is correct
96 Correct 60 ms 18632 KB Output is correct
97 Correct 31 ms 15444 KB Output is correct
98 Correct 29 ms 15484 KB Output is correct
99 Correct 21 ms 15448 KB Output is correct
100 Correct 18 ms 15352 KB Output is correct
101 Correct 12 ms 14456 KB Output is correct
102 Correct 11 ms 13268 KB Output is correct
103 Correct 7 ms 9812 KB Output is correct
104 Correct 14 ms 7524 KB Output is correct
105 Correct 13 ms 7512 KB Output is correct
106 Correct 13 ms 7512 KB Output is correct
107 Correct 12 ms 7516 KB Output is correct
108 Correct 48 ms 13132 KB Output is correct
109 Correct 64 ms 13084 KB Output is correct
110 Correct 66 ms 13144 KB Output is correct
111 Correct 47 ms 13028 KB Output is correct
112 Correct 47 ms 13036 KB Output is correct
113 Correct 64 ms 15932 KB Output is correct
114 Correct 71 ms 15320 KB Output is correct
115 Correct 57 ms 14620 KB Output is correct
116 Correct 80 ms 14144 KB Output is correct
117 Correct 55 ms 13124 KB Output is correct
118 Correct 48 ms 13072 KB Output is correct
119 Correct 51 ms 13144 KB Output is correct
120 Correct 54 ms 13108 KB Output is correct
121 Correct 62 ms 12696 KB Output is correct
122 Correct 49 ms 12376 KB Output is correct
123 Correct 28 ms 11220 KB Output is correct
124 Correct 35 ms 13288 KB Output is correct
125 Correct 36 ms 13264 KB Output is correct
126 Correct 34 ms 13260 KB Output is correct
127 Correct 38 ms 13320 KB Output is correct
128 Correct 41 ms 15356 KB Output is correct
129 Correct 47 ms 17128 KB Output is correct
130 Correct 54 ms 16412 KB Output is correct
131 Correct 50 ms 14292 KB Output is correct
132 Correct 58 ms 11988 KB Output is correct
133 Correct 68 ms 10804 KB Output is correct
134 Correct 74 ms 10072 KB Output is correct
135 Correct 79 ms 9556 KB Output is correct
136 Correct 87 ms 8788 KB Output is correct
137 Correct 94 ms 8532 KB Output is correct
138 Correct 139 ms 8248 KB Output is correct
139 Correct 55 ms 18360 KB Output is correct
140 Correct 52 ms 17280 KB Output is correct
141 Correct 57 ms 16468 KB Output is correct
142 Correct 57 ms 16340 KB Output is correct
143 Correct 42 ms 14292 KB Output is correct
144 Correct 36 ms 14736 KB Output is correct
145 Correct 24 ms 14292 KB Output is correct
146 Correct 10 ms 12628 KB Output is correct
147 Correct 8 ms 10184 KB Output is correct
148 Correct 32 ms 12752 KB Output is correct
149 Correct 32 ms 13144 KB Output is correct
150 Correct 38 ms 12240 KB Output is correct
151 Correct 36 ms 12392 KB Output is correct
152 Correct 5 ms 7508 KB Output is correct
153 Correct 5 ms 7500 KB Output is correct
154 Correct 5 ms 7376 KB Output is correct
155 Correct 61 ms 13132 KB Output is correct
156 Correct 72 ms 13004 KB Output is correct
157 Incorrect 62 ms 13648 KB Output isn't correct
158 Halted 0 ms 0 KB -