#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) x.begin() , x.end()
#define sze(x) (ll)(x.size())
typedef long long ll;
typedef pair<ll , ll> pll;
const ll maxn = 2e5 + 17 , inf = 2e16;
ll n , m;
vector<ll> adj[maxn] , cdj[maxn];
bitset<maxn> mark , bor , bst;
ll dis[maxn] , dep = 0 , hb[maxn] , z[maxn] , sz , ans = 0 , o , cs[maxn] , pr[maxn];
vector<pll> b;
void bDFS(ll r){
mark[r] = true;
dis[r] = dep++;
bool f = false;
for(auto i : adj[r]){
if(dis[i] == dep - 2) continue;
if(mark[i]){
hb[r] = min(hb[r] , dis[i]);
continue;
}
pr[i] = r;
bDFS(i);
hb[r] = min(hb[r] , hb[i]);
f |= (hb[i] >= dep - 1);
}
bor[r] = f;
dep--;
return;
}
void cDFS(ll r , ll ban){
bst[r] = true;
if(bor[r]){
cdj[o].push_back(r); cdj[r].push_back(o);
} else {
cs[o]++;
}
for(auto i : adj[r]){
if(i == pr[r] || i == ban) continue;
if(bst[i]) continue;
cDFS(i , ban);
}
return;
}
void zDFS(ll r , ll par){
mark[r] = true;
if(r < n){
z[r] = 1;
} else {
z[r] = cs[r];
}
for(auto i : cdj[r]){
if(i == par) continue;
zDFS(i , r);
z[r] += z[i];
}
return;
}
void aDFS(ll r , ll par){
for(auto i : cdj[r]){
if(i == par) continue;
aDFS(i , r);
}
if(r < n) return;
ll h = 0;
for(auto i : cdj[r]){
if(i == par) continue;
h += z[i] * (z[i] - 1);
}
h += (sz - z[r]) * (sz - z[r] - 1);
ans -= (cs[r] + sze(cdj[r]) - 1) * h;
return;
}
int main(){
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
memset(hb , 63 , sizeof(hb));
memset(dis , 63 , sizeof(dis));
memset(cs , 0 , sizeof(cs));
memset(pr , -1 , sizeof(pr));
cin>>n>>m;
for(ll i = 0 ; i < m ; i++){
ll v , u;
cin>>v>>u; v--; u--;
adj[v].push_back(u); adj[u].push_back(v);
}
// cout<<"----------------------------------\n";
for(ll i = 0 ; i < n ; i++){
if(mark[i]) continue;
bDFS(i);
}
for(ll i = 0 ; i < n ; i++){
if(!bor[i]) continue;
b.push_back({dis[i] , i});
}
sort(all(b) , greater<pll>());
o = n;
for(auto p : b){
ll r = p.second;
for(auto i : adj[r]){
if(i == pr[r]) continue;
if(pr[i] != r) continue;
if(hb[i] >= dis[r]){
// cout<<r<<' '<<i<<'\n';
cDFS(i , r);
cdj[o].push_back(r); cdj[r].push_back(o);
o++;
}
}
}
// for(ll i = 0 ; i < n ; i++){
// cout<<pr[i]<<' ';
// }
// cout<<'\n';
// for(ll i = n ; i < o ; i++){
// cout<<cs[i]<<'\n';
// for(auto j : cdj[i]){
// cout<<j<<' ';
// }
// cout<<'\n';
// }
mark.reset();
for(ll i = 0 ; i < n ; i++){
if(!bor[i]) continue;
if(mark[i]) continue;
zDFS(i , -1);
sz = z[i];
ans += sz * (sz - 1) * (sz - 2);
aDFS(i , -1);
}
cout<<ans<<'\n';
return 0;
}
/*
6 6
1 2
2 3
3 4
4 5
5 2
4 6
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
15956 KB |
Output is correct |
2 |
Correct |
8 ms |
15956 KB |
Output is correct |
3 |
Correct |
8 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15976 KB |
Output is correct |
5 |
Correct |
11 ms |
15988 KB |
Output is correct |
6 |
Correct |
9 ms |
15956 KB |
Output is correct |
7 |
Correct |
10 ms |
15956 KB |
Output is correct |
8 |
Correct |
7 ms |
15916 KB |
Output is correct |
9 |
Correct |
8 ms |
15988 KB |
Output is correct |
10 |
Correct |
7 ms |
15988 KB |
Output is correct |
11 |
Correct |
8 ms |
15956 KB |
Output is correct |
12 |
Correct |
8 ms |
15988 KB |
Output is correct |
13 |
Correct |
8 ms |
16004 KB |
Output is correct |
14 |
Correct |
9 ms |
15956 KB |
Output is correct |
15 |
Correct |
8 ms |
15984 KB |
Output is correct |
16 |
Correct |
8 ms |
15956 KB |
Output is correct |
17 |
Correct |
8 ms |
15956 KB |
Output is correct |
18 |
Correct |
9 ms |
15956 KB |
Output is correct |
19 |
Correct |
9 ms |
15992 KB |
Output is correct |
20 |
Correct |
10 ms |
15984 KB |
Output is correct |
21 |
Correct |
8 ms |
15948 KB |
Output is correct |
22 |
Correct |
8 ms |
15932 KB |
Output is correct |
23 |
Correct |
8 ms |
15956 KB |
Output is correct |
24 |
Correct |
8 ms |
15956 KB |
Output is correct |
25 |
Correct |
8 ms |
15988 KB |
Output is correct |
26 |
Correct |
7 ms |
15892 KB |
Output is correct |
27 |
Correct |
8 ms |
15956 KB |
Output is correct |
28 |
Correct |
8 ms |
15956 KB |
Output is correct |
29 |
Correct |
9 ms |
15988 KB |
Output is correct |
30 |
Correct |
8 ms |
15988 KB |
Output is correct |
31 |
Correct |
8 ms |
15956 KB |
Output is correct |
32 |
Correct |
8 ms |
16016 KB |
Output is correct |
33 |
Correct |
9 ms |
15956 KB |
Output is correct |
34 |
Correct |
10 ms |
15988 KB |
Output is correct |
35 |
Correct |
8 ms |
15988 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
15956 KB |
Output is correct |
2 |
Correct |
8 ms |
15956 KB |
Output is correct |
3 |
Correct |
8 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15976 KB |
Output is correct |
5 |
Correct |
11 ms |
15988 KB |
Output is correct |
6 |
Correct |
9 ms |
15956 KB |
Output is correct |
7 |
Correct |
10 ms |
15956 KB |
Output is correct |
8 |
Correct |
7 ms |
15916 KB |
Output is correct |
9 |
Correct |
8 ms |
15988 KB |
Output is correct |
10 |
Correct |
7 ms |
15988 KB |
Output is correct |
11 |
Correct |
8 ms |
15956 KB |
Output is correct |
12 |
Correct |
8 ms |
15988 KB |
Output is correct |
13 |
Correct |
8 ms |
16004 KB |
Output is correct |
14 |
Correct |
9 ms |
15956 KB |
Output is correct |
15 |
Correct |
8 ms |
15984 KB |
Output is correct |
16 |
Correct |
8 ms |
15956 KB |
Output is correct |
17 |
Correct |
8 ms |
15956 KB |
Output is correct |
18 |
Correct |
9 ms |
15956 KB |
Output is correct |
19 |
Correct |
9 ms |
15992 KB |
Output is correct |
20 |
Correct |
10 ms |
15984 KB |
Output is correct |
21 |
Correct |
8 ms |
15948 KB |
Output is correct |
22 |
Correct |
8 ms |
15932 KB |
Output is correct |
23 |
Correct |
8 ms |
15956 KB |
Output is correct |
24 |
Correct |
8 ms |
15956 KB |
Output is correct |
25 |
Correct |
8 ms |
15988 KB |
Output is correct |
26 |
Correct |
7 ms |
15892 KB |
Output is correct |
27 |
Correct |
8 ms |
15956 KB |
Output is correct |
28 |
Correct |
8 ms |
15956 KB |
Output is correct |
29 |
Correct |
9 ms |
15988 KB |
Output is correct |
30 |
Correct |
8 ms |
15988 KB |
Output is correct |
31 |
Correct |
8 ms |
15956 KB |
Output is correct |
32 |
Correct |
8 ms |
16016 KB |
Output is correct |
33 |
Correct |
9 ms |
15956 KB |
Output is correct |
34 |
Correct |
10 ms |
15988 KB |
Output is correct |
35 |
Correct |
8 ms |
15988 KB |
Output is correct |
36 |
Correct |
8 ms |
15984 KB |
Output is correct |
37 |
Correct |
8 ms |
15956 KB |
Output is correct |
38 |
Correct |
8 ms |
15956 KB |
Output is correct |
39 |
Correct |
7 ms |
15992 KB |
Output is correct |
40 |
Correct |
8 ms |
15956 KB |
Output is correct |
41 |
Correct |
8 ms |
15956 KB |
Output is correct |
42 |
Correct |
9 ms |
16088 KB |
Output is correct |
43 |
Correct |
8 ms |
15956 KB |
Output is correct |
44 |
Correct |
8 ms |
15984 KB |
Output is correct |
45 |
Correct |
9 ms |
16012 KB |
Output is correct |
46 |
Correct |
10 ms |
15956 KB |
Output is correct |
47 |
Correct |
9 ms |
15988 KB |
Output is correct |
48 |
Correct |
9 ms |
15988 KB |
Output is correct |
49 |
Correct |
8 ms |
15956 KB |
Output is correct |
50 |
Correct |
9 ms |
15956 KB |
Output is correct |
51 |
Correct |
9 ms |
15916 KB |
Output is correct |
52 |
Correct |
8 ms |
15956 KB |
Output is correct |
53 |
Correct |
8 ms |
15956 KB |
Output is correct |
54 |
Correct |
8 ms |
15956 KB |
Output is correct |
55 |
Correct |
9 ms |
15912 KB |
Output is correct |
56 |
Correct |
8 ms |
15956 KB |
Output is correct |
57 |
Correct |
8 ms |
15956 KB |
Output is correct |
58 |
Correct |
8 ms |
15956 KB |
Output is correct |
59 |
Correct |
8 ms |
15952 KB |
Output is correct |
60 |
Correct |
8 ms |
15928 KB |
Output is correct |
61 |
Correct |
10 ms |
15956 KB |
Output is correct |
62 |
Correct |
9 ms |
15956 KB |
Output is correct |
63 |
Correct |
9 ms |
15984 KB |
Output is correct |
64 |
Correct |
9 ms |
16016 KB |
Output is correct |
65 |
Correct |
9 ms |
15956 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
69 ms |
29828 KB |
Output is correct |
2 |
Correct |
83 ms |
29772 KB |
Output is correct |
3 |
Correct |
111 ms |
30608 KB |
Output is correct |
4 |
Correct |
121 ms |
30324 KB |
Output is correct |
5 |
Correct |
117 ms |
27264 KB |
Output is correct |
6 |
Correct |
114 ms |
30116 KB |
Output is correct |
7 |
Correct |
124 ms |
28772 KB |
Output is correct |
8 |
Correct |
145 ms |
29152 KB |
Output is correct |
9 |
Correct |
142 ms |
27616 KB |
Output is correct |
10 |
Correct |
119 ms |
27240 KB |
Output is correct |
11 |
Correct |
93 ms |
24896 KB |
Output is correct |
12 |
Correct |
111 ms |
24824 KB |
Output is correct |
13 |
Correct |
80 ms |
24680 KB |
Output is correct |
14 |
Correct |
80 ms |
24352 KB |
Output is correct |
15 |
Correct |
50 ms |
23376 KB |
Output is correct |
16 |
Correct |
56 ms |
23164 KB |
Output is correct |
17 |
Correct |
13 ms |
16468 KB |
Output is correct |
18 |
Correct |
11 ms |
16468 KB |
Output is correct |
19 |
Correct |
12 ms |
16372 KB |
Output is correct |
20 |
Correct |
10 ms |
16340 KB |
Output is correct |
21 |
Correct |
9 ms |
16340 KB |
Output is correct |
22 |
Correct |
9 ms |
16240 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
16124 KB |
Output is correct |
2 |
Correct |
8 ms |
16084 KB |
Output is correct |
3 |
Correct |
9 ms |
16048 KB |
Output is correct |
4 |
Correct |
8 ms |
16228 KB |
Output is correct |
5 |
Correct |
12 ms |
16112 KB |
Output is correct |
6 |
Correct |
9 ms |
16084 KB |
Output is correct |
7 |
Correct |
12 ms |
16212 KB |
Output is correct |
8 |
Correct |
11 ms |
16124 KB |
Output is correct |
9 |
Correct |
8 ms |
16084 KB |
Output is correct |
10 |
Correct |
10 ms |
16124 KB |
Output is correct |
11 |
Correct |
8 ms |
16124 KB |
Output is correct |
12 |
Correct |
8 ms |
16124 KB |
Output is correct |
13 |
Correct |
8 ms |
16084 KB |
Output is correct |
14 |
Correct |
9 ms |
16084 KB |
Output is correct |
15 |
Correct |
10 ms |
16112 KB |
Output is correct |
16 |
Correct |
9 ms |
16084 KB |
Output is correct |
17 |
Correct |
9 ms |
16092 KB |
Output is correct |
18 |
Correct |
11 ms |
16068 KB |
Output is correct |
19 |
Correct |
10 ms |
16084 KB |
Output is correct |
20 |
Correct |
9 ms |
16120 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
140 ms |
28660 KB |
Output is correct |
2 |
Correct |
151 ms |
28648 KB |
Output is correct |
3 |
Correct |
166 ms |
28620 KB |
Output is correct |
4 |
Correct |
169 ms |
28608 KB |
Output is correct |
5 |
Correct |
177 ms |
28592 KB |
Output is correct |
6 |
Correct |
152 ms |
36632 KB |
Output is correct |
7 |
Correct |
148 ms |
33892 KB |
Output is correct |
8 |
Correct |
146 ms |
32736 KB |
Output is correct |
9 |
Correct |
140 ms |
31292 KB |
Output is correct |
10 |
Correct |
182 ms |
28580 KB |
Output is correct |
11 |
Correct |
145 ms |
28604 KB |
Output is correct |
12 |
Correct |
141 ms |
28792 KB |
Output is correct |
13 |
Correct |
121 ms |
28604 KB |
Output is correct |
14 |
Correct |
146 ms |
27832 KB |
Output is correct |
15 |
Correct |
111 ms |
26952 KB |
Output is correct |
16 |
Correct |
54 ms |
23660 KB |
Output is correct |
17 |
Correct |
55 ms |
25844 KB |
Output is correct |
18 |
Correct |
56 ms |
25808 KB |
Output is correct |
19 |
Correct |
66 ms |
26060 KB |
Output is correct |
20 |
Correct |
80 ms |
25888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
16084 KB |
Output is correct |
2 |
Correct |
9 ms |
16128 KB |
Output is correct |
3 |
Correct |
8 ms |
16124 KB |
Output is correct |
4 |
Correct |
8 ms |
16084 KB |
Output is correct |
5 |
Correct |
8 ms |
16084 KB |
Output is correct |
6 |
Correct |
9 ms |
15992 KB |
Output is correct |
7 |
Correct |
10 ms |
15984 KB |
Output is correct |
8 |
Correct |
8 ms |
15992 KB |
Output is correct |
9 |
Correct |
9 ms |
16036 KB |
Output is correct |
10 |
Correct |
8 ms |
15968 KB |
Output is correct |
11 |
Correct |
9 ms |
16064 KB |
Output is correct |
12 |
Correct |
10 ms |
16088 KB |
Output is correct |
13 |
Correct |
9 ms |
16120 KB |
Output is correct |
14 |
Correct |
9 ms |
16088 KB |
Output is correct |
15 |
Correct |
11 ms |
16084 KB |
Output is correct |
16 |
Correct |
11 ms |
16120 KB |
Output is correct |
17 |
Correct |
9 ms |
16084 KB |
Output is correct |
18 |
Correct |
8 ms |
16084 KB |
Output is correct |
19 |
Correct |
8 ms |
16084 KB |
Output is correct |
20 |
Correct |
8 ms |
15984 KB |
Output is correct |
21 |
Correct |
8 ms |
16120 KB |
Output is correct |
22 |
Correct |
8 ms |
16084 KB |
Output is correct |
23 |
Correct |
9 ms |
16124 KB |
Output is correct |
24 |
Correct |
8 ms |
16120 KB |
Output is correct |
25 |
Correct |
9 ms |
15956 KB |
Output is correct |
26 |
Correct |
8 ms |
16084 KB |
Output is correct |
27 |
Correct |
8 ms |
15984 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
150 ms |
28600 KB |
Output is correct |
2 |
Correct |
211 ms |
28888 KB |
Output is correct |
3 |
Correct |
163 ms |
28344 KB |
Output is correct |
4 |
Correct |
124 ms |
26744 KB |
Output is correct |
5 |
Correct |
96 ms |
24552 KB |
Output is correct |
6 |
Correct |
97 ms |
23620 KB |
Output is correct |
7 |
Correct |
95 ms |
23044 KB |
Output is correct |
8 |
Correct |
125 ms |
22544 KB |
Output is correct |
9 |
Correct |
91 ms |
22148 KB |
Output is correct |
10 |
Correct |
69 ms |
21936 KB |
Output is correct |
11 |
Correct |
70 ms |
21588 KB |
Output is correct |
12 |
Correct |
90 ms |
21464 KB |
Output is correct |
13 |
Correct |
106 ms |
21464 KB |
Output is correct |
14 |
Correct |
63 ms |
22996 KB |
Output is correct |
15 |
Correct |
125 ms |
33400 KB |
Output is correct |
16 |
Correct |
144 ms |
31648 KB |
Output is correct |
17 |
Correct |
167 ms |
31760 KB |
Output is correct |
18 |
Correct |
139 ms |
30360 KB |
Output is correct |
19 |
Correct |
135 ms |
26684 KB |
Output is correct |
20 |
Correct |
183 ms |
26696 KB |
Output is correct |
21 |
Correct |
144 ms |
26724 KB |
Output is correct |
22 |
Correct |
134 ms |
25632 KB |
Output is correct |
23 |
Correct |
105 ms |
24596 KB |
Output is correct |
24 |
Correct |
119 ms |
27428 KB |
Output is correct |
25 |
Correct |
126 ms |
27444 KB |
Output is correct |
26 |
Correct |
117 ms |
26508 KB |
Output is correct |
27 |
Correct |
132 ms |
26444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
15956 KB |
Output is correct |
2 |
Correct |
8 ms |
15956 KB |
Output is correct |
3 |
Correct |
8 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15976 KB |
Output is correct |
5 |
Correct |
11 ms |
15988 KB |
Output is correct |
6 |
Correct |
9 ms |
15956 KB |
Output is correct |
7 |
Correct |
10 ms |
15956 KB |
Output is correct |
8 |
Correct |
7 ms |
15916 KB |
Output is correct |
9 |
Correct |
8 ms |
15988 KB |
Output is correct |
10 |
Correct |
7 ms |
15988 KB |
Output is correct |
11 |
Correct |
8 ms |
15956 KB |
Output is correct |
12 |
Correct |
8 ms |
15988 KB |
Output is correct |
13 |
Correct |
8 ms |
16004 KB |
Output is correct |
14 |
Correct |
9 ms |
15956 KB |
Output is correct |
15 |
Correct |
8 ms |
15984 KB |
Output is correct |
16 |
Correct |
8 ms |
15956 KB |
Output is correct |
17 |
Correct |
8 ms |
15956 KB |
Output is correct |
18 |
Correct |
9 ms |
15956 KB |
Output is correct |
19 |
Correct |
9 ms |
15992 KB |
Output is correct |
20 |
Correct |
10 ms |
15984 KB |
Output is correct |
21 |
Correct |
8 ms |
15948 KB |
Output is correct |
22 |
Correct |
8 ms |
15932 KB |
Output is correct |
23 |
Correct |
8 ms |
15956 KB |
Output is correct |
24 |
Correct |
8 ms |
15956 KB |
Output is correct |
25 |
Correct |
8 ms |
15988 KB |
Output is correct |
26 |
Correct |
7 ms |
15892 KB |
Output is correct |
27 |
Correct |
8 ms |
15956 KB |
Output is correct |
28 |
Correct |
8 ms |
15956 KB |
Output is correct |
29 |
Correct |
9 ms |
15988 KB |
Output is correct |
30 |
Correct |
8 ms |
15988 KB |
Output is correct |
31 |
Correct |
8 ms |
15956 KB |
Output is correct |
32 |
Correct |
8 ms |
16016 KB |
Output is correct |
33 |
Correct |
9 ms |
15956 KB |
Output is correct |
34 |
Correct |
10 ms |
15988 KB |
Output is correct |
35 |
Correct |
8 ms |
15988 KB |
Output is correct |
36 |
Correct |
8 ms |
15984 KB |
Output is correct |
37 |
Correct |
8 ms |
15956 KB |
Output is correct |
38 |
Correct |
8 ms |
15956 KB |
Output is correct |
39 |
Correct |
7 ms |
15992 KB |
Output is correct |
40 |
Correct |
8 ms |
15956 KB |
Output is correct |
41 |
Correct |
8 ms |
15956 KB |
Output is correct |
42 |
Correct |
9 ms |
16088 KB |
Output is correct |
43 |
Correct |
8 ms |
15956 KB |
Output is correct |
44 |
Correct |
8 ms |
15984 KB |
Output is correct |
45 |
Correct |
9 ms |
16012 KB |
Output is correct |
46 |
Correct |
10 ms |
15956 KB |
Output is correct |
47 |
Correct |
9 ms |
15988 KB |
Output is correct |
48 |
Correct |
9 ms |
15988 KB |
Output is correct |
49 |
Correct |
8 ms |
15956 KB |
Output is correct |
50 |
Correct |
9 ms |
15956 KB |
Output is correct |
51 |
Correct |
9 ms |
15916 KB |
Output is correct |
52 |
Correct |
8 ms |
15956 KB |
Output is correct |
53 |
Correct |
8 ms |
15956 KB |
Output is correct |
54 |
Correct |
8 ms |
15956 KB |
Output is correct |
55 |
Correct |
9 ms |
15912 KB |
Output is correct |
56 |
Correct |
8 ms |
15956 KB |
Output is correct |
57 |
Correct |
8 ms |
15956 KB |
Output is correct |
58 |
Correct |
8 ms |
15956 KB |
Output is correct |
59 |
Correct |
8 ms |
15952 KB |
Output is correct |
60 |
Correct |
8 ms |
15928 KB |
Output is correct |
61 |
Correct |
10 ms |
15956 KB |
Output is correct |
62 |
Correct |
9 ms |
15956 KB |
Output is correct |
63 |
Correct |
9 ms |
15984 KB |
Output is correct |
64 |
Correct |
9 ms |
16016 KB |
Output is correct |
65 |
Correct |
9 ms |
15956 KB |
Output is correct |
66 |
Correct |
8 ms |
15956 KB |
Output is correct |
67 |
Correct |
9 ms |
16060 KB |
Output is correct |
68 |
Correct |
8 ms |
16084 KB |
Output is correct |
69 |
Correct |
8 ms |
16132 KB |
Output is correct |
70 |
Correct |
10 ms |
16128 KB |
Output is correct |
71 |
Correct |
8 ms |
15988 KB |
Output is correct |
72 |
Correct |
8 ms |
16052 KB |
Output is correct |
73 |
Correct |
9 ms |
16000 KB |
Output is correct |
74 |
Correct |
8 ms |
15988 KB |
Output is correct |
75 |
Correct |
8 ms |
16084 KB |
Output is correct |
76 |
Correct |
9 ms |
15956 KB |
Output is correct |
77 |
Correct |
10 ms |
16124 KB |
Output is correct |
78 |
Correct |
9 ms |
16012 KB |
Output is correct |
79 |
Correct |
10 ms |
16084 KB |
Output is correct |
80 |
Correct |
9 ms |
16028 KB |
Output is correct |
81 |
Correct |
10 ms |
16084 KB |
Output is correct |
82 |
Correct |
9 ms |
16124 KB |
Output is correct |
83 |
Correct |
9 ms |
16084 KB |
Output is correct |
84 |
Correct |
9 ms |
16084 KB |
Output is correct |
85 |
Correct |
8 ms |
16084 KB |
Output is correct |
86 |
Correct |
9 ms |
16084 KB |
Output is correct |
87 |
Correct |
8 ms |
15984 KB |
Output is correct |
88 |
Correct |
11 ms |
16084 KB |
Output is correct |
89 |
Correct |
10 ms |
16108 KB |
Output is correct |
90 |
Correct |
9 ms |
16012 KB |
Output is correct |
91 |
Correct |
8 ms |
16084 KB |
Output is correct |
92 |
Correct |
9 ms |
16084 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
15956 KB |
Output is correct |
2 |
Correct |
8 ms |
15956 KB |
Output is correct |
3 |
Correct |
8 ms |
15956 KB |
Output is correct |
4 |
Correct |
9 ms |
15976 KB |
Output is correct |
5 |
Correct |
11 ms |
15988 KB |
Output is correct |
6 |
Correct |
9 ms |
15956 KB |
Output is correct |
7 |
Correct |
10 ms |
15956 KB |
Output is correct |
8 |
Correct |
7 ms |
15916 KB |
Output is correct |
9 |
Correct |
8 ms |
15988 KB |
Output is correct |
10 |
Correct |
7 ms |
15988 KB |
Output is correct |
11 |
Correct |
8 ms |
15956 KB |
Output is correct |
12 |
Correct |
8 ms |
15988 KB |
Output is correct |
13 |
Correct |
8 ms |
16004 KB |
Output is correct |
14 |
Correct |
9 ms |
15956 KB |
Output is correct |
15 |
Correct |
8 ms |
15984 KB |
Output is correct |
16 |
Correct |
8 ms |
15956 KB |
Output is correct |
17 |
Correct |
8 ms |
15956 KB |
Output is correct |
18 |
Correct |
9 ms |
15956 KB |
Output is correct |
19 |
Correct |
9 ms |
15992 KB |
Output is correct |
20 |
Correct |
10 ms |
15984 KB |
Output is correct |
21 |
Correct |
8 ms |
15948 KB |
Output is correct |
22 |
Correct |
8 ms |
15932 KB |
Output is correct |
23 |
Correct |
8 ms |
15956 KB |
Output is correct |
24 |
Correct |
8 ms |
15956 KB |
Output is correct |
25 |
Correct |
8 ms |
15988 KB |
Output is correct |
26 |
Correct |
7 ms |
15892 KB |
Output is correct |
27 |
Correct |
8 ms |
15956 KB |
Output is correct |
28 |
Correct |
8 ms |
15956 KB |
Output is correct |
29 |
Correct |
9 ms |
15988 KB |
Output is correct |
30 |
Correct |
8 ms |
15988 KB |
Output is correct |
31 |
Correct |
8 ms |
15956 KB |
Output is correct |
32 |
Correct |
8 ms |
16016 KB |
Output is correct |
33 |
Correct |
9 ms |
15956 KB |
Output is correct |
34 |
Correct |
10 ms |
15988 KB |
Output is correct |
35 |
Correct |
8 ms |
15988 KB |
Output is correct |
36 |
Correct |
8 ms |
15984 KB |
Output is correct |
37 |
Correct |
8 ms |
15956 KB |
Output is correct |
38 |
Correct |
8 ms |
15956 KB |
Output is correct |
39 |
Correct |
7 ms |
15992 KB |
Output is correct |
40 |
Correct |
8 ms |
15956 KB |
Output is correct |
41 |
Correct |
8 ms |
15956 KB |
Output is correct |
42 |
Correct |
9 ms |
16088 KB |
Output is correct |
43 |
Correct |
8 ms |
15956 KB |
Output is correct |
44 |
Correct |
8 ms |
15984 KB |
Output is correct |
45 |
Correct |
9 ms |
16012 KB |
Output is correct |
46 |
Correct |
10 ms |
15956 KB |
Output is correct |
47 |
Correct |
9 ms |
15988 KB |
Output is correct |
48 |
Correct |
9 ms |
15988 KB |
Output is correct |
49 |
Correct |
8 ms |
15956 KB |
Output is correct |
50 |
Correct |
9 ms |
15956 KB |
Output is correct |
51 |
Correct |
9 ms |
15916 KB |
Output is correct |
52 |
Correct |
8 ms |
15956 KB |
Output is correct |
53 |
Correct |
8 ms |
15956 KB |
Output is correct |
54 |
Correct |
8 ms |
15956 KB |
Output is correct |
55 |
Correct |
9 ms |
15912 KB |
Output is correct |
56 |
Correct |
8 ms |
15956 KB |
Output is correct |
57 |
Correct |
8 ms |
15956 KB |
Output is correct |
58 |
Correct |
8 ms |
15956 KB |
Output is correct |
59 |
Correct |
8 ms |
15952 KB |
Output is correct |
60 |
Correct |
8 ms |
15928 KB |
Output is correct |
61 |
Correct |
10 ms |
15956 KB |
Output is correct |
62 |
Correct |
9 ms |
15956 KB |
Output is correct |
63 |
Correct |
9 ms |
15984 KB |
Output is correct |
64 |
Correct |
9 ms |
16016 KB |
Output is correct |
65 |
Correct |
9 ms |
15956 KB |
Output is correct |
66 |
Correct |
69 ms |
29828 KB |
Output is correct |
67 |
Correct |
83 ms |
29772 KB |
Output is correct |
68 |
Correct |
111 ms |
30608 KB |
Output is correct |
69 |
Correct |
121 ms |
30324 KB |
Output is correct |
70 |
Correct |
117 ms |
27264 KB |
Output is correct |
71 |
Correct |
114 ms |
30116 KB |
Output is correct |
72 |
Correct |
124 ms |
28772 KB |
Output is correct |
73 |
Correct |
145 ms |
29152 KB |
Output is correct |
74 |
Correct |
142 ms |
27616 KB |
Output is correct |
75 |
Correct |
119 ms |
27240 KB |
Output is correct |
76 |
Correct |
93 ms |
24896 KB |
Output is correct |
77 |
Correct |
111 ms |
24824 KB |
Output is correct |
78 |
Correct |
80 ms |
24680 KB |
Output is correct |
79 |
Correct |
80 ms |
24352 KB |
Output is correct |
80 |
Correct |
50 ms |
23376 KB |
Output is correct |
81 |
Correct |
56 ms |
23164 KB |
Output is correct |
82 |
Correct |
13 ms |
16468 KB |
Output is correct |
83 |
Correct |
11 ms |
16468 KB |
Output is correct |
84 |
Correct |
12 ms |
16372 KB |
Output is correct |
85 |
Correct |
10 ms |
16340 KB |
Output is correct |
86 |
Correct |
9 ms |
16340 KB |
Output is correct |
87 |
Correct |
9 ms |
16240 KB |
Output is correct |
88 |
Correct |
8 ms |
16124 KB |
Output is correct |
89 |
Correct |
8 ms |
16084 KB |
Output is correct |
90 |
Correct |
9 ms |
16048 KB |
Output is correct |
91 |
Correct |
8 ms |
16228 KB |
Output is correct |
92 |
Correct |
12 ms |
16112 KB |
Output is correct |
93 |
Correct |
9 ms |
16084 KB |
Output is correct |
94 |
Correct |
12 ms |
16212 KB |
Output is correct |
95 |
Correct |
11 ms |
16124 KB |
Output is correct |
96 |
Correct |
8 ms |
16084 KB |
Output is correct |
97 |
Correct |
10 ms |
16124 KB |
Output is correct |
98 |
Correct |
8 ms |
16124 KB |
Output is correct |
99 |
Correct |
8 ms |
16124 KB |
Output is correct |
100 |
Correct |
8 ms |
16084 KB |
Output is correct |
101 |
Correct |
9 ms |
16084 KB |
Output is correct |
102 |
Correct |
10 ms |
16112 KB |
Output is correct |
103 |
Correct |
9 ms |
16084 KB |
Output is correct |
104 |
Correct |
9 ms |
16092 KB |
Output is correct |
105 |
Correct |
11 ms |
16068 KB |
Output is correct |
106 |
Correct |
10 ms |
16084 KB |
Output is correct |
107 |
Correct |
9 ms |
16120 KB |
Output is correct |
108 |
Correct |
140 ms |
28660 KB |
Output is correct |
109 |
Correct |
151 ms |
28648 KB |
Output is correct |
110 |
Correct |
166 ms |
28620 KB |
Output is correct |
111 |
Correct |
169 ms |
28608 KB |
Output is correct |
112 |
Correct |
177 ms |
28592 KB |
Output is correct |
113 |
Correct |
152 ms |
36632 KB |
Output is correct |
114 |
Correct |
148 ms |
33892 KB |
Output is correct |
115 |
Correct |
146 ms |
32736 KB |
Output is correct |
116 |
Correct |
140 ms |
31292 KB |
Output is correct |
117 |
Correct |
182 ms |
28580 KB |
Output is correct |
118 |
Correct |
145 ms |
28604 KB |
Output is correct |
119 |
Correct |
141 ms |
28792 KB |
Output is correct |
120 |
Correct |
121 ms |
28604 KB |
Output is correct |
121 |
Correct |
146 ms |
27832 KB |
Output is correct |
122 |
Correct |
111 ms |
26952 KB |
Output is correct |
123 |
Correct |
54 ms |
23660 KB |
Output is correct |
124 |
Correct |
55 ms |
25844 KB |
Output is correct |
125 |
Correct |
56 ms |
25808 KB |
Output is correct |
126 |
Correct |
66 ms |
26060 KB |
Output is correct |
127 |
Correct |
80 ms |
25888 KB |
Output is correct |
128 |
Correct |
9 ms |
16084 KB |
Output is correct |
129 |
Correct |
9 ms |
16128 KB |
Output is correct |
130 |
Correct |
8 ms |
16124 KB |
Output is correct |
131 |
Correct |
8 ms |
16084 KB |
Output is correct |
132 |
Correct |
8 ms |
16084 KB |
Output is correct |
133 |
Correct |
9 ms |
15992 KB |
Output is correct |
134 |
Correct |
10 ms |
15984 KB |
Output is correct |
135 |
Correct |
8 ms |
15992 KB |
Output is correct |
136 |
Correct |
9 ms |
16036 KB |
Output is correct |
137 |
Correct |
8 ms |
15968 KB |
Output is correct |
138 |
Correct |
9 ms |
16064 KB |
Output is correct |
139 |
Correct |
10 ms |
16088 KB |
Output is correct |
140 |
Correct |
9 ms |
16120 KB |
Output is correct |
141 |
Correct |
9 ms |
16088 KB |
Output is correct |
142 |
Correct |
11 ms |
16084 KB |
Output is correct |
143 |
Correct |
11 ms |
16120 KB |
Output is correct |
144 |
Correct |
9 ms |
16084 KB |
Output is correct |
145 |
Correct |
8 ms |
16084 KB |
Output is correct |
146 |
Correct |
8 ms |
16084 KB |
Output is correct |
147 |
Correct |
8 ms |
15984 KB |
Output is correct |
148 |
Correct |
8 ms |
16120 KB |
Output is correct |
149 |
Correct |
8 ms |
16084 KB |
Output is correct |
150 |
Correct |
9 ms |
16124 KB |
Output is correct |
151 |
Correct |
8 ms |
16120 KB |
Output is correct |
152 |
Correct |
9 ms |
15956 KB |
Output is correct |
153 |
Correct |
8 ms |
16084 KB |
Output is correct |
154 |
Correct |
8 ms |
15984 KB |
Output is correct |
155 |
Correct |
150 ms |
28600 KB |
Output is correct |
156 |
Correct |
211 ms |
28888 KB |
Output is correct |
157 |
Correct |
163 ms |
28344 KB |
Output is correct |
158 |
Correct |
124 ms |
26744 KB |
Output is correct |
159 |
Correct |
96 ms |
24552 KB |
Output is correct |
160 |
Correct |
97 ms |
23620 KB |
Output is correct |
161 |
Correct |
95 ms |
23044 KB |
Output is correct |
162 |
Correct |
125 ms |
22544 KB |
Output is correct |
163 |
Correct |
91 ms |
22148 KB |
Output is correct |
164 |
Correct |
69 ms |
21936 KB |
Output is correct |
165 |
Correct |
70 ms |
21588 KB |
Output is correct |
166 |
Correct |
90 ms |
21464 KB |
Output is correct |
167 |
Correct |
106 ms |
21464 KB |
Output is correct |
168 |
Correct |
63 ms |
22996 KB |
Output is correct |
169 |
Correct |
125 ms |
33400 KB |
Output is correct |
170 |
Correct |
144 ms |
31648 KB |
Output is correct |
171 |
Correct |
167 ms |
31760 KB |
Output is correct |
172 |
Correct |
139 ms |
30360 KB |
Output is correct |
173 |
Correct |
135 ms |
26684 KB |
Output is correct |
174 |
Correct |
183 ms |
26696 KB |
Output is correct |
175 |
Correct |
144 ms |
26724 KB |
Output is correct |
176 |
Correct |
134 ms |
25632 KB |
Output is correct |
177 |
Correct |
105 ms |
24596 KB |
Output is correct |
178 |
Correct |
119 ms |
27428 KB |
Output is correct |
179 |
Correct |
126 ms |
27444 KB |
Output is correct |
180 |
Correct |
117 ms |
26508 KB |
Output is correct |
181 |
Correct |
132 ms |
26444 KB |
Output is correct |
182 |
Correct |
8 ms |
15956 KB |
Output is correct |
183 |
Correct |
9 ms |
16060 KB |
Output is correct |
184 |
Correct |
8 ms |
16084 KB |
Output is correct |
185 |
Correct |
8 ms |
16132 KB |
Output is correct |
186 |
Correct |
10 ms |
16128 KB |
Output is correct |
187 |
Correct |
8 ms |
15988 KB |
Output is correct |
188 |
Correct |
8 ms |
16052 KB |
Output is correct |
189 |
Correct |
9 ms |
16000 KB |
Output is correct |
190 |
Correct |
8 ms |
15988 KB |
Output is correct |
191 |
Correct |
8 ms |
16084 KB |
Output is correct |
192 |
Correct |
9 ms |
15956 KB |
Output is correct |
193 |
Correct |
10 ms |
16124 KB |
Output is correct |
194 |
Correct |
9 ms |
16012 KB |
Output is correct |
195 |
Correct |
10 ms |
16084 KB |
Output is correct |
196 |
Correct |
9 ms |
16028 KB |
Output is correct |
197 |
Correct |
10 ms |
16084 KB |
Output is correct |
198 |
Correct |
9 ms |
16124 KB |
Output is correct |
199 |
Correct |
9 ms |
16084 KB |
Output is correct |
200 |
Correct |
9 ms |
16084 KB |
Output is correct |
201 |
Correct |
8 ms |
16084 KB |
Output is correct |
202 |
Correct |
9 ms |
16084 KB |
Output is correct |
203 |
Correct |
8 ms |
15984 KB |
Output is correct |
204 |
Correct |
11 ms |
16084 KB |
Output is correct |
205 |
Correct |
10 ms |
16108 KB |
Output is correct |
206 |
Correct |
9 ms |
16012 KB |
Output is correct |
207 |
Correct |
8 ms |
16084 KB |
Output is correct |
208 |
Correct |
9 ms |
16084 KB |
Output is correct |
209 |
Correct |
10 ms |
15956 KB |
Output is correct |
210 |
Correct |
66 ms |
23404 KB |
Output is correct |
211 |
Correct |
133 ms |
26988 KB |
Output is correct |
212 |
Correct |
145 ms |
29284 KB |
Output is correct |
213 |
Correct |
151 ms |
31352 KB |
Output is correct |
214 |
Correct |
56 ms |
25028 KB |
Output is correct |
215 |
Correct |
61 ms |
24844 KB |
Output is correct |
216 |
Correct |
111 ms |
26984 KB |
Output is correct |
217 |
Correct |
117 ms |
25068 KB |
Output is correct |
218 |
Correct |
92 ms |
22568 KB |
Output is correct |
219 |
Correct |
95 ms |
21880 KB |
Output is correct |
220 |
Correct |
109 ms |
21600 KB |
Output is correct |
221 |
Correct |
93 ms |
21236 KB |
Output is correct |
222 |
Correct |
89 ms |
21920 KB |
Output is correct |
223 |
Correct |
159 ms |
27964 KB |
Output is correct |
224 |
Correct |
170 ms |
27144 KB |
Output is correct |
225 |
Correct |
114 ms |
24584 KB |
Output is correct |
226 |
Correct |
113 ms |
24716 KB |
Output is correct |
227 |
Correct |
97 ms |
24696 KB |
Output is correct |
228 |
Correct |
122 ms |
24136 KB |
Output is correct |
229 |
Correct |
76 ms |
23564 KB |
Output is correct |
230 |
Correct |
90 ms |
23360 KB |
Output is correct |
231 |
Correct |
96 ms |
23512 KB |
Output is correct |