#include<bits/stdc++.h>
using namespace std;
const int nax = 1e5 + 2;
vector<int>tree[nax * 2];
int n, m;
int sub[nax * 2];
long long ans = 0;
void ad(int u, int v) {
tree[u].push_back(v);
tree[v].push_back(u);
}
template<int SZ> struct BCC {
vector<int>adj[SZ];
int N;
int pre_order[SZ], low[SZ], comp[SZ], par[SZ];
int compsz[SZ];
int ti = 0;
vector<pair<int,int>>st;
vector<vector<pair<int,int>>>fin;
void addEdge(int u, int v) {
adj[u].push_back(v);
adj[v].push_back(u);
}
void BCCutil(int u, bool root = 0) {
pre_order[u] = low[u] = ti++;
int child = 0;
for(int i : adj[u]) if(i!=par[u]) {
//cerr<<u<<' '<<i<<'\n';
if(pre_order[i]==-1) {
++child, par[i] = u;
st.emplace_back(u, i);
BCCutil(i);
low[u] = min(low[u], low[i]);
if((root && child>1) || (!root && low[i]>=pre_order[u])) { // cut vertex
//cerr<<u<<'\n';
vector<pair<int,int>>temp;
while(st.back()!=make_pair(u, i)) {
temp.push_back(st.back());
st.pop_back();
}
temp.push_back(st.back()), st.pop_back();
fin.push_back(temp);
}
} else if(pre_order[i] < pre_order[u]) {
low[u] = min(low[u], pre_order[i]);
st.emplace_back(u, i);
}
}
}
void bcc() {
for(int i=1; i<=N; ++i) {
pre_order[i] = par[i] = low[i] = -1;
}
for(int i=1; i<=N; ++i) {
if(pre_order[i]==-1) {
BCCutil(i, 1);
if(!st.empty()) fin.push_back(st);
st.clear();
}
}
int co = 0;
for(auto a : fin) {
set<int>s;
for(auto b : a) {
s.insert(b.first), s.insert(b.second);
}
++co;
compsz[co] = s.size();
for(int i : s) ad(i, co+N);
}
}
};
BCC<nax>a;
int dfs1(int v, int p) {
sub[v] = v<=n ? 1 : 0;
for(int u : tree[v]) if(u!=p) {
sub[v] += dfs1(u, v);
}
return sub[v];
}
void dfs2(int v, int r, int prv) {
if(v<=n) {
for(int u : tree[v]) {
if(u==prv) {
ans -= 1LL * sub[v] * (sub[v] - 1) * (a.compsz[u-a.N]-1);
} else {
ans -= 1LL * (a.compsz[u-a.N]-1) * (sub[r]-sub[u]) * (sub[r]-sub[u]-1);
}
}
}
for(int u : tree[v]) if(u!=prv) {
dfs2(u, r, v);
}
}
void PlayGround() {
cin>>n>>m;
a.N = n;
for(int i=0; i<m; ++i) {
int u, v;
cin>>u>>v;
a.addEdge(u, v);
}
a.bcc();
memset(sub, -1, sizeof sub);
for(int i=1; i<=n; ++i) if(sub[i]==-1) {
dfs1(i, i);
ans += 1LL * sub[i] * (sub[i]-1) * (sub[i]-2);
dfs2(i, i, i);
}
cout<<ans<<'\n';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
PlayGround();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
8148 KB |
Output is correct |
2 |
Correct |
5 ms |
8148 KB |
Output is correct |
3 |
Correct |
4 ms |
8148 KB |
Output is correct |
4 |
Correct |
4 ms |
8152 KB |
Output is correct |
5 |
Correct |
4 ms |
8148 KB |
Output is correct |
6 |
Correct |
6 ms |
8152 KB |
Output is correct |
7 |
Correct |
4 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8148 KB |
Output is correct |
9 |
Correct |
6 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8156 KB |
Output is correct |
11 |
Correct |
5 ms |
8148 KB |
Output is correct |
12 |
Correct |
4 ms |
8148 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8152 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
4 ms |
8160 KB |
Output is correct |
17 |
Correct |
4 ms |
8148 KB |
Output is correct |
18 |
Correct |
4 ms |
8148 KB |
Output is correct |
19 |
Correct |
4 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
4 ms |
8152 KB |
Output is correct |
22 |
Correct |
4 ms |
8152 KB |
Output is correct |
23 |
Correct |
4 ms |
8148 KB |
Output is correct |
24 |
Correct |
4 ms |
8148 KB |
Output is correct |
25 |
Correct |
4 ms |
8152 KB |
Output is correct |
26 |
Correct |
4 ms |
8152 KB |
Output is correct |
27 |
Correct |
4 ms |
8148 KB |
Output is correct |
28 |
Correct |
4 ms |
8148 KB |
Output is correct |
29 |
Correct |
4 ms |
8064 KB |
Output is correct |
30 |
Correct |
4 ms |
8148 KB |
Output is correct |
31 |
Correct |
4 ms |
8148 KB |
Output is correct |
32 |
Correct |
6 ms |
8148 KB |
Output is correct |
33 |
Correct |
4 ms |
8148 KB |
Output is correct |
34 |
Correct |
6 ms |
8152 KB |
Output is correct |
35 |
Correct |
4 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
8148 KB |
Output is correct |
2 |
Correct |
5 ms |
8148 KB |
Output is correct |
3 |
Correct |
4 ms |
8148 KB |
Output is correct |
4 |
Correct |
4 ms |
8152 KB |
Output is correct |
5 |
Correct |
4 ms |
8148 KB |
Output is correct |
6 |
Correct |
6 ms |
8152 KB |
Output is correct |
7 |
Correct |
4 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8148 KB |
Output is correct |
9 |
Correct |
6 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8156 KB |
Output is correct |
11 |
Correct |
5 ms |
8148 KB |
Output is correct |
12 |
Correct |
4 ms |
8148 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8152 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
4 ms |
8160 KB |
Output is correct |
17 |
Correct |
4 ms |
8148 KB |
Output is correct |
18 |
Correct |
4 ms |
8148 KB |
Output is correct |
19 |
Correct |
4 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
4 ms |
8152 KB |
Output is correct |
22 |
Correct |
4 ms |
8152 KB |
Output is correct |
23 |
Correct |
4 ms |
8148 KB |
Output is correct |
24 |
Correct |
4 ms |
8148 KB |
Output is correct |
25 |
Correct |
4 ms |
8152 KB |
Output is correct |
26 |
Correct |
4 ms |
8152 KB |
Output is correct |
27 |
Correct |
4 ms |
8148 KB |
Output is correct |
28 |
Correct |
4 ms |
8148 KB |
Output is correct |
29 |
Correct |
4 ms |
8064 KB |
Output is correct |
30 |
Correct |
4 ms |
8148 KB |
Output is correct |
31 |
Correct |
4 ms |
8148 KB |
Output is correct |
32 |
Correct |
6 ms |
8148 KB |
Output is correct |
33 |
Correct |
4 ms |
8148 KB |
Output is correct |
34 |
Correct |
6 ms |
8152 KB |
Output is correct |
35 |
Correct |
4 ms |
8148 KB |
Output is correct |
36 |
Correct |
6 ms |
8148 KB |
Output is correct |
37 |
Correct |
4 ms |
8148 KB |
Output is correct |
38 |
Correct |
4 ms |
8156 KB |
Output is correct |
39 |
Correct |
4 ms |
8148 KB |
Output is correct |
40 |
Correct |
4 ms |
8148 KB |
Output is correct |
41 |
Correct |
5 ms |
8148 KB |
Output is correct |
42 |
Correct |
4 ms |
8148 KB |
Output is correct |
43 |
Correct |
4 ms |
8148 KB |
Output is correct |
44 |
Correct |
4 ms |
8148 KB |
Output is correct |
45 |
Correct |
5 ms |
8116 KB |
Output is correct |
46 |
Correct |
4 ms |
8168 KB |
Output is correct |
47 |
Correct |
4 ms |
8152 KB |
Output is correct |
48 |
Correct |
4 ms |
8148 KB |
Output is correct |
49 |
Correct |
5 ms |
8156 KB |
Output is correct |
50 |
Correct |
4 ms |
8148 KB |
Output is correct |
51 |
Correct |
4 ms |
8148 KB |
Output is correct |
52 |
Correct |
5 ms |
8148 KB |
Output is correct |
53 |
Correct |
5 ms |
8152 KB |
Output is correct |
54 |
Correct |
5 ms |
8256 KB |
Output is correct |
55 |
Correct |
4 ms |
8148 KB |
Output is correct |
56 |
Correct |
4 ms |
8148 KB |
Output is correct |
57 |
Correct |
5 ms |
8148 KB |
Output is correct |
58 |
Correct |
4 ms |
8148 KB |
Output is correct |
59 |
Correct |
5 ms |
8156 KB |
Output is correct |
60 |
Correct |
4 ms |
8148 KB |
Output is correct |
61 |
Correct |
4 ms |
8148 KB |
Output is correct |
62 |
Correct |
4 ms |
8148 KB |
Output is correct |
63 |
Correct |
4 ms |
8148 KB |
Output is correct |
64 |
Correct |
4 ms |
8148 KB |
Output is correct |
65 |
Correct |
5 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
106 ms |
39144 KB |
Output is correct |
2 |
Correct |
105 ms |
39244 KB |
Output is correct |
3 |
Correct |
109 ms |
30024 KB |
Output is correct |
4 |
Correct |
108 ms |
35752 KB |
Output is correct |
5 |
Correct |
99 ms |
26116 KB |
Output is correct |
6 |
Correct |
116 ms |
28356 KB |
Output is correct |
7 |
Correct |
114 ms |
27004 KB |
Output is correct |
8 |
Correct |
107 ms |
28772 KB |
Output is correct |
9 |
Correct |
103 ms |
24320 KB |
Output is correct |
10 |
Correct |
100 ms |
25084 KB |
Output is correct |
11 |
Correct |
65 ms |
21220 KB |
Output is correct |
12 |
Correct |
100 ms |
20940 KB |
Output is correct |
13 |
Correct |
65 ms |
20656 KB |
Output is correct |
14 |
Correct |
60 ms |
20216 KB |
Output is correct |
15 |
Correct |
58 ms |
18768 KB |
Output is correct |
16 |
Correct |
49 ms |
18444 KB |
Output is correct |
17 |
Correct |
8 ms |
9300 KB |
Output is correct |
18 |
Correct |
8 ms |
9300 KB |
Output is correct |
19 |
Correct |
7 ms |
9300 KB |
Output is correct |
20 |
Correct |
7 ms |
9300 KB |
Output is correct |
21 |
Correct |
6 ms |
9300 KB |
Output is correct |
22 |
Correct |
6 ms |
9300 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8276 KB |
Output is correct |
2 |
Correct |
5 ms |
8276 KB |
Output is correct |
3 |
Correct |
5 ms |
8276 KB |
Output is correct |
4 |
Correct |
6 ms |
8420 KB |
Output is correct |
5 |
Correct |
7 ms |
8404 KB |
Output is correct |
6 |
Correct |
5 ms |
8404 KB |
Output is correct |
7 |
Correct |
7 ms |
8404 KB |
Output is correct |
8 |
Correct |
5 ms |
8276 KB |
Output is correct |
9 |
Correct |
5 ms |
8284 KB |
Output is correct |
10 |
Correct |
5 ms |
8288 KB |
Output is correct |
11 |
Correct |
5 ms |
8348 KB |
Output is correct |
12 |
Correct |
5 ms |
8292 KB |
Output is correct |
13 |
Correct |
5 ms |
8276 KB |
Output is correct |
14 |
Correct |
5 ms |
8284 KB |
Output is correct |
15 |
Correct |
6 ms |
8284 KB |
Output is correct |
16 |
Correct |
4 ms |
8276 KB |
Output is correct |
17 |
Correct |
5 ms |
8276 KB |
Output is correct |
18 |
Correct |
6 ms |
8276 KB |
Output is correct |
19 |
Correct |
7 ms |
8256 KB |
Output is correct |
20 |
Correct |
6 ms |
8280 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
112 ms |
26080 KB |
Output is correct |
2 |
Correct |
130 ms |
26024 KB |
Output is correct |
3 |
Correct |
125 ms |
26028 KB |
Output is correct |
4 |
Correct |
149 ms |
25968 KB |
Output is correct |
5 |
Correct |
110 ms |
26008 KB |
Output is correct |
6 |
Correct |
131 ms |
34840 KB |
Output is correct |
7 |
Correct |
112 ms |
31796 KB |
Output is correct |
8 |
Correct |
113 ms |
30220 KB |
Output is correct |
9 |
Correct |
173 ms |
28776 KB |
Output is correct |
10 |
Correct |
111 ms |
25976 KB |
Output is correct |
11 |
Correct |
109 ms |
25992 KB |
Output is correct |
12 |
Correct |
99 ms |
25960 KB |
Output is correct |
13 |
Correct |
101 ms |
26020 KB |
Output is correct |
14 |
Correct |
88 ms |
24812 KB |
Output is correct |
15 |
Correct |
85 ms |
23544 KB |
Output is correct |
16 |
Correct |
53 ms |
19120 KB |
Output is correct |
17 |
Correct |
83 ms |
26544 KB |
Output is correct |
18 |
Correct |
80 ms |
26580 KB |
Output is correct |
19 |
Correct |
84 ms |
26712 KB |
Output is correct |
20 |
Correct |
87 ms |
26592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
5 ms |
8276 KB |
Output is correct |
2 |
Correct |
5 ms |
8276 KB |
Output is correct |
3 |
Correct |
5 ms |
8292 KB |
Output is correct |
4 |
Correct |
4 ms |
8276 KB |
Output is correct |
5 |
Correct |
5 ms |
8276 KB |
Output is correct |
6 |
Correct |
5 ms |
8276 KB |
Output is correct |
7 |
Correct |
6 ms |
8276 KB |
Output is correct |
8 |
Correct |
4 ms |
8292 KB |
Output is correct |
9 |
Correct |
4 ms |
8276 KB |
Output is correct |
10 |
Correct |
5 ms |
8284 KB |
Output is correct |
11 |
Correct |
5 ms |
8404 KB |
Output is correct |
12 |
Correct |
5 ms |
8404 KB |
Output is correct |
13 |
Correct |
7 ms |
8276 KB |
Output is correct |
14 |
Correct |
5 ms |
8404 KB |
Output is correct |
15 |
Correct |
5 ms |
8276 KB |
Output is correct |
16 |
Correct |
5 ms |
8284 KB |
Output is correct |
17 |
Correct |
5 ms |
8276 KB |
Output is correct |
18 |
Correct |
5 ms |
8276 KB |
Output is correct |
19 |
Correct |
5 ms |
8276 KB |
Output is correct |
20 |
Correct |
5 ms |
8276 KB |
Output is correct |
21 |
Correct |
5 ms |
8288 KB |
Output is correct |
22 |
Correct |
6 ms |
8284 KB |
Output is correct |
23 |
Correct |
6 ms |
8276 KB |
Output is correct |
24 |
Correct |
5 ms |
8284 KB |
Output is correct |
25 |
Correct |
5 ms |
8148 KB |
Output is correct |
26 |
Correct |
4 ms |
8152 KB |
Output is correct |
27 |
Correct |
5 ms |
8148 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
99 ms |
25932 KB |
Output is correct |
2 |
Correct |
135 ms |
25904 KB |
Output is correct |
3 |
Correct |
105 ms |
24588 KB |
Output is correct |
4 |
Correct |
97 ms |
22812 KB |
Output is correct |
5 |
Correct |
90 ms |
20908 KB |
Output is correct |
6 |
Correct |
89 ms |
19972 KB |
Output is correct |
7 |
Correct |
80 ms |
19588 KB |
Output is correct |
8 |
Correct |
81 ms |
19160 KB |
Output is correct |
9 |
Correct |
90 ms |
18952 KB |
Output is correct |
10 |
Correct |
101 ms |
18764 KB |
Output is correct |
11 |
Correct |
72 ms |
18620 KB |
Output is correct |
12 |
Correct |
71 ms |
18768 KB |
Output is correct |
13 |
Correct |
92 ms |
18748 KB |
Output is correct |
14 |
Correct |
91 ms |
23040 KB |
Output is correct |
15 |
Correct |
128 ms |
31264 KB |
Output is correct |
16 |
Correct |
106 ms |
29036 KB |
Output is correct |
17 |
Correct |
121 ms |
29792 KB |
Output is correct |
18 |
Correct |
126 ms |
27744 KB |
Output is correct |
19 |
Correct |
122 ms |
22756 KB |
Output is correct |
20 |
Correct |
108 ms |
22816 KB |
Output is correct |
21 |
Correct |
97 ms |
22840 KB |
Output is correct |
22 |
Correct |
92 ms |
21680 KB |
Output is correct |
23 |
Correct |
108 ms |
20528 KB |
Output is correct |
24 |
Correct |
104 ms |
24932 KB |
Output is correct |
25 |
Correct |
104 ms |
25096 KB |
Output is correct |
26 |
Correct |
93 ms |
23844 KB |
Output is correct |
27 |
Correct |
111 ms |
23888 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
8148 KB |
Output is correct |
2 |
Correct |
5 ms |
8148 KB |
Output is correct |
3 |
Correct |
4 ms |
8148 KB |
Output is correct |
4 |
Correct |
4 ms |
8152 KB |
Output is correct |
5 |
Correct |
4 ms |
8148 KB |
Output is correct |
6 |
Correct |
6 ms |
8152 KB |
Output is correct |
7 |
Correct |
4 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8148 KB |
Output is correct |
9 |
Correct |
6 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8156 KB |
Output is correct |
11 |
Correct |
5 ms |
8148 KB |
Output is correct |
12 |
Correct |
4 ms |
8148 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8152 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
4 ms |
8160 KB |
Output is correct |
17 |
Correct |
4 ms |
8148 KB |
Output is correct |
18 |
Correct |
4 ms |
8148 KB |
Output is correct |
19 |
Correct |
4 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
4 ms |
8152 KB |
Output is correct |
22 |
Correct |
4 ms |
8152 KB |
Output is correct |
23 |
Correct |
4 ms |
8148 KB |
Output is correct |
24 |
Correct |
4 ms |
8148 KB |
Output is correct |
25 |
Correct |
4 ms |
8152 KB |
Output is correct |
26 |
Correct |
4 ms |
8152 KB |
Output is correct |
27 |
Correct |
4 ms |
8148 KB |
Output is correct |
28 |
Correct |
4 ms |
8148 KB |
Output is correct |
29 |
Correct |
4 ms |
8064 KB |
Output is correct |
30 |
Correct |
4 ms |
8148 KB |
Output is correct |
31 |
Correct |
4 ms |
8148 KB |
Output is correct |
32 |
Correct |
6 ms |
8148 KB |
Output is correct |
33 |
Correct |
4 ms |
8148 KB |
Output is correct |
34 |
Correct |
6 ms |
8152 KB |
Output is correct |
35 |
Correct |
4 ms |
8148 KB |
Output is correct |
36 |
Correct |
6 ms |
8148 KB |
Output is correct |
37 |
Correct |
4 ms |
8148 KB |
Output is correct |
38 |
Correct |
4 ms |
8156 KB |
Output is correct |
39 |
Correct |
4 ms |
8148 KB |
Output is correct |
40 |
Correct |
4 ms |
8148 KB |
Output is correct |
41 |
Correct |
5 ms |
8148 KB |
Output is correct |
42 |
Correct |
4 ms |
8148 KB |
Output is correct |
43 |
Correct |
4 ms |
8148 KB |
Output is correct |
44 |
Correct |
4 ms |
8148 KB |
Output is correct |
45 |
Correct |
5 ms |
8116 KB |
Output is correct |
46 |
Correct |
4 ms |
8168 KB |
Output is correct |
47 |
Correct |
4 ms |
8152 KB |
Output is correct |
48 |
Correct |
4 ms |
8148 KB |
Output is correct |
49 |
Correct |
5 ms |
8156 KB |
Output is correct |
50 |
Correct |
4 ms |
8148 KB |
Output is correct |
51 |
Correct |
4 ms |
8148 KB |
Output is correct |
52 |
Correct |
5 ms |
8148 KB |
Output is correct |
53 |
Correct |
5 ms |
8152 KB |
Output is correct |
54 |
Correct |
5 ms |
8256 KB |
Output is correct |
55 |
Correct |
4 ms |
8148 KB |
Output is correct |
56 |
Correct |
4 ms |
8148 KB |
Output is correct |
57 |
Correct |
5 ms |
8148 KB |
Output is correct |
58 |
Correct |
4 ms |
8148 KB |
Output is correct |
59 |
Correct |
5 ms |
8156 KB |
Output is correct |
60 |
Correct |
4 ms |
8148 KB |
Output is correct |
61 |
Correct |
4 ms |
8148 KB |
Output is correct |
62 |
Correct |
4 ms |
8148 KB |
Output is correct |
63 |
Correct |
4 ms |
8148 KB |
Output is correct |
64 |
Correct |
4 ms |
8148 KB |
Output is correct |
65 |
Correct |
5 ms |
8148 KB |
Output is correct |
66 |
Correct |
4 ms |
8152 KB |
Output is correct |
67 |
Correct |
4 ms |
8276 KB |
Output is correct |
68 |
Correct |
5 ms |
8292 KB |
Output is correct |
69 |
Correct |
5 ms |
8404 KB |
Output is correct |
70 |
Correct |
5 ms |
8404 KB |
Output is correct |
71 |
Correct |
4 ms |
8276 KB |
Output is correct |
72 |
Correct |
5 ms |
8276 KB |
Output is correct |
73 |
Correct |
6 ms |
8276 KB |
Output is correct |
74 |
Correct |
5 ms |
8288 KB |
Output is correct |
75 |
Correct |
4 ms |
8276 KB |
Output is correct |
76 |
Correct |
4 ms |
8152 KB |
Output is correct |
77 |
Correct |
5 ms |
8284 KB |
Output is correct |
78 |
Correct |
5 ms |
8296 KB |
Output is correct |
79 |
Correct |
6 ms |
8276 KB |
Output is correct |
80 |
Correct |
6 ms |
8276 KB |
Output is correct |
81 |
Correct |
5 ms |
8276 KB |
Output is correct |
82 |
Correct |
7 ms |
8400 KB |
Output is correct |
83 |
Correct |
6 ms |
8412 KB |
Output is correct |
84 |
Correct |
5 ms |
8276 KB |
Output is correct |
85 |
Correct |
5 ms |
8276 KB |
Output is correct |
86 |
Correct |
5 ms |
8276 KB |
Output is correct |
87 |
Correct |
5 ms |
8288 KB |
Output is correct |
88 |
Correct |
5 ms |
8288 KB |
Output is correct |
89 |
Correct |
5 ms |
8276 KB |
Output is correct |
90 |
Correct |
5 ms |
8256 KB |
Output is correct |
91 |
Correct |
5 ms |
8276 KB |
Output is correct |
92 |
Correct |
5 ms |
8276 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
8148 KB |
Output is correct |
2 |
Correct |
5 ms |
8148 KB |
Output is correct |
3 |
Correct |
4 ms |
8148 KB |
Output is correct |
4 |
Correct |
4 ms |
8152 KB |
Output is correct |
5 |
Correct |
4 ms |
8148 KB |
Output is correct |
6 |
Correct |
6 ms |
8152 KB |
Output is correct |
7 |
Correct |
4 ms |
8148 KB |
Output is correct |
8 |
Correct |
4 ms |
8148 KB |
Output is correct |
9 |
Correct |
6 ms |
8148 KB |
Output is correct |
10 |
Correct |
5 ms |
8156 KB |
Output is correct |
11 |
Correct |
5 ms |
8148 KB |
Output is correct |
12 |
Correct |
4 ms |
8148 KB |
Output is correct |
13 |
Correct |
4 ms |
8148 KB |
Output is correct |
14 |
Correct |
4 ms |
8152 KB |
Output is correct |
15 |
Correct |
4 ms |
8148 KB |
Output is correct |
16 |
Correct |
4 ms |
8160 KB |
Output is correct |
17 |
Correct |
4 ms |
8148 KB |
Output is correct |
18 |
Correct |
4 ms |
8148 KB |
Output is correct |
19 |
Correct |
4 ms |
8148 KB |
Output is correct |
20 |
Correct |
5 ms |
8148 KB |
Output is correct |
21 |
Correct |
4 ms |
8152 KB |
Output is correct |
22 |
Correct |
4 ms |
8152 KB |
Output is correct |
23 |
Correct |
4 ms |
8148 KB |
Output is correct |
24 |
Correct |
4 ms |
8148 KB |
Output is correct |
25 |
Correct |
4 ms |
8152 KB |
Output is correct |
26 |
Correct |
4 ms |
8152 KB |
Output is correct |
27 |
Correct |
4 ms |
8148 KB |
Output is correct |
28 |
Correct |
4 ms |
8148 KB |
Output is correct |
29 |
Correct |
4 ms |
8064 KB |
Output is correct |
30 |
Correct |
4 ms |
8148 KB |
Output is correct |
31 |
Correct |
4 ms |
8148 KB |
Output is correct |
32 |
Correct |
6 ms |
8148 KB |
Output is correct |
33 |
Correct |
4 ms |
8148 KB |
Output is correct |
34 |
Correct |
6 ms |
8152 KB |
Output is correct |
35 |
Correct |
4 ms |
8148 KB |
Output is correct |
36 |
Correct |
6 ms |
8148 KB |
Output is correct |
37 |
Correct |
4 ms |
8148 KB |
Output is correct |
38 |
Correct |
4 ms |
8156 KB |
Output is correct |
39 |
Correct |
4 ms |
8148 KB |
Output is correct |
40 |
Correct |
4 ms |
8148 KB |
Output is correct |
41 |
Correct |
5 ms |
8148 KB |
Output is correct |
42 |
Correct |
4 ms |
8148 KB |
Output is correct |
43 |
Correct |
4 ms |
8148 KB |
Output is correct |
44 |
Correct |
4 ms |
8148 KB |
Output is correct |
45 |
Correct |
5 ms |
8116 KB |
Output is correct |
46 |
Correct |
4 ms |
8168 KB |
Output is correct |
47 |
Correct |
4 ms |
8152 KB |
Output is correct |
48 |
Correct |
4 ms |
8148 KB |
Output is correct |
49 |
Correct |
5 ms |
8156 KB |
Output is correct |
50 |
Correct |
4 ms |
8148 KB |
Output is correct |
51 |
Correct |
4 ms |
8148 KB |
Output is correct |
52 |
Correct |
5 ms |
8148 KB |
Output is correct |
53 |
Correct |
5 ms |
8152 KB |
Output is correct |
54 |
Correct |
5 ms |
8256 KB |
Output is correct |
55 |
Correct |
4 ms |
8148 KB |
Output is correct |
56 |
Correct |
4 ms |
8148 KB |
Output is correct |
57 |
Correct |
5 ms |
8148 KB |
Output is correct |
58 |
Correct |
4 ms |
8148 KB |
Output is correct |
59 |
Correct |
5 ms |
8156 KB |
Output is correct |
60 |
Correct |
4 ms |
8148 KB |
Output is correct |
61 |
Correct |
4 ms |
8148 KB |
Output is correct |
62 |
Correct |
4 ms |
8148 KB |
Output is correct |
63 |
Correct |
4 ms |
8148 KB |
Output is correct |
64 |
Correct |
4 ms |
8148 KB |
Output is correct |
65 |
Correct |
5 ms |
8148 KB |
Output is correct |
66 |
Correct |
106 ms |
39144 KB |
Output is correct |
67 |
Correct |
105 ms |
39244 KB |
Output is correct |
68 |
Correct |
109 ms |
30024 KB |
Output is correct |
69 |
Correct |
108 ms |
35752 KB |
Output is correct |
70 |
Correct |
99 ms |
26116 KB |
Output is correct |
71 |
Correct |
116 ms |
28356 KB |
Output is correct |
72 |
Correct |
114 ms |
27004 KB |
Output is correct |
73 |
Correct |
107 ms |
28772 KB |
Output is correct |
74 |
Correct |
103 ms |
24320 KB |
Output is correct |
75 |
Correct |
100 ms |
25084 KB |
Output is correct |
76 |
Correct |
65 ms |
21220 KB |
Output is correct |
77 |
Correct |
100 ms |
20940 KB |
Output is correct |
78 |
Correct |
65 ms |
20656 KB |
Output is correct |
79 |
Correct |
60 ms |
20216 KB |
Output is correct |
80 |
Correct |
58 ms |
18768 KB |
Output is correct |
81 |
Correct |
49 ms |
18444 KB |
Output is correct |
82 |
Correct |
8 ms |
9300 KB |
Output is correct |
83 |
Correct |
8 ms |
9300 KB |
Output is correct |
84 |
Correct |
7 ms |
9300 KB |
Output is correct |
85 |
Correct |
7 ms |
9300 KB |
Output is correct |
86 |
Correct |
6 ms |
9300 KB |
Output is correct |
87 |
Correct |
6 ms |
9300 KB |
Output is correct |
88 |
Correct |
5 ms |
8276 KB |
Output is correct |
89 |
Correct |
5 ms |
8276 KB |
Output is correct |
90 |
Correct |
5 ms |
8276 KB |
Output is correct |
91 |
Correct |
6 ms |
8420 KB |
Output is correct |
92 |
Correct |
7 ms |
8404 KB |
Output is correct |
93 |
Correct |
5 ms |
8404 KB |
Output is correct |
94 |
Correct |
7 ms |
8404 KB |
Output is correct |
95 |
Correct |
5 ms |
8276 KB |
Output is correct |
96 |
Correct |
5 ms |
8284 KB |
Output is correct |
97 |
Correct |
5 ms |
8288 KB |
Output is correct |
98 |
Correct |
5 ms |
8348 KB |
Output is correct |
99 |
Correct |
5 ms |
8292 KB |
Output is correct |
100 |
Correct |
5 ms |
8276 KB |
Output is correct |
101 |
Correct |
5 ms |
8284 KB |
Output is correct |
102 |
Correct |
6 ms |
8284 KB |
Output is correct |
103 |
Correct |
4 ms |
8276 KB |
Output is correct |
104 |
Correct |
5 ms |
8276 KB |
Output is correct |
105 |
Correct |
6 ms |
8276 KB |
Output is correct |
106 |
Correct |
7 ms |
8256 KB |
Output is correct |
107 |
Correct |
6 ms |
8280 KB |
Output is correct |
108 |
Correct |
112 ms |
26080 KB |
Output is correct |
109 |
Correct |
130 ms |
26024 KB |
Output is correct |
110 |
Correct |
125 ms |
26028 KB |
Output is correct |
111 |
Correct |
149 ms |
25968 KB |
Output is correct |
112 |
Correct |
110 ms |
26008 KB |
Output is correct |
113 |
Correct |
131 ms |
34840 KB |
Output is correct |
114 |
Correct |
112 ms |
31796 KB |
Output is correct |
115 |
Correct |
113 ms |
30220 KB |
Output is correct |
116 |
Correct |
173 ms |
28776 KB |
Output is correct |
117 |
Correct |
111 ms |
25976 KB |
Output is correct |
118 |
Correct |
109 ms |
25992 KB |
Output is correct |
119 |
Correct |
99 ms |
25960 KB |
Output is correct |
120 |
Correct |
101 ms |
26020 KB |
Output is correct |
121 |
Correct |
88 ms |
24812 KB |
Output is correct |
122 |
Correct |
85 ms |
23544 KB |
Output is correct |
123 |
Correct |
53 ms |
19120 KB |
Output is correct |
124 |
Correct |
83 ms |
26544 KB |
Output is correct |
125 |
Correct |
80 ms |
26580 KB |
Output is correct |
126 |
Correct |
84 ms |
26712 KB |
Output is correct |
127 |
Correct |
87 ms |
26592 KB |
Output is correct |
128 |
Correct |
5 ms |
8276 KB |
Output is correct |
129 |
Correct |
5 ms |
8276 KB |
Output is correct |
130 |
Correct |
5 ms |
8292 KB |
Output is correct |
131 |
Correct |
4 ms |
8276 KB |
Output is correct |
132 |
Correct |
5 ms |
8276 KB |
Output is correct |
133 |
Correct |
5 ms |
8276 KB |
Output is correct |
134 |
Correct |
6 ms |
8276 KB |
Output is correct |
135 |
Correct |
4 ms |
8292 KB |
Output is correct |
136 |
Correct |
4 ms |
8276 KB |
Output is correct |
137 |
Correct |
5 ms |
8284 KB |
Output is correct |
138 |
Correct |
5 ms |
8404 KB |
Output is correct |
139 |
Correct |
5 ms |
8404 KB |
Output is correct |
140 |
Correct |
7 ms |
8276 KB |
Output is correct |
141 |
Correct |
5 ms |
8404 KB |
Output is correct |
142 |
Correct |
5 ms |
8276 KB |
Output is correct |
143 |
Correct |
5 ms |
8284 KB |
Output is correct |
144 |
Correct |
5 ms |
8276 KB |
Output is correct |
145 |
Correct |
5 ms |
8276 KB |
Output is correct |
146 |
Correct |
5 ms |
8276 KB |
Output is correct |
147 |
Correct |
5 ms |
8276 KB |
Output is correct |
148 |
Correct |
5 ms |
8288 KB |
Output is correct |
149 |
Correct |
6 ms |
8284 KB |
Output is correct |
150 |
Correct |
6 ms |
8276 KB |
Output is correct |
151 |
Correct |
5 ms |
8284 KB |
Output is correct |
152 |
Correct |
5 ms |
8148 KB |
Output is correct |
153 |
Correct |
4 ms |
8152 KB |
Output is correct |
154 |
Correct |
5 ms |
8148 KB |
Output is correct |
155 |
Correct |
99 ms |
25932 KB |
Output is correct |
156 |
Correct |
135 ms |
25904 KB |
Output is correct |
157 |
Correct |
105 ms |
24588 KB |
Output is correct |
158 |
Correct |
97 ms |
22812 KB |
Output is correct |
159 |
Correct |
90 ms |
20908 KB |
Output is correct |
160 |
Correct |
89 ms |
19972 KB |
Output is correct |
161 |
Correct |
80 ms |
19588 KB |
Output is correct |
162 |
Correct |
81 ms |
19160 KB |
Output is correct |
163 |
Correct |
90 ms |
18952 KB |
Output is correct |
164 |
Correct |
101 ms |
18764 KB |
Output is correct |
165 |
Correct |
72 ms |
18620 KB |
Output is correct |
166 |
Correct |
71 ms |
18768 KB |
Output is correct |
167 |
Correct |
92 ms |
18748 KB |
Output is correct |
168 |
Correct |
91 ms |
23040 KB |
Output is correct |
169 |
Correct |
128 ms |
31264 KB |
Output is correct |
170 |
Correct |
106 ms |
29036 KB |
Output is correct |
171 |
Correct |
121 ms |
29792 KB |
Output is correct |
172 |
Correct |
126 ms |
27744 KB |
Output is correct |
173 |
Correct |
122 ms |
22756 KB |
Output is correct |
174 |
Correct |
108 ms |
22816 KB |
Output is correct |
175 |
Correct |
97 ms |
22840 KB |
Output is correct |
176 |
Correct |
92 ms |
21680 KB |
Output is correct |
177 |
Correct |
108 ms |
20528 KB |
Output is correct |
178 |
Correct |
104 ms |
24932 KB |
Output is correct |
179 |
Correct |
104 ms |
25096 KB |
Output is correct |
180 |
Correct |
93 ms |
23844 KB |
Output is correct |
181 |
Correct |
111 ms |
23888 KB |
Output is correct |
182 |
Correct |
4 ms |
8152 KB |
Output is correct |
183 |
Correct |
4 ms |
8276 KB |
Output is correct |
184 |
Correct |
5 ms |
8292 KB |
Output is correct |
185 |
Correct |
5 ms |
8404 KB |
Output is correct |
186 |
Correct |
5 ms |
8404 KB |
Output is correct |
187 |
Correct |
4 ms |
8276 KB |
Output is correct |
188 |
Correct |
5 ms |
8276 KB |
Output is correct |
189 |
Correct |
6 ms |
8276 KB |
Output is correct |
190 |
Correct |
5 ms |
8288 KB |
Output is correct |
191 |
Correct |
4 ms |
8276 KB |
Output is correct |
192 |
Correct |
4 ms |
8152 KB |
Output is correct |
193 |
Correct |
5 ms |
8284 KB |
Output is correct |
194 |
Correct |
5 ms |
8296 KB |
Output is correct |
195 |
Correct |
6 ms |
8276 KB |
Output is correct |
196 |
Correct |
6 ms |
8276 KB |
Output is correct |
197 |
Correct |
5 ms |
8276 KB |
Output is correct |
198 |
Correct |
7 ms |
8400 KB |
Output is correct |
199 |
Correct |
6 ms |
8412 KB |
Output is correct |
200 |
Correct |
5 ms |
8276 KB |
Output is correct |
201 |
Correct |
5 ms |
8276 KB |
Output is correct |
202 |
Correct |
5 ms |
8276 KB |
Output is correct |
203 |
Correct |
5 ms |
8288 KB |
Output is correct |
204 |
Correct |
5 ms |
8288 KB |
Output is correct |
205 |
Correct |
5 ms |
8276 KB |
Output is correct |
206 |
Correct |
5 ms |
8256 KB |
Output is correct |
207 |
Correct |
5 ms |
8276 KB |
Output is correct |
208 |
Correct |
5 ms |
8276 KB |
Output is correct |
209 |
Correct |
6 ms |
9260 KB |
Output is correct |
210 |
Correct |
57 ms |
18432 KB |
Output is correct |
211 |
Correct |
113 ms |
27004 KB |
Output is correct |
212 |
Correct |
137 ms |
32544 KB |
Output is correct |
213 |
Correct |
159 ms |
36980 KB |
Output is correct |
214 |
Correct |
57 ms |
20796 KB |
Output is correct |
215 |
Correct |
60 ms |
20344 KB |
Output is correct |
216 |
Correct |
123 ms |
23588 KB |
Output is correct |
217 |
Correct |
93 ms |
21504 KB |
Output is correct |
218 |
Correct |
85 ms |
19268 KB |
Output is correct |
219 |
Correct |
78 ms |
18632 KB |
Output is correct |
220 |
Correct |
76 ms |
18564 KB |
Output is correct |
221 |
Correct |
79 ms |
18572 KB |
Output is correct |
222 |
Correct |
80 ms |
20828 KB |
Output is correct |
223 |
Correct |
151 ms |
25812 KB |
Output is correct |
224 |
Correct |
108 ms |
24412 KB |
Output is correct |
225 |
Correct |
98 ms |
20924 KB |
Output is correct |
226 |
Correct |
107 ms |
20968 KB |
Output is correct |
227 |
Correct |
94 ms |
20884 KB |
Output is correct |
228 |
Correct |
86 ms |
20228 KB |
Output is correct |
229 |
Correct |
69 ms |
19732 KB |
Output is correct |
230 |
Correct |
94 ms |
21632 KB |
Output is correct |
231 |
Correct |
86 ms |
21728 KB |
Output is correct |