#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 300000 + 7;
int n;
int m;
vector<int> g[N];
vector<int> g2[N];
int dep[N];
int mindep[N];
vector<vector<int>> all;
vector<pair<int, int>> stk;
int dim;
int inside[N];
void dfs(int a) {
mindep[a] = dep[a];
for (auto &b : g[a]) {
if (dep[b] == -1) {
dep[b] = 1 + dep[a];
stk.push_back({a, b});
dfs(b);
mindep[a] = min(mindep[a], mindep[b]);
if (mindep[b] >= dep[a]) {
vector<int> cur;
while (1) {
assert(!stk.empty());
auto it = stk.back();
cur.push_back(it.first);
cur.push_back(it.second);
stk.pop_back();
if (it == make_pair(a, b)) {
break;
}
}
sort(cur.begin(), cur.end());
cur.resize(unique(cur.begin(), cur.end()) - cur.begin());
all.push_back(cur);
dim++;
for (auto &v : cur) {
inside[dim]++;
g2[v].push_back(dim);
g2[dim].push_back(v);
}
}
} else {
if (dep[b] < dep[a] - 1) {
mindep[a] = min(mindep[a], dep[b]);
}
}
}
}
int sub[N];
int ninit;
int total;
ll sol = 0;
void solve(int a) {
sub[a] = (a <= ninit);
vector<int> kids;
for (auto &b : g[a]) {
if (sub[b] == -1) {
solve(b);
sub[a] += sub[b];
kids.push_back(b);
}
}
g[a] = kids;
}
int rt;
void solve2(int a, int pr = -1) {
for (auto &b : g[a]) {
solve2(b, a);
if (a > ninit) {
sol -= 1LL * (inside[a] - 1) * (sub[b]) * (sub[b] - 1);
}
}
if (a > ninit) {
sol -= 1LL * (inside[a] - 1) * (total - sub[a]) * (total - sub[a] - 1);
}
}
int main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
/// freopen ("input.txt", "r", stdin);
cin >> n >> m;
for (int i = 1; i <= m; i++) {
int a, b;
cin >> a >> b;
g[a].push_back(b);
g[b].push_back(a);
sub[a] = -1;
}
for (int i = 1; i <= n; i++) {
dep[i] = -1;
}
ninit = n;
dim = n;
for (int i = 1; i <= n; i++) {
if (dep[i] == -1) {
dep[i] = 0;
dfs(i);
assert(stk.empty());
}
}
n = dim;
for (int i = 1; i <= n; i++) {
g[i] = g2[i];
sub[i] = -1;
}
for (int i = 1; i <= n; i++) {
if (sub[i] == -1) {
solve(i);
total = sub[i];
sol += 1LL * (total) * (total - 1) * (total - 2);
///cout << "sol = " << sol << "\n";
solve2(i);
//cout << " ----------------------- \n";
}
}
cout << sol << "\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14420 KB |
Output is correct |
2 |
Correct |
8 ms |
14432 KB |
Output is correct |
3 |
Correct |
8 ms |
14424 KB |
Output is correct |
4 |
Correct |
9 ms |
14420 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
10 ms |
14420 KB |
Output is correct |
7 |
Correct |
10 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14408 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14348 KB |
Output is correct |
11 |
Correct |
8 ms |
14420 KB |
Output is correct |
12 |
Correct |
9 ms |
14420 KB |
Output is correct |
13 |
Correct |
8 ms |
14544 KB |
Output is correct |
14 |
Correct |
8 ms |
14432 KB |
Output is correct |
15 |
Correct |
9 ms |
14432 KB |
Output is correct |
16 |
Correct |
8 ms |
14352 KB |
Output is correct |
17 |
Correct |
8 ms |
14420 KB |
Output is correct |
18 |
Correct |
7 ms |
14420 KB |
Output is correct |
19 |
Correct |
8 ms |
14420 KB |
Output is correct |
20 |
Correct |
7 ms |
14340 KB |
Output is correct |
21 |
Correct |
8 ms |
14428 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
8 ms |
14336 KB |
Output is correct |
26 |
Correct |
8 ms |
14428 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14428 KB |
Output is correct |
29 |
Correct |
7 ms |
14420 KB |
Output is correct |
30 |
Correct |
7 ms |
14432 KB |
Output is correct |
31 |
Correct |
8 ms |
14424 KB |
Output is correct |
32 |
Correct |
8 ms |
14424 KB |
Output is correct |
33 |
Correct |
9 ms |
14424 KB |
Output is correct |
34 |
Correct |
9 ms |
14420 KB |
Output is correct |
35 |
Correct |
9 ms |
14420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14420 KB |
Output is correct |
2 |
Correct |
8 ms |
14432 KB |
Output is correct |
3 |
Correct |
8 ms |
14424 KB |
Output is correct |
4 |
Correct |
9 ms |
14420 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
10 ms |
14420 KB |
Output is correct |
7 |
Correct |
10 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14408 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14348 KB |
Output is correct |
11 |
Correct |
8 ms |
14420 KB |
Output is correct |
12 |
Correct |
9 ms |
14420 KB |
Output is correct |
13 |
Correct |
8 ms |
14544 KB |
Output is correct |
14 |
Correct |
8 ms |
14432 KB |
Output is correct |
15 |
Correct |
9 ms |
14432 KB |
Output is correct |
16 |
Correct |
8 ms |
14352 KB |
Output is correct |
17 |
Correct |
8 ms |
14420 KB |
Output is correct |
18 |
Correct |
7 ms |
14420 KB |
Output is correct |
19 |
Correct |
8 ms |
14420 KB |
Output is correct |
20 |
Correct |
7 ms |
14340 KB |
Output is correct |
21 |
Correct |
8 ms |
14428 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
8 ms |
14336 KB |
Output is correct |
26 |
Correct |
8 ms |
14428 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14428 KB |
Output is correct |
29 |
Correct |
7 ms |
14420 KB |
Output is correct |
30 |
Correct |
7 ms |
14432 KB |
Output is correct |
31 |
Correct |
8 ms |
14424 KB |
Output is correct |
32 |
Correct |
8 ms |
14424 KB |
Output is correct |
33 |
Correct |
9 ms |
14424 KB |
Output is correct |
34 |
Correct |
9 ms |
14420 KB |
Output is correct |
35 |
Correct |
9 ms |
14420 KB |
Output is correct |
36 |
Correct |
8 ms |
14428 KB |
Output is correct |
37 |
Correct |
7 ms |
14420 KB |
Output is correct |
38 |
Correct |
8 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14372 KB |
Output is correct |
40 |
Correct |
8 ms |
14424 KB |
Output is correct |
41 |
Correct |
8 ms |
14420 KB |
Output is correct |
42 |
Correct |
8 ms |
14396 KB |
Output is correct |
43 |
Correct |
8 ms |
14424 KB |
Output is correct |
44 |
Correct |
9 ms |
14420 KB |
Output is correct |
45 |
Correct |
7 ms |
14428 KB |
Output is correct |
46 |
Correct |
9 ms |
14420 KB |
Output is correct |
47 |
Correct |
7 ms |
14420 KB |
Output is correct |
48 |
Correct |
8 ms |
14548 KB |
Output is correct |
49 |
Correct |
9 ms |
14416 KB |
Output is correct |
50 |
Correct |
9 ms |
14420 KB |
Output is correct |
51 |
Correct |
10 ms |
14428 KB |
Output is correct |
52 |
Correct |
8 ms |
14420 KB |
Output is correct |
53 |
Correct |
7 ms |
14420 KB |
Output is correct |
54 |
Correct |
8 ms |
14420 KB |
Output is correct |
55 |
Correct |
7 ms |
14420 KB |
Output is correct |
56 |
Correct |
8 ms |
14420 KB |
Output is correct |
57 |
Correct |
7 ms |
14548 KB |
Output is correct |
58 |
Correct |
8 ms |
14420 KB |
Output is correct |
59 |
Correct |
8 ms |
14420 KB |
Output is correct |
60 |
Correct |
9 ms |
14420 KB |
Output is correct |
61 |
Correct |
8 ms |
14420 KB |
Output is correct |
62 |
Correct |
9 ms |
14428 KB |
Output is correct |
63 |
Correct |
8 ms |
14420 KB |
Output is correct |
64 |
Correct |
7 ms |
14420 KB |
Output is correct |
65 |
Correct |
8 ms |
14420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
84 ms |
41564 KB |
Output is correct |
2 |
Correct |
97 ms |
41580 KB |
Output is correct |
3 |
Correct |
129 ms |
38584 KB |
Output is correct |
4 |
Correct |
121 ms |
40180 KB |
Output is correct |
5 |
Correct |
109 ms |
33888 KB |
Output is correct |
6 |
Correct |
131 ms |
37408 KB |
Output is correct |
7 |
Correct |
154 ms |
35172 KB |
Output is correct |
8 |
Correct |
129 ms |
35864 KB |
Output is correct |
9 |
Correct |
121 ms |
33144 KB |
Output is correct |
10 |
Correct |
110 ms |
33268 KB |
Output is correct |
11 |
Correct |
110 ms |
29072 KB |
Output is correct |
12 |
Correct |
113 ms |
28696 KB |
Output is correct |
13 |
Correct |
91 ms |
28596 KB |
Output is correct |
14 |
Correct |
82 ms |
28028 KB |
Output is correct |
15 |
Correct |
71 ms |
26472 KB |
Output is correct |
16 |
Correct |
68 ms |
26056 KB |
Output is correct |
17 |
Correct |
12 ms |
15572 KB |
Output is correct |
18 |
Correct |
10 ms |
15648 KB |
Output is correct |
19 |
Correct |
10 ms |
15584 KB |
Output is correct |
20 |
Correct |
11 ms |
15696 KB |
Output is correct |
21 |
Correct |
10 ms |
15532 KB |
Output is correct |
22 |
Correct |
10 ms |
15580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
14548 KB |
Output is correct |
2 |
Correct |
8 ms |
14548 KB |
Output is correct |
3 |
Correct |
8 ms |
14548 KB |
Output is correct |
4 |
Correct |
9 ms |
14804 KB |
Output is correct |
5 |
Correct |
9 ms |
14660 KB |
Output is correct |
6 |
Correct |
8 ms |
14692 KB |
Output is correct |
7 |
Correct |
8 ms |
14692 KB |
Output is correct |
8 |
Correct |
8 ms |
14676 KB |
Output is correct |
9 |
Correct |
9 ms |
14692 KB |
Output is correct |
10 |
Correct |
9 ms |
14612 KB |
Output is correct |
11 |
Correct |
11 ms |
14548 KB |
Output is correct |
12 |
Correct |
8 ms |
14548 KB |
Output is correct |
13 |
Correct |
8 ms |
14560 KB |
Output is correct |
14 |
Correct |
8 ms |
14556 KB |
Output is correct |
15 |
Correct |
9 ms |
14564 KB |
Output is correct |
16 |
Correct |
9 ms |
14512 KB |
Output is correct |
17 |
Correct |
8 ms |
14564 KB |
Output is correct |
18 |
Correct |
9 ms |
14620 KB |
Output is correct |
19 |
Correct |
9 ms |
14548 KB |
Output is correct |
20 |
Correct |
10 ms |
14548 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
144 ms |
35728 KB |
Output is correct |
2 |
Correct |
153 ms |
35792 KB |
Output is correct |
3 |
Correct |
165 ms |
35792 KB |
Output is correct |
4 |
Correct |
169 ms |
35832 KB |
Output is correct |
5 |
Correct |
136 ms |
35828 KB |
Output is correct |
6 |
Correct |
165 ms |
46288 KB |
Output is correct |
7 |
Correct |
165 ms |
42892 KB |
Output is correct |
8 |
Correct |
178 ms |
41072 KB |
Output is correct |
9 |
Correct |
191 ms |
39436 KB |
Output is correct |
10 |
Correct |
139 ms |
35796 KB |
Output is correct |
11 |
Correct |
145 ms |
35728 KB |
Output is correct |
12 |
Correct |
155 ms |
35820 KB |
Output is correct |
13 |
Correct |
217 ms |
35836 KB |
Output is correct |
14 |
Correct |
123 ms |
34220 KB |
Output is correct |
15 |
Correct |
120 ms |
32680 KB |
Output is correct |
16 |
Correct |
76 ms |
27108 KB |
Output is correct |
17 |
Correct |
110 ms |
37220 KB |
Output is correct |
18 |
Correct |
103 ms |
37032 KB |
Output is correct |
19 |
Correct |
119 ms |
37060 KB |
Output is correct |
20 |
Correct |
120 ms |
36876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
14548 KB |
Output is correct |
2 |
Correct |
11 ms |
14548 KB |
Output is correct |
3 |
Correct |
9 ms |
14548 KB |
Output is correct |
4 |
Correct |
9 ms |
14676 KB |
Output is correct |
5 |
Correct |
9 ms |
14560 KB |
Output is correct |
6 |
Correct |
9 ms |
14548 KB |
Output is correct |
7 |
Correct |
10 ms |
14548 KB |
Output is correct |
8 |
Correct |
9 ms |
14560 KB |
Output is correct |
9 |
Correct |
8 ms |
14548 KB |
Output is correct |
10 |
Correct |
8 ms |
14452 KB |
Output is correct |
11 |
Correct |
8 ms |
14548 KB |
Output is correct |
12 |
Correct |
11 ms |
14780 KB |
Output is correct |
13 |
Correct |
10 ms |
14676 KB |
Output is correct |
14 |
Correct |
9 ms |
14676 KB |
Output is correct |
15 |
Correct |
8 ms |
14676 KB |
Output is correct |
16 |
Correct |
9 ms |
14548 KB |
Output is correct |
17 |
Correct |
8 ms |
14548 KB |
Output is correct |
18 |
Correct |
12 ms |
14540 KB |
Output is correct |
19 |
Correct |
9 ms |
14548 KB |
Output is correct |
20 |
Correct |
9 ms |
14496 KB |
Output is correct |
21 |
Correct |
11 ms |
14568 KB |
Output is correct |
22 |
Correct |
9 ms |
14552 KB |
Output is correct |
23 |
Correct |
9 ms |
14620 KB |
Output is correct |
24 |
Correct |
8 ms |
14548 KB |
Output is correct |
25 |
Correct |
8 ms |
14432 KB |
Output is correct |
26 |
Correct |
8 ms |
14420 KB |
Output is correct |
27 |
Correct |
9 ms |
14356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
143 ms |
35800 KB |
Output is correct |
2 |
Correct |
142 ms |
35740 KB |
Output is correct |
3 |
Correct |
141 ms |
33832 KB |
Output is correct |
4 |
Correct |
140 ms |
31040 KB |
Output is correct |
5 |
Correct |
140 ms |
28060 KB |
Output is correct |
6 |
Correct |
106 ms |
26936 KB |
Output is correct |
7 |
Correct |
101 ms |
26376 KB |
Output is correct |
8 |
Correct |
103 ms |
25736 KB |
Output is correct |
9 |
Correct |
101 ms |
25596 KB |
Output is correct |
10 |
Correct |
95 ms |
25288 KB |
Output is correct |
11 |
Correct |
92 ms |
24948 KB |
Output is correct |
12 |
Correct |
84 ms |
25016 KB |
Output is correct |
13 |
Correct |
83 ms |
25036 KB |
Output is correct |
14 |
Correct |
94 ms |
28980 KB |
Output is correct |
15 |
Correct |
153 ms |
41428 KB |
Output is correct |
16 |
Correct |
193 ms |
38920 KB |
Output is correct |
17 |
Correct |
157 ms |
38696 KB |
Output is correct |
18 |
Correct |
156 ms |
36480 KB |
Output is correct |
19 |
Correct |
161 ms |
30940 KB |
Output is correct |
20 |
Correct |
171 ms |
31036 KB |
Output is correct |
21 |
Correct |
145 ms |
30944 KB |
Output is correct |
22 |
Correct |
131 ms |
29528 KB |
Output is correct |
23 |
Correct |
115 ms |
27952 KB |
Output is correct |
24 |
Correct |
129 ms |
34416 KB |
Output is correct |
25 |
Correct |
136 ms |
34592 KB |
Output is correct |
26 |
Correct |
162 ms |
32828 KB |
Output is correct |
27 |
Correct |
138 ms |
32564 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14420 KB |
Output is correct |
2 |
Correct |
8 ms |
14432 KB |
Output is correct |
3 |
Correct |
8 ms |
14424 KB |
Output is correct |
4 |
Correct |
9 ms |
14420 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
10 ms |
14420 KB |
Output is correct |
7 |
Correct |
10 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14408 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14348 KB |
Output is correct |
11 |
Correct |
8 ms |
14420 KB |
Output is correct |
12 |
Correct |
9 ms |
14420 KB |
Output is correct |
13 |
Correct |
8 ms |
14544 KB |
Output is correct |
14 |
Correct |
8 ms |
14432 KB |
Output is correct |
15 |
Correct |
9 ms |
14432 KB |
Output is correct |
16 |
Correct |
8 ms |
14352 KB |
Output is correct |
17 |
Correct |
8 ms |
14420 KB |
Output is correct |
18 |
Correct |
7 ms |
14420 KB |
Output is correct |
19 |
Correct |
8 ms |
14420 KB |
Output is correct |
20 |
Correct |
7 ms |
14340 KB |
Output is correct |
21 |
Correct |
8 ms |
14428 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
8 ms |
14336 KB |
Output is correct |
26 |
Correct |
8 ms |
14428 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14428 KB |
Output is correct |
29 |
Correct |
7 ms |
14420 KB |
Output is correct |
30 |
Correct |
7 ms |
14432 KB |
Output is correct |
31 |
Correct |
8 ms |
14424 KB |
Output is correct |
32 |
Correct |
8 ms |
14424 KB |
Output is correct |
33 |
Correct |
9 ms |
14424 KB |
Output is correct |
34 |
Correct |
9 ms |
14420 KB |
Output is correct |
35 |
Correct |
9 ms |
14420 KB |
Output is correct |
36 |
Correct |
8 ms |
14428 KB |
Output is correct |
37 |
Correct |
7 ms |
14420 KB |
Output is correct |
38 |
Correct |
8 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14372 KB |
Output is correct |
40 |
Correct |
8 ms |
14424 KB |
Output is correct |
41 |
Correct |
8 ms |
14420 KB |
Output is correct |
42 |
Correct |
8 ms |
14396 KB |
Output is correct |
43 |
Correct |
8 ms |
14424 KB |
Output is correct |
44 |
Correct |
9 ms |
14420 KB |
Output is correct |
45 |
Correct |
7 ms |
14428 KB |
Output is correct |
46 |
Correct |
9 ms |
14420 KB |
Output is correct |
47 |
Correct |
7 ms |
14420 KB |
Output is correct |
48 |
Correct |
8 ms |
14548 KB |
Output is correct |
49 |
Correct |
9 ms |
14416 KB |
Output is correct |
50 |
Correct |
9 ms |
14420 KB |
Output is correct |
51 |
Correct |
10 ms |
14428 KB |
Output is correct |
52 |
Correct |
8 ms |
14420 KB |
Output is correct |
53 |
Correct |
7 ms |
14420 KB |
Output is correct |
54 |
Correct |
8 ms |
14420 KB |
Output is correct |
55 |
Correct |
7 ms |
14420 KB |
Output is correct |
56 |
Correct |
8 ms |
14420 KB |
Output is correct |
57 |
Correct |
7 ms |
14548 KB |
Output is correct |
58 |
Correct |
8 ms |
14420 KB |
Output is correct |
59 |
Correct |
8 ms |
14420 KB |
Output is correct |
60 |
Correct |
9 ms |
14420 KB |
Output is correct |
61 |
Correct |
8 ms |
14420 KB |
Output is correct |
62 |
Correct |
9 ms |
14428 KB |
Output is correct |
63 |
Correct |
8 ms |
14420 KB |
Output is correct |
64 |
Correct |
7 ms |
14420 KB |
Output is correct |
65 |
Correct |
8 ms |
14420 KB |
Output is correct |
66 |
Correct |
8 ms |
14420 KB |
Output is correct |
67 |
Correct |
8 ms |
14560 KB |
Output is correct |
68 |
Correct |
9 ms |
14556 KB |
Output is correct |
69 |
Correct |
8 ms |
14548 KB |
Output is correct |
70 |
Correct |
10 ms |
14556 KB |
Output is correct |
71 |
Correct |
9 ms |
14560 KB |
Output is correct |
72 |
Correct |
8 ms |
14548 KB |
Output is correct |
73 |
Correct |
9 ms |
14564 KB |
Output is correct |
74 |
Correct |
9 ms |
14572 KB |
Output is correct |
75 |
Correct |
9 ms |
14548 KB |
Output is correct |
76 |
Correct |
8 ms |
14448 KB |
Output is correct |
77 |
Correct |
10 ms |
14592 KB |
Output is correct |
78 |
Correct |
9 ms |
14548 KB |
Output is correct |
79 |
Correct |
8 ms |
14548 KB |
Output is correct |
80 |
Correct |
8 ms |
14548 KB |
Output is correct |
81 |
Correct |
8 ms |
14564 KB |
Output is correct |
82 |
Correct |
8 ms |
14548 KB |
Output is correct |
83 |
Correct |
9 ms |
14676 KB |
Output is correct |
84 |
Correct |
9 ms |
14548 KB |
Output is correct |
85 |
Correct |
8 ms |
14620 KB |
Output is correct |
86 |
Correct |
8 ms |
14496 KB |
Output is correct |
87 |
Correct |
8 ms |
14564 KB |
Output is correct |
88 |
Correct |
8 ms |
14548 KB |
Output is correct |
89 |
Correct |
8 ms |
14548 KB |
Output is correct |
90 |
Correct |
8 ms |
14560 KB |
Output is correct |
91 |
Correct |
8 ms |
14548 KB |
Output is correct |
92 |
Correct |
8 ms |
14476 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
14420 KB |
Output is correct |
2 |
Correct |
8 ms |
14432 KB |
Output is correct |
3 |
Correct |
8 ms |
14424 KB |
Output is correct |
4 |
Correct |
9 ms |
14420 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
10 ms |
14420 KB |
Output is correct |
7 |
Correct |
10 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14408 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14348 KB |
Output is correct |
11 |
Correct |
8 ms |
14420 KB |
Output is correct |
12 |
Correct |
9 ms |
14420 KB |
Output is correct |
13 |
Correct |
8 ms |
14544 KB |
Output is correct |
14 |
Correct |
8 ms |
14432 KB |
Output is correct |
15 |
Correct |
9 ms |
14432 KB |
Output is correct |
16 |
Correct |
8 ms |
14352 KB |
Output is correct |
17 |
Correct |
8 ms |
14420 KB |
Output is correct |
18 |
Correct |
7 ms |
14420 KB |
Output is correct |
19 |
Correct |
8 ms |
14420 KB |
Output is correct |
20 |
Correct |
7 ms |
14340 KB |
Output is correct |
21 |
Correct |
8 ms |
14428 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
8 ms |
14336 KB |
Output is correct |
26 |
Correct |
8 ms |
14428 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14428 KB |
Output is correct |
29 |
Correct |
7 ms |
14420 KB |
Output is correct |
30 |
Correct |
7 ms |
14432 KB |
Output is correct |
31 |
Correct |
8 ms |
14424 KB |
Output is correct |
32 |
Correct |
8 ms |
14424 KB |
Output is correct |
33 |
Correct |
9 ms |
14424 KB |
Output is correct |
34 |
Correct |
9 ms |
14420 KB |
Output is correct |
35 |
Correct |
9 ms |
14420 KB |
Output is correct |
36 |
Correct |
8 ms |
14428 KB |
Output is correct |
37 |
Correct |
7 ms |
14420 KB |
Output is correct |
38 |
Correct |
8 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14372 KB |
Output is correct |
40 |
Correct |
8 ms |
14424 KB |
Output is correct |
41 |
Correct |
8 ms |
14420 KB |
Output is correct |
42 |
Correct |
8 ms |
14396 KB |
Output is correct |
43 |
Correct |
8 ms |
14424 KB |
Output is correct |
44 |
Correct |
9 ms |
14420 KB |
Output is correct |
45 |
Correct |
7 ms |
14428 KB |
Output is correct |
46 |
Correct |
9 ms |
14420 KB |
Output is correct |
47 |
Correct |
7 ms |
14420 KB |
Output is correct |
48 |
Correct |
8 ms |
14548 KB |
Output is correct |
49 |
Correct |
9 ms |
14416 KB |
Output is correct |
50 |
Correct |
9 ms |
14420 KB |
Output is correct |
51 |
Correct |
10 ms |
14428 KB |
Output is correct |
52 |
Correct |
8 ms |
14420 KB |
Output is correct |
53 |
Correct |
7 ms |
14420 KB |
Output is correct |
54 |
Correct |
8 ms |
14420 KB |
Output is correct |
55 |
Correct |
7 ms |
14420 KB |
Output is correct |
56 |
Correct |
8 ms |
14420 KB |
Output is correct |
57 |
Correct |
7 ms |
14548 KB |
Output is correct |
58 |
Correct |
8 ms |
14420 KB |
Output is correct |
59 |
Correct |
8 ms |
14420 KB |
Output is correct |
60 |
Correct |
9 ms |
14420 KB |
Output is correct |
61 |
Correct |
8 ms |
14420 KB |
Output is correct |
62 |
Correct |
9 ms |
14428 KB |
Output is correct |
63 |
Correct |
8 ms |
14420 KB |
Output is correct |
64 |
Correct |
7 ms |
14420 KB |
Output is correct |
65 |
Correct |
8 ms |
14420 KB |
Output is correct |
66 |
Correct |
84 ms |
41564 KB |
Output is correct |
67 |
Correct |
97 ms |
41580 KB |
Output is correct |
68 |
Correct |
129 ms |
38584 KB |
Output is correct |
69 |
Correct |
121 ms |
40180 KB |
Output is correct |
70 |
Correct |
109 ms |
33888 KB |
Output is correct |
71 |
Correct |
131 ms |
37408 KB |
Output is correct |
72 |
Correct |
154 ms |
35172 KB |
Output is correct |
73 |
Correct |
129 ms |
35864 KB |
Output is correct |
74 |
Correct |
121 ms |
33144 KB |
Output is correct |
75 |
Correct |
110 ms |
33268 KB |
Output is correct |
76 |
Correct |
110 ms |
29072 KB |
Output is correct |
77 |
Correct |
113 ms |
28696 KB |
Output is correct |
78 |
Correct |
91 ms |
28596 KB |
Output is correct |
79 |
Correct |
82 ms |
28028 KB |
Output is correct |
80 |
Correct |
71 ms |
26472 KB |
Output is correct |
81 |
Correct |
68 ms |
26056 KB |
Output is correct |
82 |
Correct |
12 ms |
15572 KB |
Output is correct |
83 |
Correct |
10 ms |
15648 KB |
Output is correct |
84 |
Correct |
10 ms |
15584 KB |
Output is correct |
85 |
Correct |
11 ms |
15696 KB |
Output is correct |
86 |
Correct |
10 ms |
15532 KB |
Output is correct |
87 |
Correct |
10 ms |
15580 KB |
Output is correct |
88 |
Correct |
8 ms |
14548 KB |
Output is correct |
89 |
Correct |
8 ms |
14548 KB |
Output is correct |
90 |
Correct |
8 ms |
14548 KB |
Output is correct |
91 |
Correct |
9 ms |
14804 KB |
Output is correct |
92 |
Correct |
9 ms |
14660 KB |
Output is correct |
93 |
Correct |
8 ms |
14692 KB |
Output is correct |
94 |
Correct |
8 ms |
14692 KB |
Output is correct |
95 |
Correct |
8 ms |
14676 KB |
Output is correct |
96 |
Correct |
9 ms |
14692 KB |
Output is correct |
97 |
Correct |
9 ms |
14612 KB |
Output is correct |
98 |
Correct |
11 ms |
14548 KB |
Output is correct |
99 |
Correct |
8 ms |
14548 KB |
Output is correct |
100 |
Correct |
8 ms |
14560 KB |
Output is correct |
101 |
Correct |
8 ms |
14556 KB |
Output is correct |
102 |
Correct |
9 ms |
14564 KB |
Output is correct |
103 |
Correct |
9 ms |
14512 KB |
Output is correct |
104 |
Correct |
8 ms |
14564 KB |
Output is correct |
105 |
Correct |
9 ms |
14620 KB |
Output is correct |
106 |
Correct |
9 ms |
14548 KB |
Output is correct |
107 |
Correct |
10 ms |
14548 KB |
Output is correct |
108 |
Correct |
144 ms |
35728 KB |
Output is correct |
109 |
Correct |
153 ms |
35792 KB |
Output is correct |
110 |
Correct |
165 ms |
35792 KB |
Output is correct |
111 |
Correct |
169 ms |
35832 KB |
Output is correct |
112 |
Correct |
136 ms |
35828 KB |
Output is correct |
113 |
Correct |
165 ms |
46288 KB |
Output is correct |
114 |
Correct |
165 ms |
42892 KB |
Output is correct |
115 |
Correct |
178 ms |
41072 KB |
Output is correct |
116 |
Correct |
191 ms |
39436 KB |
Output is correct |
117 |
Correct |
139 ms |
35796 KB |
Output is correct |
118 |
Correct |
145 ms |
35728 KB |
Output is correct |
119 |
Correct |
155 ms |
35820 KB |
Output is correct |
120 |
Correct |
217 ms |
35836 KB |
Output is correct |
121 |
Correct |
123 ms |
34220 KB |
Output is correct |
122 |
Correct |
120 ms |
32680 KB |
Output is correct |
123 |
Correct |
76 ms |
27108 KB |
Output is correct |
124 |
Correct |
110 ms |
37220 KB |
Output is correct |
125 |
Correct |
103 ms |
37032 KB |
Output is correct |
126 |
Correct |
119 ms |
37060 KB |
Output is correct |
127 |
Correct |
120 ms |
36876 KB |
Output is correct |
128 |
Correct |
11 ms |
14548 KB |
Output is correct |
129 |
Correct |
11 ms |
14548 KB |
Output is correct |
130 |
Correct |
9 ms |
14548 KB |
Output is correct |
131 |
Correct |
9 ms |
14676 KB |
Output is correct |
132 |
Correct |
9 ms |
14560 KB |
Output is correct |
133 |
Correct |
9 ms |
14548 KB |
Output is correct |
134 |
Correct |
10 ms |
14548 KB |
Output is correct |
135 |
Correct |
9 ms |
14560 KB |
Output is correct |
136 |
Correct |
8 ms |
14548 KB |
Output is correct |
137 |
Correct |
8 ms |
14452 KB |
Output is correct |
138 |
Correct |
8 ms |
14548 KB |
Output is correct |
139 |
Correct |
11 ms |
14780 KB |
Output is correct |
140 |
Correct |
10 ms |
14676 KB |
Output is correct |
141 |
Correct |
9 ms |
14676 KB |
Output is correct |
142 |
Correct |
8 ms |
14676 KB |
Output is correct |
143 |
Correct |
9 ms |
14548 KB |
Output is correct |
144 |
Correct |
8 ms |
14548 KB |
Output is correct |
145 |
Correct |
12 ms |
14540 KB |
Output is correct |
146 |
Correct |
9 ms |
14548 KB |
Output is correct |
147 |
Correct |
9 ms |
14496 KB |
Output is correct |
148 |
Correct |
11 ms |
14568 KB |
Output is correct |
149 |
Correct |
9 ms |
14552 KB |
Output is correct |
150 |
Correct |
9 ms |
14620 KB |
Output is correct |
151 |
Correct |
8 ms |
14548 KB |
Output is correct |
152 |
Correct |
8 ms |
14432 KB |
Output is correct |
153 |
Correct |
8 ms |
14420 KB |
Output is correct |
154 |
Correct |
9 ms |
14356 KB |
Output is correct |
155 |
Correct |
143 ms |
35800 KB |
Output is correct |
156 |
Correct |
142 ms |
35740 KB |
Output is correct |
157 |
Correct |
141 ms |
33832 KB |
Output is correct |
158 |
Correct |
140 ms |
31040 KB |
Output is correct |
159 |
Correct |
140 ms |
28060 KB |
Output is correct |
160 |
Correct |
106 ms |
26936 KB |
Output is correct |
161 |
Correct |
101 ms |
26376 KB |
Output is correct |
162 |
Correct |
103 ms |
25736 KB |
Output is correct |
163 |
Correct |
101 ms |
25596 KB |
Output is correct |
164 |
Correct |
95 ms |
25288 KB |
Output is correct |
165 |
Correct |
92 ms |
24948 KB |
Output is correct |
166 |
Correct |
84 ms |
25016 KB |
Output is correct |
167 |
Correct |
83 ms |
25036 KB |
Output is correct |
168 |
Correct |
94 ms |
28980 KB |
Output is correct |
169 |
Correct |
153 ms |
41428 KB |
Output is correct |
170 |
Correct |
193 ms |
38920 KB |
Output is correct |
171 |
Correct |
157 ms |
38696 KB |
Output is correct |
172 |
Correct |
156 ms |
36480 KB |
Output is correct |
173 |
Correct |
161 ms |
30940 KB |
Output is correct |
174 |
Correct |
171 ms |
31036 KB |
Output is correct |
175 |
Correct |
145 ms |
30944 KB |
Output is correct |
176 |
Correct |
131 ms |
29528 KB |
Output is correct |
177 |
Correct |
115 ms |
27952 KB |
Output is correct |
178 |
Correct |
129 ms |
34416 KB |
Output is correct |
179 |
Correct |
136 ms |
34592 KB |
Output is correct |
180 |
Correct |
162 ms |
32828 KB |
Output is correct |
181 |
Correct |
138 ms |
32564 KB |
Output is correct |
182 |
Correct |
8 ms |
14420 KB |
Output is correct |
183 |
Correct |
8 ms |
14560 KB |
Output is correct |
184 |
Correct |
9 ms |
14556 KB |
Output is correct |
185 |
Correct |
8 ms |
14548 KB |
Output is correct |
186 |
Correct |
10 ms |
14556 KB |
Output is correct |
187 |
Correct |
9 ms |
14560 KB |
Output is correct |
188 |
Correct |
8 ms |
14548 KB |
Output is correct |
189 |
Correct |
9 ms |
14564 KB |
Output is correct |
190 |
Correct |
9 ms |
14572 KB |
Output is correct |
191 |
Correct |
9 ms |
14548 KB |
Output is correct |
192 |
Correct |
8 ms |
14448 KB |
Output is correct |
193 |
Correct |
10 ms |
14592 KB |
Output is correct |
194 |
Correct |
9 ms |
14548 KB |
Output is correct |
195 |
Correct |
8 ms |
14548 KB |
Output is correct |
196 |
Correct |
8 ms |
14548 KB |
Output is correct |
197 |
Correct |
8 ms |
14564 KB |
Output is correct |
198 |
Correct |
8 ms |
14548 KB |
Output is correct |
199 |
Correct |
9 ms |
14676 KB |
Output is correct |
200 |
Correct |
9 ms |
14548 KB |
Output is correct |
201 |
Correct |
8 ms |
14620 KB |
Output is correct |
202 |
Correct |
8 ms |
14496 KB |
Output is correct |
203 |
Correct |
8 ms |
14564 KB |
Output is correct |
204 |
Correct |
8 ms |
14548 KB |
Output is correct |
205 |
Correct |
8 ms |
14548 KB |
Output is correct |
206 |
Correct |
8 ms |
14560 KB |
Output is correct |
207 |
Correct |
8 ms |
14548 KB |
Output is correct |
208 |
Correct |
8 ms |
14476 KB |
Output is correct |
209 |
Correct |
11 ms |
15572 KB |
Output is correct |
210 |
Correct |
84 ms |
26412 KB |
Output is correct |
211 |
Correct |
112 ms |
32340 KB |
Output is correct |
212 |
Correct |
118 ms |
35608 KB |
Output is correct |
213 |
Correct |
158 ms |
37796 KB |
Output is correct |
214 |
Correct |
70 ms |
27988 KB |
Output is correct |
215 |
Correct |
64 ms |
27032 KB |
Output is correct |
216 |
Correct |
157 ms |
32308 KB |
Output is correct |
217 |
Correct |
133 ms |
28820 KB |
Output is correct |
218 |
Correct |
122 ms |
25820 KB |
Output is correct |
219 |
Correct |
112 ms |
25040 KB |
Output is correct |
220 |
Correct |
94 ms |
24920 KB |
Output is correct |
221 |
Correct |
106 ms |
24856 KB |
Output is correct |
222 |
Correct |
106 ms |
27112 KB |
Output is correct |
223 |
Correct |
148 ms |
33580 KB |
Output is correct |
224 |
Correct |
141 ms |
32060 KB |
Output is correct |
225 |
Correct |
144 ms |
28072 KB |
Output is correct |
226 |
Correct |
133 ms |
28068 KB |
Output is correct |
227 |
Correct |
132 ms |
28056 KB |
Output is correct |
228 |
Correct |
123 ms |
27328 KB |
Output is correct |
229 |
Correct |
125 ms |
26668 KB |
Output is correct |
230 |
Correct |
206 ms |
29212 KB |
Output is correct |
231 |
Correct |
137 ms |
29236 KB |
Output is correct |