Submission #50344

# Submission time Handle Problem Language Result Execution time Memory
50344 2018-06-10T12:09:52 Z zscoder Duathlon (APIO18_duathlon) C++17
90 / 100
302 ms 46504 KB
#include <bits/stdc++.h>

using namespace std;

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

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

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

void dfs(int u, int p)
{
	disc[u]=++timer; int child=0; low[u]=disc[u];
	for(int 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));
		}
	}
}

int dp[511211];
int vis[511511];
int cc; vi C;
int tot[511511];
int par[515115];
void prep_tree(int u, int p)
{
	C.pb(u); cc+=siz[u]; par[u]=p;
	dp[u] = siz[u]; vis[u]=1;
	for(int 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(int i=0;i<m;i++)
	{
		int u,v; cin>>u>>v; u--; v--;
		adj[u].pb(v); adj[v].pb(u);
	}
	timer=1;
	for(int 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(int i=0;i<bicon.size();i++)
	{
		set<int> S; set<int> 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(int 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] = int(S.size()); //if cycle then alrdy +1
	}
	for(int i=0;i<n;i++)
	{
		siz[i]=1;
	}
	for(int i=0;i<n+bicon.size();i++)
	{
		if(!vis[i])
		{
			C.clear(); cc=0;
			prep_tree(i,-1);
			for(int v:C)
			{
				tot[v] = cc;
			}
		}
	}
	ll ans = 0;
	for(int i=0;i<n+bicon.size();i++)
	{
		if(i<n)
		{
			vi vec;
			for(int j:tree[i])
			{
				int 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(int 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; int sm=0;
			int neigh=0;
			for(int j:tree[i])
			{
				neigh++;
				int 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(int 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:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<bicon.size();i++)
              ~^~~~~~~~~~~~~
count_triplets.cpp:120:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<n+bicon.size();i++)
              ~^~~~~~~~~~~~~~~
count_triplets.cpp:133:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0;i<n+bicon.size();i++)
              ~^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 16 ms 17784 KB Output is correct
2 Correct 15 ms 18024 KB Output is correct
3 Correct 18 ms 18060 KB Output is correct
4 Correct 15 ms 18060 KB Output is correct
5 Correct 15 ms 18060 KB Output is correct
6 Correct 16 ms 18060 KB Output is correct
7 Correct 20 ms 18060 KB Output is correct
8 Correct 18 ms 18060 KB Output is correct
9 Correct 15 ms 18060 KB Output is correct
10 Correct 15 ms 18060 KB Output is correct
11 Correct 16 ms 18060 KB Output is correct
12 Correct 16 ms 18096 KB Output is correct
13 Correct 15 ms 18096 KB Output is correct
14 Correct 17 ms 18096 KB Output is correct
15 Correct 16 ms 18096 KB Output is correct
16 Correct 16 ms 18096 KB Output is correct
17 Correct 19 ms 18164 KB Output is correct
18 Correct 16 ms 18164 KB Output is correct
19 Correct 16 ms 18164 KB Output is correct
20 Correct 16 ms 18164 KB Output is correct
21 Correct 16 ms 18164 KB Output is correct
22 Correct 16 ms 18164 KB Output is correct
23 Correct 16 ms 18164 KB Output is correct
24 Correct 15 ms 18164 KB Output is correct
25 Correct 16 ms 18164 KB Output is correct
26 Correct 16 ms 18164 KB Output is correct
27 Correct 15 ms 18164 KB Output is correct
28 Correct 16 ms 18164 KB Output is correct
29 Correct 16 ms 18164 KB Output is correct
30 Correct 16 ms 18164 KB Output is correct
31 Correct 16 ms 18164 KB Output is correct
32 Correct 16 ms 18164 KB Output is correct
33 Correct 15 ms 18164 KB Output is correct
34 Correct 16 ms 18164 KB Output is correct
35 Correct 17 ms 18164 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 16 ms 17784 KB Output is correct
2 Correct 15 ms 18024 KB Output is correct
3 Correct 18 ms 18060 KB Output is correct
4 Correct 15 ms 18060 KB Output is correct
5 Correct 15 ms 18060 KB Output is correct
6 Correct 16 ms 18060 KB Output is correct
7 Correct 20 ms 18060 KB Output is correct
8 Correct 18 ms 18060 KB Output is correct
9 Correct 15 ms 18060 KB Output is correct
10 Correct 15 ms 18060 KB Output is correct
11 Correct 16 ms 18060 KB Output is correct
12 Correct 16 ms 18096 KB Output is correct
13 Correct 15 ms 18096 KB Output is correct
14 Correct 17 ms 18096 KB Output is correct
15 Correct 16 ms 18096 KB Output is correct
16 Correct 16 ms 18096 KB Output is correct
17 Correct 19 ms 18164 KB Output is correct
18 Correct 16 ms 18164 KB Output is correct
19 Correct 16 ms 18164 KB Output is correct
20 Correct 16 ms 18164 KB Output is correct
21 Correct 16 ms 18164 KB Output is correct
22 Correct 16 ms 18164 KB Output is correct
23 Correct 16 ms 18164 KB Output is correct
24 Correct 15 ms 18164 KB Output is correct
25 Correct 16 ms 18164 KB Output is correct
26 Correct 16 ms 18164 KB Output is correct
27 Correct 15 ms 18164 KB Output is correct
28 Correct 16 ms 18164 KB Output is correct
29 Correct 16 ms 18164 KB Output is correct
30 Correct 16 ms 18164 KB Output is correct
31 Correct 16 ms 18164 KB Output is correct
32 Correct 16 ms 18164 KB Output is correct
33 Correct 15 ms 18164 KB Output is correct
34 Correct 16 ms 18164 KB Output is correct
35 Correct 17 ms 18164 KB Output is correct
36 Correct 16 ms 18164 KB Output is correct
37 Correct 16 ms 18164 KB Output is correct
38 Correct 16 ms 18164 KB Output is correct
39 Correct 16 ms 18164 KB Output is correct
40 Correct 16 ms 18164 KB Output is correct
41 Correct 16 ms 18176 KB Output is correct
42 Correct 18 ms 18176 KB Output is correct
43 Correct 16 ms 18176 KB Output is correct
44 Correct 16 ms 18176 KB Output is correct
45 Correct 16 ms 18176 KB Output is correct
46 Correct 16 ms 18176 KB Output is correct
47 Correct 16 ms 18176 KB Output is correct
48 Correct 16 ms 18176 KB Output is correct
49 Correct 15 ms 18176 KB Output is correct
50 Correct 15 ms 18176 KB Output is correct
51 Correct 15 ms 18176 KB Output is correct
52 Correct 16 ms 18176 KB Output is correct
53 Correct 15 ms 18176 KB Output is correct
54 Correct 17 ms 18176 KB Output is correct
55 Correct 15 ms 18176 KB Output is correct
56 Correct 15 ms 18176 KB Output is correct
57 Correct 17 ms 18176 KB Output is correct
58 Correct 18 ms 18176 KB Output is correct
59 Correct 21 ms 18176 KB Output is correct
60 Correct 15 ms 18176 KB Output is correct
61 Correct 21 ms 18176 KB Output is correct
62 Correct 17 ms 18176 KB Output is correct
63 Correct 17 ms 18176 KB Output is correct
64 Correct 18 ms 18176 KB Output is correct
65 Correct 18 ms 18176 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 156 ms 40480 KB Output is correct
2 Correct 189 ms 40588 KB Output is correct
3 Correct 210 ms 40588 KB Output is correct
4 Correct 165 ms 40588 KB Output is correct
5 Correct 152 ms 40588 KB Output is correct
6 Correct 196 ms 40588 KB Output is correct
7 Correct 224 ms 40588 KB Output is correct
8 Correct 231 ms 40588 KB Output is correct
9 Correct 218 ms 40588 KB Output is correct
10 Correct 252 ms 40588 KB Output is correct
11 Correct 126 ms 40588 KB Output is correct
12 Correct 161 ms 40588 KB Output is correct
13 Correct 162 ms 40588 KB Output is correct
14 Correct 147 ms 40588 KB Output is correct
15 Correct 111 ms 40588 KB Output is correct
16 Correct 104 ms 40588 KB Output is correct
17 Correct 21 ms 40588 KB Output is correct
18 Correct 21 ms 40588 KB Output is correct
19 Correct 25 ms 40588 KB Output is correct
20 Correct 27 ms 40588 KB Output is correct
21 Correct 26 ms 40588 KB Output is correct
22 Correct 26 ms 40588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 17 ms 40588 KB Output is correct
2 Correct 22 ms 40588 KB Output is correct
3 Correct 20 ms 40588 KB Output is correct
4 Correct 17 ms 40588 KB Output is correct
5 Correct 18 ms 40588 KB Output is correct
6 Correct 17 ms 40588 KB Output is correct
7 Correct 18 ms 40588 KB Output is correct
8 Correct 18 ms 40588 KB Output is correct
9 Correct 19 ms 40588 KB Output is correct
10 Correct 18 ms 40588 KB Output is correct
11 Correct 17 ms 40588 KB Output is correct
12 Correct 18 ms 40588 KB Output is correct
13 Correct 20 ms 40588 KB Output is correct
14 Correct 17 ms 40588 KB Output is correct
15 Correct 20 ms 40588 KB Output is correct
16 Correct 18 ms 40588 KB Output is correct
17 Correct 18 ms 40588 KB Output is correct
18 Correct 19 ms 40588 KB Output is correct
19 Correct 19 ms 40588 KB Output is correct
20 Correct 23 ms 40588 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 234 ms 40588 KB Output is correct
2 Correct 191 ms 40588 KB Output is correct
3 Correct 199 ms 40588 KB Output is correct
4 Correct 186 ms 40588 KB Output is correct
5 Correct 240 ms 40588 KB Output is correct
6 Correct 293 ms 46504 KB Output is correct
7 Correct 302 ms 46504 KB Output is correct
8 Correct 265 ms 46504 KB Output is correct
9 Correct 232 ms 46504 KB Output is correct
10 Correct 245 ms 46504 KB Output is correct
11 Correct 193 ms 46504 KB Output is correct
12 Correct 202 ms 46504 KB Output is correct
13 Correct 202 ms 46504 KB Output is correct
14 Correct 173 ms 46504 KB Output is correct
15 Correct 207 ms 46504 KB Output is correct
16 Correct 90 ms 46504 KB Output is correct
17 Correct 113 ms 46504 KB Output is correct
18 Correct 115 ms 46504 KB Output is correct
19 Correct 121 ms 46504 KB Output is correct
20 Correct 111 ms 46504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 18 ms 46504 KB Output is correct
2 Correct 17 ms 46504 KB Output is correct
3 Correct 17 ms 46504 KB Output is correct
4 Correct 17 ms 46504 KB Output is correct
5 Correct 18 ms 46504 KB Output is correct
6 Correct 18 ms 46504 KB Output is correct
7 Correct 17 ms 46504 KB Output is correct
8 Correct 17 ms 46504 KB Output is correct
9 Correct 17 ms 46504 KB Output is correct
10 Correct 20 ms 46504 KB Output is correct
11 Correct 17 ms 46504 KB Output is correct
12 Correct 18 ms 46504 KB Output is correct
13 Correct 18 ms 46504 KB Output is correct
14 Correct 21 ms 46504 KB Output is correct
15 Correct 17 ms 46504 KB Output is correct
16 Correct 17 ms 46504 KB Output is correct
17 Correct 17 ms 46504 KB Output is correct
18 Correct 17 ms 46504 KB Output is correct
19 Correct 22 ms 46504 KB Output is correct
20 Correct 16 ms 46504 KB Output is correct
21 Correct 17 ms 46504 KB Output is correct
22 Correct 17 ms 46504 KB Output is correct
23 Correct 19 ms 46504 KB Output is correct
24 Correct 20 ms 46504 KB Output is correct
25 Correct 19 ms 46504 KB Output is correct
26 Correct 19 ms 46504 KB Output is correct
27 Correct 17 ms 46504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 300 ms 46504 KB Output is correct
2 Correct 217 ms 46504 KB Output is correct
3 Correct 216 ms 46504 KB Output is correct
4 Correct 191 ms 46504 KB Output is correct
5 Correct 165 ms 46504 KB Output is correct
6 Correct 177 ms 46504 KB Output is correct
7 Correct 160 ms 46504 KB Output is correct
8 Correct 110 ms 46504 KB Output is correct
9 Correct 105 ms 46504 KB Output is correct
10 Correct 101 ms 46504 KB Output is correct
11 Correct 106 ms 46504 KB Output is correct
12 Correct 101 ms 46504 KB Output is correct
13 Correct 102 ms 46504 KB Output is correct
14 Correct 126 ms 46504 KB Output is correct
15 Correct 201 ms 46504 KB Output is correct
16 Correct 217 ms 46504 KB Output is correct
17 Correct 177 ms 46504 KB Output is correct
18 Correct 188 ms 46504 KB Output is correct
19 Correct 164 ms 46504 KB Output is correct
20 Correct 172 ms 46504 KB Output is correct
21 Correct 157 ms 46504 KB Output is correct
22 Correct 140 ms 46504 KB Output is correct
23 Correct 131 ms 46504 KB Output is correct
24 Correct 149 ms 46504 KB Output is correct
25 Correct 170 ms 46504 KB Output is correct
26 Correct 213 ms 46504 KB Output is correct
27 Correct 148 ms 46504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 16 ms 17784 KB Output is correct
2 Correct 15 ms 18024 KB Output is correct
3 Correct 18 ms 18060 KB Output is correct
4 Correct 15 ms 18060 KB Output is correct
5 Correct 15 ms 18060 KB Output is correct
6 Correct 16 ms 18060 KB Output is correct
7 Correct 20 ms 18060 KB Output is correct
8 Correct 18 ms 18060 KB Output is correct
9 Correct 15 ms 18060 KB Output is correct
10 Correct 15 ms 18060 KB Output is correct
11 Correct 16 ms 18060 KB Output is correct
12 Correct 16 ms 18096 KB Output is correct
13 Correct 15 ms 18096 KB Output is correct
14 Correct 17 ms 18096 KB Output is correct
15 Correct 16 ms 18096 KB Output is correct
16 Correct 16 ms 18096 KB Output is correct
17 Correct 19 ms 18164 KB Output is correct
18 Correct 16 ms 18164 KB Output is correct
19 Correct 16 ms 18164 KB Output is correct
20 Correct 16 ms 18164 KB Output is correct
21 Correct 16 ms 18164 KB Output is correct
22 Correct 16 ms 18164 KB Output is correct
23 Correct 16 ms 18164 KB Output is correct
24 Correct 15 ms 18164 KB Output is correct
25 Correct 16 ms 18164 KB Output is correct
26 Correct 16 ms 18164 KB Output is correct
27 Correct 15 ms 18164 KB Output is correct
28 Correct 16 ms 18164 KB Output is correct
29 Correct 16 ms 18164 KB Output is correct
30 Correct 16 ms 18164 KB Output is correct
31 Correct 16 ms 18164 KB Output is correct
32 Correct 16 ms 18164 KB Output is correct
33 Correct 15 ms 18164 KB Output is correct
34 Correct 16 ms 18164 KB Output is correct
35 Correct 17 ms 18164 KB Output is correct
36 Correct 16 ms 18164 KB Output is correct
37 Correct 16 ms 18164 KB Output is correct
38 Correct 16 ms 18164 KB Output is correct
39 Correct 16 ms 18164 KB Output is correct
40 Correct 16 ms 18164 KB Output is correct
41 Correct 16 ms 18176 KB Output is correct
42 Correct 18 ms 18176 KB Output is correct
43 Correct 16 ms 18176 KB Output is correct
44 Correct 16 ms 18176 KB Output is correct
45 Correct 16 ms 18176 KB Output is correct
46 Correct 16 ms 18176 KB Output is correct
47 Correct 16 ms 18176 KB Output is correct
48 Correct 16 ms 18176 KB Output is correct
49 Correct 15 ms 18176 KB Output is correct
50 Correct 15 ms 18176 KB Output is correct
51 Correct 15 ms 18176 KB Output is correct
52 Correct 16 ms 18176 KB Output is correct
53 Correct 15 ms 18176 KB Output is correct
54 Correct 17 ms 18176 KB Output is correct
55 Correct 15 ms 18176 KB Output is correct
56 Correct 15 ms 18176 KB Output is correct
57 Correct 17 ms 18176 KB Output is correct
58 Correct 18 ms 18176 KB Output is correct
59 Correct 21 ms 18176 KB Output is correct
60 Correct 15 ms 18176 KB Output is correct
61 Correct 21 ms 18176 KB Output is correct
62 Correct 17 ms 18176 KB Output is correct
63 Correct 17 ms 18176 KB Output is correct
64 Correct 18 ms 18176 KB Output is correct
65 Correct 18 ms 18176 KB Output is correct
66 Correct 15 ms 46504 KB Output is correct
67 Correct 16 ms 46504 KB Output is correct
68 Correct 18 ms 46504 KB Output is correct
69 Correct 16 ms 46504 KB Output is correct
70 Correct 19 ms 46504 KB Output is correct
71 Correct 16 ms 46504 KB Output is correct
72 Correct 17 ms 46504 KB Output is correct
73 Correct 16 ms 46504 KB Output is correct
74 Correct 16 ms 46504 KB Output is correct
75 Correct 17 ms 46504 KB Output is correct
76 Correct 15 ms 46504 KB Output is correct
77 Correct 17 ms 46504 KB Output is correct
78 Correct 17 ms 46504 KB Output is correct
79 Correct 16 ms 46504 KB Output is correct
80 Correct 17 ms 46504 KB Output is correct
81 Correct 16 ms 46504 KB Output is correct
82 Correct 18 ms 46504 KB Output is correct
83 Correct 18 ms 46504 KB Output is correct
84 Correct 17 ms 46504 KB Output is correct
85 Correct 17 ms 46504 KB Output is correct
86 Correct 16 ms 46504 KB Output is correct
87 Correct 24 ms 46504 KB Output is correct
88 Correct 24 ms 46504 KB Output is correct
89 Correct 16 ms 46504 KB Output is correct
90 Correct 16 ms 46504 KB Output is correct
91 Correct 16 ms 46504 KB Output is correct
92 Correct 16 ms 46504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 16 ms 17784 KB Output is correct
2 Correct 15 ms 18024 KB Output is correct
3 Correct 18 ms 18060 KB Output is correct
4 Correct 15 ms 18060 KB Output is correct
5 Correct 15 ms 18060 KB Output is correct
6 Correct 16 ms 18060 KB Output is correct
7 Correct 20 ms 18060 KB Output is correct
8 Correct 18 ms 18060 KB Output is correct
9 Correct 15 ms 18060 KB Output is correct
10 Correct 15 ms 18060 KB Output is correct
11 Correct 16 ms 18060 KB Output is correct
12 Correct 16 ms 18096 KB Output is correct
13 Correct 15 ms 18096 KB Output is correct
14 Correct 17 ms 18096 KB Output is correct
15 Correct 16 ms 18096 KB Output is correct
16 Correct 16 ms 18096 KB Output is correct
17 Correct 19 ms 18164 KB Output is correct
18 Correct 16 ms 18164 KB Output is correct
19 Correct 16 ms 18164 KB Output is correct
20 Correct 16 ms 18164 KB Output is correct
21 Correct 16 ms 18164 KB Output is correct
22 Correct 16 ms 18164 KB Output is correct
23 Correct 16 ms 18164 KB Output is correct
24 Correct 15 ms 18164 KB Output is correct
25 Correct 16 ms 18164 KB Output is correct
26 Correct 16 ms 18164 KB Output is correct
27 Correct 15 ms 18164 KB Output is correct
28 Correct 16 ms 18164 KB Output is correct
29 Correct 16 ms 18164 KB Output is correct
30 Correct 16 ms 18164 KB Output is correct
31 Correct 16 ms 18164 KB Output is correct
32 Correct 16 ms 18164 KB Output is correct
33 Correct 15 ms 18164 KB Output is correct
34 Correct 16 ms 18164 KB Output is correct
35 Correct 17 ms 18164 KB Output is correct
36 Correct 16 ms 18164 KB Output is correct
37 Correct 16 ms 18164 KB Output is correct
38 Correct 16 ms 18164 KB Output is correct
39 Correct 16 ms 18164 KB Output is correct
40 Correct 16 ms 18164 KB Output is correct
41 Correct 16 ms 18176 KB Output is correct
42 Correct 18 ms 18176 KB Output is correct
43 Correct 16 ms 18176 KB Output is correct
44 Correct 16 ms 18176 KB Output is correct
45 Correct 16 ms 18176 KB Output is correct
46 Correct 16 ms 18176 KB Output is correct
47 Correct 16 ms 18176 KB Output is correct
48 Correct 16 ms 18176 KB Output is correct
49 Correct 15 ms 18176 KB Output is correct
50 Correct 15 ms 18176 KB Output is correct
51 Correct 15 ms 18176 KB Output is correct
52 Correct 16 ms 18176 KB Output is correct
53 Correct 15 ms 18176 KB Output is correct
54 Correct 17 ms 18176 KB Output is correct
55 Correct 15 ms 18176 KB Output is correct
56 Correct 15 ms 18176 KB Output is correct
57 Correct 17 ms 18176 KB Output is correct
58 Correct 18 ms 18176 KB Output is correct
59 Correct 21 ms 18176 KB Output is correct
60 Correct 15 ms 18176 KB Output is correct
61 Correct 21 ms 18176 KB Output is correct
62 Correct 17 ms 18176 KB Output is correct
63 Correct 17 ms 18176 KB Output is correct
64 Correct 18 ms 18176 KB Output is correct
65 Correct 18 ms 18176 KB Output is correct
66 Correct 156 ms 40480 KB Output is correct
67 Correct 189 ms 40588 KB Output is correct
68 Correct 210 ms 40588 KB Output is correct
69 Correct 165 ms 40588 KB Output is correct
70 Correct 152 ms 40588 KB Output is correct
71 Correct 196 ms 40588 KB Output is correct
72 Correct 224 ms 40588 KB Output is correct
73 Correct 231 ms 40588 KB Output is correct
74 Correct 218 ms 40588 KB Output is correct
75 Correct 252 ms 40588 KB Output is correct
76 Correct 126 ms 40588 KB Output is correct
77 Correct 161 ms 40588 KB Output is correct
78 Correct 162 ms 40588 KB Output is correct
79 Correct 147 ms 40588 KB Output is correct
80 Correct 111 ms 40588 KB Output is correct
81 Correct 104 ms 40588 KB Output is correct
82 Correct 21 ms 40588 KB Output is correct
83 Correct 21 ms 40588 KB Output is correct
84 Correct 25 ms 40588 KB Output is correct
85 Correct 27 ms 40588 KB Output is correct
86 Correct 26 ms 40588 KB Output is correct
87 Correct 26 ms 40588 KB Output is correct
88 Correct 17 ms 40588 KB Output is correct
89 Correct 22 ms 40588 KB Output is correct
90 Correct 20 ms 40588 KB Output is correct
91 Correct 17 ms 40588 KB Output is correct
92 Correct 18 ms 40588 KB Output is correct
93 Correct 17 ms 40588 KB Output is correct
94 Correct 18 ms 40588 KB Output is correct
95 Correct 18 ms 40588 KB Output is correct
96 Correct 19 ms 40588 KB Output is correct
97 Correct 18 ms 40588 KB Output is correct
98 Correct 17 ms 40588 KB Output is correct
99 Correct 18 ms 40588 KB Output is correct
100 Correct 20 ms 40588 KB Output is correct
101 Correct 17 ms 40588 KB Output is correct
102 Correct 20 ms 40588 KB Output is correct
103 Correct 18 ms 40588 KB Output is correct
104 Correct 18 ms 40588 KB Output is correct
105 Correct 19 ms 40588 KB Output is correct
106 Correct 19 ms 40588 KB Output is correct
107 Correct 23 ms 40588 KB Output is correct
108 Correct 234 ms 40588 KB Output is correct
109 Correct 191 ms 40588 KB Output is correct
110 Correct 199 ms 40588 KB Output is correct
111 Correct 186 ms 40588 KB Output is correct
112 Correct 240 ms 40588 KB Output is correct
113 Correct 293 ms 46504 KB Output is correct
114 Correct 302 ms 46504 KB Output is correct
115 Correct 265 ms 46504 KB Output is correct
116 Correct 232 ms 46504 KB Output is correct
117 Correct 245 ms 46504 KB Output is correct
118 Correct 193 ms 46504 KB Output is correct
119 Correct 202 ms 46504 KB Output is correct
120 Correct 202 ms 46504 KB Output is correct
121 Correct 173 ms 46504 KB Output is correct
122 Correct 207 ms 46504 KB Output is correct
123 Correct 90 ms 46504 KB Output is correct
124 Correct 113 ms 46504 KB Output is correct
125 Correct 115 ms 46504 KB Output is correct
126 Correct 121 ms 46504 KB Output is correct
127 Correct 111 ms 46504 KB Output is correct
128 Correct 18 ms 46504 KB Output is correct
129 Correct 17 ms 46504 KB Output is correct
130 Correct 17 ms 46504 KB Output is correct
131 Correct 17 ms 46504 KB Output is correct
132 Correct 18 ms 46504 KB Output is correct
133 Correct 18 ms 46504 KB Output is correct
134 Correct 17 ms 46504 KB Output is correct
135 Correct 17 ms 46504 KB Output is correct
136 Correct 17 ms 46504 KB Output is correct
137 Correct 20 ms 46504 KB Output is correct
138 Correct 17 ms 46504 KB Output is correct
139 Correct 18 ms 46504 KB Output is correct
140 Correct 18 ms 46504 KB Output is correct
141 Correct 21 ms 46504 KB Output is correct
142 Correct 17 ms 46504 KB Output is correct
143 Correct 17 ms 46504 KB Output is correct
144 Correct 17 ms 46504 KB Output is correct
145 Correct 17 ms 46504 KB Output is correct
146 Correct 22 ms 46504 KB Output is correct
147 Correct 16 ms 46504 KB Output is correct
148 Correct 17 ms 46504 KB Output is correct
149 Correct 17 ms 46504 KB Output is correct
150 Correct 19 ms 46504 KB Output is correct
151 Correct 20 ms 46504 KB Output is correct
152 Correct 19 ms 46504 KB Output is correct
153 Correct 19 ms 46504 KB Output is correct
154 Correct 17 ms 46504 KB Output is correct
155 Correct 300 ms 46504 KB Output is correct
156 Correct 217 ms 46504 KB Output is correct
157 Correct 216 ms 46504 KB Output is correct
158 Correct 191 ms 46504 KB Output is correct
159 Correct 165 ms 46504 KB Output is correct
160 Correct 177 ms 46504 KB Output is correct
161 Correct 160 ms 46504 KB Output is correct
162 Correct 110 ms 46504 KB Output is correct
163 Correct 105 ms 46504 KB Output is correct
164 Correct 101 ms 46504 KB Output is correct
165 Correct 106 ms 46504 KB Output is correct
166 Correct 101 ms 46504 KB Output is correct
167 Correct 102 ms 46504 KB Output is correct
168 Correct 126 ms 46504 KB Output is correct
169 Correct 201 ms 46504 KB Output is correct
170 Correct 217 ms 46504 KB Output is correct
171 Correct 177 ms 46504 KB Output is correct
172 Correct 188 ms 46504 KB Output is correct
173 Correct 164 ms 46504 KB Output is correct
174 Correct 172 ms 46504 KB Output is correct
175 Correct 157 ms 46504 KB Output is correct
176 Correct 140 ms 46504 KB Output is correct
177 Correct 131 ms 46504 KB Output is correct
178 Correct 149 ms 46504 KB Output is correct
179 Correct 170 ms 46504 KB Output is correct
180 Correct 213 ms 46504 KB Output is correct
181 Correct 148 ms 46504 KB Output is correct
182 Correct 15 ms 46504 KB Output is correct
183 Correct 16 ms 46504 KB Output is correct
184 Correct 18 ms 46504 KB Output is correct
185 Correct 16 ms 46504 KB Output is correct
186 Correct 19 ms 46504 KB Output is correct
187 Correct 16 ms 46504 KB Output is correct
188 Correct 17 ms 46504 KB Output is correct
189 Correct 16 ms 46504 KB Output is correct
190 Correct 16 ms 46504 KB Output is correct
191 Correct 17 ms 46504 KB Output is correct
192 Correct 15 ms 46504 KB Output is correct
193 Correct 17 ms 46504 KB Output is correct
194 Correct 17 ms 46504 KB Output is correct
195 Correct 16 ms 46504 KB Output is correct
196 Correct 17 ms 46504 KB Output is correct
197 Correct 16 ms 46504 KB Output is correct
198 Correct 18 ms 46504 KB Output is correct
199 Correct 18 ms 46504 KB Output is correct
200 Correct 17 ms 46504 KB Output is correct
201 Correct 17 ms 46504 KB Output is correct
202 Correct 16 ms 46504 KB Output is correct
203 Correct 24 ms 46504 KB Output is correct
204 Correct 24 ms 46504 KB Output is correct
205 Correct 16 ms 46504 KB Output is correct
206 Correct 16 ms 46504 KB Output is correct
207 Correct 16 ms 46504 KB Output is correct
208 Correct 16 ms 46504 KB Output is correct
209 Correct 22 ms 46504 KB Output is correct
210 Correct 120 ms 46504 KB Output is correct
211 Correct 205 ms 46504 KB Output is correct
212 Incorrect 269 ms 46504 KB Output isn't correct
213 Halted 0 ms 0 KB -