#include <algorithm>
#include <iostream>
#include <map>
#include <set>
#include <stack>
#include <vector>
using namespace std;
const int MAXN = 100010;
vector<int> edge[MAXN];
map<int, int> bcce[MAXN];
map<int, long long> bcm[MAXN];
int bcc_cnt = 0;
int pre_cnt = 0;
int pre[MAXN];
int low[MAXN];
int mypar[MAXN];
int myorigin[MAXN];
int is_sep[MAXN];
long long sum_perm_cnt = 0;
long long node_cnt[MAXN];
long long cached_node_sum[MAXN];
set<int> bcc_node[MAXN];
stack<pair<int, int> > st;
long long ans = 0;
long long xcnt = 0;
inline const long long nP3(long long n) {
return n * (n - 1) * (n - 2);
}
inline const long long nP2(long long n) {
return n * (n - 1);
}
void dfs(int origin, int u, int par) {
int child = 0, flag = 0;
xcnt++;
mypar[u] = par;
myorigin[u] = origin;
node_cnt[u] = 1;
low[u] = pre[u] = ++pre_cnt;
for(auto &v: edge[u]) {
if(v == par) continue;
if(!pre[v]) {
child++;
st.push({u, v});
dfs(origin, v, u);
node_cnt[u] += node_cnt[v];
cached_node_sum[u] += node_cnt[v];
low[u] = min(low[u], low[v]);
if(pre[u] <= low[v]) {
bcc_cnt++;
flag = 1;
while(st.size() && (st.top().first != u || st.top().second != v)) {
int x = st.top().first;
int y = st.top().second;
bcc_node[bcc_cnt].insert(x);
bcc_node[bcc_cnt].insert(y);
bcce[x][y] = bcc_cnt;
bcce[y][x] = bcc_cnt;
if(mypar[y] == x) {
bcm[x][bcc_cnt] += node_cnt[y];
}
st.pop();
}
int x = st.top().first;
int y = st.top().second;
bcc_node[bcc_cnt].insert(x);
bcc_node[bcc_cnt].insert(y);
bcce[x][y] = bcc_cnt;
bcce[y][x] = bcc_cnt;
if(mypar[y] == x) {
bcm[x][bcc_cnt] += node_cnt[y];
}
st.pop();
}
}
else if(pre[u] > pre[v]) {
st.push({u, v});
low[u] = min(low[u], pre[v]);
}
}
if(child >= 2 && par == 0) is_sep[u] = 1;
else if(flag && par != 0) is_sep[u] = 1;
}
int main() {
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
int n, m; cin >> n >> m;
for(int i = 0; i < m; i++) {
int x, y; cin >> x >> y;
edge[x].push_back(y);
edge[y].push_back(x);
}
for (int i = 1; i <= n; i++) {
if (pre[i]) {
continue;
}
xcnt = 0;
dfs(i, i, 0);
ans += nP3(xcnt);
}
for (int i = 1; i <= bcc_cnt; i++) {
for(auto &u: bcc_node[i]) {
long long node_sum = 0;
if (!bcc_node[i].count(mypar[u])) {
node_sum += node_cnt[myorigin[u]] - node_cnt[u];
}
node_sum += cached_node_sum[u];
if (bcm[u].count(i)) {
node_sum -= bcm[u][i];
}
ans -= nP2(node_sum + 1) * (bcc_node[i].size() - 1);
}
}
cout << ans << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
16724 KB |
Output is correct |
2 |
Correct |
8 ms |
16676 KB |
Output is correct |
3 |
Correct |
8 ms |
16724 KB |
Output is correct |
4 |
Correct |
8 ms |
16724 KB |
Output is correct |
5 |
Correct |
8 ms |
16724 KB |
Output is correct |
6 |
Correct |
9 ms |
16724 KB |
Output is correct |
7 |
Correct |
9 ms |
16724 KB |
Output is correct |
8 |
Correct |
11 ms |
16796 KB |
Output is correct |
9 |
Correct |
9 ms |
16696 KB |
Output is correct |
10 |
Correct |
11 ms |
16724 KB |
Output is correct |
11 |
Correct |
10 ms |
16720 KB |
Output is correct |
12 |
Correct |
8 ms |
16724 KB |
Output is correct |
13 |
Correct |
8 ms |
16724 KB |
Output is correct |
14 |
Correct |
9 ms |
16724 KB |
Output is correct |
15 |
Correct |
9 ms |
16760 KB |
Output is correct |
16 |
Correct |
9 ms |
16724 KB |
Output is correct |
17 |
Correct |
9 ms |
16752 KB |
Output is correct |
18 |
Correct |
8 ms |
16724 KB |
Output is correct |
19 |
Correct |
9 ms |
16724 KB |
Output is correct |
20 |
Correct |
9 ms |
16724 KB |
Output is correct |
21 |
Correct |
8 ms |
16664 KB |
Output is correct |
22 |
Correct |
8 ms |
16724 KB |
Output is correct |
23 |
Correct |
9 ms |
16724 KB |
Output is correct |
24 |
Correct |
8 ms |
16724 KB |
Output is correct |
25 |
Correct |
11 ms |
16724 KB |
Output is correct |
26 |
Correct |
9 ms |
16724 KB |
Output is correct |
27 |
Correct |
8 ms |
16724 KB |
Output is correct |
28 |
Correct |
10 ms |
16724 KB |
Output is correct |
29 |
Correct |
9 ms |
16724 KB |
Output is correct |
30 |
Correct |
9 ms |
16724 KB |
Output is correct |
31 |
Correct |
8 ms |
16724 KB |
Output is correct |
32 |
Correct |
9 ms |
16724 KB |
Output is correct |
33 |
Correct |
9 ms |
16724 KB |
Output is correct |
34 |
Correct |
9 ms |
16724 KB |
Output is correct |
35 |
Correct |
9 ms |
16724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
16724 KB |
Output is correct |
2 |
Correct |
8 ms |
16676 KB |
Output is correct |
3 |
Correct |
8 ms |
16724 KB |
Output is correct |
4 |
Correct |
8 ms |
16724 KB |
Output is correct |
5 |
Correct |
8 ms |
16724 KB |
Output is correct |
6 |
Correct |
9 ms |
16724 KB |
Output is correct |
7 |
Correct |
9 ms |
16724 KB |
Output is correct |
8 |
Correct |
11 ms |
16796 KB |
Output is correct |
9 |
Correct |
9 ms |
16696 KB |
Output is correct |
10 |
Correct |
11 ms |
16724 KB |
Output is correct |
11 |
Correct |
10 ms |
16720 KB |
Output is correct |
12 |
Correct |
8 ms |
16724 KB |
Output is correct |
13 |
Correct |
8 ms |
16724 KB |
Output is correct |
14 |
Correct |
9 ms |
16724 KB |
Output is correct |
15 |
Correct |
9 ms |
16760 KB |
Output is correct |
16 |
Correct |
9 ms |
16724 KB |
Output is correct |
17 |
Correct |
9 ms |
16752 KB |
Output is correct |
18 |
Correct |
8 ms |
16724 KB |
Output is correct |
19 |
Correct |
9 ms |
16724 KB |
Output is correct |
20 |
Correct |
9 ms |
16724 KB |
Output is correct |
21 |
Correct |
8 ms |
16664 KB |
Output is correct |
22 |
Correct |
8 ms |
16724 KB |
Output is correct |
23 |
Correct |
9 ms |
16724 KB |
Output is correct |
24 |
Correct |
8 ms |
16724 KB |
Output is correct |
25 |
Correct |
11 ms |
16724 KB |
Output is correct |
26 |
Correct |
9 ms |
16724 KB |
Output is correct |
27 |
Correct |
8 ms |
16724 KB |
Output is correct |
28 |
Correct |
10 ms |
16724 KB |
Output is correct |
29 |
Correct |
9 ms |
16724 KB |
Output is correct |
30 |
Correct |
9 ms |
16724 KB |
Output is correct |
31 |
Correct |
8 ms |
16724 KB |
Output is correct |
32 |
Correct |
9 ms |
16724 KB |
Output is correct |
33 |
Correct |
9 ms |
16724 KB |
Output is correct |
34 |
Correct |
9 ms |
16724 KB |
Output is correct |
35 |
Correct |
9 ms |
16724 KB |
Output is correct |
36 |
Correct |
9 ms |
16784 KB |
Output is correct |
37 |
Correct |
9 ms |
16796 KB |
Output is correct |
38 |
Correct |
8 ms |
16772 KB |
Output is correct |
39 |
Correct |
9 ms |
16724 KB |
Output is correct |
40 |
Correct |
11 ms |
16768 KB |
Output is correct |
41 |
Correct |
9 ms |
16724 KB |
Output is correct |
42 |
Correct |
9 ms |
16708 KB |
Output is correct |
43 |
Correct |
9 ms |
16724 KB |
Output is correct |
44 |
Correct |
9 ms |
16700 KB |
Output is correct |
45 |
Correct |
10 ms |
16724 KB |
Output is correct |
46 |
Correct |
10 ms |
16724 KB |
Output is correct |
47 |
Correct |
9 ms |
16720 KB |
Output is correct |
48 |
Correct |
8 ms |
16796 KB |
Output is correct |
49 |
Correct |
10 ms |
16716 KB |
Output is correct |
50 |
Correct |
9 ms |
16708 KB |
Output is correct |
51 |
Correct |
9 ms |
16724 KB |
Output is correct |
52 |
Correct |
12 ms |
16788 KB |
Output is correct |
53 |
Correct |
9 ms |
16724 KB |
Output is correct |
54 |
Correct |
8 ms |
16724 KB |
Output is correct |
55 |
Correct |
8 ms |
16784 KB |
Output is correct |
56 |
Correct |
11 ms |
16724 KB |
Output is correct |
57 |
Correct |
9 ms |
16724 KB |
Output is correct |
58 |
Correct |
9 ms |
16744 KB |
Output is correct |
59 |
Correct |
9 ms |
16780 KB |
Output is correct |
60 |
Correct |
10 ms |
16724 KB |
Output is correct |
61 |
Correct |
8 ms |
16800 KB |
Output is correct |
62 |
Correct |
8 ms |
16724 KB |
Output is correct |
63 |
Correct |
8 ms |
16808 KB |
Output is correct |
64 |
Correct |
9 ms |
16776 KB |
Output is correct |
65 |
Correct |
10 ms |
16724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
259 ms |
60624 KB |
Output is correct |
2 |
Correct |
274 ms |
60624 KB |
Output is correct |
3 |
Correct |
201 ms |
54700 KB |
Output is correct |
4 |
Correct |
236 ms |
57868 KB |
Output is correct |
5 |
Correct |
188 ms |
51088 KB |
Output is correct |
6 |
Correct |
184 ms |
52204 KB |
Output is correct |
7 |
Correct |
183 ms |
50032 KB |
Output is correct |
8 |
Correct |
187 ms |
51404 KB |
Output is correct |
9 |
Correct |
187 ms |
48336 KB |
Output is correct |
10 |
Correct |
193 ms |
49312 KB |
Output is correct |
11 |
Correct |
134 ms |
41864 KB |
Output is correct |
12 |
Correct |
126 ms |
41488 KB |
Output is correct |
13 |
Correct |
124 ms |
39900 KB |
Output is correct |
14 |
Correct |
121 ms |
39684 KB |
Output is correct |
15 |
Correct |
81 ms |
35488 KB |
Output is correct |
16 |
Correct |
101 ms |
35372 KB |
Output is correct |
17 |
Correct |
13 ms |
19620 KB |
Output is correct |
18 |
Correct |
10 ms |
19540 KB |
Output is correct |
19 |
Correct |
11 ms |
19540 KB |
Output is correct |
20 |
Correct |
13 ms |
19540 KB |
Output is correct |
21 |
Correct |
11 ms |
19412 KB |
Output is correct |
22 |
Correct |
12 ms |
19412 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
17108 KB |
Output is correct |
2 |
Correct |
9 ms |
17108 KB |
Output is correct |
3 |
Correct |
9 ms |
17108 KB |
Output is correct |
4 |
Correct |
11 ms |
17208 KB |
Output is correct |
5 |
Correct |
10 ms |
17108 KB |
Output is correct |
6 |
Correct |
10 ms |
17108 KB |
Output is correct |
7 |
Correct |
10 ms |
17084 KB |
Output is correct |
8 |
Correct |
11 ms |
17108 KB |
Output is correct |
9 |
Correct |
10 ms |
17108 KB |
Output is correct |
10 |
Correct |
9 ms |
16996 KB |
Output is correct |
11 |
Correct |
10 ms |
17108 KB |
Output is correct |
12 |
Correct |
10 ms |
17080 KB |
Output is correct |
13 |
Correct |
10 ms |
17108 KB |
Output is correct |
14 |
Correct |
10 ms |
17080 KB |
Output is correct |
15 |
Correct |
10 ms |
16980 KB |
Output is correct |
16 |
Correct |
9 ms |
16964 KB |
Output is correct |
17 |
Correct |
12 ms |
17112 KB |
Output is correct |
18 |
Correct |
9 ms |
17108 KB |
Output is correct |
19 |
Correct |
10 ms |
17108 KB |
Output is correct |
20 |
Correct |
10 ms |
17108 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
154 ms |
48520 KB |
Output is correct |
2 |
Correct |
177 ms |
48512 KB |
Output is correct |
3 |
Correct |
202 ms |
48468 KB |
Output is correct |
4 |
Correct |
156 ms |
48500 KB |
Output is correct |
5 |
Correct |
148 ms |
48584 KB |
Output is correct |
6 |
Correct |
155 ms |
57788 KB |
Output is correct |
7 |
Correct |
180 ms |
54784 KB |
Output is correct |
8 |
Correct |
185 ms |
53068 KB |
Output is correct |
9 |
Correct |
184 ms |
51500 KB |
Output is correct |
10 |
Correct |
170 ms |
48460 KB |
Output is correct |
11 |
Correct |
189 ms |
48520 KB |
Output is correct |
12 |
Correct |
179 ms |
48460 KB |
Output is correct |
13 |
Correct |
151 ms |
48440 KB |
Output is correct |
14 |
Correct |
139 ms |
45904 KB |
Output is correct |
15 |
Correct |
152 ms |
43292 KB |
Output is correct |
16 |
Correct |
86 ms |
35080 KB |
Output is correct |
17 |
Correct |
232 ms |
47624 KB |
Output is correct |
18 |
Correct |
211 ms |
47708 KB |
Output is correct |
19 |
Correct |
191 ms |
47676 KB |
Output is correct |
20 |
Correct |
187 ms |
47632 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
17108 KB |
Output is correct |
2 |
Correct |
11 ms |
17108 KB |
Output is correct |
3 |
Correct |
10 ms |
17108 KB |
Output is correct |
4 |
Correct |
10 ms |
17108 KB |
Output is correct |
5 |
Correct |
10 ms |
16980 KB |
Output is correct |
6 |
Correct |
10 ms |
17080 KB |
Output is correct |
7 |
Correct |
10 ms |
16980 KB |
Output is correct |
8 |
Correct |
9 ms |
16972 KB |
Output is correct |
9 |
Correct |
9 ms |
17000 KB |
Output is correct |
10 |
Correct |
11 ms |
16996 KB |
Output is correct |
11 |
Correct |
10 ms |
16992 KB |
Output is correct |
12 |
Correct |
10 ms |
17192 KB |
Output is correct |
13 |
Correct |
10 ms |
17108 KB |
Output is correct |
14 |
Correct |
10 ms |
17108 KB |
Output is correct |
15 |
Correct |
10 ms |
17172 KB |
Output is correct |
16 |
Correct |
10 ms |
17108 KB |
Output is correct |
17 |
Correct |
10 ms |
17048 KB |
Output is correct |
18 |
Correct |
9 ms |
17108 KB |
Output is correct |
19 |
Correct |
11 ms |
16980 KB |
Output is correct |
20 |
Correct |
9 ms |
17040 KB |
Output is correct |
21 |
Correct |
10 ms |
17084 KB |
Output is correct |
22 |
Correct |
9 ms |
17004 KB |
Output is correct |
23 |
Correct |
10 ms |
17108 KB |
Output is correct |
24 |
Correct |
9 ms |
17108 KB |
Output is correct |
25 |
Correct |
9 ms |
16776 KB |
Output is correct |
26 |
Correct |
9 ms |
16852 KB |
Output is correct |
27 |
Correct |
11 ms |
16724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
176 ms |
48464 KB |
Output is correct |
2 |
Correct |
159 ms |
48512 KB |
Output is correct |
3 |
Correct |
173 ms |
49256 KB |
Output is correct |
4 |
Correct |
186 ms |
48540 KB |
Output is correct |
5 |
Correct |
169 ms |
46796 KB |
Output is correct |
6 |
Correct |
183 ms |
45916 KB |
Output is correct |
7 |
Correct |
165 ms |
45516 KB |
Output is correct |
8 |
Correct |
156 ms |
44848 KB |
Output is correct |
9 |
Correct |
206 ms |
44664 KB |
Output is correct |
10 |
Correct |
170 ms |
44508 KB |
Output is correct |
11 |
Correct |
166 ms |
44236 KB |
Output is correct |
12 |
Correct |
164 ms |
44344 KB |
Output is correct |
13 |
Correct |
159 ms |
44364 KB |
Output is correct |
14 |
Correct |
178 ms |
48052 KB |
Output is correct |
15 |
Correct |
180 ms |
56304 KB |
Output is correct |
16 |
Correct |
186 ms |
53864 KB |
Output is correct |
17 |
Correct |
197 ms |
55540 KB |
Output is correct |
18 |
Correct |
190 ms |
53452 KB |
Output is correct |
19 |
Correct |
204 ms |
48532 KB |
Output is correct |
20 |
Correct |
191 ms |
48492 KB |
Output is correct |
21 |
Correct |
167 ms |
48428 KB |
Output is correct |
22 |
Correct |
161 ms |
45928 KB |
Output is correct |
23 |
Correct |
136 ms |
43364 KB |
Output is correct |
24 |
Correct |
209 ms |
49436 KB |
Output is correct |
25 |
Correct |
231 ms |
50824 KB |
Output is correct |
26 |
Correct |
205 ms |
50620 KB |
Output is correct |
27 |
Correct |
234 ms |
50692 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
16724 KB |
Output is correct |
2 |
Correct |
8 ms |
16676 KB |
Output is correct |
3 |
Correct |
8 ms |
16724 KB |
Output is correct |
4 |
Correct |
8 ms |
16724 KB |
Output is correct |
5 |
Correct |
8 ms |
16724 KB |
Output is correct |
6 |
Correct |
9 ms |
16724 KB |
Output is correct |
7 |
Correct |
9 ms |
16724 KB |
Output is correct |
8 |
Correct |
11 ms |
16796 KB |
Output is correct |
9 |
Correct |
9 ms |
16696 KB |
Output is correct |
10 |
Correct |
11 ms |
16724 KB |
Output is correct |
11 |
Correct |
10 ms |
16720 KB |
Output is correct |
12 |
Correct |
8 ms |
16724 KB |
Output is correct |
13 |
Correct |
8 ms |
16724 KB |
Output is correct |
14 |
Correct |
9 ms |
16724 KB |
Output is correct |
15 |
Correct |
9 ms |
16760 KB |
Output is correct |
16 |
Correct |
9 ms |
16724 KB |
Output is correct |
17 |
Correct |
9 ms |
16752 KB |
Output is correct |
18 |
Correct |
8 ms |
16724 KB |
Output is correct |
19 |
Correct |
9 ms |
16724 KB |
Output is correct |
20 |
Correct |
9 ms |
16724 KB |
Output is correct |
21 |
Correct |
8 ms |
16664 KB |
Output is correct |
22 |
Correct |
8 ms |
16724 KB |
Output is correct |
23 |
Correct |
9 ms |
16724 KB |
Output is correct |
24 |
Correct |
8 ms |
16724 KB |
Output is correct |
25 |
Correct |
11 ms |
16724 KB |
Output is correct |
26 |
Correct |
9 ms |
16724 KB |
Output is correct |
27 |
Correct |
8 ms |
16724 KB |
Output is correct |
28 |
Correct |
10 ms |
16724 KB |
Output is correct |
29 |
Correct |
9 ms |
16724 KB |
Output is correct |
30 |
Correct |
9 ms |
16724 KB |
Output is correct |
31 |
Correct |
8 ms |
16724 KB |
Output is correct |
32 |
Correct |
9 ms |
16724 KB |
Output is correct |
33 |
Correct |
9 ms |
16724 KB |
Output is correct |
34 |
Correct |
9 ms |
16724 KB |
Output is correct |
35 |
Correct |
9 ms |
16724 KB |
Output is correct |
36 |
Correct |
9 ms |
16784 KB |
Output is correct |
37 |
Correct |
9 ms |
16796 KB |
Output is correct |
38 |
Correct |
8 ms |
16772 KB |
Output is correct |
39 |
Correct |
9 ms |
16724 KB |
Output is correct |
40 |
Correct |
11 ms |
16768 KB |
Output is correct |
41 |
Correct |
9 ms |
16724 KB |
Output is correct |
42 |
Correct |
9 ms |
16708 KB |
Output is correct |
43 |
Correct |
9 ms |
16724 KB |
Output is correct |
44 |
Correct |
9 ms |
16700 KB |
Output is correct |
45 |
Correct |
10 ms |
16724 KB |
Output is correct |
46 |
Correct |
10 ms |
16724 KB |
Output is correct |
47 |
Correct |
9 ms |
16720 KB |
Output is correct |
48 |
Correct |
8 ms |
16796 KB |
Output is correct |
49 |
Correct |
10 ms |
16716 KB |
Output is correct |
50 |
Correct |
9 ms |
16708 KB |
Output is correct |
51 |
Correct |
9 ms |
16724 KB |
Output is correct |
52 |
Correct |
12 ms |
16788 KB |
Output is correct |
53 |
Correct |
9 ms |
16724 KB |
Output is correct |
54 |
Correct |
8 ms |
16724 KB |
Output is correct |
55 |
Correct |
8 ms |
16784 KB |
Output is correct |
56 |
Correct |
11 ms |
16724 KB |
Output is correct |
57 |
Correct |
9 ms |
16724 KB |
Output is correct |
58 |
Correct |
9 ms |
16744 KB |
Output is correct |
59 |
Correct |
9 ms |
16780 KB |
Output is correct |
60 |
Correct |
10 ms |
16724 KB |
Output is correct |
61 |
Correct |
8 ms |
16800 KB |
Output is correct |
62 |
Correct |
8 ms |
16724 KB |
Output is correct |
63 |
Correct |
8 ms |
16808 KB |
Output is correct |
64 |
Correct |
9 ms |
16776 KB |
Output is correct |
65 |
Correct |
10 ms |
16724 KB |
Output is correct |
66 |
Correct |
9 ms |
16724 KB |
Output is correct |
67 |
Correct |
10 ms |
16852 KB |
Output is correct |
68 |
Correct |
10 ms |
16992 KB |
Output is correct |
69 |
Correct |
10 ms |
17180 KB |
Output is correct |
70 |
Correct |
11 ms |
17152 KB |
Output is correct |
71 |
Correct |
9 ms |
16904 KB |
Output is correct |
72 |
Correct |
9 ms |
16980 KB |
Output is correct |
73 |
Correct |
11 ms |
17036 KB |
Output is correct |
74 |
Correct |
9 ms |
16980 KB |
Output is correct |
75 |
Correct |
9 ms |
16980 KB |
Output is correct |
76 |
Correct |
9 ms |
16748 KB |
Output is correct |
77 |
Correct |
9 ms |
17108 KB |
Output is correct |
78 |
Correct |
9 ms |
17108 KB |
Output is correct |
79 |
Correct |
9 ms |
16980 KB |
Output is correct |
80 |
Correct |
10 ms |
16980 KB |
Output is correct |
81 |
Correct |
10 ms |
16980 KB |
Output is correct |
82 |
Correct |
10 ms |
17108 KB |
Output is correct |
83 |
Correct |
11 ms |
17108 KB |
Output is correct |
84 |
Correct |
11 ms |
17164 KB |
Output is correct |
85 |
Correct |
10 ms |
17108 KB |
Output is correct |
86 |
Correct |
9 ms |
17120 KB |
Output is correct |
87 |
Correct |
10 ms |
17016 KB |
Output is correct |
88 |
Correct |
10 ms |
17112 KB |
Output is correct |
89 |
Correct |
11 ms |
16980 KB |
Output is correct |
90 |
Correct |
12 ms |
16980 KB |
Output is correct |
91 |
Correct |
10 ms |
17108 KB |
Output is correct |
92 |
Correct |
13 ms |
17044 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
16724 KB |
Output is correct |
2 |
Correct |
8 ms |
16676 KB |
Output is correct |
3 |
Correct |
8 ms |
16724 KB |
Output is correct |
4 |
Correct |
8 ms |
16724 KB |
Output is correct |
5 |
Correct |
8 ms |
16724 KB |
Output is correct |
6 |
Correct |
9 ms |
16724 KB |
Output is correct |
7 |
Correct |
9 ms |
16724 KB |
Output is correct |
8 |
Correct |
11 ms |
16796 KB |
Output is correct |
9 |
Correct |
9 ms |
16696 KB |
Output is correct |
10 |
Correct |
11 ms |
16724 KB |
Output is correct |
11 |
Correct |
10 ms |
16720 KB |
Output is correct |
12 |
Correct |
8 ms |
16724 KB |
Output is correct |
13 |
Correct |
8 ms |
16724 KB |
Output is correct |
14 |
Correct |
9 ms |
16724 KB |
Output is correct |
15 |
Correct |
9 ms |
16760 KB |
Output is correct |
16 |
Correct |
9 ms |
16724 KB |
Output is correct |
17 |
Correct |
9 ms |
16752 KB |
Output is correct |
18 |
Correct |
8 ms |
16724 KB |
Output is correct |
19 |
Correct |
9 ms |
16724 KB |
Output is correct |
20 |
Correct |
9 ms |
16724 KB |
Output is correct |
21 |
Correct |
8 ms |
16664 KB |
Output is correct |
22 |
Correct |
8 ms |
16724 KB |
Output is correct |
23 |
Correct |
9 ms |
16724 KB |
Output is correct |
24 |
Correct |
8 ms |
16724 KB |
Output is correct |
25 |
Correct |
11 ms |
16724 KB |
Output is correct |
26 |
Correct |
9 ms |
16724 KB |
Output is correct |
27 |
Correct |
8 ms |
16724 KB |
Output is correct |
28 |
Correct |
10 ms |
16724 KB |
Output is correct |
29 |
Correct |
9 ms |
16724 KB |
Output is correct |
30 |
Correct |
9 ms |
16724 KB |
Output is correct |
31 |
Correct |
8 ms |
16724 KB |
Output is correct |
32 |
Correct |
9 ms |
16724 KB |
Output is correct |
33 |
Correct |
9 ms |
16724 KB |
Output is correct |
34 |
Correct |
9 ms |
16724 KB |
Output is correct |
35 |
Correct |
9 ms |
16724 KB |
Output is correct |
36 |
Correct |
9 ms |
16784 KB |
Output is correct |
37 |
Correct |
9 ms |
16796 KB |
Output is correct |
38 |
Correct |
8 ms |
16772 KB |
Output is correct |
39 |
Correct |
9 ms |
16724 KB |
Output is correct |
40 |
Correct |
11 ms |
16768 KB |
Output is correct |
41 |
Correct |
9 ms |
16724 KB |
Output is correct |
42 |
Correct |
9 ms |
16708 KB |
Output is correct |
43 |
Correct |
9 ms |
16724 KB |
Output is correct |
44 |
Correct |
9 ms |
16700 KB |
Output is correct |
45 |
Correct |
10 ms |
16724 KB |
Output is correct |
46 |
Correct |
10 ms |
16724 KB |
Output is correct |
47 |
Correct |
9 ms |
16720 KB |
Output is correct |
48 |
Correct |
8 ms |
16796 KB |
Output is correct |
49 |
Correct |
10 ms |
16716 KB |
Output is correct |
50 |
Correct |
9 ms |
16708 KB |
Output is correct |
51 |
Correct |
9 ms |
16724 KB |
Output is correct |
52 |
Correct |
12 ms |
16788 KB |
Output is correct |
53 |
Correct |
9 ms |
16724 KB |
Output is correct |
54 |
Correct |
8 ms |
16724 KB |
Output is correct |
55 |
Correct |
8 ms |
16784 KB |
Output is correct |
56 |
Correct |
11 ms |
16724 KB |
Output is correct |
57 |
Correct |
9 ms |
16724 KB |
Output is correct |
58 |
Correct |
9 ms |
16744 KB |
Output is correct |
59 |
Correct |
9 ms |
16780 KB |
Output is correct |
60 |
Correct |
10 ms |
16724 KB |
Output is correct |
61 |
Correct |
8 ms |
16800 KB |
Output is correct |
62 |
Correct |
8 ms |
16724 KB |
Output is correct |
63 |
Correct |
8 ms |
16808 KB |
Output is correct |
64 |
Correct |
9 ms |
16776 KB |
Output is correct |
65 |
Correct |
10 ms |
16724 KB |
Output is correct |
66 |
Correct |
259 ms |
60624 KB |
Output is correct |
67 |
Correct |
274 ms |
60624 KB |
Output is correct |
68 |
Correct |
201 ms |
54700 KB |
Output is correct |
69 |
Correct |
236 ms |
57868 KB |
Output is correct |
70 |
Correct |
188 ms |
51088 KB |
Output is correct |
71 |
Correct |
184 ms |
52204 KB |
Output is correct |
72 |
Correct |
183 ms |
50032 KB |
Output is correct |
73 |
Correct |
187 ms |
51404 KB |
Output is correct |
74 |
Correct |
187 ms |
48336 KB |
Output is correct |
75 |
Correct |
193 ms |
49312 KB |
Output is correct |
76 |
Correct |
134 ms |
41864 KB |
Output is correct |
77 |
Correct |
126 ms |
41488 KB |
Output is correct |
78 |
Correct |
124 ms |
39900 KB |
Output is correct |
79 |
Correct |
121 ms |
39684 KB |
Output is correct |
80 |
Correct |
81 ms |
35488 KB |
Output is correct |
81 |
Correct |
101 ms |
35372 KB |
Output is correct |
82 |
Correct |
13 ms |
19620 KB |
Output is correct |
83 |
Correct |
10 ms |
19540 KB |
Output is correct |
84 |
Correct |
11 ms |
19540 KB |
Output is correct |
85 |
Correct |
13 ms |
19540 KB |
Output is correct |
86 |
Correct |
11 ms |
19412 KB |
Output is correct |
87 |
Correct |
12 ms |
19412 KB |
Output is correct |
88 |
Correct |
9 ms |
17108 KB |
Output is correct |
89 |
Correct |
9 ms |
17108 KB |
Output is correct |
90 |
Correct |
9 ms |
17108 KB |
Output is correct |
91 |
Correct |
11 ms |
17208 KB |
Output is correct |
92 |
Correct |
10 ms |
17108 KB |
Output is correct |
93 |
Correct |
10 ms |
17108 KB |
Output is correct |
94 |
Correct |
10 ms |
17084 KB |
Output is correct |
95 |
Correct |
11 ms |
17108 KB |
Output is correct |
96 |
Correct |
10 ms |
17108 KB |
Output is correct |
97 |
Correct |
9 ms |
16996 KB |
Output is correct |
98 |
Correct |
10 ms |
17108 KB |
Output is correct |
99 |
Correct |
10 ms |
17080 KB |
Output is correct |
100 |
Correct |
10 ms |
17108 KB |
Output is correct |
101 |
Correct |
10 ms |
17080 KB |
Output is correct |
102 |
Correct |
10 ms |
16980 KB |
Output is correct |
103 |
Correct |
9 ms |
16964 KB |
Output is correct |
104 |
Correct |
12 ms |
17112 KB |
Output is correct |
105 |
Correct |
9 ms |
17108 KB |
Output is correct |
106 |
Correct |
10 ms |
17108 KB |
Output is correct |
107 |
Correct |
10 ms |
17108 KB |
Output is correct |
108 |
Correct |
154 ms |
48520 KB |
Output is correct |
109 |
Correct |
177 ms |
48512 KB |
Output is correct |
110 |
Correct |
202 ms |
48468 KB |
Output is correct |
111 |
Correct |
156 ms |
48500 KB |
Output is correct |
112 |
Correct |
148 ms |
48584 KB |
Output is correct |
113 |
Correct |
155 ms |
57788 KB |
Output is correct |
114 |
Correct |
180 ms |
54784 KB |
Output is correct |
115 |
Correct |
185 ms |
53068 KB |
Output is correct |
116 |
Correct |
184 ms |
51500 KB |
Output is correct |
117 |
Correct |
170 ms |
48460 KB |
Output is correct |
118 |
Correct |
189 ms |
48520 KB |
Output is correct |
119 |
Correct |
179 ms |
48460 KB |
Output is correct |
120 |
Correct |
151 ms |
48440 KB |
Output is correct |
121 |
Correct |
139 ms |
45904 KB |
Output is correct |
122 |
Correct |
152 ms |
43292 KB |
Output is correct |
123 |
Correct |
86 ms |
35080 KB |
Output is correct |
124 |
Correct |
232 ms |
47624 KB |
Output is correct |
125 |
Correct |
211 ms |
47708 KB |
Output is correct |
126 |
Correct |
191 ms |
47676 KB |
Output is correct |
127 |
Correct |
187 ms |
47632 KB |
Output is correct |
128 |
Correct |
10 ms |
17108 KB |
Output is correct |
129 |
Correct |
11 ms |
17108 KB |
Output is correct |
130 |
Correct |
10 ms |
17108 KB |
Output is correct |
131 |
Correct |
10 ms |
17108 KB |
Output is correct |
132 |
Correct |
10 ms |
16980 KB |
Output is correct |
133 |
Correct |
10 ms |
17080 KB |
Output is correct |
134 |
Correct |
10 ms |
16980 KB |
Output is correct |
135 |
Correct |
9 ms |
16972 KB |
Output is correct |
136 |
Correct |
9 ms |
17000 KB |
Output is correct |
137 |
Correct |
11 ms |
16996 KB |
Output is correct |
138 |
Correct |
10 ms |
16992 KB |
Output is correct |
139 |
Correct |
10 ms |
17192 KB |
Output is correct |
140 |
Correct |
10 ms |
17108 KB |
Output is correct |
141 |
Correct |
10 ms |
17108 KB |
Output is correct |
142 |
Correct |
10 ms |
17172 KB |
Output is correct |
143 |
Correct |
10 ms |
17108 KB |
Output is correct |
144 |
Correct |
10 ms |
17048 KB |
Output is correct |
145 |
Correct |
9 ms |
17108 KB |
Output is correct |
146 |
Correct |
11 ms |
16980 KB |
Output is correct |
147 |
Correct |
9 ms |
17040 KB |
Output is correct |
148 |
Correct |
10 ms |
17084 KB |
Output is correct |
149 |
Correct |
9 ms |
17004 KB |
Output is correct |
150 |
Correct |
10 ms |
17108 KB |
Output is correct |
151 |
Correct |
9 ms |
17108 KB |
Output is correct |
152 |
Correct |
9 ms |
16776 KB |
Output is correct |
153 |
Correct |
9 ms |
16852 KB |
Output is correct |
154 |
Correct |
11 ms |
16724 KB |
Output is correct |
155 |
Correct |
176 ms |
48464 KB |
Output is correct |
156 |
Correct |
159 ms |
48512 KB |
Output is correct |
157 |
Correct |
173 ms |
49256 KB |
Output is correct |
158 |
Correct |
186 ms |
48540 KB |
Output is correct |
159 |
Correct |
169 ms |
46796 KB |
Output is correct |
160 |
Correct |
183 ms |
45916 KB |
Output is correct |
161 |
Correct |
165 ms |
45516 KB |
Output is correct |
162 |
Correct |
156 ms |
44848 KB |
Output is correct |
163 |
Correct |
206 ms |
44664 KB |
Output is correct |
164 |
Correct |
170 ms |
44508 KB |
Output is correct |
165 |
Correct |
166 ms |
44236 KB |
Output is correct |
166 |
Correct |
164 ms |
44344 KB |
Output is correct |
167 |
Correct |
159 ms |
44364 KB |
Output is correct |
168 |
Correct |
178 ms |
48052 KB |
Output is correct |
169 |
Correct |
180 ms |
56304 KB |
Output is correct |
170 |
Correct |
186 ms |
53864 KB |
Output is correct |
171 |
Correct |
197 ms |
55540 KB |
Output is correct |
172 |
Correct |
190 ms |
53452 KB |
Output is correct |
173 |
Correct |
204 ms |
48532 KB |
Output is correct |
174 |
Correct |
191 ms |
48492 KB |
Output is correct |
175 |
Correct |
167 ms |
48428 KB |
Output is correct |
176 |
Correct |
161 ms |
45928 KB |
Output is correct |
177 |
Correct |
136 ms |
43364 KB |
Output is correct |
178 |
Correct |
209 ms |
49436 KB |
Output is correct |
179 |
Correct |
231 ms |
50824 KB |
Output is correct |
180 |
Correct |
205 ms |
50620 KB |
Output is correct |
181 |
Correct |
234 ms |
50692 KB |
Output is correct |
182 |
Correct |
9 ms |
16724 KB |
Output is correct |
183 |
Correct |
10 ms |
16852 KB |
Output is correct |
184 |
Correct |
10 ms |
16992 KB |
Output is correct |
185 |
Correct |
10 ms |
17180 KB |
Output is correct |
186 |
Correct |
11 ms |
17152 KB |
Output is correct |
187 |
Correct |
9 ms |
16904 KB |
Output is correct |
188 |
Correct |
9 ms |
16980 KB |
Output is correct |
189 |
Correct |
11 ms |
17036 KB |
Output is correct |
190 |
Correct |
9 ms |
16980 KB |
Output is correct |
191 |
Correct |
9 ms |
16980 KB |
Output is correct |
192 |
Correct |
9 ms |
16748 KB |
Output is correct |
193 |
Correct |
9 ms |
17108 KB |
Output is correct |
194 |
Correct |
9 ms |
17108 KB |
Output is correct |
195 |
Correct |
9 ms |
16980 KB |
Output is correct |
196 |
Correct |
10 ms |
16980 KB |
Output is correct |
197 |
Correct |
10 ms |
16980 KB |
Output is correct |
198 |
Correct |
10 ms |
17108 KB |
Output is correct |
199 |
Correct |
11 ms |
17108 KB |
Output is correct |
200 |
Correct |
11 ms |
17164 KB |
Output is correct |
201 |
Correct |
10 ms |
17108 KB |
Output is correct |
202 |
Correct |
9 ms |
17120 KB |
Output is correct |
203 |
Correct |
10 ms |
17016 KB |
Output is correct |
204 |
Correct |
10 ms |
17112 KB |
Output is correct |
205 |
Correct |
11 ms |
16980 KB |
Output is correct |
206 |
Correct |
12 ms |
16980 KB |
Output is correct |
207 |
Correct |
10 ms |
17108 KB |
Output is correct |
208 |
Correct |
13 ms |
17044 KB |
Output is correct |
209 |
Correct |
10 ms |
19028 KB |
Output is correct |
210 |
Correct |
89 ms |
35384 KB |
Output is correct |
211 |
Correct |
202 ms |
48720 KB |
Output is correct |
212 |
Correct |
334 ms |
58092 KB |
Output is correct |
213 |
Correct |
370 ms |
66064 KB |
Output is correct |
214 |
Correct |
89 ms |
45704 KB |
Output is correct |
215 |
Correct |
100 ms |
46904 KB |
Output is correct |
216 |
Correct |
189 ms |
51996 KB |
Output is correct |
217 |
Correct |
176 ms |
50200 KB |
Output is correct |
218 |
Correct |
193 ms |
46920 KB |
Output is correct |
219 |
Correct |
180 ms |
45964 KB |
Output is correct |
220 |
Correct |
148 ms |
45668 KB |
Output is correct |
221 |
Correct |
167 ms |
45428 KB |
Output is correct |
222 |
Correct |
174 ms |
47468 KB |
Output is correct |
223 |
Correct |
194 ms |
55964 KB |
Output is correct |
224 |
Correct |
224 ms |
54380 KB |
Output is correct |
225 |
Correct |
199 ms |
50324 KB |
Output is correct |
226 |
Correct |
192 ms |
50264 KB |
Output is correct |
227 |
Correct |
189 ms |
50252 KB |
Output is correct |
228 |
Correct |
166 ms |
47472 KB |
Output is correct |
229 |
Correct |
153 ms |
44764 KB |
Output is correct |
230 |
Correct |
219 ms |
51168 KB |
Output is correct |
231 |
Correct |
246 ms |
51148 KB |
Output is correct |