Submission #109653

# Submission time Handle Problem Language Result Execution time Memory
109653 2019-05-07T09:07:04 Z user202729 Duathlon (APIO18_duathlon) C++17
100 / 100
277 ms 31560 KB
// https://oj.uz/problem/view/APIO18_duathlon
#include<iostream>
#include<vector>
#include<cassert>

std::vector<std::vector<int>> adjl;

int nnode;

int lastnum=0;
std::vector<int> dnum,dlow;
std::vector<int> stk;

// adjlist for circle-square-tree
// node with index < nnode are real
std::vector<std::vector<int>> cst_adjl;

int64_t ans;
void dfs(int node,int par){
	assert(dnum[node]==0);
	dnum[node]=dlow[node]=++lastnum;
	stk.push_back(node);
	for(int ad:adjl[node]){
		if(ad==par)continue;
		if(dnum[ad])
			dlow[node]=std::min(dlow[node],dnum[ad]);
		else{ // ad is a child of node
			dfs(ad,node);
			if(dlow[ad]>=dnum[node]){
				// it creates a new biconnected component
				auto iter=--stk.end();
				while(*iter!=ad)--iter;

				std::vector<int> v;
				v.reserve(stk.end()-iter+1);
				v.assign(iter,stk.end());
				v.push_back(node);

				int newnode=(int)cst_adjl.size();
				assert(newnode>=nnode);
				for(int x:v)
					cst_adjl[x].push_back(newnode);
				cst_adjl.push_back(std::move(v));

				stk.erase(iter,stk.end());
			}else{
				dlow[node]=std::min(dlow[node],dlow[ad]);
			}
		}
	}
}

std::vector<int> cst_par,
	cst_stsize /* only includes real nodes */;
void dfs2(int node){
	int& cst_stsize_node=cst_stsize[node];
	assert(cst_stsize_node==0);
	cst_stsize_node=node<nnode;
	for(int adj:cst_adjl[node])if(adj!=cst_par[node]){
		cst_par[adj]=node;
		dfs2(adj);
		cst_stsize_node+=cst_stsize[adj];
	}
	assert(cst_stsize_node>0);
}

std::vector<int64_t> ssqr;

int64_t sqr(int x){return (int64_t)x*x;}

int ccsize; // size of currently considering connected component, in real nodes
void dfs3(int node){
	if(node<nnode){
		// consider c == node. how many of (s,t) pairs are over-counted?
		for(int d:cst_adjl[node]){
			// assume s and t are "to the direction of d" from c
			assert(d>=nnode&&cst_adjl[d].size()>1);
			int64_t& ssqr_d=ssqr[d-nnode];
			if(ssqr_d==0){
				// compute ssqr_d first
				assert(d!=cst_par[node]);
				for(int x:cst_adjl[d])
					if(cst_par[d]==x)
						ssqr_d+=sqr(ccsize-cst_stsize[d]);
					else
						ssqr_d+=sqr(cst_stsize[x]);
				assert(ssqr_d!=0);

				ans-=ssqr_d;
				ans+=sqr(ccsize-cst_stsize[d]);
			}else{
				assert(d==cst_par[node]);

				ans-=ssqr_d;
				ans+=sqr(cst_stsize[node]);
			}
		}
	}
	for(int adj:cst_adjl[node])if(adj!=cst_par[node]){
		dfs3(adj);
	}
}

int main(){
	std::ios::sync_with_stdio(0);std::cin.tie(0);
	int nedge;std::cin>>nnode>>nedge;
	adjl.resize(nnode);
	for(int i=nedge;i-->0;){
		int u,v;std::cin>>u>>v;
		--u;--v;
		adjl[u].push_back(v);
		adjl[v].push_back(u);
	}

	dnum.resize(nnode);
	dlow.resize(nnode);
	ans=0;
	cst_adjl.resize(nnode);
	std::vector<int> fnodes; // each connected component has exactly one fnode
	for(int node=0;node<nnode;++node)if(dnum[node]==0){
		fnodes.push_back(node);
		assert(stk.empty());
		dfs(node,-1);
		assert(stk.size()==1&&stk[0]==node);
		stk.clear();
	}

	cst_par.assign(cst_adjl.size(),-1);
	cst_stsize.resize(cst_adjl.size());
	ssqr.resize(cst_adjl.size()-nnode);
	for(int x:fnodes){
		assert(x<nnode);
		dfs2(x);

		ccsize=cst_stsize[x];
		ans+=ccsize // for each way to choose vertex c
			*(ccsize-1LL)*(ccsize-1); // there are at most % ways to choose s and t
		// (allow them to overlap but not the same as c)
		dfs3(x);
	}

	std::cout<<ans<<'\n';
}

/*
4 3
1 2
2 3
3 4

4 4
1 2
2 3
3 4
4 2

5 6
1 2 1 3 2 3 2 4 2 5 4 5
*/
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 3 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 3 ms 384 KB Output is correct
10 Correct 0 ms 384 KB Output is correct
11 Correct 3 ms 384 KB Output is correct
12 Correct 3 ms 384 KB Output is correct
13 Correct 3 ms 384 KB Output is correct
14 Correct 2 ms 356 KB Output is correct
15 Correct 2 ms 256 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 3 ms 256 KB Output is correct
18 Correct 3 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 2 ms 384 KB Output is correct
21 Correct 2 ms 384 KB Output is correct
22 Correct 3 ms 384 KB Output is correct
23 Correct 3 ms 384 KB Output is correct
24 Correct 2 ms 384 KB Output is correct
25 Correct 2 ms 384 KB Output is correct
26 Correct 2 ms 384 KB Output is correct
27 Correct 2 ms 384 KB Output is correct
28 Correct 3 ms 384 KB Output is correct
29 Correct 2 ms 384 KB Output is correct
30 Correct 3 ms 256 KB Output is correct
31 Correct 3 ms 384 KB Output is correct
32 Correct 3 ms 512 KB Output is correct
33 Correct 2 ms 384 KB Output is correct
34 Correct 3 ms 256 KB Output is correct
35 Correct 2 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 3 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 3 ms 384 KB Output is correct
10 Correct 0 ms 384 KB Output is correct
11 Correct 3 ms 384 KB Output is correct
12 Correct 3 ms 384 KB Output is correct
13 Correct 3 ms 384 KB Output is correct
14 Correct 2 ms 356 KB Output is correct
15 Correct 2 ms 256 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 3 ms 256 KB Output is correct
18 Correct 3 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 2 ms 384 KB Output is correct
21 Correct 2 ms 384 KB Output is correct
22 Correct 3 ms 384 KB Output is correct
23 Correct 3 ms 384 KB Output is correct
24 Correct 2 ms 384 KB Output is correct
25 Correct 2 ms 384 KB Output is correct
26 Correct 2 ms 384 KB Output is correct
27 Correct 2 ms 384 KB Output is correct
28 Correct 3 ms 384 KB Output is correct
29 Correct 2 ms 384 KB Output is correct
30 Correct 3 ms 256 KB Output is correct
31 Correct 3 ms 384 KB Output is correct
32 Correct 3 ms 512 KB Output is correct
33 Correct 2 ms 384 KB Output is correct
34 Correct 3 ms 256 KB Output is correct
35 Correct 2 ms 384 KB Output is correct
36 Correct 2 ms 384 KB Output is correct
37 Correct 3 ms 384 KB Output is correct
38 Correct 2 ms 384 KB Output is correct
39 Correct 2 ms 384 KB Output is correct
40 Correct 2 ms 384 KB Output is correct
41 Correct 2 ms 384 KB Output is correct
42 Correct 2 ms 384 KB Output is correct
43 Correct 2 ms 384 KB Output is correct
44 Correct 2 ms 384 KB Output is correct
45 Correct 2 ms 384 KB Output is correct
46 Correct 2 ms 384 KB Output is correct
47 Correct 2 ms 256 KB Output is correct
48 Correct 2 ms 384 KB Output is correct
49 Correct 2 ms 384 KB Output is correct
50 Correct 2 ms 384 KB Output is correct
51 Correct 2 ms 384 KB Output is correct
52 Correct 4 ms 384 KB Output is correct
53 Correct 2 ms 384 KB Output is correct
54 Correct 2 ms 384 KB Output is correct
55 Correct 2 ms 384 KB Output is correct
56 Correct 2 ms 384 KB Output is correct
57 Correct 2 ms 512 KB Output is correct
58 Correct 2 ms 384 KB Output is correct
59 Correct 2 ms 384 KB Output is correct
60 Correct 2 ms 384 KB Output is correct
61 Correct 2 ms 384 KB Output is correct
62 Correct 2 ms 384 KB Output is correct
63 Correct 2 ms 384 KB Output is correct
64 Correct 3 ms 384 KB Output is correct
65 Correct 3 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 147 ms 28792 KB Output is correct
2 Correct 121 ms 28912 KB Output is correct
3 Correct 165 ms 25664 KB Output is correct
4 Correct 186 ms 25808 KB Output is correct
5 Correct 163 ms 21780 KB Output is correct
6 Correct 210 ms 24524 KB Output is correct
7 Correct 195 ms 22096 KB Output is correct
8 Correct 206 ms 22776 KB Output is correct
9 Correct 168 ms 20304 KB Output is correct
10 Correct 174 ms 20468 KB Output is correct
11 Correct 149 ms 17484 KB Output is correct
12 Correct 157 ms 17080 KB Output is correct
13 Correct 133 ms 17112 KB Output is correct
14 Correct 127 ms 16724 KB Output is correct
15 Correct 108 ms 15436 KB Output is correct
16 Correct 106 ms 15184 KB Output is correct
17 Correct 14 ms 8192 KB Output is correct
18 Correct 14 ms 8192 KB Output is correct
19 Correct 11 ms 8192 KB Output is correct
20 Correct 15 ms 8192 KB Output is correct
21 Correct 14 ms 8192 KB Output is correct
22 Correct 14 ms 8192 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 512 KB Output is correct
2 Correct 4 ms 512 KB Output is correct
3 Correct 4 ms 512 KB Output is correct
4 Correct 3 ms 640 KB Output is correct
5 Correct 4 ms 640 KB Output is correct
6 Correct 2 ms 640 KB Output is correct
7 Correct 3 ms 684 KB Output is correct
8 Correct 3 ms 640 KB Output is correct
9 Correct 3 ms 640 KB Output is correct
10 Correct 2 ms 512 KB Output is correct
11 Correct 2 ms 512 KB Output is correct
12 Correct 3 ms 512 KB Output is correct
13 Correct 3 ms 512 KB Output is correct
14 Correct 2 ms 512 KB Output is correct
15 Correct 3 ms 512 KB Output is correct
16 Correct 2 ms 512 KB Output is correct
17 Correct 3 ms 512 KB Output is correct
18 Correct 3 ms 512 KB Output is correct
19 Correct 3 ms 512 KB Output is correct
20 Correct 4 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 214 ms 21108 KB Output is correct
2 Correct 219 ms 21240 KB Output is correct
3 Correct 226 ms 21308 KB Output is correct
4 Correct 221 ms 21200 KB Output is correct
5 Correct 193 ms 21360 KB Output is correct
6 Correct 235 ms 31560 KB Output is correct
7 Correct 277 ms 28084 KB Output is correct
8 Correct 235 ms 26356 KB Output is correct
9 Correct 214 ms 24660 KB Output is correct
10 Correct 178 ms 21328 KB Output is correct
11 Correct 185 ms 21384 KB Output is correct
12 Correct 194 ms 21328 KB Output is correct
13 Correct 165 ms 21284 KB Output is correct
14 Correct 164 ms 20336 KB Output is correct
15 Correct 154 ms 19232 KB Output is correct
16 Correct 102 ms 15564 KB Output is correct
17 Correct 181 ms 21828 KB Output is correct
18 Correct 146 ms 21992 KB Output is correct
19 Correct 173 ms 21952 KB Output is correct
20 Correct 154 ms 21968 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 512 KB Output is correct
2 Correct 4 ms 512 KB Output is correct
3 Correct 3 ms 512 KB Output is correct
4 Correct 3 ms 512 KB Output is correct
5 Correct 3 ms 512 KB Output is correct
6 Correct 3 ms 512 KB Output is correct
7 Correct 3 ms 512 KB Output is correct
8 Correct 2 ms 512 KB Output is correct
9 Correct 3 ms 512 KB Output is correct
10 Correct 3 ms 512 KB Output is correct
11 Correct 2 ms 512 KB Output is correct
12 Correct 2 ms 640 KB Output is correct
13 Correct 3 ms 512 KB Output is correct
14 Correct 3 ms 512 KB Output is correct
15 Correct 3 ms 640 KB Output is correct
16 Correct 2 ms 512 KB Output is correct
17 Correct 3 ms 512 KB Output is correct
18 Correct 3 ms 512 KB Output is correct
19 Correct 3 ms 512 KB Output is correct
20 Correct 2 ms 512 KB Output is correct
21 Correct 3 ms 512 KB Output is correct
22 Correct 6 ms 512 KB Output is correct
23 Correct 3 ms 512 KB Output is correct
24 Correct 3 ms 512 KB Output is correct
25 Correct 2 ms 384 KB Output is correct
26 Correct 2 ms 512 KB Output is correct
27 Correct 2 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 225 ms 21204 KB Output is correct
2 Correct 206 ms 21176 KB Output is correct
3 Correct 209 ms 20148 KB Output is correct
4 Correct 207 ms 18640 KB Output is correct
5 Correct 184 ms 16884 KB Output is correct
6 Correct 169 ms 16176 KB Output is correct
7 Correct 168 ms 15664 KB Output is correct
8 Correct 166 ms 15284 KB Output is correct
9 Correct 174 ms 15156 KB Output is correct
10 Correct 173 ms 14984 KB Output is correct
11 Correct 154 ms 14800 KB Output is correct
12 Correct 128 ms 15056 KB Output is correct
13 Correct 148 ms 14928 KB Output is correct
14 Correct 140 ms 17912 KB Output is correct
15 Correct 262 ms 27492 KB Output is correct
16 Correct 238 ms 25136 KB Output is correct
17 Correct 269 ms 25420 KB Output is correct
18 Correct 254 ms 23296 KB Output is correct
19 Correct 213 ms 18640 KB Output is correct
20 Correct 190 ms 18532 KB Output is correct
21 Correct 185 ms 18516 KB Output is correct
22 Correct 163 ms 17744 KB Output is correct
23 Correct 151 ms 16844 KB Output is correct
24 Correct 198 ms 20600 KB Output is correct
25 Correct 191 ms 20780 KB Output is correct
26 Correct 195 ms 19532 KB Output is correct
27 Correct 200 ms 19536 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 3 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 3 ms 384 KB Output is correct
10 Correct 0 ms 384 KB Output is correct
11 Correct 3 ms 384 KB Output is correct
12 Correct 3 ms 384 KB Output is correct
13 Correct 3 ms 384 KB Output is correct
14 Correct 2 ms 356 KB Output is correct
15 Correct 2 ms 256 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 3 ms 256 KB Output is correct
18 Correct 3 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 2 ms 384 KB Output is correct
21 Correct 2 ms 384 KB Output is correct
22 Correct 3 ms 384 KB Output is correct
23 Correct 3 ms 384 KB Output is correct
24 Correct 2 ms 384 KB Output is correct
25 Correct 2 ms 384 KB Output is correct
26 Correct 2 ms 384 KB Output is correct
27 Correct 2 ms 384 KB Output is correct
28 Correct 3 ms 384 KB Output is correct
29 Correct 2 ms 384 KB Output is correct
30 Correct 3 ms 256 KB Output is correct
31 Correct 3 ms 384 KB Output is correct
32 Correct 3 ms 512 KB Output is correct
33 Correct 2 ms 384 KB Output is correct
34 Correct 3 ms 256 KB Output is correct
35 Correct 2 ms 384 KB Output is correct
36 Correct 2 ms 384 KB Output is correct
37 Correct 3 ms 384 KB Output is correct
38 Correct 2 ms 384 KB Output is correct
39 Correct 2 ms 384 KB Output is correct
40 Correct 2 ms 384 KB Output is correct
41 Correct 2 ms 384 KB Output is correct
42 Correct 2 ms 384 KB Output is correct
43 Correct 2 ms 384 KB Output is correct
44 Correct 2 ms 384 KB Output is correct
45 Correct 2 ms 384 KB Output is correct
46 Correct 2 ms 384 KB Output is correct
47 Correct 2 ms 256 KB Output is correct
48 Correct 2 ms 384 KB Output is correct
49 Correct 2 ms 384 KB Output is correct
50 Correct 2 ms 384 KB Output is correct
51 Correct 2 ms 384 KB Output is correct
52 Correct 4 ms 384 KB Output is correct
53 Correct 2 ms 384 KB Output is correct
54 Correct 2 ms 384 KB Output is correct
55 Correct 2 ms 384 KB Output is correct
56 Correct 2 ms 384 KB Output is correct
57 Correct 2 ms 512 KB Output is correct
58 Correct 2 ms 384 KB Output is correct
59 Correct 2 ms 384 KB Output is correct
60 Correct 2 ms 384 KB Output is correct
61 Correct 2 ms 384 KB Output is correct
62 Correct 2 ms 384 KB Output is correct
63 Correct 2 ms 384 KB Output is correct
64 Correct 3 ms 384 KB Output is correct
65 Correct 3 ms 384 KB Output is correct
66 Correct 3 ms 384 KB Output is correct
67 Correct 3 ms 512 KB Output is correct
68 Correct 3 ms 512 KB Output is correct
69 Correct 3 ms 512 KB Output is correct
70 Correct 3 ms 512 KB Output is correct
71 Correct 3 ms 512 KB Output is correct
72 Correct 2 ms 512 KB Output is correct
73 Correct 1 ms 512 KB Output is correct
74 Correct 3 ms 512 KB Output is correct
75 Correct 3 ms 512 KB Output is correct
76 Correct 2 ms 384 KB Output is correct
77 Correct 3 ms 512 KB Output is correct
78 Correct 2 ms 512 KB Output is correct
79 Correct 2 ms 512 KB Output is correct
80 Correct 2 ms 512 KB Output is correct
81 Correct 3 ms 512 KB Output is correct
82 Correct 3 ms 512 KB Output is correct
83 Correct 3 ms 640 KB Output is correct
84 Correct 2 ms 512 KB Output is correct
85 Correct 3 ms 512 KB Output is correct
86 Correct 3 ms 512 KB Output is correct
87 Correct 3 ms 512 KB Output is correct
88 Correct 3 ms 512 KB Output is correct
89 Correct 4 ms 512 KB Output is correct
90 Correct 4 ms 512 KB Output is correct
91 Correct 3 ms 512 KB Output is correct
92 Correct 4 ms 512 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 384 KB Output is correct
5 Correct 3 ms 384 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 3 ms 384 KB Output is correct
10 Correct 0 ms 384 KB Output is correct
11 Correct 3 ms 384 KB Output is correct
12 Correct 3 ms 384 KB Output is correct
13 Correct 3 ms 384 KB Output is correct
14 Correct 2 ms 356 KB Output is correct
15 Correct 2 ms 256 KB Output is correct
16 Correct 2 ms 384 KB Output is correct
17 Correct 3 ms 256 KB Output is correct
18 Correct 3 ms 384 KB Output is correct
19 Correct 2 ms 384 KB Output is correct
20 Correct 2 ms 384 KB Output is correct
21 Correct 2 ms 384 KB Output is correct
22 Correct 3 ms 384 KB Output is correct
23 Correct 3 ms 384 KB Output is correct
24 Correct 2 ms 384 KB Output is correct
25 Correct 2 ms 384 KB Output is correct
26 Correct 2 ms 384 KB Output is correct
27 Correct 2 ms 384 KB Output is correct
28 Correct 3 ms 384 KB Output is correct
29 Correct 2 ms 384 KB Output is correct
30 Correct 3 ms 256 KB Output is correct
31 Correct 3 ms 384 KB Output is correct
32 Correct 3 ms 512 KB Output is correct
33 Correct 2 ms 384 KB Output is correct
34 Correct 3 ms 256 KB Output is correct
35 Correct 2 ms 384 KB Output is correct
36 Correct 2 ms 384 KB Output is correct
37 Correct 3 ms 384 KB Output is correct
38 Correct 2 ms 384 KB Output is correct
39 Correct 2 ms 384 KB Output is correct
40 Correct 2 ms 384 KB Output is correct
41 Correct 2 ms 384 KB Output is correct
42 Correct 2 ms 384 KB Output is correct
43 Correct 2 ms 384 KB Output is correct
44 Correct 2 ms 384 KB Output is correct
45 Correct 2 ms 384 KB Output is correct
46 Correct 2 ms 384 KB Output is correct
47 Correct 2 ms 256 KB Output is correct
48 Correct 2 ms 384 KB Output is correct
49 Correct 2 ms 384 KB Output is correct
50 Correct 2 ms 384 KB Output is correct
51 Correct 2 ms 384 KB Output is correct
52 Correct 4 ms 384 KB Output is correct
53 Correct 2 ms 384 KB Output is correct
54 Correct 2 ms 384 KB Output is correct
55 Correct 2 ms 384 KB Output is correct
56 Correct 2 ms 384 KB Output is correct
57 Correct 2 ms 512 KB Output is correct
58 Correct 2 ms 384 KB Output is correct
59 Correct 2 ms 384 KB Output is correct
60 Correct 2 ms 384 KB Output is correct
61 Correct 2 ms 384 KB Output is correct
62 Correct 2 ms 384 KB Output is correct
63 Correct 2 ms 384 KB Output is correct
64 Correct 3 ms 384 KB Output is correct
65 Correct 3 ms 384 KB Output is correct
66 Correct 147 ms 28792 KB Output is correct
67 Correct 121 ms 28912 KB Output is correct
68 Correct 165 ms 25664 KB Output is correct
69 Correct 186 ms 25808 KB Output is correct
70 Correct 163 ms 21780 KB Output is correct
71 Correct 210 ms 24524 KB Output is correct
72 Correct 195 ms 22096 KB Output is correct
73 Correct 206 ms 22776 KB Output is correct
74 Correct 168 ms 20304 KB Output is correct
75 Correct 174 ms 20468 KB Output is correct
76 Correct 149 ms 17484 KB Output is correct
77 Correct 157 ms 17080 KB Output is correct
78 Correct 133 ms 17112 KB Output is correct
79 Correct 127 ms 16724 KB Output is correct
80 Correct 108 ms 15436 KB Output is correct
81 Correct 106 ms 15184 KB Output is correct
82 Correct 14 ms 8192 KB Output is correct
83 Correct 14 ms 8192 KB Output is correct
84 Correct 11 ms 8192 KB Output is correct
85 Correct 15 ms 8192 KB Output is correct
86 Correct 14 ms 8192 KB Output is correct
87 Correct 14 ms 8192 KB Output is correct
88 Correct 3 ms 512 KB Output is correct
89 Correct 4 ms 512 KB Output is correct
90 Correct 4 ms 512 KB Output is correct
91 Correct 3 ms 640 KB Output is correct
92 Correct 4 ms 640 KB Output is correct
93 Correct 2 ms 640 KB Output is correct
94 Correct 3 ms 684 KB Output is correct
95 Correct 3 ms 640 KB Output is correct
96 Correct 3 ms 640 KB Output is correct
97 Correct 2 ms 512 KB Output is correct
98 Correct 2 ms 512 KB Output is correct
99 Correct 3 ms 512 KB Output is correct
100 Correct 3 ms 512 KB Output is correct
101 Correct 2 ms 512 KB Output is correct
102 Correct 3 ms 512 KB Output is correct
103 Correct 2 ms 512 KB Output is correct
104 Correct 3 ms 512 KB Output is correct
105 Correct 3 ms 512 KB Output is correct
106 Correct 3 ms 512 KB Output is correct
107 Correct 4 ms 512 KB Output is correct
108 Correct 214 ms 21108 KB Output is correct
109 Correct 219 ms 21240 KB Output is correct
110 Correct 226 ms 21308 KB Output is correct
111 Correct 221 ms 21200 KB Output is correct
112 Correct 193 ms 21360 KB Output is correct
113 Correct 235 ms 31560 KB Output is correct
114 Correct 277 ms 28084 KB Output is correct
115 Correct 235 ms 26356 KB Output is correct
116 Correct 214 ms 24660 KB Output is correct
117 Correct 178 ms 21328 KB Output is correct
118 Correct 185 ms 21384 KB Output is correct
119 Correct 194 ms 21328 KB Output is correct
120 Correct 165 ms 21284 KB Output is correct
121 Correct 164 ms 20336 KB Output is correct
122 Correct 154 ms 19232 KB Output is correct
123 Correct 102 ms 15564 KB Output is correct
124 Correct 181 ms 21828 KB Output is correct
125 Correct 146 ms 21992 KB Output is correct
126 Correct 173 ms 21952 KB Output is correct
127 Correct 154 ms 21968 KB Output is correct
128 Correct 4 ms 512 KB Output is correct
129 Correct 4 ms 512 KB Output is correct
130 Correct 3 ms 512 KB Output is correct
131 Correct 3 ms 512 KB Output is correct
132 Correct 3 ms 512 KB Output is correct
133 Correct 3 ms 512 KB Output is correct
134 Correct 3 ms 512 KB Output is correct
135 Correct 2 ms 512 KB Output is correct
136 Correct 3 ms 512 KB Output is correct
137 Correct 3 ms 512 KB Output is correct
138 Correct 2 ms 512 KB Output is correct
139 Correct 2 ms 640 KB Output is correct
140 Correct 3 ms 512 KB Output is correct
141 Correct 3 ms 512 KB Output is correct
142 Correct 3 ms 640 KB Output is correct
143 Correct 2 ms 512 KB Output is correct
144 Correct 3 ms 512 KB Output is correct
145 Correct 3 ms 512 KB Output is correct
146 Correct 3 ms 512 KB Output is correct
147 Correct 2 ms 512 KB Output is correct
148 Correct 3 ms 512 KB Output is correct
149 Correct 6 ms 512 KB Output is correct
150 Correct 3 ms 512 KB Output is correct
151 Correct 3 ms 512 KB Output is correct
152 Correct 2 ms 384 KB Output is correct
153 Correct 2 ms 512 KB Output is correct
154 Correct 2 ms 384 KB Output is correct
155 Correct 225 ms 21204 KB Output is correct
156 Correct 206 ms 21176 KB Output is correct
157 Correct 209 ms 20148 KB Output is correct
158 Correct 207 ms 18640 KB Output is correct
159 Correct 184 ms 16884 KB Output is correct
160 Correct 169 ms 16176 KB Output is correct
161 Correct 168 ms 15664 KB Output is correct
162 Correct 166 ms 15284 KB Output is correct
163 Correct 174 ms 15156 KB Output is correct
164 Correct 173 ms 14984 KB Output is correct
165 Correct 154 ms 14800 KB Output is correct
166 Correct 128 ms 15056 KB Output is correct
167 Correct 148 ms 14928 KB Output is correct
168 Correct 140 ms 17912 KB Output is correct
169 Correct 262 ms 27492 KB Output is correct
170 Correct 238 ms 25136 KB Output is correct
171 Correct 269 ms 25420 KB Output is correct
172 Correct 254 ms 23296 KB Output is correct
173 Correct 213 ms 18640 KB Output is correct
174 Correct 190 ms 18532 KB Output is correct
175 Correct 185 ms 18516 KB Output is correct
176 Correct 163 ms 17744 KB Output is correct
177 Correct 151 ms 16844 KB Output is correct
178 Correct 198 ms 20600 KB Output is correct
179 Correct 191 ms 20780 KB Output is correct
180 Correct 195 ms 19532 KB Output is correct
181 Correct 200 ms 19536 KB Output is correct
182 Correct 3 ms 384 KB Output is correct
183 Correct 3 ms 512 KB Output is correct
184 Correct 3 ms 512 KB Output is correct
185 Correct 3 ms 512 KB Output is correct
186 Correct 3 ms 512 KB Output is correct
187 Correct 3 ms 512 KB Output is correct
188 Correct 2 ms 512 KB Output is correct
189 Correct 1 ms 512 KB Output is correct
190 Correct 3 ms 512 KB Output is correct
191 Correct 3 ms 512 KB Output is correct
192 Correct 2 ms 384 KB Output is correct
193 Correct 3 ms 512 KB Output is correct
194 Correct 2 ms 512 KB Output is correct
195 Correct 2 ms 512 KB Output is correct
196 Correct 2 ms 512 KB Output is correct
197 Correct 3 ms 512 KB Output is correct
198 Correct 3 ms 512 KB Output is correct
199 Correct 3 ms 640 KB Output is correct
200 Correct 2 ms 512 KB Output is correct
201 Correct 3 ms 512 KB Output is correct
202 Correct 3 ms 512 KB Output is correct
203 Correct 3 ms 512 KB Output is correct
204 Correct 3 ms 512 KB Output is correct
205 Correct 4 ms 512 KB Output is correct
206 Correct 4 ms 512 KB Output is correct
207 Correct 3 ms 512 KB Output is correct
208 Correct 4 ms 512 KB Output is correct
209 Correct 14 ms 8192 KB Output is correct
210 Correct 98 ms 14908 KB Output is correct
211 Correct 158 ms 19664 KB Output is correct
212 Correct 193 ms 22480 KB Output is correct
213 Correct 233 ms 24656 KB Output is correct
214 Correct 76 ms 16852 KB Output is correct
215 Correct 73 ms 16156 KB Output is correct
216 Correct 180 ms 19664 KB Output is correct
217 Correct 174 ms 17588 KB Output is correct
218 Correct 158 ms 15568 KB Output is correct
219 Correct 152 ms 15056 KB Output is correct
220 Correct 127 ms 14772 KB Output is correct
221 Correct 145 ms 14900 KB Output is correct
222 Correct 156 ms 16588 KB Output is correct
223 Correct 215 ms 21072 KB Output is correct
224 Correct 194 ms 20088 KB Output is correct
225 Correct 192 ms 17104 KB Output is correct
226 Correct 182 ms 17104 KB Output is correct
227 Correct 167 ms 17072 KB Output is correct
228 Correct 171 ms 16656 KB Output is correct
229 Correct 164 ms 16120 KB Output is correct
230 Correct 156 ms 17888 KB Output is correct
231 Correct 146 ms 17928 KB Output is correct