Submission #1088522

# Submission time Handle Problem Language Result Execution time Memory
1088522 2024-09-14T14:48:09 Z alexander707070 Duathlon (APIO18_duathlon) C++14
100 / 100
74 ms 31540 KB
#include<bits/stdc++.h>
#define MAXN 200007
using namespace std;

int n,m,a[MAXN],b[MAXN],k;
int dp[MAXN],low[MAXN];

vector< pair<int,int> > v[MAXN];
vector<int> g[MAXN];
stack<int> st;

int li[MAXN],tim,sz[MAXN];

long long ans;

void bcc(int x,int p,int dep){
	st.push(x);
	li[x]=tim; dp[x]=low[x]=dep;
	
	int ch=0;

	for(int i=0;i<v[x].size();i++){
		if(li[v[x][i].first]!=tim){
			bcc(v[x][i].first,x,dep+1); ch++;
			low[x]=min(low[x],low[v[x][i].first]);

			if(low[v[x][i].first]>=dp[x]){
				k++;
				g[k].push_back(x);
				g[x].push_back(k);

				while(!st.empty()){
					g[st.top()].push_back(k);
					g[k].push_back(st.top());

					if(st.top()==v[x][i].first){
						st.pop(); break;
					}
					st.pop();
				}
			}

		}else if(v[x][i].first!=p){
			low[x]=min(low[x],dp[v[x][i].first]);
		}
	}
}

void dfs(int x,int p){
	sz[x]=(x<=n);

	for(int i=0;i<g[x].size();i++){
		if(g[x][i]==p)continue;
		dfs(g[x][i],x);

		sz[x]+=sz[g[x][i]];
	}
}

void dfs2(int x,int p,int szcomp){
	for(int i=0;i<g[x].size();i++){
		if(g[x][i]==p)continue;
		dfs2(g[x][i],x,szcomp);

		if(x>n)ans-=(long long) (g[x].size()-1) * (sz[g[x][i]]-1) * (sz[g[x][i]]);
	}

	if(x>n)ans-=(long long) (g[x].size()-1) * (szcomp-sz[x]-1) * (szcomp-sz[x]);
}

int main(){

	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);

	cin>>n>>m;
	for(int i=1;i<=m;i++){
		cin>>a[i]>>b[i];

		v[a[i]].push_back({b[i],i});
		v[b[i]].push_back({a[i],i});
	}

	tim++; k=n;
	for(int i=1;i<=n;i++){
		if(li[i]!=tim)bcc(i,0,0);
	}

	tim++;
	for(int i=1;i<=k;i++){
		if(sz[i]!=0)continue;

		dfs(i,0);
		ans+=(long long) sz[i]*(sz[i]-1)*(sz[i]-2);
		dfs2(i,0,sz[i]);
	}

	cout<<ans<<"\n";

	return 0;
}

Compilation message

count_triplets.cpp: In function 'void bcc(int, int, int)':
count_triplets.cpp:22:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   22 |  for(int i=0;i<v[x].size();i++){
      |              ~^~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs(int, int)':
count_triplets.cpp:52:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   52 |  for(int i=0;i<g[x].size();i++){
      |              ~^~~~~~~~~~~~
count_triplets.cpp: In function 'void dfs2(int, int, int)':
count_triplets.cpp:61:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   61 |  for(int i=0;i<g[x].size();i++){
      |              ~^~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 6 ms 9820 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9656 KB Output is correct
6 Correct 5 ms 9820 KB Output is correct
7 Correct 4 ms 9856 KB Output is correct
8 Correct 4 ms 9820 KB Output is correct
9 Correct 4 ms 9864 KB Output is correct
10 Correct 4 ms 9820 KB Output is correct
11 Correct 4 ms 9820 KB Output is correct
12 Correct 6 ms 9820 KB Output is correct
13 Correct 5 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9816 KB Output is correct
16 Correct 4 ms 9816 KB Output is correct
17 Correct 4 ms 9816 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 4 ms 9788 KB Output is correct
20 Correct 5 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 4 ms 9816 KB Output is correct
23 Correct 4 ms 9816 KB Output is correct
24 Correct 4 ms 9816 KB Output is correct
25 Correct 5 ms 9820 KB Output is correct
26 Correct 7 ms 9880 KB Output is correct
27 Correct 6 ms 10076 KB Output is correct
28 Correct 4 ms 9820 KB Output is correct
29 Correct 4 ms 9820 KB Output is correct
30 Correct 4 ms 9820 KB Output is correct
31 Correct 4 ms 9884 KB Output is correct
32 Correct 4 ms 9820 KB Output is correct
33 Correct 4 ms 9820 KB Output is correct
34 Correct 5 ms 9812 KB Output is correct
35 Correct 4 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 6 ms 9820 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9656 KB Output is correct
6 Correct 5 ms 9820 KB Output is correct
7 Correct 4 ms 9856 KB Output is correct
8 Correct 4 ms 9820 KB Output is correct
9 Correct 4 ms 9864 KB Output is correct
10 Correct 4 ms 9820 KB Output is correct
11 Correct 4 ms 9820 KB Output is correct
12 Correct 6 ms 9820 KB Output is correct
13 Correct 5 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9816 KB Output is correct
16 Correct 4 ms 9816 KB Output is correct
17 Correct 4 ms 9816 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 4 ms 9788 KB Output is correct
20 Correct 5 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 4 ms 9816 KB Output is correct
23 Correct 4 ms 9816 KB Output is correct
24 Correct 4 ms 9816 KB Output is correct
25 Correct 5 ms 9820 KB Output is correct
26 Correct 7 ms 9880 KB Output is correct
27 Correct 6 ms 10076 KB Output is correct
28 Correct 4 ms 9820 KB Output is correct
29 Correct 4 ms 9820 KB Output is correct
30 Correct 4 ms 9820 KB Output is correct
31 Correct 4 ms 9884 KB Output is correct
32 Correct 4 ms 9820 KB Output is correct
33 Correct 4 ms 9820 KB Output is correct
34 Correct 5 ms 9812 KB Output is correct
35 Correct 4 ms 9820 KB Output is correct
36 Correct 4 ms 9820 KB Output is correct
37 Correct 5 ms 9820 KB Output is correct
38 Correct 4 ms 9820 KB Output is correct
39 Correct 4 ms 9820 KB Output is correct
40 Correct 4 ms 9820 KB Output is correct
41 Correct 5 ms 9820 KB Output is correct
42 Correct 4 ms 9664 KB Output is correct
43 Correct 4 ms 9820 KB Output is correct
44 Correct 4 ms 9816 KB Output is correct
45 Correct 4 ms 9816 KB Output is correct
46 Correct 5 ms 9860 KB Output is correct
47 Correct 4 ms 9816 KB Output is correct
48 Correct 5 ms 9652 KB Output is correct
49 Correct 4 ms 9820 KB Output is correct
50 Correct 4 ms 9820 KB Output is correct
51 Correct 4 ms 9820 KB Output is correct
52 Correct 4 ms 9864 KB Output is correct
53 Correct 5 ms 9820 KB Output is correct
54 Correct 4 ms 9668 KB Output is correct
55 Correct 5 ms 9820 KB Output is correct
56 Correct 6 ms 9820 KB Output is correct
57 Correct 4 ms 9788 KB Output is correct
58 Correct 4 ms 9820 KB Output is correct
59 Correct 5 ms 9820 KB Output is correct
60 Correct 4 ms 9868 KB Output is correct
61 Correct 4 ms 9820 KB Output is correct
62 Correct 4 ms 9820 KB Output is correct
63 Correct 4 ms 9820 KB Output is correct
64 Correct 4 ms 9820 KB Output is correct
65 Correct 4 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 48 ms 28228 KB Output is correct
2 Correct 52 ms 29384 KB Output is correct
3 Correct 63 ms 28112 KB Output is correct
4 Correct 62 ms 27800 KB Output is correct
5 Correct 54 ms 25292 KB Output is correct
6 Correct 57 ms 26832 KB Output is correct
7 Correct 60 ms 24984 KB Output is correct
8 Correct 57 ms 25424 KB Output is correct
9 Correct 61 ms 23476 KB Output is correct
10 Correct 56 ms 23808 KB Output is correct
11 Correct 50 ms 21076 KB Output is correct
12 Correct 44 ms 20936 KB Output is correct
13 Correct 41 ms 20596 KB Output is correct
14 Correct 43 ms 20308 KB Output is correct
15 Correct 43 ms 19316 KB Output is correct
16 Correct 33 ms 19008 KB Output is correct
17 Correct 6 ms 11864 KB Output is correct
18 Correct 6 ms 11900 KB Output is correct
19 Correct 6 ms 11868 KB Output is correct
20 Correct 7 ms 11868 KB Output is correct
21 Correct 6 ms 11652 KB Output is correct
22 Correct 7 ms 11864 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 4 ms 10024 KB Output is correct
3 Correct 5 ms 9820 KB Output is correct
4 Correct 5 ms 9920 KB Output is correct
5 Correct 5 ms 10076 KB Output is correct
6 Correct 5 ms 10076 KB Output is correct
7 Correct 6 ms 10076 KB Output is correct
8 Correct 5 ms 9820 KB Output is correct
9 Correct 6 ms 10004 KB Output is correct
10 Correct 5 ms 9860 KB Output is correct
11 Correct 6 ms 9820 KB Output is correct
12 Correct 4 ms 9872 KB Output is correct
13 Correct 5 ms 9820 KB Output is correct
14 Correct 5 ms 9820 KB Output is correct
15 Correct 4 ms 9820 KB Output is correct
16 Correct 4 ms 9820 KB Output is correct
17 Correct 4 ms 9820 KB Output is correct
18 Correct 5 ms 10028 KB Output is correct
19 Correct 5 ms 9820 KB Output is correct
20 Correct 7 ms 9816 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 60 ms 22608 KB Output is correct
2 Correct 57 ms 23888 KB Output is correct
3 Correct 65 ms 23892 KB Output is correct
4 Correct 60 ms 23888 KB Output is correct
5 Correct 61 ms 23748 KB Output is correct
6 Correct 74 ms 31540 KB Output is correct
7 Correct 68 ms 29296 KB Output is correct
8 Correct 65 ms 27732 KB Output is correct
9 Correct 66 ms 26448 KB Output is correct
10 Correct 72 ms 23892 KB Output is correct
11 Correct 64 ms 23928 KB Output is correct
12 Correct 60 ms 23888 KB Output is correct
13 Correct 59 ms 23732 KB Output is correct
14 Correct 50 ms 23120 KB Output is correct
15 Correct 49 ms 22352 KB Output is correct
16 Correct 32 ms 19028 KB Output is correct
17 Correct 63 ms 24276 KB Output is correct
18 Correct 48 ms 24388 KB Output is correct
19 Correct 46 ms 24304 KB Output is correct
20 Correct 49 ms 24200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 9820 KB Output is correct
2 Correct 4 ms 9820 KB Output is correct
3 Correct 4 ms 10012 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 6 ms 9820 KB Output is correct
6 Correct 4 ms 9820 KB Output is correct
7 Correct 5 ms 9816 KB Output is correct
8 Correct 6 ms 9820 KB Output is correct
9 Correct 5 ms 9820 KB Output is correct
10 Correct 4 ms 9820 KB Output is correct
11 Correct 5 ms 9820 KB Output is correct
12 Correct 4 ms 10072 KB Output is correct
13 Correct 5 ms 9820 KB Output is correct
14 Correct 6 ms 9868 KB Output is correct
15 Correct 5 ms 9820 KB Output is correct
16 Correct 4 ms 9820 KB Output is correct
17 Correct 4 ms 9900 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 5 ms 9820 KB Output is correct
20 Correct 5 ms 9856 KB Output is correct
21 Correct 5 ms 9820 KB Output is correct
22 Correct 5 ms 10024 KB Output is correct
23 Correct 6 ms 10076 KB Output is correct
24 Correct 4 ms 9872 KB Output is correct
25 Correct 4 ms 9820 KB Output is correct
26 Correct 4 ms 9820 KB Output is correct
27 Correct 4 ms 9828 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 63 ms 22560 KB Output is correct
2 Correct 65 ms 23632 KB Output is correct
3 Correct 61 ms 23636 KB Output is correct
4 Correct 63 ms 22868 KB Output is correct
5 Correct 65 ms 21840 KB Output is correct
6 Correct 50 ms 21456 KB Output is correct
7 Correct 50 ms 21076 KB Output is correct
8 Correct 49 ms 20908 KB Output is correct
9 Correct 47 ms 20692 KB Output is correct
10 Correct 51 ms 20556 KB Output is correct
11 Correct 50 ms 20564 KB Output is correct
12 Correct 42 ms 20340 KB Output is correct
13 Correct 44 ms 20564 KB Output is correct
14 Correct 45 ms 22612 KB Output is correct
15 Correct 69 ms 29264 KB Output is correct
16 Correct 68 ms 27472 KB Output is correct
17 Correct 71 ms 28244 KB Output is correct
18 Correct 69 ms 26608 KB Output is correct
19 Correct 68 ms 22824 KB Output is correct
20 Correct 60 ms 22952 KB Output is correct
21 Correct 66 ms 22868 KB Output is correct
22 Correct 53 ms 22096 KB Output is correct
23 Correct 49 ms 21204 KB Output is correct
24 Correct 53 ms 23624 KB Output is correct
25 Correct 59 ms 23756 KB Output is correct
26 Correct 62 ms 23208 KB Output is correct
27 Correct 65 ms 23376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 6 ms 9820 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9656 KB Output is correct
6 Correct 5 ms 9820 KB Output is correct
7 Correct 4 ms 9856 KB Output is correct
8 Correct 4 ms 9820 KB Output is correct
9 Correct 4 ms 9864 KB Output is correct
10 Correct 4 ms 9820 KB Output is correct
11 Correct 4 ms 9820 KB Output is correct
12 Correct 6 ms 9820 KB Output is correct
13 Correct 5 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9816 KB Output is correct
16 Correct 4 ms 9816 KB Output is correct
17 Correct 4 ms 9816 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 4 ms 9788 KB Output is correct
20 Correct 5 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 4 ms 9816 KB Output is correct
23 Correct 4 ms 9816 KB Output is correct
24 Correct 4 ms 9816 KB Output is correct
25 Correct 5 ms 9820 KB Output is correct
26 Correct 7 ms 9880 KB Output is correct
27 Correct 6 ms 10076 KB Output is correct
28 Correct 4 ms 9820 KB Output is correct
29 Correct 4 ms 9820 KB Output is correct
30 Correct 4 ms 9820 KB Output is correct
31 Correct 4 ms 9884 KB Output is correct
32 Correct 4 ms 9820 KB Output is correct
33 Correct 4 ms 9820 KB Output is correct
34 Correct 5 ms 9812 KB Output is correct
35 Correct 4 ms 9820 KB Output is correct
36 Correct 4 ms 9820 KB Output is correct
37 Correct 5 ms 9820 KB Output is correct
38 Correct 4 ms 9820 KB Output is correct
39 Correct 4 ms 9820 KB Output is correct
40 Correct 4 ms 9820 KB Output is correct
41 Correct 5 ms 9820 KB Output is correct
42 Correct 4 ms 9664 KB Output is correct
43 Correct 4 ms 9820 KB Output is correct
44 Correct 4 ms 9816 KB Output is correct
45 Correct 4 ms 9816 KB Output is correct
46 Correct 5 ms 9860 KB Output is correct
47 Correct 4 ms 9816 KB Output is correct
48 Correct 5 ms 9652 KB Output is correct
49 Correct 4 ms 9820 KB Output is correct
50 Correct 4 ms 9820 KB Output is correct
51 Correct 4 ms 9820 KB Output is correct
52 Correct 4 ms 9864 KB Output is correct
53 Correct 5 ms 9820 KB Output is correct
54 Correct 4 ms 9668 KB Output is correct
55 Correct 5 ms 9820 KB Output is correct
56 Correct 6 ms 9820 KB Output is correct
57 Correct 4 ms 9788 KB Output is correct
58 Correct 4 ms 9820 KB Output is correct
59 Correct 5 ms 9820 KB Output is correct
60 Correct 4 ms 9868 KB Output is correct
61 Correct 4 ms 9820 KB Output is correct
62 Correct 4 ms 9820 KB Output is correct
63 Correct 4 ms 9820 KB Output is correct
64 Correct 4 ms 9820 KB Output is correct
65 Correct 4 ms 9820 KB Output is correct
66 Correct 4 ms 9856 KB Output is correct
67 Correct 4 ms 9820 KB Output is correct
68 Correct 5 ms 9820 KB Output is correct
69 Correct 5 ms 9820 KB Output is correct
70 Correct 4 ms 10076 KB Output is correct
71 Correct 5 ms 9756 KB Output is correct
72 Correct 4 ms 9820 KB Output is correct
73 Correct 7 ms 9956 KB Output is correct
74 Correct 4 ms 9820 KB Output is correct
75 Correct 5 ms 9820 KB Output is correct
76 Correct 4 ms 9820 KB Output is correct
77 Correct 6 ms 9820 KB Output is correct
78 Correct 4 ms 9820 KB Output is correct
79 Correct 4 ms 9872 KB Output is correct
80 Correct 4 ms 9820 KB Output is correct
81 Correct 4 ms 9820 KB Output is correct
82 Correct 4 ms 9820 KB Output is correct
83 Correct 4 ms 9820 KB Output is correct
84 Correct 4 ms 9820 KB Output is correct
85 Correct 4 ms 9820 KB Output is correct
86 Correct 5 ms 9868 KB Output is correct
87 Correct 4 ms 9820 KB Output is correct
88 Correct 4 ms 9820 KB Output is correct
89 Correct 6 ms 9820 KB Output is correct
90 Correct 7 ms 9996 KB Output is correct
91 Correct 4 ms 9820 KB Output is correct
92 Correct 4 ms 9820 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 9820 KB Output is correct
2 Correct 6 ms 9820 KB Output is correct
3 Correct 4 ms 9820 KB Output is correct
4 Correct 4 ms 9820 KB Output is correct
5 Correct 4 ms 9656 KB Output is correct
6 Correct 5 ms 9820 KB Output is correct
7 Correct 4 ms 9856 KB Output is correct
8 Correct 4 ms 9820 KB Output is correct
9 Correct 4 ms 9864 KB Output is correct
10 Correct 4 ms 9820 KB Output is correct
11 Correct 4 ms 9820 KB Output is correct
12 Correct 6 ms 9820 KB Output is correct
13 Correct 5 ms 9820 KB Output is correct
14 Correct 4 ms 9820 KB Output is correct
15 Correct 4 ms 9816 KB Output is correct
16 Correct 4 ms 9816 KB Output is correct
17 Correct 4 ms 9816 KB Output is correct
18 Correct 4 ms 9820 KB Output is correct
19 Correct 4 ms 9788 KB Output is correct
20 Correct 5 ms 9820 KB Output is correct
21 Correct 4 ms 9820 KB Output is correct
22 Correct 4 ms 9816 KB Output is correct
23 Correct 4 ms 9816 KB Output is correct
24 Correct 4 ms 9816 KB Output is correct
25 Correct 5 ms 9820 KB Output is correct
26 Correct 7 ms 9880 KB Output is correct
27 Correct 6 ms 10076 KB Output is correct
28 Correct 4 ms 9820 KB Output is correct
29 Correct 4 ms 9820 KB Output is correct
30 Correct 4 ms 9820 KB Output is correct
31 Correct 4 ms 9884 KB Output is correct
32 Correct 4 ms 9820 KB Output is correct
33 Correct 4 ms 9820 KB Output is correct
34 Correct 5 ms 9812 KB Output is correct
35 Correct 4 ms 9820 KB Output is correct
36 Correct 4 ms 9820 KB Output is correct
37 Correct 5 ms 9820 KB Output is correct
38 Correct 4 ms 9820 KB Output is correct
39 Correct 4 ms 9820 KB Output is correct
40 Correct 4 ms 9820 KB Output is correct
41 Correct 5 ms 9820 KB Output is correct
42 Correct 4 ms 9664 KB Output is correct
43 Correct 4 ms 9820 KB Output is correct
44 Correct 4 ms 9816 KB Output is correct
45 Correct 4 ms 9816 KB Output is correct
46 Correct 5 ms 9860 KB Output is correct
47 Correct 4 ms 9816 KB Output is correct
48 Correct 5 ms 9652 KB Output is correct
49 Correct 4 ms 9820 KB Output is correct
50 Correct 4 ms 9820 KB Output is correct
51 Correct 4 ms 9820 KB Output is correct
52 Correct 4 ms 9864 KB Output is correct
53 Correct 5 ms 9820 KB Output is correct
54 Correct 4 ms 9668 KB Output is correct
55 Correct 5 ms 9820 KB Output is correct
56 Correct 6 ms 9820 KB Output is correct
57 Correct 4 ms 9788 KB Output is correct
58 Correct 4 ms 9820 KB Output is correct
59 Correct 5 ms 9820 KB Output is correct
60 Correct 4 ms 9868 KB Output is correct
61 Correct 4 ms 9820 KB Output is correct
62 Correct 4 ms 9820 KB Output is correct
63 Correct 4 ms 9820 KB Output is correct
64 Correct 4 ms 9820 KB Output is correct
65 Correct 4 ms 9820 KB Output is correct
66 Correct 48 ms 28228 KB Output is correct
67 Correct 52 ms 29384 KB Output is correct
68 Correct 63 ms 28112 KB Output is correct
69 Correct 62 ms 27800 KB Output is correct
70 Correct 54 ms 25292 KB Output is correct
71 Correct 57 ms 26832 KB Output is correct
72 Correct 60 ms 24984 KB Output is correct
73 Correct 57 ms 25424 KB Output is correct
74 Correct 61 ms 23476 KB Output is correct
75 Correct 56 ms 23808 KB Output is correct
76 Correct 50 ms 21076 KB Output is correct
77 Correct 44 ms 20936 KB Output is correct
78 Correct 41 ms 20596 KB Output is correct
79 Correct 43 ms 20308 KB Output is correct
80 Correct 43 ms 19316 KB Output is correct
81 Correct 33 ms 19008 KB Output is correct
82 Correct 6 ms 11864 KB Output is correct
83 Correct 6 ms 11900 KB Output is correct
84 Correct 6 ms 11868 KB Output is correct
85 Correct 7 ms 11868 KB Output is correct
86 Correct 6 ms 11652 KB Output is correct
87 Correct 7 ms 11864 KB Output is correct
88 Correct 5 ms 9820 KB Output is correct
89 Correct 4 ms 10024 KB Output is correct
90 Correct 5 ms 9820 KB Output is correct
91 Correct 5 ms 9920 KB Output is correct
92 Correct 5 ms 10076 KB Output is correct
93 Correct 5 ms 10076 KB Output is correct
94 Correct 6 ms 10076 KB Output is correct
95 Correct 5 ms 9820 KB Output is correct
96 Correct 6 ms 10004 KB Output is correct
97 Correct 5 ms 9860 KB Output is correct
98 Correct 6 ms 9820 KB Output is correct
99 Correct 4 ms 9872 KB Output is correct
100 Correct 5 ms 9820 KB Output is correct
101 Correct 5 ms 9820 KB Output is correct
102 Correct 4 ms 9820 KB Output is correct
103 Correct 4 ms 9820 KB Output is correct
104 Correct 4 ms 9820 KB Output is correct
105 Correct 5 ms 10028 KB Output is correct
106 Correct 5 ms 9820 KB Output is correct
107 Correct 7 ms 9816 KB Output is correct
108 Correct 60 ms 22608 KB Output is correct
109 Correct 57 ms 23888 KB Output is correct
110 Correct 65 ms 23892 KB Output is correct
111 Correct 60 ms 23888 KB Output is correct
112 Correct 61 ms 23748 KB Output is correct
113 Correct 74 ms 31540 KB Output is correct
114 Correct 68 ms 29296 KB Output is correct
115 Correct 65 ms 27732 KB Output is correct
116 Correct 66 ms 26448 KB Output is correct
117 Correct 72 ms 23892 KB Output is correct
118 Correct 64 ms 23928 KB Output is correct
119 Correct 60 ms 23888 KB Output is correct
120 Correct 59 ms 23732 KB Output is correct
121 Correct 50 ms 23120 KB Output is correct
122 Correct 49 ms 22352 KB Output is correct
123 Correct 32 ms 19028 KB Output is correct
124 Correct 63 ms 24276 KB Output is correct
125 Correct 48 ms 24388 KB Output is correct
126 Correct 46 ms 24304 KB Output is correct
127 Correct 49 ms 24200 KB Output is correct
128 Correct 4 ms 9820 KB Output is correct
129 Correct 4 ms 9820 KB Output is correct
130 Correct 4 ms 10012 KB Output is correct
131 Correct 4 ms 9820 KB Output is correct
132 Correct 6 ms 9820 KB Output is correct
133 Correct 4 ms 9820 KB Output is correct
134 Correct 5 ms 9816 KB Output is correct
135 Correct 6 ms 9820 KB Output is correct
136 Correct 5 ms 9820 KB Output is correct
137 Correct 4 ms 9820 KB Output is correct
138 Correct 5 ms 9820 KB Output is correct
139 Correct 4 ms 10072 KB Output is correct
140 Correct 5 ms 9820 KB Output is correct
141 Correct 6 ms 9868 KB Output is correct
142 Correct 5 ms 9820 KB Output is correct
143 Correct 4 ms 9820 KB Output is correct
144 Correct 4 ms 9900 KB Output is correct
145 Correct 4 ms 9820 KB Output is correct
146 Correct 5 ms 9820 KB Output is correct
147 Correct 5 ms 9856 KB Output is correct
148 Correct 5 ms 9820 KB Output is correct
149 Correct 5 ms 10024 KB Output is correct
150 Correct 6 ms 10076 KB Output is correct
151 Correct 4 ms 9872 KB Output is correct
152 Correct 4 ms 9820 KB Output is correct
153 Correct 4 ms 9820 KB Output is correct
154 Correct 4 ms 9828 KB Output is correct
155 Correct 63 ms 22560 KB Output is correct
156 Correct 65 ms 23632 KB Output is correct
157 Correct 61 ms 23636 KB Output is correct
158 Correct 63 ms 22868 KB Output is correct
159 Correct 65 ms 21840 KB Output is correct
160 Correct 50 ms 21456 KB Output is correct
161 Correct 50 ms 21076 KB Output is correct
162 Correct 49 ms 20908 KB Output is correct
163 Correct 47 ms 20692 KB Output is correct
164 Correct 51 ms 20556 KB Output is correct
165 Correct 50 ms 20564 KB Output is correct
166 Correct 42 ms 20340 KB Output is correct
167 Correct 44 ms 20564 KB Output is correct
168 Correct 45 ms 22612 KB Output is correct
169 Correct 69 ms 29264 KB Output is correct
170 Correct 68 ms 27472 KB Output is correct
171 Correct 71 ms 28244 KB Output is correct
172 Correct 69 ms 26608 KB Output is correct
173 Correct 68 ms 22824 KB Output is correct
174 Correct 60 ms 22952 KB Output is correct
175 Correct 66 ms 22868 KB Output is correct
176 Correct 53 ms 22096 KB Output is correct
177 Correct 49 ms 21204 KB Output is correct
178 Correct 53 ms 23624 KB Output is correct
179 Correct 59 ms 23756 KB Output is correct
180 Correct 62 ms 23208 KB Output is correct
181 Correct 65 ms 23376 KB Output is correct
182 Correct 4 ms 9856 KB Output is correct
183 Correct 4 ms 9820 KB Output is correct
184 Correct 5 ms 9820 KB Output is correct
185 Correct 5 ms 9820 KB Output is correct
186 Correct 4 ms 10076 KB Output is correct
187 Correct 5 ms 9756 KB Output is correct
188 Correct 4 ms 9820 KB Output is correct
189 Correct 7 ms 9956 KB Output is correct
190 Correct 4 ms 9820 KB Output is correct
191 Correct 5 ms 9820 KB Output is correct
192 Correct 4 ms 9820 KB Output is correct
193 Correct 6 ms 9820 KB Output is correct
194 Correct 4 ms 9820 KB Output is correct
195 Correct 4 ms 9872 KB Output is correct
196 Correct 4 ms 9820 KB Output is correct
197 Correct 4 ms 9820 KB Output is correct
198 Correct 4 ms 9820 KB Output is correct
199 Correct 4 ms 9820 KB Output is correct
200 Correct 4 ms 9820 KB Output is correct
201 Correct 4 ms 9820 KB Output is correct
202 Correct 5 ms 9868 KB Output is correct
203 Correct 4 ms 9820 KB Output is correct
204 Correct 4 ms 9820 KB Output is correct
205 Correct 6 ms 9820 KB Output is correct
206 Correct 7 ms 9996 KB Output is correct
207 Correct 4 ms 9820 KB Output is correct
208 Correct 4 ms 9820 KB Output is correct
209 Correct 6 ms 11608 KB Output is correct
210 Correct 34 ms 18424 KB Output is correct
211 Correct 49 ms 23504 KB Output is correct
212 Correct 66 ms 27340 KB Output is correct
213 Correct 71 ms 30296 KB Output is correct
214 Correct 36 ms 22108 KB Output is correct
215 Correct 36 ms 22096 KB Output is correct
216 Correct 59 ms 23672 KB Output is correct
217 Correct 55 ms 22608 KB Output is correct
218 Correct 46 ms 20880 KB Output is correct
219 Correct 46 ms 20564 KB Output is correct
220 Correct 44 ms 20536 KB Output is correct
221 Correct 49 ms 20260 KB Output is correct
222 Correct 46 ms 21584 KB Output is correct
223 Correct 61 ms 25172 KB Output is correct
224 Correct 64 ms 24352 KB Output is correct
225 Correct 54 ms 22356 KB Output is correct
226 Correct 59 ms 22352 KB Output is correct
227 Correct 55 ms 22352 KB Output is correct
228 Correct 54 ms 21584 KB Output is correct
229 Correct 51 ms 20984 KB Output is correct
230 Correct 54 ms 22552 KB Output is correct
231 Correct 67 ms 22868 KB Output is correct