#include <bits/stdc++.h>
using namespace std;
long long n,m;
vector <int> g[100010],bc[200010];
bool visited[200010];
long long dfn[100010],lo[100010],w[200020],sz[200020],occ[200020];
int dsu[200020],siz[200020];
int prt(int n){
if (dsu[n]==n) return n;
return dsu[n]=prt(dsu[n]);
}
void unn(int u,int v){
u=prt(u); v=prt(v);
if (u==v) return;
if (siz[u]<siz[v]) swap(u,v);
dsu[v]=dsu[u];
siz[u]+=siz[v];
}
stack <int> st;
int tme,curid;
void dfs(int cur){
tme++;
dfn[cur]=lo[cur]=tme;
visited[cur]=1;
st.push(cur);
for (int i:g[cur]){
if (!visited[i]){
dfs(i);
lo[cur]=min(lo[cur],lo[i]);
if (lo[i]==dfn[cur]){
curid++;
bool ok=1;
while (ok){
bc[st.top()].push_back(curid);
bc[curid].push_back(st.top());
w[curid]++;
if (st.top()==i) ok=0;
st.pop();
}
bc[cur].push_back(curid);
bc[curid].push_back(cur);
w[curid]++;
}
} else lo[cur]=min(lo[cur],dfn[i]);
}
}
long long S;
void dfs2(int cur,int prv){
visited[cur]=1;
sz[cur]=(cur<=n);
long long rem=S-(cur<=n);
occ[cur]=S*(S-1)/2;
for (int i:bc[cur]){
if (i==prv) continue;
dfs2(i,cur);
sz[cur]+=sz[i];
occ[cur]-=sz[i]*(sz[i]-1)/2;
rem-=sz[i];
}
occ[cur]-=rem*(rem-1)/2;
}
signed main(){
cin>>n>>m;
for (int i=1; i<=2*n; i++){
dsu[i]=i; siz[i]=(i<=n);
}
for (int i=0; i<m; i++){
int u,v; cin>>u>>v;
g[u].push_back(v);
g[v].push_back(u);
unn(u,v);
}
curid=n;
for (int i=1; i<=n; i++){
if (!visited[i]) dfs(i);
}
for (int i=1; i<=curid; i++) visited[i]=0;
for (int i=1; i<=n; i++) w[i]=-1;
for (int i=1; i<=curid; i++){
if (!visited[i]){
S=siz[prt(i)];
dfs2(i,0);
}
}
long long ans=0;
for (int i=1; i<=curid; i++) ans+=w[i]*occ[i];
cout<<ans*2<<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
5 ms |
7380 KB |
Output is correct |
4 |
Correct |
4 ms |
7324 KB |
Output is correct |
5 |
Correct |
5 ms |
7320 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7316 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
7332 KB |
Output is correct |
13 |
Correct |
4 ms |
7380 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7380 KB |
Output is correct |
23 |
Correct |
3 ms |
7380 KB |
Output is correct |
24 |
Correct |
3 ms |
7380 KB |
Output is correct |
25 |
Correct |
3 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
3 ms |
7380 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
3 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
5 ms |
7304 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
5 ms |
7380 KB |
Output is correct |
4 |
Correct |
4 ms |
7324 KB |
Output is correct |
5 |
Correct |
5 ms |
7320 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7316 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
7332 KB |
Output is correct |
13 |
Correct |
4 ms |
7380 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7380 KB |
Output is correct |
23 |
Correct |
3 ms |
7380 KB |
Output is correct |
24 |
Correct |
3 ms |
7380 KB |
Output is correct |
25 |
Correct |
3 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
3 ms |
7380 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
3 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
5 ms |
7304 KB |
Output is correct |
36 |
Correct |
4 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7380 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
4 ms |
7380 KB |
Output is correct |
40 |
Correct |
4 ms |
7380 KB |
Output is correct |
41 |
Correct |
4 ms |
7380 KB |
Output is correct |
42 |
Correct |
5 ms |
7380 KB |
Output is correct |
43 |
Correct |
3 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7380 KB |
Output is correct |
45 |
Correct |
3 ms |
7380 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
5 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7380 KB |
Output is correct |
49 |
Correct |
4 ms |
7380 KB |
Output is correct |
50 |
Correct |
5 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7316 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
3 ms |
7380 KB |
Output is correct |
54 |
Correct |
3 ms |
7380 KB |
Output is correct |
55 |
Correct |
3 ms |
7380 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
4 ms |
7392 KB |
Output is correct |
58 |
Correct |
4 ms |
7312 KB |
Output is correct |
59 |
Correct |
5 ms |
7380 KB |
Output is correct |
60 |
Correct |
4 ms |
7380 KB |
Output is correct |
61 |
Correct |
5 ms |
7380 KB |
Output is correct |
62 |
Correct |
4 ms |
7328 KB |
Output is correct |
63 |
Correct |
5 ms |
7380 KB |
Output is correct |
64 |
Correct |
4 ms |
7380 KB |
Output is correct |
65 |
Correct |
4 ms |
7380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
127 ms |
27444 KB |
Output is correct |
2 |
Correct |
150 ms |
27400 KB |
Output is correct |
3 |
Correct |
151 ms |
28656 KB |
Output is correct |
4 |
Correct |
125 ms |
27972 KB |
Output is correct |
5 |
Correct |
129 ms |
26716 KB |
Output is correct |
6 |
Correct |
145 ms |
28872 KB |
Output is correct |
7 |
Correct |
146 ms |
26972 KB |
Output is correct |
8 |
Correct |
150 ms |
27348 KB |
Output is correct |
9 |
Correct |
132 ms |
25576 KB |
Output is correct |
10 |
Correct |
165 ms |
25572 KB |
Output is correct |
11 |
Correct |
129 ms |
23052 KB |
Output is correct |
12 |
Correct |
106 ms |
22732 KB |
Output is correct |
13 |
Correct |
102 ms |
22600 KB |
Output is correct |
14 |
Correct |
92 ms |
22280 KB |
Output is correct |
15 |
Correct |
93 ms |
21116 KB |
Output is correct |
16 |
Correct |
73 ms |
20928 KB |
Output is correct |
17 |
Correct |
9 ms |
13396 KB |
Output is correct |
18 |
Correct |
8 ms |
13396 KB |
Output is correct |
19 |
Correct |
8 ms |
13268 KB |
Output is correct |
20 |
Correct |
9 ms |
13268 KB |
Output is correct |
21 |
Correct |
9 ms |
13364 KB |
Output is correct |
22 |
Correct |
8 ms |
13372 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
7508 KB |
Output is correct |
2 |
Correct |
4 ms |
7508 KB |
Output is correct |
3 |
Correct |
7 ms |
7508 KB |
Output is correct |
4 |
Correct |
4 ms |
7636 KB |
Output is correct |
5 |
Correct |
5 ms |
7636 KB |
Output is correct |
6 |
Correct |
5 ms |
7508 KB |
Output is correct |
7 |
Correct |
4 ms |
7636 KB |
Output is correct |
8 |
Correct |
5 ms |
7508 KB |
Output is correct |
9 |
Correct |
4 ms |
7508 KB |
Output is correct |
10 |
Correct |
5 ms |
7508 KB |
Output is correct |
11 |
Correct |
4 ms |
7508 KB |
Output is correct |
12 |
Correct |
5 ms |
7456 KB |
Output is correct |
13 |
Correct |
5 ms |
7508 KB |
Output is correct |
14 |
Correct |
4 ms |
7508 KB |
Output is correct |
15 |
Correct |
5 ms |
7508 KB |
Output is correct |
16 |
Correct |
4 ms |
7508 KB |
Output is correct |
17 |
Correct |
4 ms |
7508 KB |
Output is correct |
18 |
Correct |
5 ms |
7508 KB |
Output is correct |
19 |
Correct |
4 ms |
7508 KB |
Output is correct |
20 |
Correct |
4 ms |
7508 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
133 ms |
24948 KB |
Output is correct |
2 |
Correct |
156 ms |
26196 KB |
Output is correct |
3 |
Correct |
175 ms |
26200 KB |
Output is correct |
4 |
Correct |
147 ms |
26156 KB |
Output is correct |
5 |
Correct |
138 ms |
26120 KB |
Output is correct |
6 |
Correct |
183 ms |
34492 KB |
Output is correct |
7 |
Correct |
139 ms |
31668 KB |
Output is correct |
8 |
Correct |
155 ms |
30192 KB |
Output is correct |
9 |
Correct |
173 ms |
28740 KB |
Output is correct |
10 |
Correct |
136 ms |
26188 KB |
Output is correct |
11 |
Correct |
142 ms |
26212 KB |
Output is correct |
12 |
Correct |
163 ms |
26260 KB |
Output is correct |
13 |
Correct |
131 ms |
26148 KB |
Output is correct |
14 |
Correct |
118 ms |
25332 KB |
Output is correct |
15 |
Correct |
126 ms |
24484 KB |
Output is correct |
16 |
Correct |
84 ms |
21196 KB |
Output is correct |
17 |
Correct |
101 ms |
26704 KB |
Output is correct |
18 |
Correct |
104 ms |
26808 KB |
Output is correct |
19 |
Correct |
133 ms |
26852 KB |
Output is correct |
20 |
Correct |
111 ms |
26876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
7508 KB |
Output is correct |
2 |
Correct |
4 ms |
7508 KB |
Output is correct |
3 |
Correct |
4 ms |
7508 KB |
Output is correct |
4 |
Correct |
4 ms |
7440 KB |
Output is correct |
5 |
Correct |
4 ms |
7508 KB |
Output is correct |
6 |
Correct |
5 ms |
7508 KB |
Output is correct |
7 |
Correct |
5 ms |
7508 KB |
Output is correct |
8 |
Correct |
5 ms |
7508 KB |
Output is correct |
9 |
Correct |
5 ms |
7508 KB |
Output is correct |
10 |
Correct |
4 ms |
7508 KB |
Output is correct |
11 |
Correct |
5 ms |
7508 KB |
Output is correct |
12 |
Correct |
4 ms |
7508 KB |
Output is correct |
13 |
Correct |
4 ms |
7508 KB |
Output is correct |
14 |
Correct |
4 ms |
7508 KB |
Output is correct |
15 |
Correct |
5 ms |
7508 KB |
Output is correct |
16 |
Correct |
5 ms |
7508 KB |
Output is correct |
17 |
Correct |
4 ms |
7508 KB |
Output is correct |
18 |
Correct |
5 ms |
7508 KB |
Output is correct |
19 |
Correct |
4 ms |
7508 KB |
Output is correct |
20 |
Correct |
4 ms |
7508 KB |
Output is correct |
21 |
Correct |
5 ms |
7508 KB |
Output is correct |
22 |
Correct |
5 ms |
7508 KB |
Output is correct |
23 |
Correct |
7 ms |
7508 KB |
Output is correct |
24 |
Correct |
5 ms |
7508 KB |
Output is correct |
25 |
Correct |
5 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
127 ms |
24968 KB |
Output is correct |
2 |
Correct |
148 ms |
26020 KB |
Output is correct |
3 |
Correct |
177 ms |
25280 KB |
Output is correct |
4 |
Correct |
149 ms |
24164 KB |
Output is correct |
5 |
Correct |
138 ms |
22848 KB |
Output is correct |
6 |
Correct |
146 ms |
22252 KB |
Output is correct |
7 |
Correct |
143 ms |
22032 KB |
Output is correct |
8 |
Correct |
129 ms |
21608 KB |
Output is correct |
9 |
Correct |
123 ms |
21492 KB |
Output is correct |
10 |
Correct |
128 ms |
21424 KB |
Output is correct |
11 |
Correct |
166 ms |
21264 KB |
Output is correct |
12 |
Correct |
118 ms |
21268 KB |
Output is correct |
13 |
Correct |
126 ms |
21212 KB |
Output is correct |
14 |
Correct |
146 ms |
23072 KB |
Output is correct |
15 |
Correct |
144 ms |
31180 KB |
Output is correct |
16 |
Correct |
167 ms |
29156 KB |
Output is correct |
17 |
Correct |
176 ms |
29652 KB |
Output is correct |
18 |
Correct |
149 ms |
27852 KB |
Output is correct |
19 |
Correct |
146 ms |
24104 KB |
Output is correct |
20 |
Correct |
142 ms |
24168 KB |
Output is correct |
21 |
Correct |
157 ms |
24148 KB |
Output is correct |
22 |
Correct |
174 ms |
23500 KB |
Output is correct |
23 |
Correct |
127 ms |
22828 KB |
Output is correct |
24 |
Correct |
148 ms |
25676 KB |
Output is correct |
25 |
Correct |
154 ms |
25676 KB |
Output is correct |
26 |
Correct |
135 ms |
24864 KB |
Output is correct |
27 |
Correct |
142 ms |
24836 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
5 ms |
7380 KB |
Output is correct |
4 |
Correct |
4 ms |
7324 KB |
Output is correct |
5 |
Correct |
5 ms |
7320 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7316 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
7332 KB |
Output is correct |
13 |
Correct |
4 ms |
7380 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7380 KB |
Output is correct |
23 |
Correct |
3 ms |
7380 KB |
Output is correct |
24 |
Correct |
3 ms |
7380 KB |
Output is correct |
25 |
Correct |
3 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
3 ms |
7380 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
3 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
5 ms |
7304 KB |
Output is correct |
36 |
Correct |
4 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7380 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
4 ms |
7380 KB |
Output is correct |
40 |
Correct |
4 ms |
7380 KB |
Output is correct |
41 |
Correct |
4 ms |
7380 KB |
Output is correct |
42 |
Correct |
5 ms |
7380 KB |
Output is correct |
43 |
Correct |
3 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7380 KB |
Output is correct |
45 |
Correct |
3 ms |
7380 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
5 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7380 KB |
Output is correct |
49 |
Correct |
4 ms |
7380 KB |
Output is correct |
50 |
Correct |
5 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7316 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
3 ms |
7380 KB |
Output is correct |
54 |
Correct |
3 ms |
7380 KB |
Output is correct |
55 |
Correct |
3 ms |
7380 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
4 ms |
7392 KB |
Output is correct |
58 |
Correct |
4 ms |
7312 KB |
Output is correct |
59 |
Correct |
5 ms |
7380 KB |
Output is correct |
60 |
Correct |
4 ms |
7380 KB |
Output is correct |
61 |
Correct |
5 ms |
7380 KB |
Output is correct |
62 |
Correct |
4 ms |
7328 KB |
Output is correct |
63 |
Correct |
5 ms |
7380 KB |
Output is correct |
64 |
Correct |
4 ms |
7380 KB |
Output is correct |
65 |
Correct |
4 ms |
7380 KB |
Output is correct |
66 |
Correct |
4 ms |
7380 KB |
Output is correct |
67 |
Correct |
4 ms |
7508 KB |
Output is correct |
68 |
Correct |
4 ms |
7508 KB |
Output is correct |
69 |
Correct |
4 ms |
7508 KB |
Output is correct |
70 |
Correct |
5 ms |
7508 KB |
Output is correct |
71 |
Correct |
6 ms |
7508 KB |
Output is correct |
72 |
Correct |
6 ms |
7508 KB |
Output is correct |
73 |
Correct |
7 ms |
7508 KB |
Output is correct |
74 |
Correct |
5 ms |
7508 KB |
Output is correct |
75 |
Correct |
5 ms |
7508 KB |
Output is correct |
76 |
Correct |
4 ms |
7380 KB |
Output is correct |
77 |
Correct |
5 ms |
7552 KB |
Output is correct |
78 |
Correct |
5 ms |
7508 KB |
Output is correct |
79 |
Correct |
4 ms |
7508 KB |
Output is correct |
80 |
Correct |
6 ms |
7508 KB |
Output is correct |
81 |
Correct |
6 ms |
7468 KB |
Output is correct |
82 |
Correct |
5 ms |
7508 KB |
Output is correct |
83 |
Correct |
5 ms |
7508 KB |
Output is correct |
84 |
Correct |
6 ms |
7508 KB |
Output is correct |
85 |
Correct |
5 ms |
7508 KB |
Output is correct |
86 |
Correct |
5 ms |
7520 KB |
Output is correct |
87 |
Correct |
5 ms |
7508 KB |
Output is correct |
88 |
Correct |
5 ms |
7508 KB |
Output is correct |
89 |
Correct |
4 ms |
7508 KB |
Output is correct |
90 |
Correct |
6 ms |
7508 KB |
Output is correct |
91 |
Correct |
5 ms |
7528 KB |
Output is correct |
92 |
Correct |
4 ms |
7508 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
5 ms |
7380 KB |
Output is correct |
4 |
Correct |
4 ms |
7324 KB |
Output is correct |
5 |
Correct |
5 ms |
7320 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
5 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7316 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
5 ms |
7332 KB |
Output is correct |
13 |
Correct |
4 ms |
7380 KB |
Output is correct |
14 |
Correct |
4 ms |
7380 KB |
Output is correct |
15 |
Correct |
4 ms |
7372 KB |
Output is correct |
16 |
Correct |
5 ms |
7380 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7380 KB |
Output is correct |
23 |
Correct |
3 ms |
7380 KB |
Output is correct |
24 |
Correct |
3 ms |
7380 KB |
Output is correct |
25 |
Correct |
3 ms |
7380 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
3 ms |
7380 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
3 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7380 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7380 KB |
Output is correct |
35 |
Correct |
5 ms |
7304 KB |
Output is correct |
36 |
Correct |
4 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7380 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
4 ms |
7380 KB |
Output is correct |
40 |
Correct |
4 ms |
7380 KB |
Output is correct |
41 |
Correct |
4 ms |
7380 KB |
Output is correct |
42 |
Correct |
5 ms |
7380 KB |
Output is correct |
43 |
Correct |
3 ms |
7380 KB |
Output is correct |
44 |
Correct |
4 ms |
7380 KB |
Output is correct |
45 |
Correct |
3 ms |
7380 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
5 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7380 KB |
Output is correct |
49 |
Correct |
4 ms |
7380 KB |
Output is correct |
50 |
Correct |
5 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7316 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
3 ms |
7380 KB |
Output is correct |
54 |
Correct |
3 ms |
7380 KB |
Output is correct |
55 |
Correct |
3 ms |
7380 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
4 ms |
7392 KB |
Output is correct |
58 |
Correct |
4 ms |
7312 KB |
Output is correct |
59 |
Correct |
5 ms |
7380 KB |
Output is correct |
60 |
Correct |
4 ms |
7380 KB |
Output is correct |
61 |
Correct |
5 ms |
7380 KB |
Output is correct |
62 |
Correct |
4 ms |
7328 KB |
Output is correct |
63 |
Correct |
5 ms |
7380 KB |
Output is correct |
64 |
Correct |
4 ms |
7380 KB |
Output is correct |
65 |
Correct |
4 ms |
7380 KB |
Output is correct |
66 |
Correct |
127 ms |
27444 KB |
Output is correct |
67 |
Correct |
150 ms |
27400 KB |
Output is correct |
68 |
Correct |
151 ms |
28656 KB |
Output is correct |
69 |
Correct |
125 ms |
27972 KB |
Output is correct |
70 |
Correct |
129 ms |
26716 KB |
Output is correct |
71 |
Correct |
145 ms |
28872 KB |
Output is correct |
72 |
Correct |
146 ms |
26972 KB |
Output is correct |
73 |
Correct |
150 ms |
27348 KB |
Output is correct |
74 |
Correct |
132 ms |
25576 KB |
Output is correct |
75 |
Correct |
165 ms |
25572 KB |
Output is correct |
76 |
Correct |
129 ms |
23052 KB |
Output is correct |
77 |
Correct |
106 ms |
22732 KB |
Output is correct |
78 |
Correct |
102 ms |
22600 KB |
Output is correct |
79 |
Correct |
92 ms |
22280 KB |
Output is correct |
80 |
Correct |
93 ms |
21116 KB |
Output is correct |
81 |
Correct |
73 ms |
20928 KB |
Output is correct |
82 |
Correct |
9 ms |
13396 KB |
Output is correct |
83 |
Correct |
8 ms |
13396 KB |
Output is correct |
84 |
Correct |
8 ms |
13268 KB |
Output is correct |
85 |
Correct |
9 ms |
13268 KB |
Output is correct |
86 |
Correct |
9 ms |
13364 KB |
Output is correct |
87 |
Correct |
8 ms |
13372 KB |
Output is correct |
88 |
Correct |
4 ms |
7508 KB |
Output is correct |
89 |
Correct |
4 ms |
7508 KB |
Output is correct |
90 |
Correct |
7 ms |
7508 KB |
Output is correct |
91 |
Correct |
4 ms |
7636 KB |
Output is correct |
92 |
Correct |
5 ms |
7636 KB |
Output is correct |
93 |
Correct |
5 ms |
7508 KB |
Output is correct |
94 |
Correct |
4 ms |
7636 KB |
Output is correct |
95 |
Correct |
5 ms |
7508 KB |
Output is correct |
96 |
Correct |
4 ms |
7508 KB |
Output is correct |
97 |
Correct |
5 ms |
7508 KB |
Output is correct |
98 |
Correct |
4 ms |
7508 KB |
Output is correct |
99 |
Correct |
5 ms |
7456 KB |
Output is correct |
100 |
Correct |
5 ms |
7508 KB |
Output is correct |
101 |
Correct |
4 ms |
7508 KB |
Output is correct |
102 |
Correct |
5 ms |
7508 KB |
Output is correct |
103 |
Correct |
4 ms |
7508 KB |
Output is correct |
104 |
Correct |
4 ms |
7508 KB |
Output is correct |
105 |
Correct |
5 ms |
7508 KB |
Output is correct |
106 |
Correct |
4 ms |
7508 KB |
Output is correct |
107 |
Correct |
4 ms |
7508 KB |
Output is correct |
108 |
Correct |
133 ms |
24948 KB |
Output is correct |
109 |
Correct |
156 ms |
26196 KB |
Output is correct |
110 |
Correct |
175 ms |
26200 KB |
Output is correct |
111 |
Correct |
147 ms |
26156 KB |
Output is correct |
112 |
Correct |
138 ms |
26120 KB |
Output is correct |
113 |
Correct |
183 ms |
34492 KB |
Output is correct |
114 |
Correct |
139 ms |
31668 KB |
Output is correct |
115 |
Correct |
155 ms |
30192 KB |
Output is correct |
116 |
Correct |
173 ms |
28740 KB |
Output is correct |
117 |
Correct |
136 ms |
26188 KB |
Output is correct |
118 |
Correct |
142 ms |
26212 KB |
Output is correct |
119 |
Correct |
163 ms |
26260 KB |
Output is correct |
120 |
Correct |
131 ms |
26148 KB |
Output is correct |
121 |
Correct |
118 ms |
25332 KB |
Output is correct |
122 |
Correct |
126 ms |
24484 KB |
Output is correct |
123 |
Correct |
84 ms |
21196 KB |
Output is correct |
124 |
Correct |
101 ms |
26704 KB |
Output is correct |
125 |
Correct |
104 ms |
26808 KB |
Output is correct |
126 |
Correct |
133 ms |
26852 KB |
Output is correct |
127 |
Correct |
111 ms |
26876 KB |
Output is correct |
128 |
Correct |
4 ms |
7508 KB |
Output is correct |
129 |
Correct |
4 ms |
7508 KB |
Output is correct |
130 |
Correct |
4 ms |
7508 KB |
Output is correct |
131 |
Correct |
4 ms |
7440 KB |
Output is correct |
132 |
Correct |
4 ms |
7508 KB |
Output is correct |
133 |
Correct |
5 ms |
7508 KB |
Output is correct |
134 |
Correct |
5 ms |
7508 KB |
Output is correct |
135 |
Correct |
5 ms |
7508 KB |
Output is correct |
136 |
Correct |
5 ms |
7508 KB |
Output is correct |
137 |
Correct |
4 ms |
7508 KB |
Output is correct |
138 |
Correct |
5 ms |
7508 KB |
Output is correct |
139 |
Correct |
4 ms |
7508 KB |
Output is correct |
140 |
Correct |
4 ms |
7508 KB |
Output is correct |
141 |
Correct |
4 ms |
7508 KB |
Output is correct |
142 |
Correct |
5 ms |
7508 KB |
Output is correct |
143 |
Correct |
5 ms |
7508 KB |
Output is correct |
144 |
Correct |
4 ms |
7508 KB |
Output is correct |
145 |
Correct |
5 ms |
7508 KB |
Output is correct |
146 |
Correct |
4 ms |
7508 KB |
Output is correct |
147 |
Correct |
4 ms |
7508 KB |
Output is correct |
148 |
Correct |
5 ms |
7508 KB |
Output is correct |
149 |
Correct |
5 ms |
7508 KB |
Output is correct |
150 |
Correct |
7 ms |
7508 KB |
Output is correct |
151 |
Correct |
5 ms |
7508 KB |
Output is correct |
152 |
Correct |
5 ms |
7380 KB |
Output is correct |
153 |
Correct |
4 ms |
7380 KB |
Output is correct |
154 |
Correct |
4 ms |
7380 KB |
Output is correct |
155 |
Correct |
127 ms |
24968 KB |
Output is correct |
156 |
Correct |
148 ms |
26020 KB |
Output is correct |
157 |
Correct |
177 ms |
25280 KB |
Output is correct |
158 |
Correct |
149 ms |
24164 KB |
Output is correct |
159 |
Correct |
138 ms |
22848 KB |
Output is correct |
160 |
Correct |
146 ms |
22252 KB |
Output is correct |
161 |
Correct |
143 ms |
22032 KB |
Output is correct |
162 |
Correct |
129 ms |
21608 KB |
Output is correct |
163 |
Correct |
123 ms |
21492 KB |
Output is correct |
164 |
Correct |
128 ms |
21424 KB |
Output is correct |
165 |
Correct |
166 ms |
21264 KB |
Output is correct |
166 |
Correct |
118 ms |
21268 KB |
Output is correct |
167 |
Correct |
126 ms |
21212 KB |
Output is correct |
168 |
Correct |
146 ms |
23072 KB |
Output is correct |
169 |
Correct |
144 ms |
31180 KB |
Output is correct |
170 |
Correct |
167 ms |
29156 KB |
Output is correct |
171 |
Correct |
176 ms |
29652 KB |
Output is correct |
172 |
Correct |
149 ms |
27852 KB |
Output is correct |
173 |
Correct |
146 ms |
24104 KB |
Output is correct |
174 |
Correct |
142 ms |
24168 KB |
Output is correct |
175 |
Correct |
157 ms |
24148 KB |
Output is correct |
176 |
Correct |
174 ms |
23500 KB |
Output is correct |
177 |
Correct |
127 ms |
22828 KB |
Output is correct |
178 |
Correct |
148 ms |
25676 KB |
Output is correct |
179 |
Correct |
154 ms |
25676 KB |
Output is correct |
180 |
Correct |
135 ms |
24864 KB |
Output is correct |
181 |
Correct |
142 ms |
24836 KB |
Output is correct |
182 |
Correct |
4 ms |
7380 KB |
Output is correct |
183 |
Correct |
4 ms |
7508 KB |
Output is correct |
184 |
Correct |
4 ms |
7508 KB |
Output is correct |
185 |
Correct |
4 ms |
7508 KB |
Output is correct |
186 |
Correct |
5 ms |
7508 KB |
Output is correct |
187 |
Correct |
6 ms |
7508 KB |
Output is correct |
188 |
Correct |
6 ms |
7508 KB |
Output is correct |
189 |
Correct |
7 ms |
7508 KB |
Output is correct |
190 |
Correct |
5 ms |
7508 KB |
Output is correct |
191 |
Correct |
5 ms |
7508 KB |
Output is correct |
192 |
Correct |
4 ms |
7380 KB |
Output is correct |
193 |
Correct |
5 ms |
7552 KB |
Output is correct |
194 |
Correct |
5 ms |
7508 KB |
Output is correct |
195 |
Correct |
4 ms |
7508 KB |
Output is correct |
196 |
Correct |
6 ms |
7508 KB |
Output is correct |
197 |
Correct |
6 ms |
7468 KB |
Output is correct |
198 |
Correct |
5 ms |
7508 KB |
Output is correct |
199 |
Correct |
5 ms |
7508 KB |
Output is correct |
200 |
Correct |
6 ms |
7508 KB |
Output is correct |
201 |
Correct |
5 ms |
7508 KB |
Output is correct |
202 |
Correct |
5 ms |
7520 KB |
Output is correct |
203 |
Correct |
5 ms |
7508 KB |
Output is correct |
204 |
Correct |
5 ms |
7508 KB |
Output is correct |
205 |
Correct |
4 ms |
7508 KB |
Output is correct |
206 |
Correct |
6 ms |
7508 KB |
Output is correct |
207 |
Correct |
5 ms |
7528 KB |
Output is correct |
208 |
Correct |
4 ms |
7508 KB |
Output is correct |
209 |
Correct |
8 ms |
13268 KB |
Output is correct |
210 |
Correct |
70 ms |
20488 KB |
Output is correct |
211 |
Correct |
125 ms |
24020 KB |
Output is correct |
212 |
Correct |
173 ms |
25992 KB |
Output is correct |
213 |
Correct |
205 ms |
27676 KB |
Output is correct |
214 |
Correct |
106 ms |
22788 KB |
Output is correct |
215 |
Correct |
112 ms |
22204 KB |
Output is correct |
216 |
Correct |
148 ms |
25004 KB |
Output is correct |
217 |
Correct |
142 ms |
23344 KB |
Output is correct |
218 |
Correct |
123 ms |
21708 KB |
Output is correct |
219 |
Correct |
138 ms |
21316 KB |
Output is correct |
220 |
Correct |
142 ms |
21252 KB |
Output is correct |
221 |
Correct |
130 ms |
21192 KB |
Output is correct |
222 |
Correct |
128 ms |
22100 KB |
Output is correct |
223 |
Correct |
192 ms |
25732 KB |
Output is correct |
224 |
Correct |
179 ms |
24976 KB |
Output is correct |
225 |
Correct |
174 ms |
23020 KB |
Output is correct |
226 |
Correct |
157 ms |
22988 KB |
Output is correct |
227 |
Correct |
161 ms |
23016 KB |
Output is correct |
228 |
Correct |
138 ms |
22604 KB |
Output is correct |
229 |
Correct |
119 ms |
22148 KB |
Output is correct |
230 |
Correct |
156 ms |
23576 KB |
Output is correct |
231 |
Correct |
178 ms |
23720 KB |
Output is correct |