Submission #50346

# Submission time Handle Problem Language Result Execution time Memory
50346 2018-06-10T12:17:20 Z zscoder Duathlon (APIO18_duathlon) C++17
100 / 100
359 ms 60096 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll,ll> ii;

#define fi first
#define se second
#define pb push_back
#define mp make_pair

vi adj[533113];
ll disc[533113];
ll low[533113];
vector<vector<ii> > bicon;
ll timer;
stack<ii> st;
bool isconn[533113];
bool isart[533113];
ll siz[510511];
vi tree[510511];
ll n,m; 

void dfs(ll u, ll p)
{
	disc[u]=++timer; ll child=0; low[u]=disc[u];
	for(ll v:adj[u])
	{
		if(v==p) continue;
		if(!disc[v])
		{
			child++;
			st.push(mp(u,v));
			dfs(v,u);
			low[u] = min(low[u], low[v]);
			if((p==-1&&child>1)||(p!=-1&&low[v]>=disc[u]))
			{
				isart[u] = 1; bicon.pb(vector<ii>());
				while(!st.empty()&&st.top()!=mp(u,v))
				{
					bicon.back().pb(st.top()); st.pop();
				}
				bicon.back().pb(st.top()); st.pop();
			}
		}
		else if(disc[v]<disc[u])
		{
			low[u] = min(low[u], disc[v]);
			st.push(mp(u,v));
		}
	}
}

ll dp[511211];
ll vis[511511];
ll cc; vi C;
ll tot[511511];
ll par[515115];
void prep_tree(ll u, ll p)
{
	C.pb(u); cc+=siz[u]; par[u]=p;
	dp[u] = siz[u]; vis[u]=1;
	for(ll v:tree[u])
	{
		if(v==p) continue;
		prep_tree(v,u);
		dp[u]+=dp[v];
	}
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	cin>>n>>m; //do for each cc
	for(ll i=0;i<m;i++)
	{
		ll u,v; cin>>u>>v; u--; v--;
		adj[u].pb(v); adj[v].pb(u);
	}
	timer=1;
	for(ll i=0;i<n;i++)
	{
		if(!disc[i]) 
		{
			dfs(i,-1);
			if(!st.empty())
			{
				bicon.pb(vector<ii>());
				while(!st.empty())
				{
					bicon.back().pb(st.top()); st.pop();
				}
			}
		}
	}
	for(ll i=0;i<bicon.size();i++)
	{
		set<ll> S; set<ll> ss;
		for(ii v:bicon[i])
		{
			if(!isart[v.fi]) S.insert(v.fi);
			else ss.insert(v.fi);
			if(!isart[v.se]) S.insert(v.se);
			else ss.insert(v.se);
		}
		for(ll j:ss) 
		{
			tree[j].pb(n+i); tree[n+i].pb(j);
			//cerr<<"ADD EDGE "<<j<<' '<<n+i<<'\n';
		}
		//cerr<<"BICON "<<n+i<<' '<<S.size()<<'\n';
		siz[n+i] = ll(S.size()); //if cycle then alrdy +1
	}
	for(ll i=0;i<n;i++)
	{
		siz[i]=1;
	}
	for(ll i=0;i<n+bicon.size();i++)
	{
		if(!vis[i])
		{
			C.clear(); cc=0;
			prep_tree(i,-1);
			for(ll v:C)
			{
				tot[v] = cc;
			}
		}
	}
	ll ans = 0;
	for(ll i=0;i<n+bicon.size();i++)
	{
		if(i<n)
		{
			vi vec;
			for(ll j:tree[i])
			{
				ll v=dp[j];
				if(j==par[i])
				{
					v=tot[i]-dp[i];
				}
				vec.pb(v);
			}
			ll sos = 0; ll sum = 0;
			for(auto x:vec)
			{
				sos+=ll(x)*x;
				sum+=x;
			}
			ll res=0;
			res += sum*sum - sos;
			for(ll j:tree[i])
			{
				res += siz[j]*(siz[j]-1);
			}
			ans+=res;
			//cerr<<"ANS "<<i<<' '<<res<<'\n';
		}
		else
		{
			ll sz = siz[i]; ll res=0;
			res += sz*(sz-1)*(sz-2); //all 3 from here
			res += 2LL*sz*(sz-1)*(tot[i]-sz); //here-here-out
			vi vec; ll sm=0;
			ll neigh=0;
			for(ll j:tree[i])
			{
				neigh++;
				ll v=dp[j];
				if(j==par[i])
				{
					v=tot[i]-dp[i];
				}
				//cerr<<v<<' ';
				vec.pb(v);
				sm+=v;
			}
			//cerr<<'\n';
			assert(sm==tot[i]-sz);
			ll sos = 0; ll sum = 0;
			for(auto x:vec)
			{
				sos+=ll(x)*x;
				sum+=x;
			}
			res += sz*(sum*sum-sos);//out-here-out
			res += max(0LL,ll(neigh-2))*(sum*sum-sos);
			res += max(0LL,ll(neigh-1))*sz*2LL*sum;
			for(ll j:tree[i])
			{
				res += sz*siz[j]*(siz[j]-1);
			}
			//cerr<<"ANS "<<i<<' '<<res<<'\n';
			ans+=res;
		}
	}
	cout<<ans<<'\n';
}

Compilation message

count_triplets.cpp: In function 'int main()':
count_triplets.cpp:98:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(ll i=0;i<bicon.size();i++)
             ~^~~~~~~~~~~~~
count_triplets.cpp:120:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(ll i=0;i<n+bicon.size();i++)
             ~^~~~~~~~~~~~~~~
count_triplets.cpp:133:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(ll i=0;i<n+bicon.size();i++)
             ~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 21 ms 24952 KB Output is correct
2 Correct 21 ms 25052 KB Output is correct
3 Correct 22 ms 25052 KB Output is correct
4 Correct 21 ms 25052 KB Output is correct
5 Correct 22 ms 25052 KB Output is correct
6 Correct 21 ms 25052 KB Output is correct
7 Correct 22 ms 25052 KB Output is correct
8 Correct 22 ms 25096 KB Output is correct
9 Correct 22 ms 25096 KB Output is correct
10 Correct 21 ms 25096 KB Output is correct
11 Correct 25 ms 25172 KB Output is correct
12 Correct 21 ms 25172 KB Output is correct
13 Correct 21 ms 25172 KB Output is correct
14 Correct 21 ms 25172 KB Output is correct
15 Correct 21 ms 25172 KB Output is correct
16 Correct 21 ms 25172 KB Output is correct
17 Correct 20 ms 25172 KB Output is correct
18 Correct 24 ms 25172 KB Output is correct
19 Correct 21 ms 25172 KB Output is correct
20 Correct 21 ms 25172 KB Output is correct
21 Correct 21 ms 25172 KB Output is correct
22 Correct 21 ms 25172 KB Output is correct
23 Correct 25 ms 25196 KB Output is correct
24 Correct 24 ms 25196 KB Output is correct
25 Correct 20 ms 25196 KB Output is correct
26 Correct 27 ms 25212 KB Output is correct
27 Correct 21 ms 25212 KB Output is correct
28 Correct 26 ms 25212 KB Output is correct
29 Correct 27 ms 25212 KB Output is correct
30 Correct 22 ms 25212 KB Output is correct
31 Correct 25 ms 25212 KB Output is correct
32 Correct 21 ms 25212 KB Output is correct
33 Correct 21 ms 25212 KB Output is correct
34 Correct 22 ms 25212 KB Output is correct
35 Correct 21 ms 25212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 24952 KB Output is correct
2 Correct 21 ms 25052 KB Output is correct
3 Correct 22 ms 25052 KB Output is correct
4 Correct 21 ms 25052 KB Output is correct
5 Correct 22 ms 25052 KB Output is correct
6 Correct 21 ms 25052 KB Output is correct
7 Correct 22 ms 25052 KB Output is correct
8 Correct 22 ms 25096 KB Output is correct
9 Correct 22 ms 25096 KB Output is correct
10 Correct 21 ms 25096 KB Output is correct
11 Correct 25 ms 25172 KB Output is correct
12 Correct 21 ms 25172 KB Output is correct
13 Correct 21 ms 25172 KB Output is correct
14 Correct 21 ms 25172 KB Output is correct
15 Correct 21 ms 25172 KB Output is correct
16 Correct 21 ms 25172 KB Output is correct
17 Correct 20 ms 25172 KB Output is correct
18 Correct 24 ms 25172 KB Output is correct
19 Correct 21 ms 25172 KB Output is correct
20 Correct 21 ms 25172 KB Output is correct
21 Correct 21 ms 25172 KB Output is correct
22 Correct 21 ms 25172 KB Output is correct
23 Correct 25 ms 25196 KB Output is correct
24 Correct 24 ms 25196 KB Output is correct
25 Correct 20 ms 25196 KB Output is correct
26 Correct 27 ms 25212 KB Output is correct
27 Correct 21 ms 25212 KB Output is correct
28 Correct 26 ms 25212 KB Output is correct
29 Correct 27 ms 25212 KB Output is correct
30 Correct 22 ms 25212 KB Output is correct
31 Correct 25 ms 25212 KB Output is correct
32 Correct 21 ms 25212 KB Output is correct
33 Correct 21 ms 25212 KB Output is correct
34 Correct 22 ms 25212 KB Output is correct
35 Correct 21 ms 25212 KB Output is correct
36 Correct 21 ms 25212 KB Output is correct
37 Correct 23 ms 25212 KB Output is correct
38 Correct 21 ms 25212 KB Output is correct
39 Correct 22 ms 25212 KB Output is correct
40 Correct 24 ms 25212 KB Output is correct
41 Correct 23 ms 25212 KB Output is correct
42 Correct 24 ms 25212 KB Output is correct
43 Correct 22 ms 25212 KB Output is correct
44 Correct 22 ms 25212 KB Output is correct
45 Correct 22 ms 25212 KB Output is correct
46 Correct 21 ms 25212 KB Output is correct
47 Correct 21 ms 25212 KB Output is correct
48 Correct 22 ms 25212 KB Output is correct
49 Correct 21 ms 25212 KB Output is correct
50 Correct 24 ms 25212 KB Output is correct
51 Correct 24 ms 25212 KB Output is correct
52 Correct 23 ms 25212 KB Output is correct
53 Correct 21 ms 25212 KB Output is correct
54 Correct 21 ms 25212 KB Output is correct
55 Correct 24 ms 25212 KB Output is correct
56 Correct 21 ms 25212 KB Output is correct
57 Correct 27 ms 25212 KB Output is correct
58 Correct 21 ms 25212 KB Output is correct
59 Correct 22 ms 25212 KB Output is correct
60 Correct 21 ms 25212 KB Output is correct
61 Correct 22 ms 25212 KB Output is correct
62 Correct 20 ms 25212 KB Output is correct
63 Correct 21 ms 25212 KB Output is correct
64 Correct 21 ms 25212 KB Output is correct
65 Correct 21 ms 25212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 188 ms 49588 KB Output is correct
2 Correct 176 ms 49588 KB Output is correct
3 Correct 185 ms 49740 KB Output is correct
4 Correct 220 ms 49740 KB Output is correct
5 Correct 173 ms 49740 KB Output is correct
6 Correct 241 ms 49740 KB Output is correct
7 Correct 249 ms 49740 KB Output is correct
8 Correct 196 ms 49740 KB Output is correct
9 Correct 234 ms 49740 KB Output is correct
10 Correct 199 ms 49740 KB Output is correct
11 Correct 153 ms 49740 KB Output is correct
12 Correct 173 ms 49740 KB Output is correct
13 Correct 119 ms 49740 KB Output is correct
14 Correct 148 ms 49740 KB Output is correct
15 Correct 90 ms 49740 KB Output is correct
16 Correct 97 ms 49740 KB Output is correct
17 Correct 31 ms 49740 KB Output is correct
18 Correct 31 ms 49740 KB Output is correct
19 Correct 31 ms 49740 KB Output is correct
20 Correct 29 ms 49740 KB Output is correct
21 Correct 29 ms 49740 KB Output is correct
22 Correct 28 ms 49740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 24 ms 49740 KB Output is correct
2 Correct 25 ms 49740 KB Output is correct
3 Correct 26 ms 49740 KB Output is correct
4 Correct 24 ms 49740 KB Output is correct
5 Correct 25 ms 49740 KB Output is correct
6 Correct 23 ms 49740 KB Output is correct
7 Correct 26 ms 49740 KB Output is correct
8 Correct 25 ms 49740 KB Output is correct
9 Correct 24 ms 49740 KB Output is correct
10 Correct 24 ms 49740 KB Output is correct
11 Correct 24 ms 49740 KB Output is correct
12 Correct 25 ms 49740 KB Output is correct
13 Correct 22 ms 49740 KB Output is correct
14 Correct 24 ms 49740 KB Output is correct
15 Correct 27 ms 49740 KB Output is correct
16 Correct 25 ms 49740 KB Output is correct
17 Correct 29 ms 49740 KB Output is correct
18 Correct 24 ms 49740 KB Output is correct
19 Correct 23 ms 49740 KB Output is correct
20 Correct 28 ms 49740 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 272 ms 52392 KB Output is correct
2 Correct 220 ms 52576 KB Output is correct
3 Correct 226 ms 52576 KB Output is correct
4 Correct 236 ms 52576 KB Output is correct
5 Correct 187 ms 52576 KB Output is correct
6 Correct 227 ms 60096 KB Output is correct
7 Correct 228 ms 60096 KB Output is correct
8 Correct 237 ms 60096 KB Output is correct
9 Correct 220 ms 60096 KB Output is correct
10 Correct 203 ms 60096 KB Output is correct
11 Correct 218 ms 60096 KB Output is correct
12 Correct 221 ms 60096 KB Output is correct
13 Correct 205 ms 60096 KB Output is correct
14 Correct 169 ms 60096 KB Output is correct
15 Correct 143 ms 60096 KB Output is correct
16 Correct 100 ms 60096 KB Output is correct
17 Correct 126 ms 60096 KB Output is correct
18 Correct 120 ms 60096 KB Output is correct
19 Correct 122 ms 60096 KB Output is correct
20 Correct 131 ms 60096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 22 ms 60096 KB Output is correct
2 Correct 22 ms 60096 KB Output is correct
3 Correct 25 ms 60096 KB Output is correct
4 Correct 22 ms 60096 KB Output is correct
5 Correct 23 ms 60096 KB Output is correct
6 Correct 22 ms 60096 KB Output is correct
7 Correct 24 ms 60096 KB Output is correct
8 Correct 26 ms 60096 KB Output is correct
9 Correct 25 ms 60096 KB Output is correct
10 Correct 22 ms 60096 KB Output is correct
11 Correct 25 ms 60096 KB Output is correct
12 Correct 26 ms 60096 KB Output is correct
13 Correct 25 ms 60096 KB Output is correct
14 Correct 24 ms 60096 KB Output is correct
15 Correct 25 ms 60096 KB Output is correct
16 Correct 27 ms 60096 KB Output is correct
17 Correct 32 ms 60096 KB Output is correct
18 Correct 22 ms 60096 KB Output is correct
19 Correct 23 ms 60096 KB Output is correct
20 Correct 24 ms 60096 KB Output is correct
21 Correct 25 ms 60096 KB Output is correct
22 Correct 23 ms 60096 KB Output is correct
23 Correct 24 ms 60096 KB Output is correct
24 Correct 25 ms 60096 KB Output is correct
25 Correct 24 ms 60096 KB Output is correct
26 Correct 24 ms 60096 KB Output is correct
27 Correct 23 ms 60096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 248 ms 60096 KB Output is correct
2 Correct 333 ms 60096 KB Output is correct
3 Correct 258 ms 60096 KB Output is correct
4 Correct 267 ms 60096 KB Output is correct
5 Correct 219 ms 60096 KB Output is correct
6 Correct 175 ms 60096 KB Output is correct
7 Correct 160 ms 60096 KB Output is correct
8 Correct 165 ms 60096 KB Output is correct
9 Correct 158 ms 60096 KB Output is correct
10 Correct 150 ms 60096 KB Output is correct
11 Correct 141 ms 60096 KB Output is correct
12 Correct 129 ms 60096 KB Output is correct
13 Correct 145 ms 60096 KB Output is correct
14 Correct 139 ms 60096 KB Output is correct
15 Correct 256 ms 60096 KB Output is correct
16 Correct 226 ms 60096 KB Output is correct
17 Correct 256 ms 60096 KB Output is correct
18 Correct 250 ms 60096 KB Output is correct
19 Correct 197 ms 60096 KB Output is correct
20 Correct 284 ms 60096 KB Output is correct
21 Correct 259 ms 60096 KB Output is correct
22 Correct 216 ms 60096 KB Output is correct
23 Correct 177 ms 60096 KB Output is correct
24 Correct 180 ms 60096 KB Output is correct
25 Correct 194 ms 60096 KB Output is correct
26 Correct 165 ms 60096 KB Output is correct
27 Correct 173 ms 60096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 24952 KB Output is correct
2 Correct 21 ms 25052 KB Output is correct
3 Correct 22 ms 25052 KB Output is correct
4 Correct 21 ms 25052 KB Output is correct
5 Correct 22 ms 25052 KB Output is correct
6 Correct 21 ms 25052 KB Output is correct
7 Correct 22 ms 25052 KB Output is correct
8 Correct 22 ms 25096 KB Output is correct
9 Correct 22 ms 25096 KB Output is correct
10 Correct 21 ms 25096 KB Output is correct
11 Correct 25 ms 25172 KB Output is correct
12 Correct 21 ms 25172 KB Output is correct
13 Correct 21 ms 25172 KB Output is correct
14 Correct 21 ms 25172 KB Output is correct
15 Correct 21 ms 25172 KB Output is correct
16 Correct 21 ms 25172 KB Output is correct
17 Correct 20 ms 25172 KB Output is correct
18 Correct 24 ms 25172 KB Output is correct
19 Correct 21 ms 25172 KB Output is correct
20 Correct 21 ms 25172 KB Output is correct
21 Correct 21 ms 25172 KB Output is correct
22 Correct 21 ms 25172 KB Output is correct
23 Correct 25 ms 25196 KB Output is correct
24 Correct 24 ms 25196 KB Output is correct
25 Correct 20 ms 25196 KB Output is correct
26 Correct 27 ms 25212 KB Output is correct
27 Correct 21 ms 25212 KB Output is correct
28 Correct 26 ms 25212 KB Output is correct
29 Correct 27 ms 25212 KB Output is correct
30 Correct 22 ms 25212 KB Output is correct
31 Correct 25 ms 25212 KB Output is correct
32 Correct 21 ms 25212 KB Output is correct
33 Correct 21 ms 25212 KB Output is correct
34 Correct 22 ms 25212 KB Output is correct
35 Correct 21 ms 25212 KB Output is correct
36 Correct 21 ms 25212 KB Output is correct
37 Correct 23 ms 25212 KB Output is correct
38 Correct 21 ms 25212 KB Output is correct
39 Correct 22 ms 25212 KB Output is correct
40 Correct 24 ms 25212 KB Output is correct
41 Correct 23 ms 25212 KB Output is correct
42 Correct 24 ms 25212 KB Output is correct
43 Correct 22 ms 25212 KB Output is correct
44 Correct 22 ms 25212 KB Output is correct
45 Correct 22 ms 25212 KB Output is correct
46 Correct 21 ms 25212 KB Output is correct
47 Correct 21 ms 25212 KB Output is correct
48 Correct 22 ms 25212 KB Output is correct
49 Correct 21 ms 25212 KB Output is correct
50 Correct 24 ms 25212 KB Output is correct
51 Correct 24 ms 25212 KB Output is correct
52 Correct 23 ms 25212 KB Output is correct
53 Correct 21 ms 25212 KB Output is correct
54 Correct 21 ms 25212 KB Output is correct
55 Correct 24 ms 25212 KB Output is correct
56 Correct 21 ms 25212 KB Output is correct
57 Correct 27 ms 25212 KB Output is correct
58 Correct 21 ms 25212 KB Output is correct
59 Correct 22 ms 25212 KB Output is correct
60 Correct 21 ms 25212 KB Output is correct
61 Correct 22 ms 25212 KB Output is correct
62 Correct 20 ms 25212 KB Output is correct
63 Correct 21 ms 25212 KB Output is correct
64 Correct 21 ms 25212 KB Output is correct
65 Correct 21 ms 25212 KB Output is correct
66 Correct 22 ms 60096 KB Output is correct
67 Correct 22 ms 60096 KB Output is correct
68 Correct 25 ms 60096 KB Output is correct
69 Correct 23 ms 60096 KB Output is correct
70 Correct 23 ms 60096 KB Output is correct
71 Correct 26 ms 60096 KB Output is correct
72 Correct 22 ms 60096 KB Output is correct
73 Correct 26 ms 60096 KB Output is correct
74 Correct 26 ms 60096 KB Output is correct
75 Correct 23 ms 60096 KB Output is correct
76 Correct 25 ms 60096 KB Output is correct
77 Correct 26 ms 60096 KB Output is correct
78 Correct 24 ms 60096 KB Output is correct
79 Correct 23 ms 60096 KB Output is correct
80 Correct 23 ms 60096 KB Output is correct
81 Correct 23 ms 60096 KB Output is correct
82 Correct 26 ms 60096 KB Output is correct
83 Correct 27 ms 60096 KB Output is correct
84 Correct 27 ms 60096 KB Output is correct
85 Correct 25 ms 60096 KB Output is correct
86 Correct 27 ms 60096 KB Output is correct
87 Correct 25 ms 60096 KB Output is correct
88 Correct 23 ms 60096 KB Output is correct
89 Correct 24 ms 60096 KB Output is correct
90 Correct 23 ms 60096 KB Output is correct
91 Correct 24 ms 60096 KB Output is correct
92 Correct 24 ms 60096 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 21 ms 24952 KB Output is correct
2 Correct 21 ms 25052 KB Output is correct
3 Correct 22 ms 25052 KB Output is correct
4 Correct 21 ms 25052 KB Output is correct
5 Correct 22 ms 25052 KB Output is correct
6 Correct 21 ms 25052 KB Output is correct
7 Correct 22 ms 25052 KB Output is correct
8 Correct 22 ms 25096 KB Output is correct
9 Correct 22 ms 25096 KB Output is correct
10 Correct 21 ms 25096 KB Output is correct
11 Correct 25 ms 25172 KB Output is correct
12 Correct 21 ms 25172 KB Output is correct
13 Correct 21 ms 25172 KB Output is correct
14 Correct 21 ms 25172 KB Output is correct
15 Correct 21 ms 25172 KB Output is correct
16 Correct 21 ms 25172 KB Output is correct
17 Correct 20 ms 25172 KB Output is correct
18 Correct 24 ms 25172 KB Output is correct
19 Correct 21 ms 25172 KB Output is correct
20 Correct 21 ms 25172 KB Output is correct
21 Correct 21 ms 25172 KB Output is correct
22 Correct 21 ms 25172 KB Output is correct
23 Correct 25 ms 25196 KB Output is correct
24 Correct 24 ms 25196 KB Output is correct
25 Correct 20 ms 25196 KB Output is correct
26 Correct 27 ms 25212 KB Output is correct
27 Correct 21 ms 25212 KB Output is correct
28 Correct 26 ms 25212 KB Output is correct
29 Correct 27 ms 25212 KB Output is correct
30 Correct 22 ms 25212 KB Output is correct
31 Correct 25 ms 25212 KB Output is correct
32 Correct 21 ms 25212 KB Output is correct
33 Correct 21 ms 25212 KB Output is correct
34 Correct 22 ms 25212 KB Output is correct
35 Correct 21 ms 25212 KB Output is correct
36 Correct 21 ms 25212 KB Output is correct
37 Correct 23 ms 25212 KB Output is correct
38 Correct 21 ms 25212 KB Output is correct
39 Correct 22 ms 25212 KB Output is correct
40 Correct 24 ms 25212 KB Output is correct
41 Correct 23 ms 25212 KB Output is correct
42 Correct 24 ms 25212 KB Output is correct
43 Correct 22 ms 25212 KB Output is correct
44 Correct 22 ms 25212 KB Output is correct
45 Correct 22 ms 25212 KB Output is correct
46 Correct 21 ms 25212 KB Output is correct
47 Correct 21 ms 25212 KB Output is correct
48 Correct 22 ms 25212 KB Output is correct
49 Correct 21 ms 25212 KB Output is correct
50 Correct 24 ms 25212 KB Output is correct
51 Correct 24 ms 25212 KB Output is correct
52 Correct 23 ms 25212 KB Output is correct
53 Correct 21 ms 25212 KB Output is correct
54 Correct 21 ms 25212 KB Output is correct
55 Correct 24 ms 25212 KB Output is correct
56 Correct 21 ms 25212 KB Output is correct
57 Correct 27 ms 25212 KB Output is correct
58 Correct 21 ms 25212 KB Output is correct
59 Correct 22 ms 25212 KB Output is correct
60 Correct 21 ms 25212 KB Output is correct
61 Correct 22 ms 25212 KB Output is correct
62 Correct 20 ms 25212 KB Output is correct
63 Correct 21 ms 25212 KB Output is correct
64 Correct 21 ms 25212 KB Output is correct
65 Correct 21 ms 25212 KB Output is correct
66 Correct 188 ms 49588 KB Output is correct
67 Correct 176 ms 49588 KB Output is correct
68 Correct 185 ms 49740 KB Output is correct
69 Correct 220 ms 49740 KB Output is correct
70 Correct 173 ms 49740 KB Output is correct
71 Correct 241 ms 49740 KB Output is correct
72 Correct 249 ms 49740 KB Output is correct
73 Correct 196 ms 49740 KB Output is correct
74 Correct 234 ms 49740 KB Output is correct
75 Correct 199 ms 49740 KB Output is correct
76 Correct 153 ms 49740 KB Output is correct
77 Correct 173 ms 49740 KB Output is correct
78 Correct 119 ms 49740 KB Output is correct
79 Correct 148 ms 49740 KB Output is correct
80 Correct 90 ms 49740 KB Output is correct
81 Correct 97 ms 49740 KB Output is correct
82 Correct 31 ms 49740 KB Output is correct
83 Correct 31 ms 49740 KB Output is correct
84 Correct 31 ms 49740 KB Output is correct
85 Correct 29 ms 49740 KB Output is correct
86 Correct 29 ms 49740 KB Output is correct
87 Correct 28 ms 49740 KB Output is correct
88 Correct 24 ms 49740 KB Output is correct
89 Correct 25 ms 49740 KB Output is correct
90 Correct 26 ms 49740 KB Output is correct
91 Correct 24 ms 49740 KB Output is correct
92 Correct 25 ms 49740 KB Output is correct
93 Correct 23 ms 49740 KB Output is correct
94 Correct 26 ms 49740 KB Output is correct
95 Correct 25 ms 49740 KB Output is correct
96 Correct 24 ms 49740 KB Output is correct
97 Correct 24 ms 49740 KB Output is correct
98 Correct 24 ms 49740 KB Output is correct
99 Correct 25 ms 49740 KB Output is correct
100 Correct 22 ms 49740 KB Output is correct
101 Correct 24 ms 49740 KB Output is correct
102 Correct 27 ms 49740 KB Output is correct
103 Correct 25 ms 49740 KB Output is correct
104 Correct 29 ms 49740 KB Output is correct
105 Correct 24 ms 49740 KB Output is correct
106 Correct 23 ms 49740 KB Output is correct
107 Correct 28 ms 49740 KB Output is correct
108 Correct 272 ms 52392 KB Output is correct
109 Correct 220 ms 52576 KB Output is correct
110 Correct 226 ms 52576 KB Output is correct
111 Correct 236 ms 52576 KB Output is correct
112 Correct 187 ms 52576 KB Output is correct
113 Correct 227 ms 60096 KB Output is correct
114 Correct 228 ms 60096 KB Output is correct
115 Correct 237 ms 60096 KB Output is correct
116 Correct 220 ms 60096 KB Output is correct
117 Correct 203 ms 60096 KB Output is correct
118 Correct 218 ms 60096 KB Output is correct
119 Correct 221 ms 60096 KB Output is correct
120 Correct 205 ms 60096 KB Output is correct
121 Correct 169 ms 60096 KB Output is correct
122 Correct 143 ms 60096 KB Output is correct
123 Correct 100 ms 60096 KB Output is correct
124 Correct 126 ms 60096 KB Output is correct
125 Correct 120 ms 60096 KB Output is correct
126 Correct 122 ms 60096 KB Output is correct
127 Correct 131 ms 60096 KB Output is correct
128 Correct 22 ms 60096 KB Output is correct
129 Correct 22 ms 60096 KB Output is correct
130 Correct 25 ms 60096 KB Output is correct
131 Correct 22 ms 60096 KB Output is correct
132 Correct 23 ms 60096 KB Output is correct
133 Correct 22 ms 60096 KB Output is correct
134 Correct 24 ms 60096 KB Output is correct
135 Correct 26 ms 60096 KB Output is correct
136 Correct 25 ms 60096 KB Output is correct
137 Correct 22 ms 60096 KB Output is correct
138 Correct 25 ms 60096 KB Output is correct
139 Correct 26 ms 60096 KB Output is correct
140 Correct 25 ms 60096 KB Output is correct
141 Correct 24 ms 60096 KB Output is correct
142 Correct 25 ms 60096 KB Output is correct
143 Correct 27 ms 60096 KB Output is correct
144 Correct 32 ms 60096 KB Output is correct
145 Correct 22 ms 60096 KB Output is correct
146 Correct 23 ms 60096 KB Output is correct
147 Correct 24 ms 60096 KB Output is correct
148 Correct 25 ms 60096 KB Output is correct
149 Correct 23 ms 60096 KB Output is correct
150 Correct 24 ms 60096 KB Output is correct
151 Correct 25 ms 60096 KB Output is correct
152 Correct 24 ms 60096 KB Output is correct
153 Correct 24 ms 60096 KB Output is correct
154 Correct 23 ms 60096 KB Output is correct
155 Correct 248 ms 60096 KB Output is correct
156 Correct 333 ms 60096 KB Output is correct
157 Correct 258 ms 60096 KB Output is correct
158 Correct 267 ms 60096 KB Output is correct
159 Correct 219 ms 60096 KB Output is correct
160 Correct 175 ms 60096 KB Output is correct
161 Correct 160 ms 60096 KB Output is correct
162 Correct 165 ms 60096 KB Output is correct
163 Correct 158 ms 60096 KB Output is correct
164 Correct 150 ms 60096 KB Output is correct
165 Correct 141 ms 60096 KB Output is correct
166 Correct 129 ms 60096 KB Output is correct
167 Correct 145 ms 60096 KB Output is correct
168 Correct 139 ms 60096 KB Output is correct
169 Correct 256 ms 60096 KB Output is correct
170 Correct 226 ms 60096 KB Output is correct
171 Correct 256 ms 60096 KB Output is correct
172 Correct 250 ms 60096 KB Output is correct
173 Correct 197 ms 60096 KB Output is correct
174 Correct 284 ms 60096 KB Output is correct
175 Correct 259 ms 60096 KB Output is correct
176 Correct 216 ms 60096 KB Output is correct
177 Correct 177 ms 60096 KB Output is correct
178 Correct 180 ms 60096 KB Output is correct
179 Correct 194 ms 60096 KB Output is correct
180 Correct 165 ms 60096 KB Output is correct
181 Correct 173 ms 60096 KB Output is correct
182 Correct 22 ms 60096 KB Output is correct
183 Correct 22 ms 60096 KB Output is correct
184 Correct 25 ms 60096 KB Output is correct
185 Correct 23 ms 60096 KB Output is correct
186 Correct 23 ms 60096 KB Output is correct
187 Correct 26 ms 60096 KB Output is correct
188 Correct 22 ms 60096 KB Output is correct
189 Correct 26 ms 60096 KB Output is correct
190 Correct 26 ms 60096 KB Output is correct
191 Correct 23 ms 60096 KB Output is correct
192 Correct 25 ms 60096 KB Output is correct
193 Correct 26 ms 60096 KB Output is correct
194 Correct 24 ms 60096 KB Output is correct
195 Correct 23 ms 60096 KB Output is correct
196 Correct 23 ms 60096 KB Output is correct
197 Correct 23 ms 60096 KB Output is correct
198 Correct 26 ms 60096 KB Output is correct
199 Correct 27 ms 60096 KB Output is correct
200 Correct 27 ms 60096 KB Output is correct
201 Correct 25 ms 60096 KB Output is correct
202 Correct 27 ms 60096 KB Output is correct
203 Correct 25 ms 60096 KB Output is correct
204 Correct 23 ms 60096 KB Output is correct
205 Correct 24 ms 60096 KB Output is correct
206 Correct 23 ms 60096 KB Output is correct
207 Correct 24 ms 60096 KB Output is correct
208 Correct 24 ms 60096 KB Output is correct
209 Correct 29 ms 60096 KB Output is correct
210 Correct 135 ms 60096 KB Output is correct
211 Correct 194 ms 60096 KB Output is correct
212 Correct 292 ms 60096 KB Output is correct
213 Correct 359 ms 60096 KB Output is correct
214 Correct 100 ms 60096 KB Output is correct
215 Correct 145 ms 60096 KB Output is correct
216 Correct 180 ms 60096 KB Output is correct
217 Correct 174 ms 60096 KB Output is correct
218 Correct 135 ms 60096 KB Output is correct
219 Correct 136 ms 60096 KB Output is correct
220 Correct 122 ms 60096 KB Output is correct
221 Correct 116 ms 60096 KB Output is correct
222 Correct 152 ms 60096 KB Output is correct
223 Correct 196 ms 60096 KB Output is correct
224 Correct 160 ms 60096 KB Output is correct
225 Correct 180 ms 60096 KB Output is correct
226 Correct 186 ms 60096 KB Output is correct
227 Correct 166 ms 60096 KB Output is correct
228 Correct 127 ms 60096 KB Output is correct
229 Correct 113 ms 60096 KB Output is correct
230 Correct 138 ms 60096 KB Output is correct
231 Correct 171 ms 60096 KB Output is correct