답안 #728659

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
728659 2023-04-22T19:23:55 Z myrcella 철인 이종 경기 (APIO18_duathlon) C++17
100 / 100
152 ms 34024 KB
//by szh
#include<bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pii pair<int,int>
#define pll pair<long long,long long>
#define pb push_back
#define debug(x) cerr<<#x<<"="<<x<<endl
#define pq priority_queue
#define inf 0x3f
#define rep(i,a,b) for (int i=a;i<(b);i++)
#define MP make_pair
#define SZ(x) (int(x.size()))
#define ll long long
#define mod 1000000007
#define ALL(x) x.begin(),x.end()
void inc(int &a,int b) {a=(a+b)%mod;}
void dec(int &a,int b) {a=(a-b+mod)%mod;}
int lowbit(int x) {return x&(-x);}
ll p0w(ll base,ll p) {ll ret=1;while(p>0){if (p%2ll==1ll) ret=ret*base%mod;base=base*base%mod;p/=2ll;}return ret;}

const int maxn = 200010;

int n,m;
vector <int> edge[maxn];
vector <int> tree[maxn];
ll dp[maxn][2];
int dfn[maxn],low[maxn];
int tot = 0,cnt;
ll ans = 0;
stack <int> s;

void solve(int u,int fa) {
	dfn[u] = 1;
	if (u<=n) dp[u][0]++;
	for (int v:tree[u]) {
		if (v==fa) continue;
//		debug(u),debug(v);
		solve(v,u);
		ans += dp[u][0]*dp[v][1] + dp[u][1]*dp[v][0];
		dp[u][0] += dp[v][0];
		dp[u][1] += dp[v][1];
		if (u<=n) dp[u][1] += dp[v][0];
	}
	if (u>n) {
		ll cnt = 0,tmp = 0;
//		debug(u);
		for (int v:tree[u]) {
			if (v==fa) continue;
			tmp += cnt*dp[v][0];
			cnt += dp[v][0];
			dp[u][1] += dp[v][0] * (SZ(tree[u])-2);
		}
		ans += tmp * (SZ(tree[u])-2);
//		debug(ans);
	}
}

void tarjan(int u,int fa) {
	dfn[u] = low[u] = tot++;
	s.push(u);
	for (int v:edge[u]) {
		if (v==fa) continue;
		if (dfn[v]==-1) {
			tarjan(v,u);
			low[u] = min(low[u],low[v]);
//			cout<<u<<" "<<v<<" "<<dfn[u]<<" "<<low[v]<<endl;
			if (low[v]>=dfn[u]) {
				while (1) {
					int cur = s.top();
					s.pop();
					tree[cnt].pb(cur);
					tree[cur].pb(cnt);
					if (cur==v) break;
				}
				tree[cnt].pb(u);
				tree[u].pb(cnt);
				cnt++;
			}
			
		}
		else low[u] = min(low[u],dfn[v]);
	}
}

int main() {
//	freopen("input.txt","r",stdin);	
	std::ios::sync_with_stdio(false);cin.tie(0);
	memset(low,-1,sizeof(low));
	memset(dfn,-1,sizeof(dfn));
	cin>>n>>m;
	cnt=n+1;
	rep(i,0,m) {
		int u,v;
		cin>>u>>v;
		edge[u].pb(v);
		edge[v].pb(u);
	}
	rep(i,1,n+1) if (dfn[i]==-1) tarjan(i,-1);
	memset(dfn,-1,sizeof(dfn));
	rep(i,1,n+1) if (dfn[i]==-1) solve(i,-1);
	cout<<2*ans;
	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11220 KB Output is correct
2 Correct 6 ms 11284 KB Output is correct
3 Correct 7 ms 11220 KB Output is correct
4 Correct 5 ms 11220 KB Output is correct
5 Correct 6 ms 11292 KB Output is correct
6 Correct 6 ms 11236 KB Output is correct
7 Correct 7 ms 11252 KB Output is correct
8 Correct 7 ms 11288 KB Output is correct
9 Correct 6 ms 11292 KB Output is correct
10 Correct 6 ms 11220 KB Output is correct
11 Correct 6 ms 11220 KB Output is correct
12 Correct 6 ms 11220 KB Output is correct
13 Correct 6 ms 11220 KB Output is correct
14 Correct 6 ms 11288 KB Output is correct
15 Correct 6 ms 11220 KB Output is correct
16 Correct 6 ms 11220 KB Output is correct
17 Correct 6 ms 11220 KB Output is correct
18 Correct 6 ms 11220 KB Output is correct
19 Correct 6 ms 11292 KB Output is correct
20 Correct 6 ms 11220 KB Output is correct
21 Correct 7 ms 11288 KB Output is correct
22 Correct 6 ms 11220 KB Output is correct
23 Correct 8 ms 11220 KB Output is correct
24 Correct 6 ms 11220 KB Output is correct
25 Correct 6 ms 11220 KB Output is correct
26 Correct 6 ms 11288 KB Output is correct
27 Correct 6 ms 11220 KB Output is correct
28 Correct 6 ms 11168 KB Output is correct
29 Correct 6 ms 11288 KB Output is correct
30 Correct 6 ms 11288 KB Output is correct
31 Correct 6 ms 11164 KB Output is correct
32 Correct 6 ms 11220 KB Output is correct
33 Correct 6 ms 11220 KB Output is correct
34 Correct 6 ms 11220 KB Output is correct
35 Correct 7 ms 11220 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11220 KB Output is correct
2 Correct 6 ms 11284 KB Output is correct
3 Correct 7 ms 11220 KB Output is correct
4 Correct 5 ms 11220 KB Output is correct
5 Correct 6 ms 11292 KB Output is correct
6 Correct 6 ms 11236 KB Output is correct
7 Correct 7 ms 11252 KB Output is correct
8 Correct 7 ms 11288 KB Output is correct
9 Correct 6 ms 11292 KB Output is correct
10 Correct 6 ms 11220 KB Output is correct
11 Correct 6 ms 11220 KB Output is correct
12 Correct 6 ms 11220 KB Output is correct
13 Correct 6 ms 11220 KB Output is correct
14 Correct 6 ms 11288 KB Output is correct
15 Correct 6 ms 11220 KB Output is correct
16 Correct 6 ms 11220 KB Output is correct
17 Correct 6 ms 11220 KB Output is correct
18 Correct 6 ms 11220 KB Output is correct
19 Correct 6 ms 11292 KB Output is correct
20 Correct 6 ms 11220 KB Output is correct
21 Correct 7 ms 11288 KB Output is correct
22 Correct 6 ms 11220 KB Output is correct
23 Correct 8 ms 11220 KB Output is correct
24 Correct 6 ms 11220 KB Output is correct
25 Correct 6 ms 11220 KB Output is correct
26 Correct 6 ms 11288 KB Output is correct
27 Correct 6 ms 11220 KB Output is correct
28 Correct 6 ms 11168 KB Output is correct
29 Correct 6 ms 11288 KB Output is correct
30 Correct 6 ms 11288 KB Output is correct
31 Correct 6 ms 11164 KB Output is correct
32 Correct 6 ms 11220 KB Output is correct
33 Correct 6 ms 11220 KB Output is correct
34 Correct 6 ms 11220 KB Output is correct
35 Correct 7 ms 11220 KB Output is correct
36 Correct 6 ms 11220 KB Output is correct
37 Correct 7 ms 11376 KB Output is correct
38 Correct 7 ms 11288 KB Output is correct
39 Correct 8 ms 11284 KB Output is correct
40 Correct 6 ms 11220 KB Output is correct
41 Correct 7 ms 11220 KB Output is correct
42 Correct 6 ms 11220 KB Output is correct
43 Correct 7 ms 11292 KB Output is correct
44 Correct 6 ms 11220 KB Output is correct
45 Correct 6 ms 11220 KB Output is correct
46 Correct 6 ms 11220 KB Output is correct
47 Correct 6 ms 11240 KB Output is correct
48 Correct 8 ms 11284 KB Output is correct
49 Correct 6 ms 11220 KB Output is correct
50 Correct 6 ms 11204 KB Output is correct
51 Correct 6 ms 11220 KB Output is correct
52 Correct 6 ms 11220 KB Output is correct
53 Correct 6 ms 11220 KB Output is correct
54 Correct 6 ms 11220 KB Output is correct
55 Correct 6 ms 11288 KB Output is correct
56 Correct 6 ms 11288 KB Output is correct
57 Correct 6 ms 11292 KB Output is correct
58 Correct 6 ms 11220 KB Output is correct
59 Correct 6 ms 11220 KB Output is correct
60 Correct 6 ms 11224 KB Output is correct
61 Correct 6 ms 11224 KB Output is correct
62 Correct 6 ms 11220 KB Output is correct
63 Correct 6 ms 11220 KB Output is correct
64 Correct 6 ms 11220 KB Output is correct
65 Correct 6 ms 11288 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 64 ms 30372 KB Output is correct
2 Correct 71 ms 31716 KB Output is correct
3 Correct 81 ms 30600 KB Output is correct
4 Correct 88 ms 30016 KB Output is correct
5 Correct 84 ms 27160 KB Output is correct
6 Correct 102 ms 29376 KB Output is correct
7 Correct 85 ms 26956 KB Output is correct
8 Correct 78 ms 27480 KB Output is correct
9 Correct 77 ms 25116 KB Output is correct
10 Correct 94 ms 25484 KB Output is correct
11 Correct 76 ms 22520 KB Output is correct
12 Correct 76 ms 22232 KB Output is correct
13 Correct 63 ms 22188 KB Output is correct
14 Correct 59 ms 21784 KB Output is correct
15 Correct 59 ms 20684 KB Output is correct
16 Correct 56 ms 20464 KB Output is correct
17 Correct 8 ms 13208 KB Output is correct
18 Correct 8 ms 13220 KB Output is correct
19 Correct 8 ms 13200 KB Output is correct
20 Correct 8 ms 13208 KB Output is correct
21 Correct 9 ms 13204 KB Output is correct
22 Correct 8 ms 13268 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11348 KB Output is correct
2 Correct 8 ms 11348 KB Output is correct
3 Correct 7 ms 11348 KB Output is correct
4 Correct 7 ms 11476 KB Output is correct
5 Correct 7 ms 11476 KB Output is correct
6 Correct 6 ms 11476 KB Output is correct
7 Correct 6 ms 11476 KB Output is correct
8 Correct 6 ms 11348 KB Output is correct
9 Correct 6 ms 11348 KB Output is correct
10 Correct 6 ms 11348 KB Output is correct
11 Correct 6 ms 11348 KB Output is correct
12 Correct 6 ms 11348 KB Output is correct
13 Correct 6 ms 11348 KB Output is correct
14 Correct 6 ms 11348 KB Output is correct
15 Correct 6 ms 11368 KB Output is correct
16 Correct 7 ms 11348 KB Output is correct
17 Correct 7 ms 11420 KB Output is correct
18 Correct 6 ms 11348 KB Output is correct
19 Correct 7 ms 11348 KB Output is correct
20 Correct 7 ms 11352 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 89 ms 24008 KB Output is correct
2 Correct 91 ms 24004 KB Output is correct
3 Correct 87 ms 23888 KB Output is correct
4 Correct 125 ms 23936 KB Output is correct
5 Correct 87 ms 23996 KB Output is correct
6 Correct 101 ms 34024 KB Output is correct
7 Correct 109 ms 30696 KB Output is correct
8 Correct 100 ms 28872 KB Output is correct
9 Correct 103 ms 27188 KB Output is correct
10 Correct 88 ms 23916 KB Output is correct
11 Correct 92 ms 23988 KB Output is correct
12 Correct 88 ms 23968 KB Output is correct
13 Correct 82 ms 23960 KB Output is correct
14 Correct 97 ms 23280 KB Output is correct
15 Correct 65 ms 22692 KB Output is correct
16 Correct 43 ms 20020 KB Output is correct
17 Correct 57 ms 24512 KB Output is correct
18 Correct 58 ms 24516 KB Output is correct
19 Correct 57 ms 24656 KB Output is correct
20 Correct 62 ms 24528 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 11328 KB Output is correct
2 Correct 6 ms 11348 KB Output is correct
3 Correct 6 ms 11348 KB Output is correct
4 Correct 6 ms 11348 KB Output is correct
5 Correct 8 ms 11292 KB Output is correct
6 Correct 7 ms 11348 KB Output is correct
7 Correct 8 ms 11420 KB Output is correct
8 Correct 7 ms 11296 KB Output is correct
9 Correct 6 ms 11292 KB Output is correct
10 Correct 7 ms 11348 KB Output is correct
11 Correct 6 ms 11376 KB Output is correct
12 Correct 7 ms 11424 KB Output is correct
13 Correct 7 ms 11440 KB Output is correct
14 Correct 6 ms 11348 KB Output is correct
15 Correct 7 ms 11348 KB Output is correct
16 Correct 7 ms 11300 KB Output is correct
17 Correct 6 ms 11348 KB Output is correct
18 Correct 7 ms 11348 KB Output is correct
19 Correct 6 ms 11348 KB Output is correct
20 Correct 7 ms 11296 KB Output is correct
21 Correct 7 ms 11348 KB Output is correct
22 Correct 8 ms 11424 KB Output is correct
23 Correct 6 ms 11348 KB Output is correct
24 Correct 6 ms 11296 KB Output is correct
25 Correct 6 ms 11232 KB Output is correct
26 Correct 6 ms 11220 KB Output is correct
27 Correct 6 ms 11280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 81 ms 23904 KB Output is correct
2 Correct 86 ms 23912 KB Output is correct
3 Correct 106 ms 23016 KB Output is correct
4 Correct 103 ms 23504 KB Output is correct
5 Correct 84 ms 22420 KB Output is correct
6 Correct 83 ms 21956 KB Output is correct
7 Correct 96 ms 21700 KB Output is correct
8 Correct 90 ms 21412 KB Output is correct
9 Correct 69 ms 21384 KB Output is correct
10 Correct 74 ms 21292 KB Output is correct
11 Correct 78 ms 21112 KB Output is correct
12 Correct 77 ms 21264 KB Output is correct
13 Correct 90 ms 21332 KB Output is correct
14 Correct 75 ms 23700 KB Output is correct
15 Correct 95 ms 31472 KB Output is correct
16 Correct 115 ms 29240 KB Output is correct
17 Correct 117 ms 29904 KB Output is correct
18 Correct 102 ms 27804 KB Output is correct
19 Correct 97 ms 23564 KB Output is correct
20 Correct 88 ms 23520 KB Output is correct
21 Correct 94 ms 23484 KB Output is correct
22 Correct 87 ms 22940 KB Output is correct
23 Correct 74 ms 22188 KB Output is correct
24 Correct 86 ms 25064 KB Output is correct
25 Correct 91 ms 24856 KB Output is correct
26 Correct 85 ms 24108 KB Output is correct
27 Correct 89 ms 24120 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11220 KB Output is correct
2 Correct 6 ms 11284 KB Output is correct
3 Correct 7 ms 11220 KB Output is correct
4 Correct 5 ms 11220 KB Output is correct
5 Correct 6 ms 11292 KB Output is correct
6 Correct 6 ms 11236 KB Output is correct
7 Correct 7 ms 11252 KB Output is correct
8 Correct 7 ms 11288 KB Output is correct
9 Correct 6 ms 11292 KB Output is correct
10 Correct 6 ms 11220 KB Output is correct
11 Correct 6 ms 11220 KB Output is correct
12 Correct 6 ms 11220 KB Output is correct
13 Correct 6 ms 11220 KB Output is correct
14 Correct 6 ms 11288 KB Output is correct
15 Correct 6 ms 11220 KB Output is correct
16 Correct 6 ms 11220 KB Output is correct
17 Correct 6 ms 11220 KB Output is correct
18 Correct 6 ms 11220 KB Output is correct
19 Correct 6 ms 11292 KB Output is correct
20 Correct 6 ms 11220 KB Output is correct
21 Correct 7 ms 11288 KB Output is correct
22 Correct 6 ms 11220 KB Output is correct
23 Correct 8 ms 11220 KB Output is correct
24 Correct 6 ms 11220 KB Output is correct
25 Correct 6 ms 11220 KB Output is correct
26 Correct 6 ms 11288 KB Output is correct
27 Correct 6 ms 11220 KB Output is correct
28 Correct 6 ms 11168 KB Output is correct
29 Correct 6 ms 11288 KB Output is correct
30 Correct 6 ms 11288 KB Output is correct
31 Correct 6 ms 11164 KB Output is correct
32 Correct 6 ms 11220 KB Output is correct
33 Correct 6 ms 11220 KB Output is correct
34 Correct 6 ms 11220 KB Output is correct
35 Correct 7 ms 11220 KB Output is correct
36 Correct 6 ms 11220 KB Output is correct
37 Correct 7 ms 11376 KB Output is correct
38 Correct 7 ms 11288 KB Output is correct
39 Correct 8 ms 11284 KB Output is correct
40 Correct 6 ms 11220 KB Output is correct
41 Correct 7 ms 11220 KB Output is correct
42 Correct 6 ms 11220 KB Output is correct
43 Correct 7 ms 11292 KB Output is correct
44 Correct 6 ms 11220 KB Output is correct
45 Correct 6 ms 11220 KB Output is correct
46 Correct 6 ms 11220 KB Output is correct
47 Correct 6 ms 11240 KB Output is correct
48 Correct 8 ms 11284 KB Output is correct
49 Correct 6 ms 11220 KB Output is correct
50 Correct 6 ms 11204 KB Output is correct
51 Correct 6 ms 11220 KB Output is correct
52 Correct 6 ms 11220 KB Output is correct
53 Correct 6 ms 11220 KB Output is correct
54 Correct 6 ms 11220 KB Output is correct
55 Correct 6 ms 11288 KB Output is correct
56 Correct 6 ms 11288 KB Output is correct
57 Correct 6 ms 11292 KB Output is correct
58 Correct 6 ms 11220 KB Output is correct
59 Correct 6 ms 11220 KB Output is correct
60 Correct 6 ms 11224 KB Output is correct
61 Correct 6 ms 11224 KB Output is correct
62 Correct 6 ms 11220 KB Output is correct
63 Correct 6 ms 11220 KB Output is correct
64 Correct 6 ms 11220 KB Output is correct
65 Correct 6 ms 11288 KB Output is correct
66 Correct 8 ms 11220 KB Output is correct
67 Correct 6 ms 11348 KB Output is correct
68 Correct 7 ms 11348 KB Output is correct
69 Correct 6 ms 11348 KB Output is correct
70 Correct 7 ms 11428 KB Output is correct
71 Correct 7 ms 11348 KB Output is correct
72 Correct 7 ms 11348 KB Output is correct
73 Correct 7 ms 11400 KB Output is correct
74 Correct 6 ms 11348 KB Output is correct
75 Correct 7 ms 11292 KB Output is correct
76 Correct 6 ms 11172 KB Output is correct
77 Correct 7 ms 11348 KB Output is correct
78 Correct 6 ms 11348 KB Output is correct
79 Correct 6 ms 11304 KB Output is correct
80 Correct 6 ms 11348 KB Output is correct
81 Correct 6 ms 11296 KB Output is correct
82 Correct 6 ms 11428 KB Output is correct
83 Correct 6 ms 11352 KB Output is correct
84 Correct 6 ms 11348 KB Output is correct
85 Correct 7 ms 11432 KB Output is correct
86 Correct 7 ms 11296 KB Output is correct
87 Correct 8 ms 11300 KB Output is correct
88 Correct 7 ms 11348 KB Output is correct
89 Correct 6 ms 11296 KB Output is correct
90 Correct 6 ms 11296 KB Output is correct
91 Correct 6 ms 11348 KB Output is correct
92 Correct 7 ms 11280 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11220 KB Output is correct
2 Correct 6 ms 11284 KB Output is correct
3 Correct 7 ms 11220 KB Output is correct
4 Correct 5 ms 11220 KB Output is correct
5 Correct 6 ms 11292 KB Output is correct
6 Correct 6 ms 11236 KB Output is correct
7 Correct 7 ms 11252 KB Output is correct
8 Correct 7 ms 11288 KB Output is correct
9 Correct 6 ms 11292 KB Output is correct
10 Correct 6 ms 11220 KB Output is correct
11 Correct 6 ms 11220 KB Output is correct
12 Correct 6 ms 11220 KB Output is correct
13 Correct 6 ms 11220 KB Output is correct
14 Correct 6 ms 11288 KB Output is correct
15 Correct 6 ms 11220 KB Output is correct
16 Correct 6 ms 11220 KB Output is correct
17 Correct 6 ms 11220 KB Output is correct
18 Correct 6 ms 11220 KB Output is correct
19 Correct 6 ms 11292 KB Output is correct
20 Correct 6 ms 11220 KB Output is correct
21 Correct 7 ms 11288 KB Output is correct
22 Correct 6 ms 11220 KB Output is correct
23 Correct 8 ms 11220 KB Output is correct
24 Correct 6 ms 11220 KB Output is correct
25 Correct 6 ms 11220 KB Output is correct
26 Correct 6 ms 11288 KB Output is correct
27 Correct 6 ms 11220 KB Output is correct
28 Correct 6 ms 11168 KB Output is correct
29 Correct 6 ms 11288 KB Output is correct
30 Correct 6 ms 11288 KB Output is correct
31 Correct 6 ms 11164 KB Output is correct
32 Correct 6 ms 11220 KB Output is correct
33 Correct 6 ms 11220 KB Output is correct
34 Correct 6 ms 11220 KB Output is correct
35 Correct 7 ms 11220 KB Output is correct
36 Correct 6 ms 11220 KB Output is correct
37 Correct 7 ms 11376 KB Output is correct
38 Correct 7 ms 11288 KB Output is correct
39 Correct 8 ms 11284 KB Output is correct
40 Correct 6 ms 11220 KB Output is correct
41 Correct 7 ms 11220 KB Output is correct
42 Correct 6 ms 11220 KB Output is correct
43 Correct 7 ms 11292 KB Output is correct
44 Correct 6 ms 11220 KB Output is correct
45 Correct 6 ms 11220 KB Output is correct
46 Correct 6 ms 11220 KB Output is correct
47 Correct 6 ms 11240 KB Output is correct
48 Correct 8 ms 11284 KB Output is correct
49 Correct 6 ms 11220 KB Output is correct
50 Correct 6 ms 11204 KB Output is correct
51 Correct 6 ms 11220 KB Output is correct
52 Correct 6 ms 11220 KB Output is correct
53 Correct 6 ms 11220 KB Output is correct
54 Correct 6 ms 11220 KB Output is correct
55 Correct 6 ms 11288 KB Output is correct
56 Correct 6 ms 11288 KB Output is correct
57 Correct 6 ms 11292 KB Output is correct
58 Correct 6 ms 11220 KB Output is correct
59 Correct 6 ms 11220 KB Output is correct
60 Correct 6 ms 11224 KB Output is correct
61 Correct 6 ms 11224 KB Output is correct
62 Correct 6 ms 11220 KB Output is correct
63 Correct 6 ms 11220 KB Output is correct
64 Correct 6 ms 11220 KB Output is correct
65 Correct 6 ms 11288 KB Output is correct
66 Correct 64 ms 30372 KB Output is correct
67 Correct 71 ms 31716 KB Output is correct
68 Correct 81 ms 30600 KB Output is correct
69 Correct 88 ms 30016 KB Output is correct
70 Correct 84 ms 27160 KB Output is correct
71 Correct 102 ms 29376 KB Output is correct
72 Correct 85 ms 26956 KB Output is correct
73 Correct 78 ms 27480 KB Output is correct
74 Correct 77 ms 25116 KB Output is correct
75 Correct 94 ms 25484 KB Output is correct
76 Correct 76 ms 22520 KB Output is correct
77 Correct 76 ms 22232 KB Output is correct
78 Correct 63 ms 22188 KB Output is correct
79 Correct 59 ms 21784 KB Output is correct
80 Correct 59 ms 20684 KB Output is correct
81 Correct 56 ms 20464 KB Output is correct
82 Correct 8 ms 13208 KB Output is correct
83 Correct 8 ms 13220 KB Output is correct
84 Correct 8 ms 13200 KB Output is correct
85 Correct 8 ms 13208 KB Output is correct
86 Correct 9 ms 13204 KB Output is correct
87 Correct 8 ms 13268 KB Output is correct
88 Correct 6 ms 11348 KB Output is correct
89 Correct 8 ms 11348 KB Output is correct
90 Correct 7 ms 11348 KB Output is correct
91 Correct 7 ms 11476 KB Output is correct
92 Correct 7 ms 11476 KB Output is correct
93 Correct 6 ms 11476 KB Output is correct
94 Correct 6 ms 11476 KB Output is correct
95 Correct 6 ms 11348 KB Output is correct
96 Correct 6 ms 11348 KB Output is correct
97 Correct 6 ms 11348 KB Output is correct
98 Correct 6 ms 11348 KB Output is correct
99 Correct 6 ms 11348 KB Output is correct
100 Correct 6 ms 11348 KB Output is correct
101 Correct 6 ms 11348 KB Output is correct
102 Correct 6 ms 11368 KB Output is correct
103 Correct 7 ms 11348 KB Output is correct
104 Correct 7 ms 11420 KB Output is correct
105 Correct 6 ms 11348 KB Output is correct
106 Correct 7 ms 11348 KB Output is correct
107 Correct 7 ms 11352 KB Output is correct
108 Correct 89 ms 24008 KB Output is correct
109 Correct 91 ms 24004 KB Output is correct
110 Correct 87 ms 23888 KB Output is correct
111 Correct 125 ms 23936 KB Output is correct
112 Correct 87 ms 23996 KB Output is correct
113 Correct 101 ms 34024 KB Output is correct
114 Correct 109 ms 30696 KB Output is correct
115 Correct 100 ms 28872 KB Output is correct
116 Correct 103 ms 27188 KB Output is correct
117 Correct 88 ms 23916 KB Output is correct
118 Correct 92 ms 23988 KB Output is correct
119 Correct 88 ms 23968 KB Output is correct
120 Correct 82 ms 23960 KB Output is correct
121 Correct 97 ms 23280 KB Output is correct
122 Correct 65 ms 22692 KB Output is correct
123 Correct 43 ms 20020 KB Output is correct
124 Correct 57 ms 24512 KB Output is correct
125 Correct 58 ms 24516 KB Output is correct
126 Correct 57 ms 24656 KB Output is correct
127 Correct 62 ms 24528 KB Output is correct
128 Correct 7 ms 11328 KB Output is correct
129 Correct 6 ms 11348 KB Output is correct
130 Correct 6 ms 11348 KB Output is correct
131 Correct 6 ms 11348 KB Output is correct
132 Correct 8 ms 11292 KB Output is correct
133 Correct 7 ms 11348 KB Output is correct
134 Correct 8 ms 11420 KB Output is correct
135 Correct 7 ms 11296 KB Output is correct
136 Correct 6 ms 11292 KB Output is correct
137 Correct 7 ms 11348 KB Output is correct
138 Correct 6 ms 11376 KB Output is correct
139 Correct 7 ms 11424 KB Output is correct
140 Correct 7 ms 11440 KB Output is correct
141 Correct 6 ms 11348 KB Output is correct
142 Correct 7 ms 11348 KB Output is correct
143 Correct 7 ms 11300 KB Output is correct
144 Correct 6 ms 11348 KB Output is correct
145 Correct 7 ms 11348 KB Output is correct
146 Correct 6 ms 11348 KB Output is correct
147 Correct 7 ms 11296 KB Output is correct
148 Correct 7 ms 11348 KB Output is correct
149 Correct 8 ms 11424 KB Output is correct
150 Correct 6 ms 11348 KB Output is correct
151 Correct 6 ms 11296 KB Output is correct
152 Correct 6 ms 11232 KB Output is correct
153 Correct 6 ms 11220 KB Output is correct
154 Correct 6 ms 11280 KB Output is correct
155 Correct 81 ms 23904 KB Output is correct
156 Correct 86 ms 23912 KB Output is correct
157 Correct 106 ms 23016 KB Output is correct
158 Correct 103 ms 23504 KB Output is correct
159 Correct 84 ms 22420 KB Output is correct
160 Correct 83 ms 21956 KB Output is correct
161 Correct 96 ms 21700 KB Output is correct
162 Correct 90 ms 21412 KB Output is correct
163 Correct 69 ms 21384 KB Output is correct
164 Correct 74 ms 21292 KB Output is correct
165 Correct 78 ms 21112 KB Output is correct
166 Correct 77 ms 21264 KB Output is correct
167 Correct 90 ms 21332 KB Output is correct
168 Correct 75 ms 23700 KB Output is correct
169 Correct 95 ms 31472 KB Output is correct
170 Correct 115 ms 29240 KB Output is correct
171 Correct 117 ms 29904 KB Output is correct
172 Correct 102 ms 27804 KB Output is correct
173 Correct 97 ms 23564 KB Output is correct
174 Correct 88 ms 23520 KB Output is correct
175 Correct 94 ms 23484 KB Output is correct
176 Correct 87 ms 22940 KB Output is correct
177 Correct 74 ms 22188 KB Output is correct
178 Correct 86 ms 25064 KB Output is correct
179 Correct 91 ms 24856 KB Output is correct
180 Correct 85 ms 24108 KB Output is correct
181 Correct 89 ms 24120 KB Output is correct
182 Correct 8 ms 11220 KB Output is correct
183 Correct 6 ms 11348 KB Output is correct
184 Correct 7 ms 11348 KB Output is correct
185 Correct 6 ms 11348 KB Output is correct
186 Correct 7 ms 11428 KB Output is correct
187 Correct 7 ms 11348 KB Output is correct
188 Correct 7 ms 11348 KB Output is correct
189 Correct 7 ms 11400 KB Output is correct
190 Correct 6 ms 11348 KB Output is correct
191 Correct 7 ms 11292 KB Output is correct
192 Correct 6 ms 11172 KB Output is correct
193 Correct 7 ms 11348 KB Output is correct
194 Correct 6 ms 11348 KB Output is correct
195 Correct 6 ms 11304 KB Output is correct
196 Correct 6 ms 11348 KB Output is correct
197 Correct 6 ms 11296 KB Output is correct
198 Correct 6 ms 11428 KB Output is correct
199 Correct 6 ms 11352 KB Output is correct
200 Correct 6 ms 11348 KB Output is correct
201 Correct 7 ms 11432 KB Output is correct
202 Correct 7 ms 11296 KB Output is correct
203 Correct 8 ms 11300 KB Output is correct
204 Correct 7 ms 11348 KB Output is correct
205 Correct 6 ms 11296 KB Output is correct
206 Correct 6 ms 11296 KB Output is correct
207 Correct 6 ms 11348 KB Output is correct
208 Correct 7 ms 11280 KB Output is correct
209 Correct 8 ms 13212 KB Output is correct
210 Correct 47 ms 19924 KB Output is correct
211 Correct 82 ms 24404 KB Output is correct
212 Correct 89 ms 27224 KB Output is correct
213 Correct 152 ms 29376 KB Output is correct
214 Correct 50 ms 22264 KB Output is correct
215 Correct 51 ms 22016 KB Output is correct
216 Correct 92 ms 24352 KB Output is correct
217 Correct 119 ms 22988 KB Output is correct
218 Correct 94 ms 21488 KB Output is correct
219 Correct 66 ms 21116 KB Output is correct
220 Correct 76 ms 21096 KB Output is correct
221 Correct 84 ms 21072 KB Output is correct
222 Correct 67 ms 22428 KB Output is correct
223 Correct 111 ms 25940 KB Output is correct
224 Correct 102 ms 24828 KB Output is correct
225 Correct 92 ms 22624 KB Output is correct
226 Correct 86 ms 22604 KB Output is correct
227 Correct 94 ms 22628 KB Output is correct
228 Correct 93 ms 22228 KB Output is correct
229 Correct 69 ms 21824 KB Output is correct
230 Correct 99 ms 23264 KB Output is correct
231 Correct 95 ms 23280 KB Output is correct