답안 #733212

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
733212 2023-04-30T08:57:54 Z sentheta 철인 이종 경기 (APIO18_duathlon) C++17
100 / 100
147 ms 31772 KB
// author : sentheta aka vanwij
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cassert>
#include<random>
#include<chrono>
#include<cmath>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<stack>
#include<map>
#include<set>
using namespace std;

#define Int long long
#define V vector
#define pii pair<int,int>
#define ff first
#define ss second

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

#define pow2(x) (1LL<<(x))
#define msb(x) (63-__builtin_clzll(x))
#define bitcnt(x) (__builtin_popcountll(x))

#define nl '\n'
#define _ << ' ' <<
#define all(x) (x).begin(), (x).end()
#define rep(i,a,b) for(int i = (int)(a); i < (int)(b); i++)
#define dbg(x) if(1) cout << "?" << #x << " : " << (x) << endl << flush;

#define int long long
// const Int MOD = 1e9+7;
const Int MOD = 998244353;
Int bpow(Int a,Int b){
	Int ret = 1;
	for(;b; a=a*a%MOD,b/=2) if(b&1) ret = ret*a%MOD;
	return ret;
}
Int inv(Int a){return bpow(a,MOD-2);}

void solve(); int TC, ALLTC;
signed main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	srand(chrono::steady_clock::now().time_since_epoch().count());
	cout << fixed << setprecision(7);
	// cin >> ALLTC; for(TC=1; TC<=ALLTC; TC++) solve(); return 0;
	solve();
}








const int N = 2e5+5;

int n, m;
V<int> adj[N];

bool vis[N];

V<int> cadj[N], stak;
int id;

bool art[N];
int t[N], up[N], tim=0;
void dfs_art(int x,int par){
	up[x] = t[x] = ++tim;
	stak.push_back(x);
	if(par!=-1) assert(t[par]);
		
	int children = 0;
	for(int y : adj[x]){
		if(!t[y]){
			children++;
			dfs_art(y, x);
			up[x] = min(up[x], up[y]);
		
			// new bcc
			if(up[y] >= t[x]){
				++id;

				while(1){
					int z = stak.back(); stak.pop_back();

					cadj[z].push_back(id);
					cadj[id].push_back(z);
					if(z==y) break;
				}
				cadj[x].push_back(id);
				cadj[id].push_back(x);
			}
		}
		else if(y!=par) up[x] = min(up[x], t[y]);
		
		if(par!=-1) art[x] |= up[y]>=t[x];
	}
	if(par==-1) art[x] |= children>=2;
}


int sz[N];
void dfs_sz(int x,int par){
	vis[x] = 1;
	for(int y : cadj[x]) if(y!=par){
		dfs_sz(y, x);
		sz[x] += sz[y];
	}
}

int ans = 0;
void reroot(int x,int par){
	vis[x] = 1;
	if(x > n){
		// dbg(x);
		int sum = 0;
		for(int y : cadj[x]){
			// dbg(y); dbg(sz[y]);
			sum += sz[y]*(sz[y]-1);
		}
		for(int y : cadj[x]){
			ans -= sum -sz[y]*(sz[y]-1);
		}
		// dbg(ans);
		// cout << nl;
	}

	int orisz = sz[x];
	for(int y : cadj[x]) if(y!=par){
		sz[x] = orisz - sz[y];
		sz[y] += sz[x];

		reroot(y, x);
	}
}

void solve(){
	
	cin >> n >> m;

	rep(i,0,m){
		int u, v; cin >> u >> v;

		adj[u].push_back(v);
		adj[v].push_back(u);
	}
	
	id = n;
	rep(x,1,n+1) if(!t[x]){
		dfs_art(x, -1);
	}

	// cout << "ART[] ";
	// rep(x,1,n+1) if(art[x]) cout << x << " ";
	// cout << endl << endl;

	// cout << "BCC" << nl;
	// rep(x,1,n+1) for(int y : cadj[x]){
	// 	cout << x _ y << nl;
	// }
	// cout << endl;

	// rep(i,n+1,id+1){
	// 	rep(x,1,n+1){
	// 		bool ok = 0;
	// 		for(int j : cadj[x]) ok |= i==j;
	// 		if(ok) cout << x << " ";
	// 	}
	// 	cout << nl;
	// }
	// cout << nl;

	// return;

	rep(x,1,n+1){
		vis[x] = 0;
		sz[x] = 1;
	}
	rep(x,1,n+1) if(!vis[x]){
		dfs_sz(x, -1);
		ans += sz[x] *(sz[x]-1) *(sz[x]-2);
	}
	// dbg(ans);


	rep(x,1,id+1){
		vis[x] = 0;
	}
	rep(x,1,id+1) if(!vis[x]){
		reroot(x, -1);
	}

	cout << ans << nl;

}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9728 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 6 ms 9684 KB Output is correct
9 Correct 6 ms 9684 KB Output is correct
10 Correct 5 ms 9748 KB Output is correct
11 Correct 7 ms 9728 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 6 ms 9644 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 6 ms 9684 KB Output is correct
16 Correct 5 ms 9624 KB Output is correct
17 Correct 5 ms 9724 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9728 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 6 ms 9652 KB Output is correct
27 Correct 6 ms 9684 KB Output is correct
28 Correct 5 ms 9728 KB Output is correct
29 Correct 5 ms 9684 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9728 KB Output is correct
32 Correct 6 ms 9684 KB Output is correct
33 Correct 5 ms 9724 KB Output is correct
34 Correct 7 ms 9680 KB Output is correct
35 Correct 6 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9728 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 6 ms 9684 KB Output is correct
9 Correct 6 ms 9684 KB Output is correct
10 Correct 5 ms 9748 KB Output is correct
11 Correct 7 ms 9728 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 6 ms 9644 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 6 ms 9684 KB Output is correct
16 Correct 5 ms 9624 KB Output is correct
17 Correct 5 ms 9724 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9728 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 6 ms 9652 KB Output is correct
27 Correct 6 ms 9684 KB Output is correct
28 Correct 5 ms 9728 KB Output is correct
29 Correct 5 ms 9684 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9728 KB Output is correct
32 Correct 6 ms 9684 KB Output is correct
33 Correct 5 ms 9724 KB Output is correct
34 Correct 7 ms 9680 KB Output is correct
35 Correct 6 ms 9684 KB Output is correct
36 Correct 5 ms 9704 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9728 KB Output is correct
39 Correct 7 ms 9728 KB Output is correct
40 Correct 5 ms 9728 KB Output is correct
41 Correct 5 ms 9724 KB Output is correct
42 Correct 6 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9728 KB Output is correct
45 Correct 5 ms 9732 KB Output is correct
46 Correct 7 ms 9684 KB Output is correct
47 Correct 5 ms 9736 KB Output is correct
48 Correct 5 ms 9732 KB Output is correct
49 Correct 5 ms 9696 KB Output is correct
50 Correct 6 ms 9684 KB Output is correct
51 Correct 5 ms 9652 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9732 KB Output is correct
56 Correct 5 ms 9732 KB Output is correct
57 Correct 5 ms 9684 KB Output is correct
58 Correct 6 ms 9684 KB Output is correct
59 Correct 6 ms 9812 KB Output is correct
60 Correct 7 ms 9664 KB Output is correct
61 Correct 6 ms 9724 KB Output is correct
62 Correct 6 ms 9684 KB Output is correct
63 Correct 5 ms 9684 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 72 ms 31064 KB Output is correct
2 Correct 88 ms 31028 KB Output is correct
3 Correct 95 ms 26692 KB Output is correct
4 Correct 82 ms 29240 KB Output is correct
5 Correct 84 ms 24420 KB Output is correct
6 Correct 99 ms 25624 KB Output is correct
7 Correct 92 ms 23972 KB Output is correct
8 Correct 88 ms 24604 KB Output is correct
9 Correct 84 ms 22648 KB Output is correct
10 Correct 90 ms 23208 KB Output is correct
11 Correct 79 ms 21188 KB Output is correct
12 Correct 65 ms 20848 KB Output is correct
13 Correct 82 ms 20764 KB Output is correct
14 Correct 69 ms 20420 KB Output is correct
15 Correct 56 ms 19656 KB Output is correct
16 Correct 57 ms 19312 KB Output is correct
17 Correct 9 ms 13140 KB Output is correct
18 Correct 9 ms 13140 KB Output is correct
19 Correct 8 ms 13140 KB Output is correct
20 Correct 9 ms 13140 KB Output is correct
21 Correct 9 ms 13136 KB Output is correct
22 Correct 9 ms 13136 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9812 KB Output is correct
2 Correct 6 ms 9812 KB Output is correct
3 Correct 6 ms 9772 KB Output is correct
4 Correct 6 ms 9940 KB Output is correct
5 Correct 6 ms 9940 KB Output is correct
6 Correct 6 ms 9924 KB Output is correct
7 Correct 7 ms 9940 KB Output is correct
8 Correct 6 ms 9812 KB Output is correct
9 Correct 5 ms 9812 KB Output is correct
10 Correct 6 ms 9812 KB Output is correct
11 Correct 5 ms 9812 KB Output is correct
12 Correct 6 ms 9812 KB Output is correct
13 Correct 6 ms 9812 KB Output is correct
14 Correct 6 ms 9812 KB Output is correct
15 Correct 5 ms 9812 KB Output is correct
16 Correct 6 ms 9812 KB Output is correct
17 Correct 6 ms 9812 KB Output is correct
18 Correct 5 ms 9860 KB Output is correct
19 Correct 5 ms 9812 KB Output is correct
20 Correct 8 ms 9812 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 106 ms 23748 KB Output is correct
2 Correct 97 ms 23756 KB Output is correct
3 Correct 96 ms 23752 KB Output is correct
4 Correct 91 ms 23724 KB Output is correct
5 Correct 121 ms 23736 KB Output is correct
6 Correct 105 ms 29836 KB Output is correct
7 Correct 101 ms 28100 KB Output is correct
8 Correct 114 ms 26928 KB Output is correct
9 Correct 147 ms 25708 KB Output is correct
10 Correct 103 ms 23688 KB Output is correct
11 Correct 93 ms 23884 KB Output is correct
12 Correct 108 ms 23756 KB Output is correct
13 Correct 98 ms 23788 KB Output is correct
14 Correct 80 ms 23116 KB Output is correct
15 Correct 80 ms 22408 KB Output is correct
16 Correct 52 ms 19644 KB Output is correct
17 Correct 65 ms 24152 KB Output is correct
18 Correct 67 ms 24172 KB Output is correct
19 Correct 64 ms 24484 KB Output is correct
20 Correct 69 ms 24204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9812 KB Output is correct
2 Correct 6 ms 9884 KB Output is correct
3 Correct 6 ms 9812 KB Output is correct
4 Correct 8 ms 9812 KB Output is correct
5 Correct 8 ms 9872 KB Output is correct
6 Correct 6 ms 9812 KB Output is correct
7 Correct 7 ms 9860 KB Output is correct
8 Correct 6 ms 9812 KB Output is correct
9 Correct 5 ms 9812 KB Output is correct
10 Correct 6 ms 9812 KB Output is correct
11 Correct 5 ms 9812 KB Output is correct
12 Correct 6 ms 9940 KB Output is correct
13 Correct 6 ms 9812 KB Output is correct
14 Correct 6 ms 9860 KB Output is correct
15 Correct 8 ms 9864 KB Output is correct
16 Correct 6 ms 9860 KB Output is correct
17 Correct 6 ms 9812 KB Output is correct
18 Correct 7 ms 9812 KB Output is correct
19 Correct 9 ms 9868 KB Output is correct
20 Correct 7 ms 9864 KB Output is correct
21 Correct 6 ms 9812 KB Output is correct
22 Correct 6 ms 9812 KB Output is correct
23 Correct 6 ms 9812 KB Output is correct
24 Correct 6 ms 9812 KB Output is correct
25 Correct 6 ms 9772 KB Output is correct
26 Correct 6 ms 9684 KB Output is correct
27 Correct 5 ms 9684 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 119 ms 23716 KB Output is correct
2 Correct 101 ms 23440 KB Output is correct
3 Correct 117 ms 23180 KB Output is correct
4 Correct 108 ms 23884 KB Output is correct
5 Correct 95 ms 22604 KB Output is correct
6 Correct 91 ms 22092 KB Output is correct
7 Correct 92 ms 21884 KB Output is correct
8 Correct 85 ms 21516 KB Output is correct
9 Correct 94 ms 21440 KB Output is correct
10 Correct 99 ms 21260 KB Output is correct
11 Correct 83 ms 21132 KB Output is correct
12 Correct 94 ms 21256 KB Output is correct
13 Correct 97 ms 21312 KB Output is correct
14 Correct 88 ms 23840 KB Output is correct
15 Correct 114 ms 29408 KB Output is correct
16 Correct 124 ms 27836 KB Output is correct
17 Correct 121 ms 28480 KB Output is correct
18 Correct 123 ms 27012 KB Output is correct
19 Correct 114 ms 23736 KB Output is correct
20 Correct 119 ms 23780 KB Output is correct
21 Correct 132 ms 23808 KB Output is correct
22 Correct 105 ms 22916 KB Output is correct
23 Correct 82 ms 22100 KB Output is correct
24 Correct 107 ms 24628 KB Output is correct
25 Correct 113 ms 24776 KB Output is correct
26 Correct 100 ms 24112 KB Output is correct
27 Correct 90 ms 24100 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9728 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 6 ms 9684 KB Output is correct
9 Correct 6 ms 9684 KB Output is correct
10 Correct 5 ms 9748 KB Output is correct
11 Correct 7 ms 9728 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 6 ms 9644 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 6 ms 9684 KB Output is correct
16 Correct 5 ms 9624 KB Output is correct
17 Correct 5 ms 9724 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9728 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 6 ms 9652 KB Output is correct
27 Correct 6 ms 9684 KB Output is correct
28 Correct 5 ms 9728 KB Output is correct
29 Correct 5 ms 9684 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9728 KB Output is correct
32 Correct 6 ms 9684 KB Output is correct
33 Correct 5 ms 9724 KB Output is correct
34 Correct 7 ms 9680 KB Output is correct
35 Correct 6 ms 9684 KB Output is correct
36 Correct 5 ms 9704 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9728 KB Output is correct
39 Correct 7 ms 9728 KB Output is correct
40 Correct 5 ms 9728 KB Output is correct
41 Correct 5 ms 9724 KB Output is correct
42 Correct 6 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9728 KB Output is correct
45 Correct 5 ms 9732 KB Output is correct
46 Correct 7 ms 9684 KB Output is correct
47 Correct 5 ms 9736 KB Output is correct
48 Correct 5 ms 9732 KB Output is correct
49 Correct 5 ms 9696 KB Output is correct
50 Correct 6 ms 9684 KB Output is correct
51 Correct 5 ms 9652 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9732 KB Output is correct
56 Correct 5 ms 9732 KB Output is correct
57 Correct 5 ms 9684 KB Output is correct
58 Correct 6 ms 9684 KB Output is correct
59 Correct 6 ms 9812 KB Output is correct
60 Correct 7 ms 9664 KB Output is correct
61 Correct 6 ms 9724 KB Output is correct
62 Correct 6 ms 9684 KB Output is correct
63 Correct 5 ms 9684 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9684 KB Output is correct
66 Correct 5 ms 9684 KB Output is correct
67 Correct 6 ms 9732 KB Output is correct
68 Correct 6 ms 9812 KB Output is correct
69 Correct 6 ms 9932 KB Output is correct
70 Correct 7 ms 9864 KB Output is correct
71 Correct 6 ms 9812 KB Output is correct
72 Correct 6 ms 9812 KB Output is correct
73 Correct 6 ms 9812 KB Output is correct
74 Correct 6 ms 9812 KB Output is correct
75 Correct 6 ms 9864 KB Output is correct
76 Correct 6 ms 9684 KB Output is correct
77 Correct 6 ms 9812 KB Output is correct
78 Correct 7 ms 9812 KB Output is correct
79 Correct 7 ms 9868 KB Output is correct
80 Correct 5 ms 9812 KB Output is correct
81 Correct 6 ms 9792 KB Output is correct
82 Correct 7 ms 9940 KB Output is correct
83 Correct 6 ms 9940 KB Output is correct
84 Correct 6 ms 9812 KB Output is correct
85 Correct 6 ms 9812 KB Output is correct
86 Correct 7 ms 9812 KB Output is correct
87 Correct 7 ms 9812 KB Output is correct
88 Correct 7 ms 9812 KB Output is correct
89 Correct 6 ms 9812 KB Output is correct
90 Correct 6 ms 9812 KB Output is correct
91 Correct 6 ms 9812 KB Output is correct
92 Correct 6 ms 9812 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 9728 KB Output is correct
2 Correct 5 ms 9684 KB Output is correct
3 Correct 5 ms 9684 KB Output is correct
4 Correct 5 ms 9684 KB Output is correct
5 Correct 5 ms 9684 KB Output is correct
6 Correct 5 ms 9684 KB Output is correct
7 Correct 5 ms 9684 KB Output is correct
8 Correct 6 ms 9684 KB Output is correct
9 Correct 6 ms 9684 KB Output is correct
10 Correct 5 ms 9748 KB Output is correct
11 Correct 7 ms 9728 KB Output is correct
12 Correct 5 ms 9684 KB Output is correct
13 Correct 6 ms 9644 KB Output is correct
14 Correct 5 ms 9684 KB Output is correct
15 Correct 6 ms 9684 KB Output is correct
16 Correct 5 ms 9624 KB Output is correct
17 Correct 5 ms 9724 KB Output is correct
18 Correct 5 ms 9684 KB Output is correct
19 Correct 5 ms 9684 KB Output is correct
20 Correct 5 ms 9684 KB Output is correct
21 Correct 5 ms 9728 KB Output is correct
22 Correct 5 ms 9684 KB Output is correct
23 Correct 5 ms 9684 KB Output is correct
24 Correct 5 ms 9684 KB Output is correct
25 Correct 5 ms 9684 KB Output is correct
26 Correct 6 ms 9652 KB Output is correct
27 Correct 6 ms 9684 KB Output is correct
28 Correct 5 ms 9728 KB Output is correct
29 Correct 5 ms 9684 KB Output is correct
30 Correct 6 ms 9684 KB Output is correct
31 Correct 5 ms 9728 KB Output is correct
32 Correct 6 ms 9684 KB Output is correct
33 Correct 5 ms 9724 KB Output is correct
34 Correct 7 ms 9680 KB Output is correct
35 Correct 6 ms 9684 KB Output is correct
36 Correct 5 ms 9704 KB Output is correct
37 Correct 5 ms 9684 KB Output is correct
38 Correct 6 ms 9728 KB Output is correct
39 Correct 7 ms 9728 KB Output is correct
40 Correct 5 ms 9728 KB Output is correct
41 Correct 5 ms 9724 KB Output is correct
42 Correct 6 ms 9684 KB Output is correct
43 Correct 5 ms 9684 KB Output is correct
44 Correct 5 ms 9728 KB Output is correct
45 Correct 5 ms 9732 KB Output is correct
46 Correct 7 ms 9684 KB Output is correct
47 Correct 5 ms 9736 KB Output is correct
48 Correct 5 ms 9732 KB Output is correct
49 Correct 5 ms 9696 KB Output is correct
50 Correct 6 ms 9684 KB Output is correct
51 Correct 5 ms 9652 KB Output is correct
52 Correct 5 ms 9684 KB Output is correct
53 Correct 5 ms 9684 KB Output is correct
54 Correct 5 ms 9684 KB Output is correct
55 Correct 5 ms 9732 KB Output is correct
56 Correct 5 ms 9732 KB Output is correct
57 Correct 5 ms 9684 KB Output is correct
58 Correct 6 ms 9684 KB Output is correct
59 Correct 6 ms 9812 KB Output is correct
60 Correct 7 ms 9664 KB Output is correct
61 Correct 6 ms 9724 KB Output is correct
62 Correct 6 ms 9684 KB Output is correct
63 Correct 5 ms 9684 KB Output is correct
64 Correct 5 ms 9684 KB Output is correct
65 Correct 5 ms 9684 KB Output is correct
66 Correct 72 ms 31064 KB Output is correct
67 Correct 88 ms 31028 KB Output is correct
68 Correct 95 ms 26692 KB Output is correct
69 Correct 82 ms 29240 KB Output is correct
70 Correct 84 ms 24420 KB Output is correct
71 Correct 99 ms 25624 KB Output is correct
72 Correct 92 ms 23972 KB Output is correct
73 Correct 88 ms 24604 KB Output is correct
74 Correct 84 ms 22648 KB Output is correct
75 Correct 90 ms 23208 KB Output is correct
76 Correct 79 ms 21188 KB Output is correct
77 Correct 65 ms 20848 KB Output is correct
78 Correct 82 ms 20764 KB Output is correct
79 Correct 69 ms 20420 KB Output is correct
80 Correct 56 ms 19656 KB Output is correct
81 Correct 57 ms 19312 KB Output is correct
82 Correct 9 ms 13140 KB Output is correct
83 Correct 9 ms 13140 KB Output is correct
84 Correct 8 ms 13140 KB Output is correct
85 Correct 9 ms 13140 KB Output is correct
86 Correct 9 ms 13136 KB Output is correct
87 Correct 9 ms 13136 KB Output is correct
88 Correct 5 ms 9812 KB Output is correct
89 Correct 6 ms 9812 KB Output is correct
90 Correct 6 ms 9772 KB Output is correct
91 Correct 6 ms 9940 KB Output is correct
92 Correct 6 ms 9940 KB Output is correct
93 Correct 6 ms 9924 KB Output is correct
94 Correct 7 ms 9940 KB Output is correct
95 Correct 6 ms 9812 KB Output is correct
96 Correct 5 ms 9812 KB Output is correct
97 Correct 6 ms 9812 KB Output is correct
98 Correct 5 ms 9812 KB Output is correct
99 Correct 6 ms 9812 KB Output is correct
100 Correct 6 ms 9812 KB Output is correct
101 Correct 6 ms 9812 KB Output is correct
102 Correct 5 ms 9812 KB Output is correct
103 Correct 6 ms 9812 KB Output is correct
104 Correct 6 ms 9812 KB Output is correct
105 Correct 5 ms 9860 KB Output is correct
106 Correct 5 ms 9812 KB Output is correct
107 Correct 8 ms 9812 KB Output is correct
108 Correct 106 ms 23748 KB Output is correct
109 Correct 97 ms 23756 KB Output is correct
110 Correct 96 ms 23752 KB Output is correct
111 Correct 91 ms 23724 KB Output is correct
112 Correct 121 ms 23736 KB Output is correct
113 Correct 105 ms 29836 KB Output is correct
114 Correct 101 ms 28100 KB Output is correct
115 Correct 114 ms 26928 KB Output is correct
116 Correct 147 ms 25708 KB Output is correct
117 Correct 103 ms 23688 KB Output is correct
118 Correct 93 ms 23884 KB Output is correct
119 Correct 108 ms 23756 KB Output is correct
120 Correct 98 ms 23788 KB Output is correct
121 Correct 80 ms 23116 KB Output is correct
122 Correct 80 ms 22408 KB Output is correct
123 Correct 52 ms 19644 KB Output is correct
124 Correct 65 ms 24152 KB Output is correct
125 Correct 67 ms 24172 KB Output is correct
126 Correct 64 ms 24484 KB Output is correct
127 Correct 69 ms 24204 KB Output is correct
128 Correct 5 ms 9812 KB Output is correct
129 Correct 6 ms 9884 KB Output is correct
130 Correct 6 ms 9812 KB Output is correct
131 Correct 8 ms 9812 KB Output is correct
132 Correct 8 ms 9872 KB Output is correct
133 Correct 6 ms 9812 KB Output is correct
134 Correct 7 ms 9860 KB Output is correct
135 Correct 6 ms 9812 KB Output is correct
136 Correct 5 ms 9812 KB Output is correct
137 Correct 6 ms 9812 KB Output is correct
138 Correct 5 ms 9812 KB Output is correct
139 Correct 6 ms 9940 KB Output is correct
140 Correct 6 ms 9812 KB Output is correct
141 Correct 6 ms 9860 KB Output is correct
142 Correct 8 ms 9864 KB Output is correct
143 Correct 6 ms 9860 KB Output is correct
144 Correct 6 ms 9812 KB Output is correct
145 Correct 7 ms 9812 KB Output is correct
146 Correct 9 ms 9868 KB Output is correct
147 Correct 7 ms 9864 KB Output is correct
148 Correct 6 ms 9812 KB Output is correct
149 Correct 6 ms 9812 KB Output is correct
150 Correct 6 ms 9812 KB Output is correct
151 Correct 6 ms 9812 KB Output is correct
152 Correct 6 ms 9772 KB Output is correct
153 Correct 6 ms 9684 KB Output is correct
154 Correct 5 ms 9684 KB Output is correct
155 Correct 119 ms 23716 KB Output is correct
156 Correct 101 ms 23440 KB Output is correct
157 Correct 117 ms 23180 KB Output is correct
158 Correct 108 ms 23884 KB Output is correct
159 Correct 95 ms 22604 KB Output is correct
160 Correct 91 ms 22092 KB Output is correct
161 Correct 92 ms 21884 KB Output is correct
162 Correct 85 ms 21516 KB Output is correct
163 Correct 94 ms 21440 KB Output is correct
164 Correct 99 ms 21260 KB Output is correct
165 Correct 83 ms 21132 KB Output is correct
166 Correct 94 ms 21256 KB Output is correct
167 Correct 97 ms 21312 KB Output is correct
168 Correct 88 ms 23840 KB Output is correct
169 Correct 114 ms 29408 KB Output is correct
170 Correct 124 ms 27836 KB Output is correct
171 Correct 121 ms 28480 KB Output is correct
172 Correct 123 ms 27012 KB Output is correct
173 Correct 114 ms 23736 KB Output is correct
174 Correct 119 ms 23780 KB Output is correct
175 Correct 132 ms 23808 KB Output is correct
176 Correct 105 ms 22916 KB Output is correct
177 Correct 82 ms 22100 KB Output is correct
178 Correct 107 ms 24628 KB Output is correct
179 Correct 113 ms 24776 KB Output is correct
180 Correct 100 ms 24112 KB Output is correct
181 Correct 90 ms 24100 KB Output is correct
182 Correct 5 ms 9684 KB Output is correct
183 Correct 6 ms 9732 KB Output is correct
184 Correct 6 ms 9812 KB Output is correct
185 Correct 6 ms 9932 KB Output is correct
186 Correct 7 ms 9864 KB Output is correct
187 Correct 6 ms 9812 KB Output is correct
188 Correct 6 ms 9812 KB Output is correct
189 Correct 6 ms 9812 KB Output is correct
190 Correct 6 ms 9812 KB Output is correct
191 Correct 6 ms 9864 KB Output is correct
192 Correct 6 ms 9684 KB Output is correct
193 Correct 6 ms 9812 KB Output is correct
194 Correct 7 ms 9812 KB Output is correct
195 Correct 7 ms 9868 KB Output is correct
196 Correct 5 ms 9812 KB Output is correct
197 Correct 6 ms 9792 KB Output is correct
198 Correct 7 ms 9940 KB Output is correct
199 Correct 6 ms 9940 KB Output is correct
200 Correct 6 ms 9812 KB Output is correct
201 Correct 6 ms 9812 KB Output is correct
202 Correct 7 ms 9812 KB Output is correct
203 Correct 7 ms 9812 KB Output is correct
204 Correct 7 ms 9812 KB Output is correct
205 Correct 6 ms 9812 KB Output is correct
206 Correct 6 ms 9812 KB Output is correct
207 Correct 6 ms 9812 KB Output is correct
208 Correct 6 ms 9812 KB Output is correct
209 Correct 9 ms 13148 KB Output is correct
210 Correct 57 ms 19544 KB Output is correct
211 Correct 112 ms 24728 KB Output is correct
212 Correct 122 ms 28896 KB Output is correct
213 Correct 132 ms 31772 KB Output is correct
214 Correct 52 ms 22680 KB Output is correct
215 Correct 58 ms 22796 KB Output is correct
216 Correct 111 ms 24800 KB Output is correct
217 Correct 110 ms 23472 KB Output is correct
218 Correct 94 ms 21608 KB Output is correct
219 Correct 83 ms 21232 KB Output is correct
220 Correct 91 ms 21124 KB Output is correct
221 Correct 81 ms 21080 KB Output is correct
222 Correct 76 ms 22488 KB Output is correct
223 Correct 101 ms 26492 KB Output is correct
224 Correct 100 ms 25568 KB Output is correct
225 Correct 103 ms 23176 KB Output is correct
226 Correct 111 ms 23216 KB Output is correct
227 Correct 89 ms 23172 KB Output is correct
228 Correct 90 ms 22404 KB Output is correct
229 Correct 70 ms 21808 KB Output is correct
230 Correct 111 ms 23420 KB Output is correct
231 Correct 98 ms 23500 KB Output is correct