답안 #525859

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
525859 2022-02-13T04:00:30 Z koioi.org-koosaga Mountains and Valleys (CCO20_day1problem3) C++17
13 / 25
742 ms 25480 KB
#include <bits/stdc++.h>
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
using namespace std;
typedef long long lint;
typedef pair<lint, lint> pi;
const int MAXN = 500005;

struct edge{
	int s, e, x;
};

int n, m;
vector<int> gph[MAXN];
int par[20][MAXN], dep[MAXN];

int lca(int x, int y){
	if(dep[x] > dep[y]) swap(x, y);
	int dx = dep[y] - dep[x];
	for(int i = 0; dx; i++){
		if(dx & 1) y = par[i][y];
		dx >>= 1;
	}
	for(int i = 19; i >= 0; i--){
		if(par[i][x] != par[i][y]){
			x = par[i][x];
			y = par[i][y];
		}
	}
	if(x != y) return par[0][x];
	return x;
}

vector<int> ord;
int din[MAXN], dout[MAXN], piv;
int f[MAXN], far[MAXN], diam[MAXN], pfar[MAXN];
vector<pi> fars[MAXN];

bool in(int u, int v){
	return din[u] <= din[v] && dout[v] <= dout[u];
}

void dfs(int x, int p = -1){
	ord.push_back(x);
	din[x] = ++piv;
	for(auto &y : gph[x]){
		if(y == p) continue;
		par[0][y] = x;
		dep[y] = dep[x] + 1;
		dfs(y, x);
	}
	dout[x] = piv;
}

bool vis[MAXN];

pi dfsl(int x, int p = -1){
	pi ret(0, x);
	for(auto &y : gph[x]){
		if(y == p || vis[y]) continue;
		auto ans = dfsl(y, x);
		ans.first++;
		ret = max(ret, ans);
	}
	return ret;
}

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin >> n >> m;
	vector<edge> qry;
	for(int i = 0; i < m; i++){
		int s, e, x; cin >> s >> e >> x;
		if(x == 1){
			gph[s].push_back(e);
			gph[e].push_back(s);
		}
		else{
			qry.push_back({s, e, x});
		}
	}
	dfs(0);
	for(int i = 1; i < 20; i++){
		for(int j = 0; j < n; j++){
			par[i][j] = par[i-1][par[i-1][j]];
		}
	}
	{
		for(int i = 0; i < n; i++){
			if(dep[i] >= 2){
				vis[i] = 1;
				vis[par[1][i]] = 1;
				f[i] = dfsl(dfsl(par[0][i]).second).first;
				vis[i] = 0;
				vis[par[1][i]] = 0;
			}
		}
		reverse(all(ord));
		for(auto &i : ord){
			for(auto &j : gph[i]){
				if(j == par[0][i]) continue;
				far[i] = max(far[i], far[j] + 1);
				diam[i] = max({diam[i], diam[j], far[j] + 1});
				fars[i].emplace_back(far[j], j);
			}
			sort(all(fars[i]));
			reverse(all(fars[i]));
			if(sz(fars[i]) >= 2) diam[i] = max(diam[i], (int)fars[i][0].first + (int)fars[i][1].first + 2);
		}
		reverse(all(ord));
		for(auto &i : ord){
			if(i == 0) continue;
			for(auto &j : fars[par[0][i]]){
				if(j.second == i) continue;
				pfar[i] = j.first + 1;
				break;
			}
			fars[i].emplace_back(pfar[i], par[0][i]);
			sort(all(fars[i]));
			reverse(all(fars[i]));
		}
	}
	int ans = 2 * n - 2 - diam[0];
	for(auto &x : qry){
		int l = lca(x.s, x.e);
		vector<int> v, w;
		for(int i = x.s; i != l; i = par[0][i]) v.push_back(i);
		for(int i = x.e; i != l; i = par[0][i]) w.push_back(i);
		reverse(all(w));
		v.push_back(l);
		for(auto &i : w) v.push_back(i);
		for(auto &i : v) vis[i] = 1;
		vector<int> val;
		vector<int> ndiam;
		int maxPath = -1e9;
		for(int i = x.s; dep[i] >= dep[l] + 2; i = par[0][i]) maxPath = max(maxPath, f[i] - 3 + sz(v));
		for(int i = x.e; dep[i] >= dep[l] + 2; i = par[0][i]) maxPath = max(maxPath, f[i] - 3 + sz(v));
		if(l != x.s){
			maxPath = max(maxPath, diam[x.s] - 3 + sz(v));
		}
		if(l != x.e){
			maxPath = max(maxPath, diam[x.e] - 3 + sz(v));
		}
		{
			int new_diam = 0;
			int cnt = 0;
			for(auto &[d, v] : fars[l]){
				if((in(v, x.s) || in(v, x.e)) && v != par[0][l]) continue;
				new_diam += d + 1;
				cnt += 1;
				if(cnt == 2) break;
			}
			maxPath = max(maxPath, new_diam - 3 + sz(v));
		}
		for(auto &i : v){
			vis[i] = 0;
			val.push_back(dfsl(i).first);
			vis[i] = 1;
		}
		for(auto &i : v) vis[i] = 0;
		int pmax = -1e9;
		for(int i = 0; i < sz(val); i++){
			maxPath = max(maxPath, sz(val) - 1 - i + val[i] + pmax);
			pmax = max(pmax, i + val[i]);
		}
		ans = min(ans, 2 * n - 4 + x.x - maxPath);
	}
	cout << ans << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 23884 KB Output is correct
2 Correct 11 ms 24012 KB Output is correct
3 Correct 11 ms 24012 KB Output is correct
4 Correct 11 ms 23972 KB Output is correct
5 Correct 12 ms 24012 KB Output is correct
6 Correct 14 ms 24012 KB Output is correct
7 Correct 13 ms 23976 KB Output is correct
8 Correct 11 ms 24012 KB Output is correct
9 Correct 14 ms 24012 KB Output is correct
10 Correct 11 ms 23884 KB Output is correct
11 Correct 11 ms 23884 KB Output is correct
12 Correct 11 ms 23920 KB Output is correct
13 Correct 11 ms 24012 KB Output is correct
14 Correct 11 ms 23960 KB Output is correct
15 Correct 13 ms 24040 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 23884 KB Output is correct
2 Correct 11 ms 24012 KB Output is correct
3 Correct 11 ms 24012 KB Output is correct
4 Correct 11 ms 23972 KB Output is correct
5 Correct 12 ms 24012 KB Output is correct
6 Correct 14 ms 24012 KB Output is correct
7 Correct 13 ms 23976 KB Output is correct
8 Correct 11 ms 24012 KB Output is correct
9 Correct 14 ms 24012 KB Output is correct
10 Correct 11 ms 23884 KB Output is correct
11 Correct 11 ms 23884 KB Output is correct
12 Correct 11 ms 23920 KB Output is correct
13 Correct 11 ms 24012 KB Output is correct
14 Correct 11 ms 23960 KB Output is correct
15 Correct 13 ms 24040 KB Output is correct
16 Correct 11 ms 24012 KB Output is correct
17 Correct 11 ms 24012 KB Output is correct
18 Correct 13 ms 23948 KB Output is correct
19 Correct 11 ms 24012 KB Output is correct
20 Correct 12 ms 23968 KB Output is correct
21 Correct 12 ms 23884 KB Output is correct
22 Correct 12 ms 24012 KB Output is correct
23 Correct 11 ms 24012 KB Output is correct
24 Correct 11 ms 24012 KB Output is correct
25 Correct 11 ms 24012 KB Output is correct
26 Correct 11 ms 24012 KB Output is correct
27 Correct 11 ms 23908 KB Output is correct
28 Correct 11 ms 23912 KB Output is correct
29 Correct 12 ms 24012 KB Output is correct
30 Correct 13 ms 24008 KB Output is correct
31 Correct 11 ms 24012 KB Output is correct
32 Correct 14 ms 24004 KB Output is correct
33 Correct 11 ms 24012 KB Output is correct
34 Correct 14 ms 24012 KB Output is correct
35 Correct 11 ms 24012 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 662 ms 25348 KB Output is correct
2 Correct 662 ms 25420 KB Output is correct
3 Correct 622 ms 25288 KB Output is correct
4 Correct 607 ms 25220 KB Output is correct
5 Correct 578 ms 25180 KB Output is correct
6 Correct 362 ms 24988 KB Output is correct
7 Correct 636 ms 25420 KB Output is correct
8 Correct 742 ms 25276 KB Output is correct
9 Correct 682 ms 25404 KB Output is correct
10 Correct 592 ms 25232 KB Output is correct
11 Correct 596 ms 25300 KB Output is correct
12 Correct 617 ms 25284 KB Output is correct
13 Correct 603 ms 25296 KB Output is correct
14 Correct 611 ms 25316 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 23884 KB Output is correct
2 Correct 11 ms 24012 KB Output is correct
3 Correct 11 ms 24012 KB Output is correct
4 Correct 11 ms 23972 KB Output is correct
5 Correct 12 ms 24012 KB Output is correct
6 Correct 14 ms 24012 KB Output is correct
7 Correct 13 ms 23976 KB Output is correct
8 Correct 11 ms 24012 KB Output is correct
9 Correct 14 ms 24012 KB Output is correct
10 Correct 11 ms 23884 KB Output is correct
11 Correct 11 ms 23884 KB Output is correct
12 Correct 11 ms 23920 KB Output is correct
13 Correct 11 ms 24012 KB Output is correct
14 Correct 11 ms 23960 KB Output is correct
15 Correct 13 ms 24040 KB Output is correct
16 Correct 11 ms 24012 KB Output is correct
17 Correct 11 ms 24012 KB Output is correct
18 Correct 13 ms 23948 KB Output is correct
19 Correct 11 ms 24012 KB Output is correct
20 Correct 12 ms 23968 KB Output is correct
21 Correct 12 ms 23884 KB Output is correct
22 Correct 12 ms 24012 KB Output is correct
23 Correct 11 ms 24012 KB Output is correct
24 Correct 11 ms 24012 KB Output is correct
25 Correct 11 ms 24012 KB Output is correct
26 Correct 11 ms 24012 KB Output is correct
27 Correct 11 ms 23908 KB Output is correct
28 Correct 11 ms 23912 KB Output is correct
29 Correct 12 ms 24012 KB Output is correct
30 Correct 13 ms 24008 KB Output is correct
31 Correct 11 ms 24012 KB Output is correct
32 Correct 14 ms 24004 KB Output is correct
33 Correct 11 ms 24012 KB Output is correct
34 Correct 14 ms 24012 KB Output is correct
35 Correct 11 ms 24012 KB Output is correct
36 Correct 12 ms 24012 KB Output is correct
37 Correct 12 ms 23948 KB Output is correct
38 Correct 12 ms 24012 KB Output is correct
39 Correct 11 ms 24012 KB Output is correct
40 Correct 12 ms 23908 KB Output is correct
41 Correct 13 ms 23960 KB Output is correct
42 Correct 12 ms 24012 KB Output is correct
43 Correct 14 ms 23992 KB Output is correct
44 Correct 11 ms 24012 KB Output is correct
45 Correct 12 ms 24012 KB Output is correct
46 Correct 11 ms 24012 KB Output is correct
47 Correct 12 ms 24012 KB Output is correct
48 Correct 11 ms 23964 KB Output is correct
49 Correct 13 ms 24004 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 23884 KB Output is correct
2 Correct 11 ms 24012 KB Output is correct
3 Correct 11 ms 24012 KB Output is correct
4 Correct 11 ms 23972 KB Output is correct
5 Correct 12 ms 24012 KB Output is correct
6 Correct 14 ms 24012 KB Output is correct
7 Correct 13 ms 23976 KB Output is correct
8 Correct 11 ms 24012 KB Output is correct
9 Correct 14 ms 24012 KB Output is correct
10 Correct 11 ms 23884 KB Output is correct
11 Correct 11 ms 23884 KB Output is correct
12 Correct 11 ms 23920 KB Output is correct
13 Correct 11 ms 24012 KB Output is correct
14 Correct 11 ms 23960 KB Output is correct
15 Correct 13 ms 24040 KB Output is correct
16 Correct 11 ms 24012 KB Output is correct
17 Correct 11 ms 24012 KB Output is correct
18 Correct 13 ms 23948 KB Output is correct
19 Correct 11 ms 24012 KB Output is correct
20 Correct 12 ms 23968 KB Output is correct
21 Correct 12 ms 23884 KB Output is correct
22 Correct 12 ms 24012 KB Output is correct
23 Correct 11 ms 24012 KB Output is correct
24 Correct 11 ms 24012 KB Output is correct
25 Correct 11 ms 24012 KB Output is correct
26 Correct 11 ms 24012 KB Output is correct
27 Correct 11 ms 23908 KB Output is correct
28 Correct 11 ms 23912 KB Output is correct
29 Correct 12 ms 24012 KB Output is correct
30 Correct 13 ms 24008 KB Output is correct
31 Correct 11 ms 24012 KB Output is correct
32 Correct 14 ms 24004 KB Output is correct
33 Correct 11 ms 24012 KB Output is correct
34 Correct 14 ms 24012 KB Output is correct
35 Correct 11 ms 24012 KB Output is correct
36 Correct 12 ms 24012 KB Output is correct
37 Correct 12 ms 23948 KB Output is correct
38 Correct 12 ms 24012 KB Output is correct
39 Correct 11 ms 24012 KB Output is correct
40 Correct 12 ms 23908 KB Output is correct
41 Correct 13 ms 23960 KB Output is correct
42 Correct 12 ms 24012 KB Output is correct
43 Correct 14 ms 23992 KB Output is correct
44 Correct 11 ms 24012 KB Output is correct
45 Correct 12 ms 24012 KB Output is correct
46 Correct 11 ms 24012 KB Output is correct
47 Correct 12 ms 24012 KB Output is correct
48 Correct 11 ms 23964 KB Output is correct
49 Correct 13 ms 24004 KB Output is correct
50 Correct 17 ms 24128 KB Output is correct
51 Correct 18 ms 24080 KB Output is correct
52 Correct 17 ms 24140 KB Output is correct
53 Correct 18 ms 24012 KB Output is correct
54 Correct 16 ms 24012 KB Output is correct
55 Correct 17 ms 24088 KB Output is correct
56 Correct 18 ms 24128 KB Output is correct
57 Correct 19 ms 24120 KB Output is correct
58 Correct 17 ms 24096 KB Output is correct
59 Correct 16 ms 24040 KB Output is correct
60 Correct 16 ms 24012 KB Output is correct
61 Correct 16 ms 24012 KB Output is correct
62 Correct 12 ms 24076 KB Output is correct
63 Correct 13 ms 24012 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 23884 KB Output is correct
2 Correct 11 ms 24012 KB Output is correct
3 Correct 11 ms 24012 KB Output is correct
4 Correct 11 ms 23972 KB Output is correct
5 Correct 12 ms 24012 KB Output is correct
6 Correct 14 ms 24012 KB Output is correct
7 Correct 13 ms 23976 KB Output is correct
8 Correct 11 ms 24012 KB Output is correct
9 Correct 14 ms 24012 KB Output is correct
10 Correct 11 ms 23884 KB Output is correct
11 Correct 11 ms 23884 KB Output is correct
12 Correct 11 ms 23920 KB Output is correct
13 Correct 11 ms 24012 KB Output is correct
14 Correct 11 ms 23960 KB Output is correct
15 Correct 13 ms 24040 KB Output is correct
16 Correct 11 ms 24012 KB Output is correct
17 Correct 11 ms 24012 KB Output is correct
18 Correct 13 ms 23948 KB Output is correct
19 Correct 11 ms 24012 KB Output is correct
20 Correct 12 ms 23968 KB Output is correct
21 Correct 12 ms 23884 KB Output is correct
22 Correct 12 ms 24012 KB Output is correct
23 Correct 11 ms 24012 KB Output is correct
24 Correct 11 ms 24012 KB Output is correct
25 Correct 11 ms 24012 KB Output is correct
26 Correct 11 ms 24012 KB Output is correct
27 Correct 11 ms 23908 KB Output is correct
28 Correct 11 ms 23912 KB Output is correct
29 Correct 12 ms 24012 KB Output is correct
30 Correct 13 ms 24008 KB Output is correct
31 Correct 11 ms 24012 KB Output is correct
32 Correct 14 ms 24004 KB Output is correct
33 Correct 11 ms 24012 KB Output is correct
34 Correct 14 ms 24012 KB Output is correct
35 Correct 11 ms 24012 KB Output is correct
36 Correct 662 ms 25348 KB Output is correct
37 Correct 662 ms 25420 KB Output is correct
38 Correct 622 ms 25288 KB Output is correct
39 Correct 607 ms 25220 KB Output is correct
40 Correct 578 ms 25180 KB Output is correct
41 Correct 362 ms 24988 KB Output is correct
42 Correct 636 ms 25420 KB Output is correct
43 Correct 742 ms 25276 KB Output is correct
44 Correct 682 ms 25404 KB Output is correct
45 Correct 592 ms 25232 KB Output is correct
46 Correct 596 ms 25300 KB Output is correct
47 Correct 617 ms 25284 KB Output is correct
48 Correct 603 ms 25296 KB Output is correct
49 Correct 611 ms 25316 KB Output is correct
50 Correct 12 ms 24012 KB Output is correct
51 Correct 12 ms 23948 KB Output is correct
52 Correct 12 ms 24012 KB Output is correct
53 Correct 11 ms 24012 KB Output is correct
54 Correct 12 ms 23908 KB Output is correct
55 Correct 13 ms 23960 KB Output is correct
56 Correct 12 ms 24012 KB Output is correct
57 Correct 14 ms 23992 KB Output is correct
58 Correct 11 ms 24012 KB Output is correct
59 Correct 12 ms 24012 KB Output is correct
60 Correct 11 ms 24012 KB Output is correct
61 Correct 12 ms 24012 KB Output is correct
62 Correct 11 ms 23964 KB Output is correct
63 Correct 13 ms 24004 KB Output is correct
64 Correct 17 ms 24128 KB Output is correct
65 Correct 18 ms 24080 KB Output is correct
66 Correct 17 ms 24140 KB Output is correct
67 Correct 18 ms 24012 KB Output is correct
68 Correct 16 ms 24012 KB Output is correct
69 Correct 17 ms 24088 KB Output is correct
70 Correct 18 ms 24128 KB Output is correct
71 Correct 19 ms 24120 KB Output is correct
72 Correct 17 ms 24096 KB Output is correct
73 Correct 16 ms 24040 KB Output is correct
74 Correct 16 ms 24012 KB Output is correct
75 Correct 16 ms 24012 KB Output is correct
76 Correct 12 ms 24076 KB Output is correct
77 Correct 13 ms 24012 KB Output is correct
78 Correct 630 ms 25320 KB Output is correct
79 Correct 625 ms 25312 KB Output is correct
80 Correct 636 ms 25284 KB Output is correct
81 Correct 615 ms 25228 KB Output is correct
82 Correct 579 ms 25284 KB Output is correct
83 Correct 403 ms 24996 KB Output is correct
84 Correct 635 ms 25284 KB Output is correct
85 Correct 736 ms 25292 KB Output is correct
86 Correct 644 ms 25480 KB Output is correct
87 Correct 584 ms 25220 KB Output is correct
88 Incorrect 625 ms 25148 KB Output isn't correct
89 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 23884 KB Output is correct
2 Correct 11 ms 24012 KB Output is correct
3 Correct 11 ms 24012 KB Output is correct
4 Correct 11 ms 23972 KB Output is correct
5 Correct 12 ms 24012 KB Output is correct
6 Correct 14 ms 24012 KB Output is correct
7 Correct 13 ms 23976 KB Output is correct
8 Correct 11 ms 24012 KB Output is correct
9 Correct 14 ms 24012 KB Output is correct
10 Correct 11 ms 23884 KB Output is correct
11 Correct 11 ms 23884 KB Output is correct
12 Correct 11 ms 23920 KB Output is correct
13 Correct 11 ms 24012 KB Output is correct
14 Correct 11 ms 23960 KB Output is correct
15 Correct 13 ms 24040 KB Output is correct
16 Correct 11 ms 24012 KB Output is correct
17 Correct 11 ms 24012 KB Output is correct
18 Correct 13 ms 23948 KB Output is correct
19 Correct 11 ms 24012 KB Output is correct
20 Correct 12 ms 23968 KB Output is correct
21 Correct 12 ms 23884 KB Output is correct
22 Correct 12 ms 24012 KB Output is correct
23 Correct 11 ms 24012 KB Output is correct
24 Correct 11 ms 24012 KB Output is correct
25 Correct 11 ms 24012 KB Output is correct
26 Correct 11 ms 24012 KB Output is correct
27 Correct 11 ms 23908 KB Output is correct
28 Correct 11 ms 23912 KB Output is correct
29 Correct 12 ms 24012 KB Output is correct
30 Correct 13 ms 24008 KB Output is correct
31 Correct 11 ms 24012 KB Output is correct
32 Correct 14 ms 24004 KB Output is correct
33 Correct 11 ms 24012 KB Output is correct
34 Correct 14 ms 24012 KB Output is correct
35 Correct 11 ms 24012 KB Output is correct
36 Correct 662 ms 25348 KB Output is correct
37 Correct 662 ms 25420 KB Output is correct
38 Correct 622 ms 25288 KB Output is correct
39 Correct 607 ms 25220 KB Output is correct
40 Correct 578 ms 25180 KB Output is correct
41 Correct 362 ms 24988 KB Output is correct
42 Correct 636 ms 25420 KB Output is correct
43 Correct 742 ms 25276 KB Output is correct
44 Correct 682 ms 25404 KB Output is correct
45 Correct 592 ms 25232 KB Output is correct
46 Correct 596 ms 25300 KB Output is correct
47 Correct 617 ms 25284 KB Output is correct
48 Correct 603 ms 25296 KB Output is correct
49 Correct 611 ms 25316 KB Output is correct
50 Correct 12 ms 24012 KB Output is correct
51 Correct 12 ms 23948 KB Output is correct
52 Correct 12 ms 24012 KB Output is correct
53 Correct 11 ms 24012 KB Output is correct
54 Correct 12 ms 23908 KB Output is correct
55 Correct 13 ms 23960 KB Output is correct
56 Correct 12 ms 24012 KB Output is correct
57 Correct 14 ms 23992 KB Output is correct
58 Correct 11 ms 24012 KB Output is correct
59 Correct 12 ms 24012 KB Output is correct
60 Correct 11 ms 24012 KB Output is correct
61 Correct 12 ms 24012 KB Output is correct
62 Correct 11 ms 23964 KB Output is correct
63 Correct 13 ms 24004 KB Output is correct
64 Correct 17 ms 24128 KB Output is correct
65 Correct 18 ms 24080 KB Output is correct
66 Correct 17 ms 24140 KB Output is correct
67 Correct 18 ms 24012 KB Output is correct
68 Correct 16 ms 24012 KB Output is correct
69 Correct 17 ms 24088 KB Output is correct
70 Correct 18 ms 24128 KB Output is correct
71 Correct 19 ms 24120 KB Output is correct
72 Correct 17 ms 24096 KB Output is correct
73 Correct 16 ms 24040 KB Output is correct
74 Correct 16 ms 24012 KB Output is correct
75 Correct 16 ms 24012 KB Output is correct
76 Correct 12 ms 24076 KB Output is correct
77 Correct 13 ms 24012 KB Output is correct
78 Correct 630 ms 25320 KB Output is correct
79 Correct 625 ms 25312 KB Output is correct
80 Correct 636 ms 25284 KB Output is correct
81 Correct 615 ms 25228 KB Output is correct
82 Correct 579 ms 25284 KB Output is correct
83 Correct 403 ms 24996 KB Output is correct
84 Correct 635 ms 25284 KB Output is correct
85 Correct 736 ms 25292 KB Output is correct
86 Correct 644 ms 25480 KB Output is correct
87 Correct 584 ms 25220 KB Output is correct
88 Incorrect 625 ms 25148 KB Output isn't correct
89 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 11 ms 23884 KB Output is correct
2 Correct 11 ms 24012 KB Output is correct
3 Correct 11 ms 24012 KB Output is correct
4 Correct 11 ms 23972 KB Output is correct
5 Correct 12 ms 24012 KB Output is correct
6 Correct 14 ms 24012 KB Output is correct
7 Correct 13 ms 23976 KB Output is correct
8 Correct 11 ms 24012 KB Output is correct
9 Correct 14 ms 24012 KB Output is correct
10 Correct 11 ms 23884 KB Output is correct
11 Correct 11 ms 23884 KB Output is correct
12 Correct 11 ms 23920 KB Output is correct
13 Correct 11 ms 24012 KB Output is correct
14 Correct 11 ms 23960 KB Output is correct
15 Correct 13 ms 24040 KB Output is correct
16 Correct 11 ms 24012 KB Output is correct
17 Correct 11 ms 24012 KB Output is correct
18 Correct 13 ms 23948 KB Output is correct
19 Correct 11 ms 24012 KB Output is correct
20 Correct 12 ms 23968 KB Output is correct
21 Correct 12 ms 23884 KB Output is correct
22 Correct 12 ms 24012 KB Output is correct
23 Correct 11 ms 24012 KB Output is correct
24 Correct 11 ms 24012 KB Output is correct
25 Correct 11 ms 24012 KB Output is correct
26 Correct 11 ms 24012 KB Output is correct
27 Correct 11 ms 23908 KB Output is correct
28 Correct 11 ms 23912 KB Output is correct
29 Correct 12 ms 24012 KB Output is correct
30 Correct 13 ms 24008 KB Output is correct
31 Correct 11 ms 24012 KB Output is correct
32 Correct 14 ms 24004 KB Output is correct
33 Correct 11 ms 24012 KB Output is correct
34 Correct 14 ms 24012 KB Output is correct
35 Correct 11 ms 24012 KB Output is correct
36 Correct 662 ms 25348 KB Output is correct
37 Correct 662 ms 25420 KB Output is correct
38 Correct 622 ms 25288 KB Output is correct
39 Correct 607 ms 25220 KB Output is correct
40 Correct 578 ms 25180 KB Output is correct
41 Correct 362 ms 24988 KB Output is correct
42 Correct 636 ms 25420 KB Output is correct
43 Correct 742 ms 25276 KB Output is correct
44 Correct 682 ms 25404 KB Output is correct
45 Correct 592 ms 25232 KB Output is correct
46 Correct 596 ms 25300 KB Output is correct
47 Correct 617 ms 25284 KB Output is correct
48 Correct 603 ms 25296 KB Output is correct
49 Correct 611 ms 25316 KB Output is correct
50 Correct 12 ms 24012 KB Output is correct
51 Correct 12 ms 23948 KB Output is correct
52 Correct 12 ms 24012 KB Output is correct
53 Correct 11 ms 24012 KB Output is correct
54 Correct 12 ms 23908 KB Output is correct
55 Correct 13 ms 23960 KB Output is correct
56 Correct 12 ms 24012 KB Output is correct
57 Correct 14 ms 23992 KB Output is correct
58 Correct 11 ms 24012 KB Output is correct
59 Correct 12 ms 24012 KB Output is correct
60 Correct 11 ms 24012 KB Output is correct
61 Correct 12 ms 24012 KB Output is correct
62 Correct 11 ms 23964 KB Output is correct
63 Correct 13 ms 24004 KB Output is correct
64 Correct 17 ms 24128 KB Output is correct
65 Correct 18 ms 24080 KB Output is correct
66 Correct 17 ms 24140 KB Output is correct
67 Correct 18 ms 24012 KB Output is correct
68 Correct 16 ms 24012 KB Output is correct
69 Correct 17 ms 24088 KB Output is correct
70 Correct 18 ms 24128 KB Output is correct
71 Correct 19 ms 24120 KB Output is correct
72 Correct 17 ms 24096 KB Output is correct
73 Correct 16 ms 24040 KB Output is correct
74 Correct 16 ms 24012 KB Output is correct
75 Correct 16 ms 24012 KB Output is correct
76 Correct 12 ms 24076 KB Output is correct
77 Correct 13 ms 24012 KB Output is correct
78 Correct 630 ms 25320 KB Output is correct
79 Correct 625 ms 25312 KB Output is correct
80 Correct 636 ms 25284 KB Output is correct
81 Correct 615 ms 25228 KB Output is correct
82 Correct 579 ms 25284 KB Output is correct
83 Correct 403 ms 24996 KB Output is correct
84 Correct 635 ms 25284 KB Output is correct
85 Correct 736 ms 25292 KB Output is correct
86 Correct 644 ms 25480 KB Output is correct
87 Correct 584 ms 25220 KB Output is correct
88 Incorrect 625 ms 25148 KB Output isn't correct
89 Halted 0 ms 0 KB -