#include "bits/stdc++.h"
using namespace std;
#define ar array
const int N = 4e5 + 5;
vector<int> edges[N], ee[N];
int tin[N], low[N], used[N];
int last, t;
vector<ar<int, 2>> ss;
void dfs(int u, int p = -1){
tin[u] = low[u] = ++t;
used[u] = 1;
int c = 0;
for(auto x : edges[u]){
if(x == p) continue;
if(used[x]){
if(low[u] > tin[x]){
low[u] = tin[x];
ss.push_back({u, x});
}
} else { ++c;
ss.push_back({u, x});
dfs(x, u);
low[u] = min(low[u], low[x]);
if(p == -1 && c > 1){
last++;
while(ss.back() != (ar<int, 2>){u, x}){
ee[ss.back()[0]].push_back(last);
ee[ss.back()[1]].push_back(last);
ss.pop_back();
} ss.pop_back();
ee[u].push_back(last);
ee[x].push_back(last);
}
if(~p && low[x] >= tin[u]){
last++;
while(ss.back() != (ar<int, 2>){u, x}){
ee[ss.back()[0]].push_back(last);
ee[ss.back()[1]].push_back(last);
ss.pop_back();
} ss.pop_back();
ee[u].push_back(last);
ee[x].push_back(last);
}
}
}
}
int sub[N], n, m;
long long res;
void dfs2(int u, int p = -1){
//~ cout<<u<<endl;
sub[u] = (u <= n);
for(auto x : ee[u]){
if(x == p) continue;
dfs2(x, u);
sub[u] += sub[x];
}
}
int tot;
void dfs3(int u, int p = -1){
used[u] = 1;
if(u <= n){
for(auto x : ee[u]){
if(x == p) continue;
dfs3(x, u);
}
} else {
int sz = ee[u].size();
assert(sz >= 2);
for(auto x : ee[u]){
if(x == p){
res -= (tot - sub[u]) * 1ll * (tot - sub[u] - 1) * (sz - 1);
} else {
res -= sub[x] * 1ll * (sub[x] - 1) * (sz - 1);
dfs3(x, u);
}
}
}
}
signed main(){
ios::sync_with_stdio(0); cin.tie(0);
cin>>n>>m;
for(int i=0;i<m;i++){
int a, b; cin>>a>>b;
edges[a].push_back(b);
edges[b].push_back(a);
}
for(int i=1;i<=n;i++){
if(used[i]) continue;
dfs(i);
last++;
while(!ss.empty()){
ee[ss.back()[0]].push_back(last);
ee[ss.back()[1]].push_back(last);
ss.pop_back();
}
}
for(int i=1;i<=n;i++){
sort(ee[i].begin(), ee[i].end());
ee[i].erase(unique(ee[i].begin(), ee[i].end()), ee[i].end());
for(auto& x : ee[i]){
x += n;
ee[x].push_back(i);
}
}
//~ last += n;
//~ for(int i=1;i<=n;i++){
//~ for(auto x : ee[i]) cout<<i<<" "<<x<<"\n";
//~ } cout<<last<<endl;
memset(used, 0, sizeof used);
for(int i=1;i<=n;i++){
if(used[i]) continue;
//~ cout<<i<<endl;
dfs2(i);
res += sub[i] * 1ll * (sub[i] - 1) * (sub[i] - 2);
tot = sub[i];
dfs3(i);
}
cout<<res<<"\n";
}
/*
4 3
1 2
2 3
3 4
4 4
1 2
2 3
3 4
4 2
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
20564 KB |
Output is correct |
2 |
Correct |
10 ms |
20564 KB |
Output is correct |
3 |
Correct |
10 ms |
20692 KB |
Output is correct |
4 |
Correct |
10 ms |
20612 KB |
Output is correct |
5 |
Correct |
10 ms |
20692 KB |
Output is correct |
6 |
Correct |
10 ms |
20692 KB |
Output is correct |
7 |
Correct |
10 ms |
20564 KB |
Output is correct |
8 |
Correct |
10 ms |
20604 KB |
Output is correct |
9 |
Correct |
10 ms |
20624 KB |
Output is correct |
10 |
Correct |
10 ms |
20692 KB |
Output is correct |
11 |
Correct |
10 ms |
20692 KB |
Output is correct |
12 |
Correct |
10 ms |
20692 KB |
Output is correct |
13 |
Correct |
10 ms |
20616 KB |
Output is correct |
14 |
Correct |
10 ms |
20588 KB |
Output is correct |
15 |
Correct |
10 ms |
20640 KB |
Output is correct |
16 |
Correct |
10 ms |
20692 KB |
Output is correct |
17 |
Correct |
10 ms |
20692 KB |
Output is correct |
18 |
Correct |
11 ms |
20692 KB |
Output is correct |
19 |
Correct |
10 ms |
20592 KB |
Output is correct |
20 |
Correct |
11 ms |
20620 KB |
Output is correct |
21 |
Correct |
10 ms |
20692 KB |
Output is correct |
22 |
Correct |
10 ms |
20676 KB |
Output is correct |
23 |
Correct |
10 ms |
20692 KB |
Output is correct |
24 |
Correct |
10 ms |
20692 KB |
Output is correct |
25 |
Correct |
10 ms |
20692 KB |
Output is correct |
26 |
Correct |
10 ms |
20688 KB |
Output is correct |
27 |
Correct |
11 ms |
20692 KB |
Output is correct |
28 |
Correct |
11 ms |
20692 KB |
Output is correct |
29 |
Correct |
11 ms |
20688 KB |
Output is correct |
30 |
Correct |
11 ms |
20788 KB |
Output is correct |
31 |
Correct |
11 ms |
20688 KB |
Output is correct |
32 |
Correct |
10 ms |
20564 KB |
Output is correct |
33 |
Correct |
10 ms |
20564 KB |
Output is correct |
34 |
Correct |
10 ms |
20692 KB |
Output is correct |
35 |
Correct |
10 ms |
20660 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
20564 KB |
Output is correct |
2 |
Correct |
10 ms |
20564 KB |
Output is correct |
3 |
Correct |
10 ms |
20692 KB |
Output is correct |
4 |
Correct |
10 ms |
20612 KB |
Output is correct |
5 |
Correct |
10 ms |
20692 KB |
Output is correct |
6 |
Correct |
10 ms |
20692 KB |
Output is correct |
7 |
Correct |
10 ms |
20564 KB |
Output is correct |
8 |
Correct |
10 ms |
20604 KB |
Output is correct |
9 |
Correct |
10 ms |
20624 KB |
Output is correct |
10 |
Correct |
10 ms |
20692 KB |
Output is correct |
11 |
Correct |
10 ms |
20692 KB |
Output is correct |
12 |
Correct |
10 ms |
20692 KB |
Output is correct |
13 |
Correct |
10 ms |
20616 KB |
Output is correct |
14 |
Correct |
10 ms |
20588 KB |
Output is correct |
15 |
Correct |
10 ms |
20640 KB |
Output is correct |
16 |
Correct |
10 ms |
20692 KB |
Output is correct |
17 |
Correct |
10 ms |
20692 KB |
Output is correct |
18 |
Correct |
11 ms |
20692 KB |
Output is correct |
19 |
Correct |
10 ms |
20592 KB |
Output is correct |
20 |
Correct |
11 ms |
20620 KB |
Output is correct |
21 |
Correct |
10 ms |
20692 KB |
Output is correct |
22 |
Correct |
10 ms |
20676 KB |
Output is correct |
23 |
Correct |
10 ms |
20692 KB |
Output is correct |
24 |
Correct |
10 ms |
20692 KB |
Output is correct |
25 |
Correct |
10 ms |
20692 KB |
Output is correct |
26 |
Correct |
10 ms |
20688 KB |
Output is correct |
27 |
Correct |
11 ms |
20692 KB |
Output is correct |
28 |
Correct |
11 ms |
20692 KB |
Output is correct |
29 |
Correct |
11 ms |
20688 KB |
Output is correct |
30 |
Correct |
11 ms |
20788 KB |
Output is correct |
31 |
Correct |
11 ms |
20688 KB |
Output is correct |
32 |
Correct |
10 ms |
20564 KB |
Output is correct |
33 |
Correct |
10 ms |
20564 KB |
Output is correct |
34 |
Correct |
10 ms |
20692 KB |
Output is correct |
35 |
Correct |
10 ms |
20660 KB |
Output is correct |
36 |
Correct |
10 ms |
20564 KB |
Output is correct |
37 |
Correct |
10 ms |
20692 KB |
Output is correct |
38 |
Correct |
10 ms |
20588 KB |
Output is correct |
39 |
Correct |
10 ms |
20692 KB |
Output is correct |
40 |
Correct |
10 ms |
20580 KB |
Output is correct |
41 |
Correct |
10 ms |
20692 KB |
Output is correct |
42 |
Correct |
10 ms |
20684 KB |
Output is correct |
43 |
Correct |
10 ms |
20692 KB |
Output is correct |
44 |
Correct |
10 ms |
20648 KB |
Output is correct |
45 |
Correct |
13 ms |
20692 KB |
Output is correct |
46 |
Correct |
11 ms |
20692 KB |
Output is correct |
47 |
Correct |
10 ms |
20688 KB |
Output is correct |
48 |
Correct |
10 ms |
20692 KB |
Output is correct |
49 |
Correct |
11 ms |
20676 KB |
Output is correct |
50 |
Correct |
10 ms |
20584 KB |
Output is correct |
51 |
Correct |
10 ms |
20636 KB |
Output is correct |
52 |
Correct |
10 ms |
20692 KB |
Output is correct |
53 |
Correct |
10 ms |
20692 KB |
Output is correct |
54 |
Correct |
10 ms |
20692 KB |
Output is correct |
55 |
Correct |
11 ms |
20692 KB |
Output is correct |
56 |
Correct |
11 ms |
20692 KB |
Output is correct |
57 |
Correct |
11 ms |
20692 KB |
Output is correct |
58 |
Correct |
10 ms |
20692 KB |
Output is correct |
59 |
Correct |
10 ms |
20692 KB |
Output is correct |
60 |
Correct |
11 ms |
20692 KB |
Output is correct |
61 |
Correct |
10 ms |
20692 KB |
Output is correct |
62 |
Correct |
10 ms |
20692 KB |
Output is correct |
63 |
Correct |
10 ms |
20600 KB |
Output is correct |
64 |
Correct |
10 ms |
20616 KB |
Output is correct |
65 |
Correct |
10 ms |
20692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
92 ms |
42308 KB |
Output is correct |
2 |
Correct |
80 ms |
43532 KB |
Output is correct |
3 |
Correct |
99 ms |
38068 KB |
Output is correct |
4 |
Correct |
101 ms |
40752 KB |
Output is correct |
5 |
Correct |
110 ms |
35508 KB |
Output is correct |
6 |
Correct |
102 ms |
37060 KB |
Output is correct |
7 |
Correct |
109 ms |
34880 KB |
Output is correct |
8 |
Correct |
102 ms |
35308 KB |
Output is correct |
9 |
Correct |
115 ms |
33356 KB |
Output is correct |
10 |
Correct |
94 ms |
33900 KB |
Output is correct |
11 |
Correct |
85 ms |
30928 KB |
Output is correct |
12 |
Correct |
77 ms |
30668 KB |
Output is correct |
13 |
Correct |
72 ms |
30500 KB |
Output is correct |
14 |
Correct |
75 ms |
30144 KB |
Output is correct |
15 |
Correct |
62 ms |
29140 KB |
Output is correct |
16 |
Correct |
58 ms |
28852 KB |
Output is correct |
17 |
Correct |
13 ms |
22100 KB |
Output is correct |
18 |
Correct |
15 ms |
22100 KB |
Output is correct |
19 |
Correct |
13 ms |
22148 KB |
Output is correct |
20 |
Correct |
13 ms |
22100 KB |
Output is correct |
21 |
Correct |
12 ms |
21972 KB |
Output is correct |
22 |
Correct |
13 ms |
22096 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
20752 KB |
Output is correct |
2 |
Correct |
10 ms |
20692 KB |
Output is correct |
3 |
Correct |
10 ms |
20692 KB |
Output is correct |
4 |
Correct |
11 ms |
20820 KB |
Output is correct |
5 |
Correct |
10 ms |
20820 KB |
Output is correct |
6 |
Correct |
10 ms |
20820 KB |
Output is correct |
7 |
Correct |
11 ms |
20820 KB |
Output is correct |
8 |
Correct |
11 ms |
20860 KB |
Output is correct |
9 |
Correct |
12 ms |
20820 KB |
Output is correct |
10 |
Correct |
13 ms |
20756 KB |
Output is correct |
11 |
Correct |
11 ms |
20692 KB |
Output is correct |
12 |
Correct |
10 ms |
20692 KB |
Output is correct |
13 |
Correct |
11 ms |
20692 KB |
Output is correct |
14 |
Correct |
12 ms |
20720 KB |
Output is correct |
15 |
Correct |
11 ms |
20692 KB |
Output is correct |
16 |
Correct |
10 ms |
20704 KB |
Output is correct |
17 |
Correct |
12 ms |
20692 KB |
Output is correct |
18 |
Correct |
11 ms |
20692 KB |
Output is correct |
19 |
Correct |
11 ms |
20820 KB |
Output is correct |
20 |
Correct |
12 ms |
20820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
119 ms |
31820 KB |
Output is correct |
2 |
Correct |
118 ms |
33040 KB |
Output is correct |
3 |
Correct |
116 ms |
33028 KB |
Output is correct |
4 |
Correct |
118 ms |
33200 KB |
Output is correct |
5 |
Correct |
124 ms |
33020 KB |
Output is correct |
6 |
Correct |
127 ms |
41844 KB |
Output is correct |
7 |
Correct |
133 ms |
38740 KB |
Output is correct |
8 |
Correct |
161 ms |
37312 KB |
Output is correct |
9 |
Correct |
135 ms |
35792 KB |
Output is correct |
10 |
Correct |
116 ms |
33100 KB |
Output is correct |
11 |
Correct |
120 ms |
33112 KB |
Output is correct |
12 |
Correct |
111 ms |
33096 KB |
Output is correct |
13 |
Correct |
124 ms |
33104 KB |
Output is correct |
14 |
Correct |
104 ms |
32388 KB |
Output is correct |
15 |
Correct |
89 ms |
31712 KB |
Output is correct |
16 |
Correct |
56 ms |
28916 KB |
Output is correct |
17 |
Correct |
94 ms |
33608 KB |
Output is correct |
18 |
Correct |
113 ms |
33584 KB |
Output is correct |
19 |
Correct |
97 ms |
33600 KB |
Output is correct |
20 |
Correct |
89 ms |
33600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
20692 KB |
Output is correct |
2 |
Correct |
11 ms |
20692 KB |
Output is correct |
3 |
Correct |
10 ms |
20692 KB |
Output is correct |
4 |
Correct |
11 ms |
20672 KB |
Output is correct |
5 |
Correct |
10 ms |
20692 KB |
Output is correct |
6 |
Correct |
11 ms |
20692 KB |
Output is correct |
7 |
Correct |
10 ms |
20692 KB |
Output is correct |
8 |
Correct |
11 ms |
20752 KB |
Output is correct |
9 |
Correct |
11 ms |
20788 KB |
Output is correct |
10 |
Correct |
12 ms |
20772 KB |
Output is correct |
11 |
Correct |
11 ms |
20692 KB |
Output is correct |
12 |
Correct |
11 ms |
20948 KB |
Output is correct |
13 |
Correct |
11 ms |
20820 KB |
Output is correct |
14 |
Correct |
11 ms |
20820 KB |
Output is correct |
15 |
Correct |
11 ms |
20820 KB |
Output is correct |
16 |
Correct |
11 ms |
20752 KB |
Output is correct |
17 |
Correct |
11 ms |
20692 KB |
Output is correct |
18 |
Correct |
11 ms |
20692 KB |
Output is correct |
19 |
Correct |
11 ms |
20692 KB |
Output is correct |
20 |
Correct |
11 ms |
20696 KB |
Output is correct |
21 |
Correct |
10 ms |
20692 KB |
Output is correct |
22 |
Correct |
11 ms |
20692 KB |
Output is correct |
23 |
Correct |
11 ms |
20776 KB |
Output is correct |
24 |
Correct |
11 ms |
20684 KB |
Output is correct |
25 |
Correct |
12 ms |
20740 KB |
Output is correct |
26 |
Correct |
10 ms |
20692 KB |
Output is correct |
27 |
Correct |
10 ms |
20692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
121 ms |
31776 KB |
Output is correct |
2 |
Correct |
124 ms |
32960 KB |
Output is correct |
3 |
Correct |
136 ms |
32572 KB |
Output is correct |
4 |
Correct |
111 ms |
32056 KB |
Output is correct |
5 |
Correct |
103 ms |
31152 KB |
Output is correct |
6 |
Correct |
89 ms |
30796 KB |
Output is correct |
7 |
Correct |
94 ms |
30672 KB |
Output is correct |
8 |
Correct |
87 ms |
30408 KB |
Output is correct |
9 |
Correct |
103 ms |
30412 KB |
Output is correct |
10 |
Correct |
85 ms |
30348 KB |
Output is correct |
11 |
Correct |
85 ms |
30284 KB |
Output is correct |
12 |
Correct |
79 ms |
30356 KB |
Output is correct |
13 |
Correct |
77 ms |
30508 KB |
Output is correct |
14 |
Correct |
77 ms |
33608 KB |
Output is correct |
15 |
Correct |
141 ms |
38968 KB |
Output is correct |
16 |
Correct |
135 ms |
36684 KB |
Output is correct |
17 |
Correct |
128 ms |
37436 KB |
Output is correct |
18 |
Correct |
130 ms |
35644 KB |
Output is correct |
19 |
Correct |
113 ms |
32048 KB |
Output is correct |
20 |
Correct |
107 ms |
31964 KB |
Output is correct |
21 |
Correct |
113 ms |
31908 KB |
Output is correct |
22 |
Correct |
95 ms |
31308 KB |
Output is correct |
23 |
Correct |
88 ms |
30924 KB |
Output is correct |
24 |
Correct |
111 ms |
32876 KB |
Output is correct |
25 |
Correct |
111 ms |
32944 KB |
Output is correct |
26 |
Correct |
102 ms |
32328 KB |
Output is correct |
27 |
Correct |
110 ms |
32428 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
20564 KB |
Output is correct |
2 |
Correct |
10 ms |
20564 KB |
Output is correct |
3 |
Correct |
10 ms |
20692 KB |
Output is correct |
4 |
Correct |
10 ms |
20612 KB |
Output is correct |
5 |
Correct |
10 ms |
20692 KB |
Output is correct |
6 |
Correct |
10 ms |
20692 KB |
Output is correct |
7 |
Correct |
10 ms |
20564 KB |
Output is correct |
8 |
Correct |
10 ms |
20604 KB |
Output is correct |
9 |
Correct |
10 ms |
20624 KB |
Output is correct |
10 |
Correct |
10 ms |
20692 KB |
Output is correct |
11 |
Correct |
10 ms |
20692 KB |
Output is correct |
12 |
Correct |
10 ms |
20692 KB |
Output is correct |
13 |
Correct |
10 ms |
20616 KB |
Output is correct |
14 |
Correct |
10 ms |
20588 KB |
Output is correct |
15 |
Correct |
10 ms |
20640 KB |
Output is correct |
16 |
Correct |
10 ms |
20692 KB |
Output is correct |
17 |
Correct |
10 ms |
20692 KB |
Output is correct |
18 |
Correct |
11 ms |
20692 KB |
Output is correct |
19 |
Correct |
10 ms |
20592 KB |
Output is correct |
20 |
Correct |
11 ms |
20620 KB |
Output is correct |
21 |
Correct |
10 ms |
20692 KB |
Output is correct |
22 |
Correct |
10 ms |
20676 KB |
Output is correct |
23 |
Correct |
10 ms |
20692 KB |
Output is correct |
24 |
Correct |
10 ms |
20692 KB |
Output is correct |
25 |
Correct |
10 ms |
20692 KB |
Output is correct |
26 |
Correct |
10 ms |
20688 KB |
Output is correct |
27 |
Correct |
11 ms |
20692 KB |
Output is correct |
28 |
Correct |
11 ms |
20692 KB |
Output is correct |
29 |
Correct |
11 ms |
20688 KB |
Output is correct |
30 |
Correct |
11 ms |
20788 KB |
Output is correct |
31 |
Correct |
11 ms |
20688 KB |
Output is correct |
32 |
Correct |
10 ms |
20564 KB |
Output is correct |
33 |
Correct |
10 ms |
20564 KB |
Output is correct |
34 |
Correct |
10 ms |
20692 KB |
Output is correct |
35 |
Correct |
10 ms |
20660 KB |
Output is correct |
36 |
Correct |
10 ms |
20564 KB |
Output is correct |
37 |
Correct |
10 ms |
20692 KB |
Output is correct |
38 |
Correct |
10 ms |
20588 KB |
Output is correct |
39 |
Correct |
10 ms |
20692 KB |
Output is correct |
40 |
Correct |
10 ms |
20580 KB |
Output is correct |
41 |
Correct |
10 ms |
20692 KB |
Output is correct |
42 |
Correct |
10 ms |
20684 KB |
Output is correct |
43 |
Correct |
10 ms |
20692 KB |
Output is correct |
44 |
Correct |
10 ms |
20648 KB |
Output is correct |
45 |
Correct |
13 ms |
20692 KB |
Output is correct |
46 |
Correct |
11 ms |
20692 KB |
Output is correct |
47 |
Correct |
10 ms |
20688 KB |
Output is correct |
48 |
Correct |
10 ms |
20692 KB |
Output is correct |
49 |
Correct |
11 ms |
20676 KB |
Output is correct |
50 |
Correct |
10 ms |
20584 KB |
Output is correct |
51 |
Correct |
10 ms |
20636 KB |
Output is correct |
52 |
Correct |
10 ms |
20692 KB |
Output is correct |
53 |
Correct |
10 ms |
20692 KB |
Output is correct |
54 |
Correct |
10 ms |
20692 KB |
Output is correct |
55 |
Correct |
11 ms |
20692 KB |
Output is correct |
56 |
Correct |
11 ms |
20692 KB |
Output is correct |
57 |
Correct |
11 ms |
20692 KB |
Output is correct |
58 |
Correct |
10 ms |
20692 KB |
Output is correct |
59 |
Correct |
10 ms |
20692 KB |
Output is correct |
60 |
Correct |
11 ms |
20692 KB |
Output is correct |
61 |
Correct |
10 ms |
20692 KB |
Output is correct |
62 |
Correct |
10 ms |
20692 KB |
Output is correct |
63 |
Correct |
10 ms |
20600 KB |
Output is correct |
64 |
Correct |
10 ms |
20616 KB |
Output is correct |
65 |
Correct |
10 ms |
20692 KB |
Output is correct |
66 |
Correct |
11 ms |
20692 KB |
Output is correct |
67 |
Correct |
11 ms |
20692 KB |
Output is correct |
68 |
Correct |
11 ms |
20692 KB |
Output is correct |
69 |
Correct |
11 ms |
20820 KB |
Output is correct |
70 |
Correct |
10 ms |
20820 KB |
Output is correct |
71 |
Correct |
11 ms |
20692 KB |
Output is correct |
72 |
Correct |
12 ms |
20692 KB |
Output is correct |
73 |
Correct |
11 ms |
20692 KB |
Output is correct |
74 |
Correct |
11 ms |
20764 KB |
Output is correct |
75 |
Correct |
12 ms |
20692 KB |
Output is correct |
76 |
Correct |
10 ms |
20628 KB |
Output is correct |
77 |
Correct |
11 ms |
20692 KB |
Output is correct |
78 |
Correct |
11 ms |
20784 KB |
Output is correct |
79 |
Correct |
11 ms |
20692 KB |
Output is correct |
80 |
Correct |
10 ms |
20792 KB |
Output is correct |
81 |
Correct |
11 ms |
20692 KB |
Output is correct |
82 |
Correct |
10 ms |
20792 KB |
Output is correct |
83 |
Correct |
13 ms |
20840 KB |
Output is correct |
84 |
Correct |
11 ms |
20740 KB |
Output is correct |
85 |
Correct |
11 ms |
20812 KB |
Output is correct |
86 |
Correct |
12 ms |
20692 KB |
Output is correct |
87 |
Correct |
12 ms |
20692 KB |
Output is correct |
88 |
Correct |
11 ms |
20784 KB |
Output is correct |
89 |
Correct |
11 ms |
20668 KB |
Output is correct |
90 |
Correct |
10 ms |
20768 KB |
Output is correct |
91 |
Correct |
10 ms |
20680 KB |
Output is correct |
92 |
Correct |
11 ms |
20808 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
20564 KB |
Output is correct |
2 |
Correct |
10 ms |
20564 KB |
Output is correct |
3 |
Correct |
10 ms |
20692 KB |
Output is correct |
4 |
Correct |
10 ms |
20612 KB |
Output is correct |
5 |
Correct |
10 ms |
20692 KB |
Output is correct |
6 |
Correct |
10 ms |
20692 KB |
Output is correct |
7 |
Correct |
10 ms |
20564 KB |
Output is correct |
8 |
Correct |
10 ms |
20604 KB |
Output is correct |
9 |
Correct |
10 ms |
20624 KB |
Output is correct |
10 |
Correct |
10 ms |
20692 KB |
Output is correct |
11 |
Correct |
10 ms |
20692 KB |
Output is correct |
12 |
Correct |
10 ms |
20692 KB |
Output is correct |
13 |
Correct |
10 ms |
20616 KB |
Output is correct |
14 |
Correct |
10 ms |
20588 KB |
Output is correct |
15 |
Correct |
10 ms |
20640 KB |
Output is correct |
16 |
Correct |
10 ms |
20692 KB |
Output is correct |
17 |
Correct |
10 ms |
20692 KB |
Output is correct |
18 |
Correct |
11 ms |
20692 KB |
Output is correct |
19 |
Correct |
10 ms |
20592 KB |
Output is correct |
20 |
Correct |
11 ms |
20620 KB |
Output is correct |
21 |
Correct |
10 ms |
20692 KB |
Output is correct |
22 |
Correct |
10 ms |
20676 KB |
Output is correct |
23 |
Correct |
10 ms |
20692 KB |
Output is correct |
24 |
Correct |
10 ms |
20692 KB |
Output is correct |
25 |
Correct |
10 ms |
20692 KB |
Output is correct |
26 |
Correct |
10 ms |
20688 KB |
Output is correct |
27 |
Correct |
11 ms |
20692 KB |
Output is correct |
28 |
Correct |
11 ms |
20692 KB |
Output is correct |
29 |
Correct |
11 ms |
20688 KB |
Output is correct |
30 |
Correct |
11 ms |
20788 KB |
Output is correct |
31 |
Correct |
11 ms |
20688 KB |
Output is correct |
32 |
Correct |
10 ms |
20564 KB |
Output is correct |
33 |
Correct |
10 ms |
20564 KB |
Output is correct |
34 |
Correct |
10 ms |
20692 KB |
Output is correct |
35 |
Correct |
10 ms |
20660 KB |
Output is correct |
36 |
Correct |
10 ms |
20564 KB |
Output is correct |
37 |
Correct |
10 ms |
20692 KB |
Output is correct |
38 |
Correct |
10 ms |
20588 KB |
Output is correct |
39 |
Correct |
10 ms |
20692 KB |
Output is correct |
40 |
Correct |
10 ms |
20580 KB |
Output is correct |
41 |
Correct |
10 ms |
20692 KB |
Output is correct |
42 |
Correct |
10 ms |
20684 KB |
Output is correct |
43 |
Correct |
10 ms |
20692 KB |
Output is correct |
44 |
Correct |
10 ms |
20648 KB |
Output is correct |
45 |
Correct |
13 ms |
20692 KB |
Output is correct |
46 |
Correct |
11 ms |
20692 KB |
Output is correct |
47 |
Correct |
10 ms |
20688 KB |
Output is correct |
48 |
Correct |
10 ms |
20692 KB |
Output is correct |
49 |
Correct |
11 ms |
20676 KB |
Output is correct |
50 |
Correct |
10 ms |
20584 KB |
Output is correct |
51 |
Correct |
10 ms |
20636 KB |
Output is correct |
52 |
Correct |
10 ms |
20692 KB |
Output is correct |
53 |
Correct |
10 ms |
20692 KB |
Output is correct |
54 |
Correct |
10 ms |
20692 KB |
Output is correct |
55 |
Correct |
11 ms |
20692 KB |
Output is correct |
56 |
Correct |
11 ms |
20692 KB |
Output is correct |
57 |
Correct |
11 ms |
20692 KB |
Output is correct |
58 |
Correct |
10 ms |
20692 KB |
Output is correct |
59 |
Correct |
10 ms |
20692 KB |
Output is correct |
60 |
Correct |
11 ms |
20692 KB |
Output is correct |
61 |
Correct |
10 ms |
20692 KB |
Output is correct |
62 |
Correct |
10 ms |
20692 KB |
Output is correct |
63 |
Correct |
10 ms |
20600 KB |
Output is correct |
64 |
Correct |
10 ms |
20616 KB |
Output is correct |
65 |
Correct |
10 ms |
20692 KB |
Output is correct |
66 |
Correct |
92 ms |
42308 KB |
Output is correct |
67 |
Correct |
80 ms |
43532 KB |
Output is correct |
68 |
Correct |
99 ms |
38068 KB |
Output is correct |
69 |
Correct |
101 ms |
40752 KB |
Output is correct |
70 |
Correct |
110 ms |
35508 KB |
Output is correct |
71 |
Correct |
102 ms |
37060 KB |
Output is correct |
72 |
Correct |
109 ms |
34880 KB |
Output is correct |
73 |
Correct |
102 ms |
35308 KB |
Output is correct |
74 |
Correct |
115 ms |
33356 KB |
Output is correct |
75 |
Correct |
94 ms |
33900 KB |
Output is correct |
76 |
Correct |
85 ms |
30928 KB |
Output is correct |
77 |
Correct |
77 ms |
30668 KB |
Output is correct |
78 |
Correct |
72 ms |
30500 KB |
Output is correct |
79 |
Correct |
75 ms |
30144 KB |
Output is correct |
80 |
Correct |
62 ms |
29140 KB |
Output is correct |
81 |
Correct |
58 ms |
28852 KB |
Output is correct |
82 |
Correct |
13 ms |
22100 KB |
Output is correct |
83 |
Correct |
15 ms |
22100 KB |
Output is correct |
84 |
Correct |
13 ms |
22148 KB |
Output is correct |
85 |
Correct |
13 ms |
22100 KB |
Output is correct |
86 |
Correct |
12 ms |
21972 KB |
Output is correct |
87 |
Correct |
13 ms |
22096 KB |
Output is correct |
88 |
Correct |
11 ms |
20752 KB |
Output is correct |
89 |
Correct |
10 ms |
20692 KB |
Output is correct |
90 |
Correct |
10 ms |
20692 KB |
Output is correct |
91 |
Correct |
11 ms |
20820 KB |
Output is correct |
92 |
Correct |
10 ms |
20820 KB |
Output is correct |
93 |
Correct |
10 ms |
20820 KB |
Output is correct |
94 |
Correct |
11 ms |
20820 KB |
Output is correct |
95 |
Correct |
11 ms |
20860 KB |
Output is correct |
96 |
Correct |
12 ms |
20820 KB |
Output is correct |
97 |
Correct |
13 ms |
20756 KB |
Output is correct |
98 |
Correct |
11 ms |
20692 KB |
Output is correct |
99 |
Correct |
10 ms |
20692 KB |
Output is correct |
100 |
Correct |
11 ms |
20692 KB |
Output is correct |
101 |
Correct |
12 ms |
20720 KB |
Output is correct |
102 |
Correct |
11 ms |
20692 KB |
Output is correct |
103 |
Correct |
10 ms |
20704 KB |
Output is correct |
104 |
Correct |
12 ms |
20692 KB |
Output is correct |
105 |
Correct |
11 ms |
20692 KB |
Output is correct |
106 |
Correct |
11 ms |
20820 KB |
Output is correct |
107 |
Correct |
12 ms |
20820 KB |
Output is correct |
108 |
Correct |
119 ms |
31820 KB |
Output is correct |
109 |
Correct |
118 ms |
33040 KB |
Output is correct |
110 |
Correct |
116 ms |
33028 KB |
Output is correct |
111 |
Correct |
118 ms |
33200 KB |
Output is correct |
112 |
Correct |
124 ms |
33020 KB |
Output is correct |
113 |
Correct |
127 ms |
41844 KB |
Output is correct |
114 |
Correct |
133 ms |
38740 KB |
Output is correct |
115 |
Correct |
161 ms |
37312 KB |
Output is correct |
116 |
Correct |
135 ms |
35792 KB |
Output is correct |
117 |
Correct |
116 ms |
33100 KB |
Output is correct |
118 |
Correct |
120 ms |
33112 KB |
Output is correct |
119 |
Correct |
111 ms |
33096 KB |
Output is correct |
120 |
Correct |
124 ms |
33104 KB |
Output is correct |
121 |
Correct |
104 ms |
32388 KB |
Output is correct |
122 |
Correct |
89 ms |
31712 KB |
Output is correct |
123 |
Correct |
56 ms |
28916 KB |
Output is correct |
124 |
Correct |
94 ms |
33608 KB |
Output is correct |
125 |
Correct |
113 ms |
33584 KB |
Output is correct |
126 |
Correct |
97 ms |
33600 KB |
Output is correct |
127 |
Correct |
89 ms |
33600 KB |
Output is correct |
128 |
Correct |
13 ms |
20692 KB |
Output is correct |
129 |
Correct |
11 ms |
20692 KB |
Output is correct |
130 |
Correct |
10 ms |
20692 KB |
Output is correct |
131 |
Correct |
11 ms |
20672 KB |
Output is correct |
132 |
Correct |
10 ms |
20692 KB |
Output is correct |
133 |
Correct |
11 ms |
20692 KB |
Output is correct |
134 |
Correct |
10 ms |
20692 KB |
Output is correct |
135 |
Correct |
11 ms |
20752 KB |
Output is correct |
136 |
Correct |
11 ms |
20788 KB |
Output is correct |
137 |
Correct |
12 ms |
20772 KB |
Output is correct |
138 |
Correct |
11 ms |
20692 KB |
Output is correct |
139 |
Correct |
11 ms |
20948 KB |
Output is correct |
140 |
Correct |
11 ms |
20820 KB |
Output is correct |
141 |
Correct |
11 ms |
20820 KB |
Output is correct |
142 |
Correct |
11 ms |
20820 KB |
Output is correct |
143 |
Correct |
11 ms |
20752 KB |
Output is correct |
144 |
Correct |
11 ms |
20692 KB |
Output is correct |
145 |
Correct |
11 ms |
20692 KB |
Output is correct |
146 |
Correct |
11 ms |
20692 KB |
Output is correct |
147 |
Correct |
11 ms |
20696 KB |
Output is correct |
148 |
Correct |
10 ms |
20692 KB |
Output is correct |
149 |
Correct |
11 ms |
20692 KB |
Output is correct |
150 |
Correct |
11 ms |
20776 KB |
Output is correct |
151 |
Correct |
11 ms |
20684 KB |
Output is correct |
152 |
Correct |
12 ms |
20740 KB |
Output is correct |
153 |
Correct |
10 ms |
20692 KB |
Output is correct |
154 |
Correct |
10 ms |
20692 KB |
Output is correct |
155 |
Correct |
121 ms |
31776 KB |
Output is correct |
156 |
Correct |
124 ms |
32960 KB |
Output is correct |
157 |
Correct |
136 ms |
32572 KB |
Output is correct |
158 |
Correct |
111 ms |
32056 KB |
Output is correct |
159 |
Correct |
103 ms |
31152 KB |
Output is correct |
160 |
Correct |
89 ms |
30796 KB |
Output is correct |
161 |
Correct |
94 ms |
30672 KB |
Output is correct |
162 |
Correct |
87 ms |
30408 KB |
Output is correct |
163 |
Correct |
103 ms |
30412 KB |
Output is correct |
164 |
Correct |
85 ms |
30348 KB |
Output is correct |
165 |
Correct |
85 ms |
30284 KB |
Output is correct |
166 |
Correct |
79 ms |
30356 KB |
Output is correct |
167 |
Correct |
77 ms |
30508 KB |
Output is correct |
168 |
Correct |
77 ms |
33608 KB |
Output is correct |
169 |
Correct |
141 ms |
38968 KB |
Output is correct |
170 |
Correct |
135 ms |
36684 KB |
Output is correct |
171 |
Correct |
128 ms |
37436 KB |
Output is correct |
172 |
Correct |
130 ms |
35644 KB |
Output is correct |
173 |
Correct |
113 ms |
32048 KB |
Output is correct |
174 |
Correct |
107 ms |
31964 KB |
Output is correct |
175 |
Correct |
113 ms |
31908 KB |
Output is correct |
176 |
Correct |
95 ms |
31308 KB |
Output is correct |
177 |
Correct |
88 ms |
30924 KB |
Output is correct |
178 |
Correct |
111 ms |
32876 KB |
Output is correct |
179 |
Correct |
111 ms |
32944 KB |
Output is correct |
180 |
Correct |
102 ms |
32328 KB |
Output is correct |
181 |
Correct |
110 ms |
32428 KB |
Output is correct |
182 |
Correct |
11 ms |
20692 KB |
Output is correct |
183 |
Correct |
11 ms |
20692 KB |
Output is correct |
184 |
Correct |
11 ms |
20692 KB |
Output is correct |
185 |
Correct |
11 ms |
20820 KB |
Output is correct |
186 |
Correct |
10 ms |
20820 KB |
Output is correct |
187 |
Correct |
11 ms |
20692 KB |
Output is correct |
188 |
Correct |
12 ms |
20692 KB |
Output is correct |
189 |
Correct |
11 ms |
20692 KB |
Output is correct |
190 |
Correct |
11 ms |
20764 KB |
Output is correct |
191 |
Correct |
12 ms |
20692 KB |
Output is correct |
192 |
Correct |
10 ms |
20628 KB |
Output is correct |
193 |
Correct |
11 ms |
20692 KB |
Output is correct |
194 |
Correct |
11 ms |
20784 KB |
Output is correct |
195 |
Correct |
11 ms |
20692 KB |
Output is correct |
196 |
Correct |
10 ms |
20792 KB |
Output is correct |
197 |
Correct |
11 ms |
20692 KB |
Output is correct |
198 |
Correct |
10 ms |
20792 KB |
Output is correct |
199 |
Correct |
13 ms |
20840 KB |
Output is correct |
200 |
Correct |
11 ms |
20740 KB |
Output is correct |
201 |
Correct |
11 ms |
20812 KB |
Output is correct |
202 |
Correct |
12 ms |
20692 KB |
Output is correct |
203 |
Correct |
12 ms |
20692 KB |
Output is correct |
204 |
Correct |
11 ms |
20784 KB |
Output is correct |
205 |
Correct |
11 ms |
20668 KB |
Output is correct |
206 |
Correct |
10 ms |
20768 KB |
Output is correct |
207 |
Correct |
10 ms |
20680 KB |
Output is correct |
208 |
Correct |
11 ms |
20808 KB |
Output is correct |
209 |
Correct |
13 ms |
21868 KB |
Output is correct |
210 |
Correct |
55 ms |
28384 KB |
Output is correct |
211 |
Correct |
116 ms |
33844 KB |
Output is correct |
212 |
Correct |
114 ms |
37960 KB |
Output is correct |
213 |
Correct |
125 ms |
40716 KB |
Output is correct |
214 |
Correct |
60 ms |
30804 KB |
Output is correct |
215 |
Correct |
79 ms |
30600 KB |
Output is correct |
216 |
Correct |
125 ms |
32696 KB |
Output is correct |
217 |
Correct |
109 ms |
31776 KB |
Output is correct |
218 |
Correct |
101 ms |
30524 KB |
Output is correct |
219 |
Correct |
86 ms |
30232 KB |
Output is correct |
220 |
Correct |
89 ms |
30284 KB |
Output is correct |
221 |
Correct |
76 ms |
30284 KB |
Output is correct |
222 |
Correct |
80 ms |
32124 KB |
Output is correct |
223 |
Correct |
113 ms |
35184 KB |
Output is correct |
224 |
Correct |
115 ms |
33992 KB |
Output is correct |
225 |
Correct |
109 ms |
31660 KB |
Output is correct |
226 |
Correct |
102 ms |
31676 KB |
Output is correct |
227 |
Correct |
102 ms |
31640 KB |
Output is correct |
228 |
Correct |
91 ms |
31036 KB |
Output is correct |
229 |
Correct |
85 ms |
30740 KB |
Output is correct |
230 |
Correct |
116 ms |
31860 KB |
Output is correct |
231 |
Correct |
107 ms |
31944 KB |
Output is correct |