#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int N = 200005;
const ll MOD = 1000000007;
const int INF = 0x3f3f3f3f;
vector<int> adj[N];
int d[N], n;
bool sep[N];
bool vis[N];
int s = 0;
int dfs(int v){
vis[v] = 1;
++s;
int t = N;
for(auto& x : adj[v]){
if(d[x] == d[v] - 1)
continue;
if(d[x] == -1){
d[x] = d[v] + 1;
int a = dfs(x);
if(a >= d[v])
sep[x] = 1;
t = min(t, a);
} else
t = min(t, d[x]);
}
return t;
}
int sz[N];
int cnt = 0;
vector<int> adj2[N];
void dfs2(int v, int c){
++sz[c];
bool did = 0;
int nv = 0;
for(auto& x : adj[v]){
if(d[x] != d[v] + 1) continue;
if(sep[x]){
if(did == 0){
nv = ++cnt;
did = 1;
if(d[v] != 1){
adj2[c].push_back(nv);
adj2[nv].push_back(c);
}
}
++cnt;
adj2[nv].push_back(cnt);
adj2[cnt].push_back(nv);
sz[cnt] = 1;
dfs2(x, cnt);
} else {
dfs2(x, c);
}
}
}
ll ans = 0;
int szz[N];
void dfs3(int v, int p){
vector<int> a;
for(auto& x : adj2[v]){
if(x == p) continue;
dfs3(x, v);
szz[v] += szz[x] - 1;
a.push_back(szz[x] - 1);
}
szz[v] += max(1, sz[v]);
a.push_back(s - szz[v]);
if(sz[v]){
for(auto& x : a){
ans -= 1LL * (sz[v] - 1) * x * (x + 1);
}
}
}
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int m;
cin>>n>>m;
while(m--){
int v, u;
cin>>v>>u;
adj[v].push_back(u);
adj[u].push_back(v);
}
for(int i = 1; i <= n; ++i)
d[i] = -1;
for(int i = 1; i <= n; ++i){
if(!vis[i]){
for(; cnt > 0; --cnt){
sz[cnt] = szz[cnt] = 0;
adj2[cnt].clear();
}
s = 0;
d[i] = 1;
dfs(i);
dfs2(i, 0);
dfs3(1, 0);
ans += 1LL * s * (s - 1) * (s - 2);
}
}
cout<<ans;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
11 ms |
9728 KB |
Output is correct |
4 |
Correct |
6 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
7 ms |
9728 KB |
Output is correct |
7 |
Correct |
8 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9728 KB |
Output is correct |
9 |
Correct |
10 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
8 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
7 ms |
9728 KB |
Output is correct |
14 |
Correct |
6 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
6 ms |
9728 KB |
Output is correct |
17 |
Correct |
7 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9728 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
9 ms |
9856 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
6 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
8 ms |
9728 KB |
Output is correct |
30 |
Correct |
7 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9728 KB |
Output is correct |
32 |
Correct |
7 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9728 KB |
Output is correct |
34 |
Correct |
7 ms |
9728 KB |
Output is correct |
35 |
Correct |
7 ms |
9728 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
11 ms |
9728 KB |
Output is correct |
4 |
Correct |
6 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
7 ms |
9728 KB |
Output is correct |
7 |
Correct |
8 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9728 KB |
Output is correct |
9 |
Correct |
10 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
8 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
7 ms |
9728 KB |
Output is correct |
14 |
Correct |
6 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
6 ms |
9728 KB |
Output is correct |
17 |
Correct |
7 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9728 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
9 ms |
9856 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
6 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
8 ms |
9728 KB |
Output is correct |
30 |
Correct |
7 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9728 KB |
Output is correct |
32 |
Correct |
7 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9728 KB |
Output is correct |
34 |
Correct |
7 ms |
9728 KB |
Output is correct |
35 |
Correct |
7 ms |
9728 KB |
Output is correct |
36 |
Correct |
7 ms |
9908 KB |
Output is correct |
37 |
Correct |
6 ms |
9728 KB |
Output is correct |
38 |
Correct |
7 ms |
9728 KB |
Output is correct |
39 |
Correct |
7 ms |
9728 KB |
Output is correct |
40 |
Correct |
6 ms |
9728 KB |
Output is correct |
41 |
Correct |
6 ms |
9728 KB |
Output is correct |
42 |
Correct |
7 ms |
9728 KB |
Output is correct |
43 |
Correct |
7 ms |
9728 KB |
Output is correct |
44 |
Correct |
6 ms |
9796 KB |
Output is correct |
45 |
Correct |
7 ms |
9728 KB |
Output is correct |
46 |
Correct |
6 ms |
9728 KB |
Output is correct |
47 |
Correct |
6 ms |
9728 KB |
Output is correct |
48 |
Correct |
7 ms |
9728 KB |
Output is correct |
49 |
Correct |
7 ms |
9728 KB |
Output is correct |
50 |
Correct |
6 ms |
9728 KB |
Output is correct |
51 |
Correct |
8 ms |
9728 KB |
Output is correct |
52 |
Correct |
7 ms |
9728 KB |
Output is correct |
53 |
Correct |
8 ms |
9728 KB |
Output is correct |
54 |
Correct |
6 ms |
9728 KB |
Output is correct |
55 |
Correct |
7 ms |
9728 KB |
Output is correct |
56 |
Correct |
8 ms |
9728 KB |
Output is correct |
57 |
Correct |
6 ms |
9728 KB |
Output is correct |
58 |
Correct |
6 ms |
9728 KB |
Output is correct |
59 |
Correct |
7 ms |
9728 KB |
Output is correct |
60 |
Correct |
7 ms |
9728 KB |
Output is correct |
61 |
Correct |
7 ms |
9728 KB |
Output is correct |
62 |
Correct |
7 ms |
9728 KB |
Output is correct |
63 |
Correct |
7 ms |
9728 KB |
Output is correct |
64 |
Correct |
7 ms |
9728 KB |
Output is correct |
65 |
Correct |
6 ms |
9728 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
94 ms |
22392 KB |
Output is correct |
2 |
Correct |
116 ms |
22392 KB |
Output is correct |
3 |
Correct |
125 ms |
26488 KB |
Output is correct |
4 |
Correct |
109 ms |
22520 KB |
Output is correct |
5 |
Correct |
110 ms |
22264 KB |
Output is correct |
6 |
Correct |
113 ms |
25336 KB |
Output is correct |
7 |
Correct |
111 ms |
19980 KB |
Output is correct |
8 |
Correct |
130 ms |
21736 KB |
Output is correct |
9 |
Correct |
105 ms |
17400 KB |
Output is correct |
10 |
Correct |
104 ms |
18680 KB |
Output is correct |
11 |
Correct |
84 ms |
14460 KB |
Output is correct |
12 |
Correct |
75 ms |
14328 KB |
Output is correct |
13 |
Correct |
70 ms |
14364 KB |
Output is correct |
14 |
Correct |
73 ms |
14200 KB |
Output is correct |
15 |
Correct |
48 ms |
13568 KB |
Output is correct |
16 |
Correct |
53 ms |
13560 KB |
Output is correct |
17 |
Correct |
13 ms |
10368 KB |
Output is correct |
18 |
Correct |
13 ms |
10368 KB |
Output is correct |
19 |
Correct |
13 ms |
10368 KB |
Output is correct |
20 |
Correct |
13 ms |
10368 KB |
Output is correct |
21 |
Correct |
13 ms |
10368 KB |
Output is correct |
22 |
Correct |
13 ms |
10368 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
9856 KB |
Output is correct |
2 |
Correct |
7 ms |
9856 KB |
Output is correct |
3 |
Correct |
7 ms |
9856 KB |
Output is correct |
4 |
Correct |
7 ms |
9984 KB |
Output is correct |
5 |
Correct |
7 ms |
9984 KB |
Output is correct |
6 |
Correct |
7 ms |
9984 KB |
Output is correct |
7 |
Correct |
8 ms |
9984 KB |
Output is correct |
8 |
Correct |
7 ms |
9984 KB |
Output is correct |
9 |
Correct |
7 ms |
9856 KB |
Output is correct |
10 |
Correct |
8 ms |
9856 KB |
Output is correct |
11 |
Correct |
8 ms |
9856 KB |
Output is correct |
12 |
Correct |
7 ms |
9856 KB |
Output is correct |
13 |
Correct |
7 ms |
9856 KB |
Output is correct |
14 |
Correct |
7 ms |
9856 KB |
Output is correct |
15 |
Correct |
7 ms |
9856 KB |
Output is correct |
16 |
Correct |
8 ms |
9728 KB |
Output is correct |
17 |
Correct |
7 ms |
9856 KB |
Output is correct |
18 |
Correct |
7 ms |
9856 KB |
Output is correct |
19 |
Correct |
7 ms |
9856 KB |
Output is correct |
20 |
Correct |
7 ms |
9856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
99 ms |
20856 KB |
Output is correct |
2 |
Correct |
122 ms |
20856 KB |
Output is correct |
3 |
Correct |
129 ms |
20856 KB |
Output is correct |
4 |
Correct |
125 ms |
20984 KB |
Output is correct |
5 |
Correct |
124 ms |
20728 KB |
Output is correct |
6 |
Correct |
172 ms |
32760 KB |
Output is correct |
7 |
Correct |
158 ms |
28536 KB |
Output is correct |
8 |
Correct |
167 ms |
26744 KB |
Output is correct |
9 |
Correct |
129 ms |
24824 KB |
Output is correct |
10 |
Correct |
111 ms |
18296 KB |
Output is correct |
11 |
Correct |
112 ms |
20088 KB |
Output is correct |
12 |
Correct |
105 ms |
16760 KB |
Output is correct |
13 |
Correct |
103 ms |
16504 KB |
Output is correct |
14 |
Correct |
83 ms |
14588 KB |
Output is correct |
15 |
Correct |
77 ms |
14328 KB |
Output is correct |
16 |
Correct |
52 ms |
13312 KB |
Output is correct |
17 |
Correct |
77 ms |
20080 KB |
Output is correct |
18 |
Correct |
62 ms |
20080 KB |
Output is correct |
19 |
Correct |
62 ms |
20076 KB |
Output is correct |
20 |
Correct |
63 ms |
19864 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
9856 KB |
Output is correct |
2 |
Correct |
7 ms |
9856 KB |
Output is correct |
3 |
Correct |
7 ms |
9912 KB |
Output is correct |
4 |
Correct |
7 ms |
9856 KB |
Output is correct |
5 |
Correct |
7 ms |
9856 KB |
Output is correct |
6 |
Correct |
9 ms |
9856 KB |
Output is correct |
7 |
Correct |
7 ms |
9856 KB |
Output is correct |
8 |
Correct |
7 ms |
9856 KB |
Output is correct |
9 |
Correct |
7 ms |
9856 KB |
Output is correct |
10 |
Correct |
7 ms |
9856 KB |
Output is correct |
11 |
Correct |
7 ms |
9856 KB |
Output is correct |
12 |
Correct |
7 ms |
9984 KB |
Output is correct |
13 |
Correct |
8 ms |
9856 KB |
Output is correct |
14 |
Correct |
7 ms |
9856 KB |
Output is correct |
15 |
Correct |
7 ms |
9856 KB |
Output is correct |
16 |
Correct |
7 ms |
9856 KB |
Output is correct |
17 |
Correct |
7 ms |
9856 KB |
Output is correct |
18 |
Correct |
7 ms |
9856 KB |
Output is correct |
19 |
Correct |
7 ms |
9856 KB |
Output is correct |
20 |
Correct |
7 ms |
9856 KB |
Output is correct |
21 |
Correct |
7 ms |
9856 KB |
Output is correct |
22 |
Correct |
7 ms |
9856 KB |
Output is correct |
23 |
Correct |
8 ms |
9856 KB |
Output is correct |
24 |
Correct |
7 ms |
9856 KB |
Output is correct |
25 |
Correct |
7 ms |
9728 KB |
Output is correct |
26 |
Correct |
9 ms |
9728 KB |
Output is correct |
27 |
Correct |
6 ms |
9728 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
122 ms |
20760 KB |
Output is correct |
2 |
Correct |
132 ms |
21116 KB |
Output is correct |
3 |
Correct |
134 ms |
20472 KB |
Output is correct |
4 |
Correct |
129 ms |
19064 KB |
Output is correct |
5 |
Correct |
122 ms |
17400 KB |
Output is correct |
6 |
Correct |
128 ms |
16632 KB |
Output is correct |
7 |
Correct |
107 ms |
16248 KB |
Output is correct |
8 |
Correct |
100 ms |
15736 KB |
Output is correct |
9 |
Correct |
102 ms |
15480 KB |
Output is correct |
10 |
Correct |
100 ms |
15352 KB |
Output is correct |
11 |
Correct |
102 ms |
15156 KB |
Output is correct |
12 |
Correct |
98 ms |
15248 KB |
Output is correct |
13 |
Correct |
93 ms |
15096 KB |
Output is correct |
14 |
Correct |
95 ms |
16760 KB |
Output is correct |
15 |
Correct |
141 ms |
28152 KB |
Output is correct |
16 |
Correct |
141 ms |
25576 KB |
Output is correct |
17 |
Correct |
143 ms |
26232 KB |
Output is correct |
18 |
Correct |
143 ms |
23996 KB |
Output is correct |
19 |
Correct |
116 ms |
18808 KB |
Output is correct |
20 |
Correct |
113 ms |
17272 KB |
Output is correct |
21 |
Correct |
112 ms |
16504 KB |
Output is correct |
22 |
Correct |
98 ms |
14840 KB |
Output is correct |
23 |
Correct |
87 ms |
14712 KB |
Output is correct |
24 |
Correct |
101 ms |
20344 KB |
Output is correct |
25 |
Correct |
111 ms |
20184 KB |
Output is correct |
26 |
Correct |
120 ms |
19616 KB |
Output is correct |
27 |
Correct |
135 ms |
19320 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
11 ms |
9728 KB |
Output is correct |
4 |
Correct |
6 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
7 ms |
9728 KB |
Output is correct |
7 |
Correct |
8 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9728 KB |
Output is correct |
9 |
Correct |
10 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
8 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
7 ms |
9728 KB |
Output is correct |
14 |
Correct |
6 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
6 ms |
9728 KB |
Output is correct |
17 |
Correct |
7 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9728 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
9 ms |
9856 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
6 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
8 ms |
9728 KB |
Output is correct |
30 |
Correct |
7 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9728 KB |
Output is correct |
32 |
Correct |
7 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9728 KB |
Output is correct |
34 |
Correct |
7 ms |
9728 KB |
Output is correct |
35 |
Correct |
7 ms |
9728 KB |
Output is correct |
36 |
Correct |
7 ms |
9908 KB |
Output is correct |
37 |
Correct |
6 ms |
9728 KB |
Output is correct |
38 |
Correct |
7 ms |
9728 KB |
Output is correct |
39 |
Correct |
7 ms |
9728 KB |
Output is correct |
40 |
Correct |
6 ms |
9728 KB |
Output is correct |
41 |
Correct |
6 ms |
9728 KB |
Output is correct |
42 |
Correct |
7 ms |
9728 KB |
Output is correct |
43 |
Correct |
7 ms |
9728 KB |
Output is correct |
44 |
Correct |
6 ms |
9796 KB |
Output is correct |
45 |
Correct |
7 ms |
9728 KB |
Output is correct |
46 |
Correct |
6 ms |
9728 KB |
Output is correct |
47 |
Correct |
6 ms |
9728 KB |
Output is correct |
48 |
Correct |
7 ms |
9728 KB |
Output is correct |
49 |
Correct |
7 ms |
9728 KB |
Output is correct |
50 |
Correct |
6 ms |
9728 KB |
Output is correct |
51 |
Correct |
8 ms |
9728 KB |
Output is correct |
52 |
Correct |
7 ms |
9728 KB |
Output is correct |
53 |
Correct |
8 ms |
9728 KB |
Output is correct |
54 |
Correct |
6 ms |
9728 KB |
Output is correct |
55 |
Correct |
7 ms |
9728 KB |
Output is correct |
56 |
Correct |
8 ms |
9728 KB |
Output is correct |
57 |
Correct |
6 ms |
9728 KB |
Output is correct |
58 |
Correct |
6 ms |
9728 KB |
Output is correct |
59 |
Correct |
7 ms |
9728 KB |
Output is correct |
60 |
Correct |
7 ms |
9728 KB |
Output is correct |
61 |
Correct |
7 ms |
9728 KB |
Output is correct |
62 |
Correct |
7 ms |
9728 KB |
Output is correct |
63 |
Correct |
7 ms |
9728 KB |
Output is correct |
64 |
Correct |
7 ms |
9728 KB |
Output is correct |
65 |
Correct |
6 ms |
9728 KB |
Output is correct |
66 |
Correct |
6 ms |
9728 KB |
Output is correct |
67 |
Correct |
7 ms |
9856 KB |
Output is correct |
68 |
Correct |
7 ms |
9856 KB |
Output is correct |
69 |
Correct |
7 ms |
9856 KB |
Output is correct |
70 |
Correct |
7 ms |
9856 KB |
Output is correct |
71 |
Correct |
7 ms |
9856 KB |
Output is correct |
72 |
Correct |
7 ms |
9728 KB |
Output is correct |
73 |
Correct |
7 ms |
9856 KB |
Output is correct |
74 |
Correct |
7 ms |
9856 KB |
Output is correct |
75 |
Correct |
6 ms |
9856 KB |
Output is correct |
76 |
Correct |
6 ms |
9728 KB |
Output is correct |
77 |
Correct |
6 ms |
9856 KB |
Output is correct |
78 |
Correct |
7 ms |
9856 KB |
Output is correct |
79 |
Correct |
7 ms |
9856 KB |
Output is correct |
80 |
Correct |
7 ms |
9856 KB |
Output is correct |
81 |
Correct |
7 ms |
9856 KB |
Output is correct |
82 |
Correct |
7 ms |
9856 KB |
Output is correct |
83 |
Correct |
6 ms |
9856 KB |
Output is correct |
84 |
Correct |
7 ms |
9856 KB |
Output is correct |
85 |
Correct |
7 ms |
9856 KB |
Output is correct |
86 |
Correct |
7 ms |
9856 KB |
Output is correct |
87 |
Correct |
7 ms |
9856 KB |
Output is correct |
88 |
Correct |
7 ms |
9856 KB |
Output is correct |
89 |
Correct |
8 ms |
9856 KB |
Output is correct |
90 |
Correct |
7 ms |
9856 KB |
Output is correct |
91 |
Correct |
7 ms |
9856 KB |
Output is correct |
92 |
Correct |
7 ms |
9856 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
11 ms |
9728 KB |
Output is correct |
4 |
Correct |
6 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
7 ms |
9728 KB |
Output is correct |
7 |
Correct |
8 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9728 KB |
Output is correct |
9 |
Correct |
10 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
8 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
7 ms |
9728 KB |
Output is correct |
14 |
Correct |
6 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
6 ms |
9728 KB |
Output is correct |
17 |
Correct |
7 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9728 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
9 ms |
9856 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
6 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
8 ms |
9728 KB |
Output is correct |
30 |
Correct |
7 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9728 KB |
Output is correct |
32 |
Correct |
7 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9728 KB |
Output is correct |
34 |
Correct |
7 ms |
9728 KB |
Output is correct |
35 |
Correct |
7 ms |
9728 KB |
Output is correct |
36 |
Correct |
7 ms |
9908 KB |
Output is correct |
37 |
Correct |
6 ms |
9728 KB |
Output is correct |
38 |
Correct |
7 ms |
9728 KB |
Output is correct |
39 |
Correct |
7 ms |
9728 KB |
Output is correct |
40 |
Correct |
6 ms |
9728 KB |
Output is correct |
41 |
Correct |
6 ms |
9728 KB |
Output is correct |
42 |
Correct |
7 ms |
9728 KB |
Output is correct |
43 |
Correct |
7 ms |
9728 KB |
Output is correct |
44 |
Correct |
6 ms |
9796 KB |
Output is correct |
45 |
Correct |
7 ms |
9728 KB |
Output is correct |
46 |
Correct |
6 ms |
9728 KB |
Output is correct |
47 |
Correct |
6 ms |
9728 KB |
Output is correct |
48 |
Correct |
7 ms |
9728 KB |
Output is correct |
49 |
Correct |
7 ms |
9728 KB |
Output is correct |
50 |
Correct |
6 ms |
9728 KB |
Output is correct |
51 |
Correct |
8 ms |
9728 KB |
Output is correct |
52 |
Correct |
7 ms |
9728 KB |
Output is correct |
53 |
Correct |
8 ms |
9728 KB |
Output is correct |
54 |
Correct |
6 ms |
9728 KB |
Output is correct |
55 |
Correct |
7 ms |
9728 KB |
Output is correct |
56 |
Correct |
8 ms |
9728 KB |
Output is correct |
57 |
Correct |
6 ms |
9728 KB |
Output is correct |
58 |
Correct |
6 ms |
9728 KB |
Output is correct |
59 |
Correct |
7 ms |
9728 KB |
Output is correct |
60 |
Correct |
7 ms |
9728 KB |
Output is correct |
61 |
Correct |
7 ms |
9728 KB |
Output is correct |
62 |
Correct |
7 ms |
9728 KB |
Output is correct |
63 |
Correct |
7 ms |
9728 KB |
Output is correct |
64 |
Correct |
7 ms |
9728 KB |
Output is correct |
65 |
Correct |
6 ms |
9728 KB |
Output is correct |
66 |
Correct |
94 ms |
22392 KB |
Output is correct |
67 |
Correct |
116 ms |
22392 KB |
Output is correct |
68 |
Correct |
125 ms |
26488 KB |
Output is correct |
69 |
Correct |
109 ms |
22520 KB |
Output is correct |
70 |
Correct |
110 ms |
22264 KB |
Output is correct |
71 |
Correct |
113 ms |
25336 KB |
Output is correct |
72 |
Correct |
111 ms |
19980 KB |
Output is correct |
73 |
Correct |
130 ms |
21736 KB |
Output is correct |
74 |
Correct |
105 ms |
17400 KB |
Output is correct |
75 |
Correct |
104 ms |
18680 KB |
Output is correct |
76 |
Correct |
84 ms |
14460 KB |
Output is correct |
77 |
Correct |
75 ms |
14328 KB |
Output is correct |
78 |
Correct |
70 ms |
14364 KB |
Output is correct |
79 |
Correct |
73 ms |
14200 KB |
Output is correct |
80 |
Correct |
48 ms |
13568 KB |
Output is correct |
81 |
Correct |
53 ms |
13560 KB |
Output is correct |
82 |
Correct |
13 ms |
10368 KB |
Output is correct |
83 |
Correct |
13 ms |
10368 KB |
Output is correct |
84 |
Correct |
13 ms |
10368 KB |
Output is correct |
85 |
Correct |
13 ms |
10368 KB |
Output is correct |
86 |
Correct |
13 ms |
10368 KB |
Output is correct |
87 |
Correct |
13 ms |
10368 KB |
Output is correct |
88 |
Correct |
7 ms |
9856 KB |
Output is correct |
89 |
Correct |
7 ms |
9856 KB |
Output is correct |
90 |
Correct |
7 ms |
9856 KB |
Output is correct |
91 |
Correct |
7 ms |
9984 KB |
Output is correct |
92 |
Correct |
7 ms |
9984 KB |
Output is correct |
93 |
Correct |
7 ms |
9984 KB |
Output is correct |
94 |
Correct |
8 ms |
9984 KB |
Output is correct |
95 |
Correct |
7 ms |
9984 KB |
Output is correct |
96 |
Correct |
7 ms |
9856 KB |
Output is correct |
97 |
Correct |
8 ms |
9856 KB |
Output is correct |
98 |
Correct |
8 ms |
9856 KB |
Output is correct |
99 |
Correct |
7 ms |
9856 KB |
Output is correct |
100 |
Correct |
7 ms |
9856 KB |
Output is correct |
101 |
Correct |
7 ms |
9856 KB |
Output is correct |
102 |
Correct |
7 ms |
9856 KB |
Output is correct |
103 |
Correct |
8 ms |
9728 KB |
Output is correct |
104 |
Correct |
7 ms |
9856 KB |
Output is correct |
105 |
Correct |
7 ms |
9856 KB |
Output is correct |
106 |
Correct |
7 ms |
9856 KB |
Output is correct |
107 |
Correct |
7 ms |
9856 KB |
Output is correct |
108 |
Correct |
99 ms |
20856 KB |
Output is correct |
109 |
Correct |
122 ms |
20856 KB |
Output is correct |
110 |
Correct |
129 ms |
20856 KB |
Output is correct |
111 |
Correct |
125 ms |
20984 KB |
Output is correct |
112 |
Correct |
124 ms |
20728 KB |
Output is correct |
113 |
Correct |
172 ms |
32760 KB |
Output is correct |
114 |
Correct |
158 ms |
28536 KB |
Output is correct |
115 |
Correct |
167 ms |
26744 KB |
Output is correct |
116 |
Correct |
129 ms |
24824 KB |
Output is correct |
117 |
Correct |
111 ms |
18296 KB |
Output is correct |
118 |
Correct |
112 ms |
20088 KB |
Output is correct |
119 |
Correct |
105 ms |
16760 KB |
Output is correct |
120 |
Correct |
103 ms |
16504 KB |
Output is correct |
121 |
Correct |
83 ms |
14588 KB |
Output is correct |
122 |
Correct |
77 ms |
14328 KB |
Output is correct |
123 |
Correct |
52 ms |
13312 KB |
Output is correct |
124 |
Correct |
77 ms |
20080 KB |
Output is correct |
125 |
Correct |
62 ms |
20080 KB |
Output is correct |
126 |
Correct |
62 ms |
20076 KB |
Output is correct |
127 |
Correct |
63 ms |
19864 KB |
Output is correct |
128 |
Correct |
7 ms |
9856 KB |
Output is correct |
129 |
Correct |
7 ms |
9856 KB |
Output is correct |
130 |
Correct |
7 ms |
9912 KB |
Output is correct |
131 |
Correct |
7 ms |
9856 KB |
Output is correct |
132 |
Correct |
7 ms |
9856 KB |
Output is correct |
133 |
Correct |
9 ms |
9856 KB |
Output is correct |
134 |
Correct |
7 ms |
9856 KB |
Output is correct |
135 |
Correct |
7 ms |
9856 KB |
Output is correct |
136 |
Correct |
7 ms |
9856 KB |
Output is correct |
137 |
Correct |
7 ms |
9856 KB |
Output is correct |
138 |
Correct |
7 ms |
9856 KB |
Output is correct |
139 |
Correct |
7 ms |
9984 KB |
Output is correct |
140 |
Correct |
8 ms |
9856 KB |
Output is correct |
141 |
Correct |
7 ms |
9856 KB |
Output is correct |
142 |
Correct |
7 ms |
9856 KB |
Output is correct |
143 |
Correct |
7 ms |
9856 KB |
Output is correct |
144 |
Correct |
7 ms |
9856 KB |
Output is correct |
145 |
Correct |
7 ms |
9856 KB |
Output is correct |
146 |
Correct |
7 ms |
9856 KB |
Output is correct |
147 |
Correct |
7 ms |
9856 KB |
Output is correct |
148 |
Correct |
7 ms |
9856 KB |
Output is correct |
149 |
Correct |
7 ms |
9856 KB |
Output is correct |
150 |
Correct |
8 ms |
9856 KB |
Output is correct |
151 |
Correct |
7 ms |
9856 KB |
Output is correct |
152 |
Correct |
7 ms |
9728 KB |
Output is correct |
153 |
Correct |
9 ms |
9728 KB |
Output is correct |
154 |
Correct |
6 ms |
9728 KB |
Output is correct |
155 |
Correct |
122 ms |
20760 KB |
Output is correct |
156 |
Correct |
132 ms |
21116 KB |
Output is correct |
157 |
Correct |
134 ms |
20472 KB |
Output is correct |
158 |
Correct |
129 ms |
19064 KB |
Output is correct |
159 |
Correct |
122 ms |
17400 KB |
Output is correct |
160 |
Correct |
128 ms |
16632 KB |
Output is correct |
161 |
Correct |
107 ms |
16248 KB |
Output is correct |
162 |
Correct |
100 ms |
15736 KB |
Output is correct |
163 |
Correct |
102 ms |
15480 KB |
Output is correct |
164 |
Correct |
100 ms |
15352 KB |
Output is correct |
165 |
Correct |
102 ms |
15156 KB |
Output is correct |
166 |
Correct |
98 ms |
15248 KB |
Output is correct |
167 |
Correct |
93 ms |
15096 KB |
Output is correct |
168 |
Correct |
95 ms |
16760 KB |
Output is correct |
169 |
Correct |
141 ms |
28152 KB |
Output is correct |
170 |
Correct |
141 ms |
25576 KB |
Output is correct |
171 |
Correct |
143 ms |
26232 KB |
Output is correct |
172 |
Correct |
143 ms |
23996 KB |
Output is correct |
173 |
Correct |
116 ms |
18808 KB |
Output is correct |
174 |
Correct |
113 ms |
17272 KB |
Output is correct |
175 |
Correct |
112 ms |
16504 KB |
Output is correct |
176 |
Correct |
98 ms |
14840 KB |
Output is correct |
177 |
Correct |
87 ms |
14712 KB |
Output is correct |
178 |
Correct |
101 ms |
20344 KB |
Output is correct |
179 |
Correct |
111 ms |
20184 KB |
Output is correct |
180 |
Correct |
120 ms |
19616 KB |
Output is correct |
181 |
Correct |
135 ms |
19320 KB |
Output is correct |
182 |
Correct |
6 ms |
9728 KB |
Output is correct |
183 |
Correct |
7 ms |
9856 KB |
Output is correct |
184 |
Correct |
7 ms |
9856 KB |
Output is correct |
185 |
Correct |
7 ms |
9856 KB |
Output is correct |
186 |
Correct |
7 ms |
9856 KB |
Output is correct |
187 |
Correct |
7 ms |
9856 KB |
Output is correct |
188 |
Correct |
7 ms |
9728 KB |
Output is correct |
189 |
Correct |
7 ms |
9856 KB |
Output is correct |
190 |
Correct |
7 ms |
9856 KB |
Output is correct |
191 |
Correct |
6 ms |
9856 KB |
Output is correct |
192 |
Correct |
6 ms |
9728 KB |
Output is correct |
193 |
Correct |
6 ms |
9856 KB |
Output is correct |
194 |
Correct |
7 ms |
9856 KB |
Output is correct |
195 |
Correct |
7 ms |
9856 KB |
Output is correct |
196 |
Correct |
7 ms |
9856 KB |
Output is correct |
197 |
Correct |
7 ms |
9856 KB |
Output is correct |
198 |
Correct |
7 ms |
9856 KB |
Output is correct |
199 |
Correct |
6 ms |
9856 KB |
Output is correct |
200 |
Correct |
7 ms |
9856 KB |
Output is correct |
201 |
Correct |
7 ms |
9856 KB |
Output is correct |
202 |
Correct |
7 ms |
9856 KB |
Output is correct |
203 |
Correct |
7 ms |
9856 KB |
Output is correct |
204 |
Correct |
7 ms |
9856 KB |
Output is correct |
205 |
Correct |
8 ms |
9856 KB |
Output is correct |
206 |
Correct |
7 ms |
9856 KB |
Output is correct |
207 |
Correct |
7 ms |
9856 KB |
Output is correct |
208 |
Correct |
7 ms |
9856 KB |
Output is correct |
209 |
Correct |
12 ms |
10240 KB |
Output is correct |
210 |
Correct |
56 ms |
13304 KB |
Output is correct |
211 |
Correct |
109 ms |
19064 KB |
Output is correct |
212 |
Correct |
147 ms |
20600 KB |
Output is correct |
213 |
Correct |
160 ms |
22008 KB |
Output is correct |
214 |
Correct |
61 ms |
14840 KB |
Output is correct |
215 |
Correct |
57 ms |
14968 KB |
Output is correct |
216 |
Correct |
152 ms |
19320 KB |
Output is correct |
217 |
Correct |
118 ms |
17816 KB |
Output is correct |
218 |
Correct |
96 ms |
15864 KB |
Output is correct |
219 |
Correct |
89 ms |
15352 KB |
Output is correct |
220 |
Correct |
87 ms |
15176 KB |
Output is correct |
221 |
Correct |
85 ms |
14972 KB |
Output is correct |
222 |
Correct |
104 ms |
15872 KB |
Output is correct |
223 |
Correct |
143 ms |
20984 KB |
Output is correct |
224 |
Correct |
142 ms |
20016 KB |
Output is correct |
225 |
Correct |
119 ms |
16748 KB |
Output is correct |
226 |
Correct |
120 ms |
16316 KB |
Output is correct |
227 |
Correct |
111 ms |
16248 KB |
Output is correct |
228 |
Correct |
96 ms |
14972 KB |
Output is correct |
229 |
Correct |
81 ms |
14840 KB |
Output is correct |
230 |
Correct |
95 ms |
17400 KB |
Output is correct |
231 |
Correct |
99 ms |
17368 KB |
Output is correct |