#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define sz(x) (int)x.size()
#define endl '\n'
const int mod = 1e9 + 7;
const int inf = 2e9 + 5;
const ll linf = 9e18 + 5;
int n, m;
const int N = 1e5 + 5;
vector<int> adj1[N];
bool mark[N];
int h[N];
int par[N];
int up[N];
vector<int> adj2[2 * N];
bool mark2[2 * N];
int block[N];
int bcnt[N];
int len[2 * N];
int par2[2 * N];
int total[2 * N];
int mull(int a, int b) {
return (1ll * a * b) % mod;
}
void init() {
}
void input() {
cin >> n >> m;
for (int i = 1; i <= m; i++) {
int u, v;
cin >> u >> v;
// u = i; v = i + 1;
adj1[u].pb(v);
adj1[v].pb(u);
}
}
void dfshp(int u) {
mark[u] = true;
for (auto v : adj1[u]) {
if (!mark[v]) {
h[v] = h[u] + 1;
par[v] = u;
dfshp(v);
}
}
}
void dfsup(int u) {
mark[u] = true;
up[u] = h[u];
for (auto v : adj1[u]) {
if (!mark[v]) {
dfsup(v);
up[u] = min(up[u], up[v]);
}
else {
up[u] = min(up[u], h[v]);
}
}
}
void dfsbd(int u) {
mark[u] = true;
for (auto v : adj1[u]) {
if (!mark[v]) {
if (up[v] == h[u]) {
block[v] = v;
bcnt[v] = 1;
}
else {
block[v] = block[u];
}
dfsbd(v);
}
}
}
void dfslen(int u) {
if (u <= n) {
len[u] = bcnt[u];
}
else {
len[u] = 1;
}
for (auto v : adj2[u]) {
if (v != par2[u]) {
par2[v] = u;
dfslen(v);
len[u] += len[v] - 1;
}
}
}
void dfstotal(int u, const int x) {
total[u] = x;
for (auto v : adj2[u]) {
if (v != par2[u]) {
dfstotal(v, x);
}
}
}
void solve() {
vector<int> roots;
fill(mark + 1, mark + n + 1, false);
for (int r = 1; r <= n; r++) {
if (!mark[r]) {
dfshp(r);
roots.pb(r);
}
}
fill(mark + 1, mark + n + 1, false);
for (auto r : roots) {
if (!mark[r]) {
dfsup(r);
}
}
fill(mark + 1, mark + n + 1, false);
for (auto r : roots) {
if (!mark[r]) {
dfsbd(r);
}
}
for (int u = 1; u <= n; u++) {
bcnt[block[u]]++;
}
bcnt[0] = 0;
for (int u = 1; u <= n; u++) {
bool cut = false;
for (auto v : adj1[u]) {
if (par[v] == u && block[v] == v) {
cut = true;
}
}
if (cut) {
adj2[block[u]].pb(u + n);
adj2[u + n].pb(block[u]);
}
if (block[u] == u) {
adj2[block[u]].pb(par[u] + n);
adj2[par[u] + n].pb(block[u]);
}
}
ll ans = 0;
for (auto r : roots) {
dfslen(r + n);
dfstotal(r + n, len[r + n]);
ans += 1ll * len[r + n] * (len[r + n] - 1) * (len[r + n] - 2);
}
for (int u = 1; u <= n; u++) {
if (!len[u]) {
continue;
}
for (auto v : adj2[u]) {
if (par2[u] != v) {
ans -= 1ll * (bcnt[u] - 1) * len[v] * (len[v] - 1);
}
}
ans -= 1ll * (bcnt[u] - 1) * (total[u] - len[u] + 1) * (total[u] - len[u]);
}
cout << ans;
}
void output() {
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int number_of_testcases = 1;
//cin >> number_of_testcases;
while (number_of_testcases--) {
init();
input();
solve();
output();
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7388 KB |
Output is correct |
4 |
Correct |
4 ms |
7384 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
5 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7376 KB |
Output is correct |
10 |
Correct |
4 ms |
7384 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7320 KB |
Output is correct |
13 |
Correct |
4 ms |
7324 KB |
Output is correct |
14 |
Correct |
4 ms |
7364 KB |
Output is correct |
15 |
Correct |
5 ms |
7388 KB |
Output is correct |
16 |
Correct |
4 ms |
7384 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7388 KB |
Output is correct |
23 |
Correct |
4 ms |
7384 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7384 KB |
Output is correct |
26 |
Correct |
5 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7388 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7384 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7384 KB |
Output is correct |
35 |
Correct |
4 ms |
7380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7388 KB |
Output is correct |
4 |
Correct |
4 ms |
7384 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
5 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7376 KB |
Output is correct |
10 |
Correct |
4 ms |
7384 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7320 KB |
Output is correct |
13 |
Correct |
4 ms |
7324 KB |
Output is correct |
14 |
Correct |
4 ms |
7364 KB |
Output is correct |
15 |
Correct |
5 ms |
7388 KB |
Output is correct |
16 |
Correct |
4 ms |
7384 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7388 KB |
Output is correct |
23 |
Correct |
4 ms |
7384 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7384 KB |
Output is correct |
26 |
Correct |
5 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7388 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7384 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7384 KB |
Output is correct |
35 |
Correct |
4 ms |
7380 KB |
Output is correct |
36 |
Correct |
4 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7384 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
4 ms |
7380 KB |
Output is correct |
40 |
Correct |
4 ms |
7380 KB |
Output is correct |
41 |
Correct |
4 ms |
7380 KB |
Output is correct |
42 |
Correct |
4 ms |
7380 KB |
Output is correct |
43 |
Correct |
4 ms |
7380 KB |
Output is correct |
44 |
Correct |
5 ms |
7384 KB |
Output is correct |
45 |
Correct |
4 ms |
7384 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
4 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7384 KB |
Output is correct |
49 |
Correct |
4 ms |
7388 KB |
Output is correct |
50 |
Correct |
4 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7384 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
4 ms |
7380 KB |
Output is correct |
54 |
Correct |
4 ms |
7380 KB |
Output is correct |
55 |
Correct |
4 ms |
7388 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
4 ms |
7380 KB |
Output is correct |
58 |
Correct |
4 ms |
7380 KB |
Output is correct |
59 |
Correct |
5 ms |
7508 KB |
Output is correct |
60 |
Correct |
4 ms |
7380 KB |
Output is correct |
61 |
Correct |
4 ms |
7380 KB |
Output is correct |
62 |
Correct |
4 ms |
7380 KB |
Output is correct |
63 |
Correct |
4 ms |
7380 KB |
Output is correct |
64 |
Correct |
4 ms |
7380 KB |
Output is correct |
65 |
Correct |
4 ms |
7380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
79 ms |
18512 KB |
Output is correct |
2 |
Correct |
70 ms |
18616 KB |
Output is correct |
3 |
Correct |
142 ms |
24736 KB |
Output is correct |
4 |
Correct |
107 ms |
21300 KB |
Output is correct |
5 |
Correct |
135 ms |
21284 KB |
Output is correct |
6 |
Correct |
159 ms |
23744 KB |
Output is correct |
7 |
Correct |
133 ms |
21816 KB |
Output is correct |
8 |
Correct |
143 ms |
22300 KB |
Output is correct |
9 |
Correct |
138 ms |
20368 KB |
Output is correct |
10 |
Correct |
125 ms |
20468 KB |
Output is correct |
11 |
Correct |
77 ms |
18168 KB |
Output is correct |
12 |
Correct |
95 ms |
17980 KB |
Output is correct |
13 |
Correct |
82 ms |
18072 KB |
Output is correct |
14 |
Correct |
76 ms |
17864 KB |
Output is correct |
15 |
Correct |
54 ms |
17280 KB |
Output is correct |
16 |
Correct |
60 ms |
17124 KB |
Output is correct |
17 |
Correct |
9 ms |
11220 KB |
Output is correct |
18 |
Correct |
10 ms |
11348 KB |
Output is correct |
19 |
Correct |
8 ms |
11092 KB |
Output is correct |
20 |
Correct |
8 ms |
11092 KB |
Output is correct |
21 |
Correct |
8 ms |
10804 KB |
Output is correct |
22 |
Correct |
9 ms |
10704 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7508 KB |
Output is correct |
2 |
Correct |
4 ms |
7520 KB |
Output is correct |
3 |
Correct |
5 ms |
7520 KB |
Output is correct |
4 |
Correct |
5 ms |
7636 KB |
Output is correct |
5 |
Correct |
5 ms |
7512 KB |
Output is correct |
6 |
Correct |
6 ms |
7508 KB |
Output is correct |
7 |
Correct |
5 ms |
7520 KB |
Output is correct |
8 |
Correct |
5 ms |
7508 KB |
Output is correct |
9 |
Correct |
5 ms |
7508 KB |
Output is correct |
10 |
Correct |
5 ms |
7508 KB |
Output is correct |
11 |
Correct |
5 ms |
7508 KB |
Output is correct |
12 |
Correct |
4 ms |
7508 KB |
Output is correct |
13 |
Correct |
4 ms |
7508 KB |
Output is correct |
14 |
Correct |
4 ms |
7508 KB |
Output is correct |
15 |
Correct |
5 ms |
7416 KB |
Output is correct |
16 |
Correct |
5 ms |
7508 KB |
Output is correct |
17 |
Correct |
4 ms |
7636 KB |
Output is correct |
18 |
Correct |
4 ms |
7508 KB |
Output is correct |
19 |
Correct |
5 ms |
7508 KB |
Output is correct |
20 |
Correct |
4 ms |
7508 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
134 ms |
19892 KB |
Output is correct |
2 |
Correct |
121 ms |
21068 KB |
Output is correct |
3 |
Correct |
147 ms |
21132 KB |
Output is correct |
4 |
Correct |
140 ms |
21040 KB |
Output is correct |
5 |
Correct |
127 ms |
20996 KB |
Output is correct |
6 |
Correct |
203 ms |
30928 KB |
Output is correct |
7 |
Correct |
177 ms |
27468 KB |
Output is correct |
8 |
Correct |
169 ms |
25732 KB |
Output is correct |
9 |
Correct |
159 ms |
24196 KB |
Output is correct |
10 |
Correct |
136 ms |
21068 KB |
Output is correct |
11 |
Correct |
137 ms |
20952 KB |
Output is correct |
12 |
Correct |
123 ms |
20960 KB |
Output is correct |
13 |
Correct |
127 ms |
21052 KB |
Output is correct |
14 |
Correct |
118 ms |
20708 KB |
Output is correct |
15 |
Correct |
104 ms |
20184 KB |
Output is correct |
16 |
Correct |
62 ms |
17868 KB |
Output is correct |
17 |
Correct |
44 ms |
18924 KB |
Output is correct |
18 |
Correct |
50 ms |
18948 KB |
Output is correct |
19 |
Correct |
51 ms |
19236 KB |
Output is correct |
20 |
Correct |
51 ms |
19016 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7508 KB |
Output is correct |
2 |
Correct |
4 ms |
7516 KB |
Output is correct |
3 |
Correct |
5 ms |
7520 KB |
Output is correct |
4 |
Correct |
5 ms |
7508 KB |
Output is correct |
5 |
Correct |
4 ms |
7508 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
4 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7508 KB |
Output is correct |
9 |
Correct |
5 ms |
7380 KB |
Output is correct |
10 |
Correct |
4 ms |
7380 KB |
Output is correct |
11 |
Correct |
6 ms |
7508 KB |
Output is correct |
12 |
Correct |
5 ms |
7516 KB |
Output is correct |
13 |
Correct |
5 ms |
7516 KB |
Output is correct |
14 |
Correct |
5 ms |
7508 KB |
Output is correct |
15 |
Correct |
5 ms |
7508 KB |
Output is correct |
16 |
Correct |
5 ms |
7508 KB |
Output is correct |
17 |
Correct |
5 ms |
7424 KB |
Output is correct |
18 |
Correct |
5 ms |
7516 KB |
Output is correct |
19 |
Correct |
5 ms |
7428 KB |
Output is correct |
20 |
Correct |
5 ms |
7508 KB |
Output is correct |
21 |
Correct |
5 ms |
7516 KB |
Output is correct |
22 |
Correct |
4 ms |
7508 KB |
Output is correct |
23 |
Correct |
5 ms |
7516 KB |
Output is correct |
24 |
Correct |
5 ms |
7508 KB |
Output is correct |
25 |
Correct |
4 ms |
7464 KB |
Output is correct |
26 |
Correct |
4 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
122 ms |
19928 KB |
Output is correct |
2 |
Correct |
151 ms |
21196 KB |
Output is correct |
3 |
Correct |
187 ms |
20784 KB |
Output is correct |
4 |
Correct |
126 ms |
19660 KB |
Output is correct |
5 |
Correct |
105 ms |
18208 KB |
Output is correct |
6 |
Correct |
119 ms |
17672 KB |
Output is correct |
7 |
Correct |
91 ms |
17344 KB |
Output is correct |
8 |
Correct |
94 ms |
16860 KB |
Output is correct |
9 |
Correct |
65 ms |
16700 KB |
Output is correct |
10 |
Correct |
73 ms |
16676 KB |
Output is correct |
11 |
Correct |
87 ms |
16416 KB |
Output is correct |
12 |
Correct |
58 ms |
16316 KB |
Output is correct |
13 |
Correct |
70 ms |
16336 KB |
Output is correct |
14 |
Correct |
63 ms |
15912 KB |
Output is correct |
15 |
Correct |
162 ms |
27212 KB |
Output is correct |
16 |
Correct |
161 ms |
24904 KB |
Output is correct |
17 |
Correct |
139 ms |
25444 KB |
Output is correct |
18 |
Correct |
156 ms |
23596 KB |
Output is correct |
19 |
Correct |
130 ms |
19720 KB |
Output is correct |
20 |
Correct |
121 ms |
19588 KB |
Output is correct |
21 |
Correct |
115 ms |
19704 KB |
Output is correct |
22 |
Correct |
104 ms |
19148 KB |
Output is correct |
23 |
Correct |
86 ms |
18568 KB |
Output is correct |
24 |
Correct |
82 ms |
20344 KB |
Output is correct |
25 |
Correct |
101 ms |
20516 KB |
Output is correct |
26 |
Correct |
85 ms |
19756 KB |
Output is correct |
27 |
Correct |
85 ms |
19792 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7388 KB |
Output is correct |
4 |
Correct |
4 ms |
7384 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
5 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7376 KB |
Output is correct |
10 |
Correct |
4 ms |
7384 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7320 KB |
Output is correct |
13 |
Correct |
4 ms |
7324 KB |
Output is correct |
14 |
Correct |
4 ms |
7364 KB |
Output is correct |
15 |
Correct |
5 ms |
7388 KB |
Output is correct |
16 |
Correct |
4 ms |
7384 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7388 KB |
Output is correct |
23 |
Correct |
4 ms |
7384 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7384 KB |
Output is correct |
26 |
Correct |
5 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7388 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7384 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7384 KB |
Output is correct |
35 |
Correct |
4 ms |
7380 KB |
Output is correct |
36 |
Correct |
4 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7384 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
4 ms |
7380 KB |
Output is correct |
40 |
Correct |
4 ms |
7380 KB |
Output is correct |
41 |
Correct |
4 ms |
7380 KB |
Output is correct |
42 |
Correct |
4 ms |
7380 KB |
Output is correct |
43 |
Correct |
4 ms |
7380 KB |
Output is correct |
44 |
Correct |
5 ms |
7384 KB |
Output is correct |
45 |
Correct |
4 ms |
7384 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
4 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7384 KB |
Output is correct |
49 |
Correct |
4 ms |
7388 KB |
Output is correct |
50 |
Correct |
4 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7384 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
4 ms |
7380 KB |
Output is correct |
54 |
Correct |
4 ms |
7380 KB |
Output is correct |
55 |
Correct |
4 ms |
7388 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
4 ms |
7380 KB |
Output is correct |
58 |
Correct |
4 ms |
7380 KB |
Output is correct |
59 |
Correct |
5 ms |
7508 KB |
Output is correct |
60 |
Correct |
4 ms |
7380 KB |
Output is correct |
61 |
Correct |
4 ms |
7380 KB |
Output is correct |
62 |
Correct |
4 ms |
7380 KB |
Output is correct |
63 |
Correct |
4 ms |
7380 KB |
Output is correct |
64 |
Correct |
4 ms |
7380 KB |
Output is correct |
65 |
Correct |
4 ms |
7380 KB |
Output is correct |
66 |
Correct |
4 ms |
7380 KB |
Output is correct |
67 |
Correct |
4 ms |
7492 KB |
Output is correct |
68 |
Correct |
4 ms |
7508 KB |
Output is correct |
69 |
Correct |
4 ms |
7528 KB |
Output is correct |
70 |
Correct |
5 ms |
7552 KB |
Output is correct |
71 |
Correct |
4 ms |
7520 KB |
Output is correct |
72 |
Correct |
5 ms |
7508 KB |
Output is correct |
73 |
Correct |
4 ms |
7520 KB |
Output is correct |
74 |
Correct |
4 ms |
7520 KB |
Output is correct |
75 |
Correct |
5 ms |
7528 KB |
Output is correct |
76 |
Correct |
5 ms |
7380 KB |
Output is correct |
77 |
Correct |
5 ms |
7520 KB |
Output is correct |
78 |
Correct |
5 ms |
7508 KB |
Output is correct |
79 |
Correct |
4 ms |
7380 KB |
Output is correct |
80 |
Correct |
4 ms |
7380 KB |
Output is correct |
81 |
Correct |
4 ms |
7452 KB |
Output is correct |
82 |
Correct |
4 ms |
7524 KB |
Output is correct |
83 |
Correct |
4 ms |
7524 KB |
Output is correct |
84 |
Correct |
5 ms |
7508 KB |
Output is correct |
85 |
Correct |
5 ms |
7524 KB |
Output is correct |
86 |
Correct |
6 ms |
7508 KB |
Output is correct |
87 |
Correct |
5 ms |
7392 KB |
Output is correct |
88 |
Correct |
4 ms |
7508 KB |
Output is correct |
89 |
Correct |
4 ms |
7508 KB |
Output is correct |
90 |
Correct |
5 ms |
7516 KB |
Output is correct |
91 |
Correct |
5 ms |
7508 KB |
Output is correct |
92 |
Correct |
5 ms |
7508 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
4 ms |
7380 KB |
Output is correct |
2 |
Correct |
4 ms |
7380 KB |
Output is correct |
3 |
Correct |
4 ms |
7388 KB |
Output is correct |
4 |
Correct |
4 ms |
7384 KB |
Output is correct |
5 |
Correct |
4 ms |
7380 KB |
Output is correct |
6 |
Correct |
4 ms |
7380 KB |
Output is correct |
7 |
Correct |
5 ms |
7380 KB |
Output is correct |
8 |
Correct |
4 ms |
7380 KB |
Output is correct |
9 |
Correct |
4 ms |
7376 KB |
Output is correct |
10 |
Correct |
4 ms |
7384 KB |
Output is correct |
11 |
Correct |
4 ms |
7380 KB |
Output is correct |
12 |
Correct |
4 ms |
7320 KB |
Output is correct |
13 |
Correct |
4 ms |
7324 KB |
Output is correct |
14 |
Correct |
4 ms |
7364 KB |
Output is correct |
15 |
Correct |
5 ms |
7388 KB |
Output is correct |
16 |
Correct |
4 ms |
7384 KB |
Output is correct |
17 |
Correct |
4 ms |
7380 KB |
Output is correct |
18 |
Correct |
4 ms |
7380 KB |
Output is correct |
19 |
Correct |
4 ms |
7380 KB |
Output is correct |
20 |
Correct |
4 ms |
7380 KB |
Output is correct |
21 |
Correct |
4 ms |
7380 KB |
Output is correct |
22 |
Correct |
4 ms |
7388 KB |
Output is correct |
23 |
Correct |
4 ms |
7384 KB |
Output is correct |
24 |
Correct |
4 ms |
7380 KB |
Output is correct |
25 |
Correct |
4 ms |
7384 KB |
Output is correct |
26 |
Correct |
5 ms |
7380 KB |
Output is correct |
27 |
Correct |
4 ms |
7388 KB |
Output is correct |
28 |
Correct |
4 ms |
7380 KB |
Output is correct |
29 |
Correct |
4 ms |
7380 KB |
Output is correct |
30 |
Correct |
4 ms |
7384 KB |
Output is correct |
31 |
Correct |
4 ms |
7380 KB |
Output is correct |
32 |
Correct |
4 ms |
7380 KB |
Output is correct |
33 |
Correct |
4 ms |
7380 KB |
Output is correct |
34 |
Correct |
4 ms |
7384 KB |
Output is correct |
35 |
Correct |
4 ms |
7380 KB |
Output is correct |
36 |
Correct |
4 ms |
7380 KB |
Output is correct |
37 |
Correct |
4 ms |
7384 KB |
Output is correct |
38 |
Correct |
4 ms |
7380 KB |
Output is correct |
39 |
Correct |
4 ms |
7380 KB |
Output is correct |
40 |
Correct |
4 ms |
7380 KB |
Output is correct |
41 |
Correct |
4 ms |
7380 KB |
Output is correct |
42 |
Correct |
4 ms |
7380 KB |
Output is correct |
43 |
Correct |
4 ms |
7380 KB |
Output is correct |
44 |
Correct |
5 ms |
7384 KB |
Output is correct |
45 |
Correct |
4 ms |
7384 KB |
Output is correct |
46 |
Correct |
4 ms |
7380 KB |
Output is correct |
47 |
Correct |
4 ms |
7380 KB |
Output is correct |
48 |
Correct |
4 ms |
7384 KB |
Output is correct |
49 |
Correct |
4 ms |
7388 KB |
Output is correct |
50 |
Correct |
4 ms |
7380 KB |
Output is correct |
51 |
Correct |
4 ms |
7384 KB |
Output is correct |
52 |
Correct |
4 ms |
7380 KB |
Output is correct |
53 |
Correct |
4 ms |
7380 KB |
Output is correct |
54 |
Correct |
4 ms |
7380 KB |
Output is correct |
55 |
Correct |
4 ms |
7388 KB |
Output is correct |
56 |
Correct |
4 ms |
7380 KB |
Output is correct |
57 |
Correct |
4 ms |
7380 KB |
Output is correct |
58 |
Correct |
4 ms |
7380 KB |
Output is correct |
59 |
Correct |
5 ms |
7508 KB |
Output is correct |
60 |
Correct |
4 ms |
7380 KB |
Output is correct |
61 |
Correct |
4 ms |
7380 KB |
Output is correct |
62 |
Correct |
4 ms |
7380 KB |
Output is correct |
63 |
Correct |
4 ms |
7380 KB |
Output is correct |
64 |
Correct |
4 ms |
7380 KB |
Output is correct |
65 |
Correct |
4 ms |
7380 KB |
Output is correct |
66 |
Correct |
79 ms |
18512 KB |
Output is correct |
67 |
Correct |
70 ms |
18616 KB |
Output is correct |
68 |
Correct |
142 ms |
24736 KB |
Output is correct |
69 |
Correct |
107 ms |
21300 KB |
Output is correct |
70 |
Correct |
135 ms |
21284 KB |
Output is correct |
71 |
Correct |
159 ms |
23744 KB |
Output is correct |
72 |
Correct |
133 ms |
21816 KB |
Output is correct |
73 |
Correct |
143 ms |
22300 KB |
Output is correct |
74 |
Correct |
138 ms |
20368 KB |
Output is correct |
75 |
Correct |
125 ms |
20468 KB |
Output is correct |
76 |
Correct |
77 ms |
18168 KB |
Output is correct |
77 |
Correct |
95 ms |
17980 KB |
Output is correct |
78 |
Correct |
82 ms |
18072 KB |
Output is correct |
79 |
Correct |
76 ms |
17864 KB |
Output is correct |
80 |
Correct |
54 ms |
17280 KB |
Output is correct |
81 |
Correct |
60 ms |
17124 KB |
Output is correct |
82 |
Correct |
9 ms |
11220 KB |
Output is correct |
83 |
Correct |
10 ms |
11348 KB |
Output is correct |
84 |
Correct |
8 ms |
11092 KB |
Output is correct |
85 |
Correct |
8 ms |
11092 KB |
Output is correct |
86 |
Correct |
8 ms |
10804 KB |
Output is correct |
87 |
Correct |
9 ms |
10704 KB |
Output is correct |
88 |
Correct |
4 ms |
7508 KB |
Output is correct |
89 |
Correct |
4 ms |
7520 KB |
Output is correct |
90 |
Correct |
5 ms |
7520 KB |
Output is correct |
91 |
Correct |
5 ms |
7636 KB |
Output is correct |
92 |
Correct |
5 ms |
7512 KB |
Output is correct |
93 |
Correct |
6 ms |
7508 KB |
Output is correct |
94 |
Correct |
5 ms |
7520 KB |
Output is correct |
95 |
Correct |
5 ms |
7508 KB |
Output is correct |
96 |
Correct |
5 ms |
7508 KB |
Output is correct |
97 |
Correct |
5 ms |
7508 KB |
Output is correct |
98 |
Correct |
5 ms |
7508 KB |
Output is correct |
99 |
Correct |
4 ms |
7508 KB |
Output is correct |
100 |
Correct |
4 ms |
7508 KB |
Output is correct |
101 |
Correct |
4 ms |
7508 KB |
Output is correct |
102 |
Correct |
5 ms |
7416 KB |
Output is correct |
103 |
Correct |
5 ms |
7508 KB |
Output is correct |
104 |
Correct |
4 ms |
7636 KB |
Output is correct |
105 |
Correct |
4 ms |
7508 KB |
Output is correct |
106 |
Correct |
5 ms |
7508 KB |
Output is correct |
107 |
Correct |
4 ms |
7508 KB |
Output is correct |
108 |
Correct |
134 ms |
19892 KB |
Output is correct |
109 |
Correct |
121 ms |
21068 KB |
Output is correct |
110 |
Correct |
147 ms |
21132 KB |
Output is correct |
111 |
Correct |
140 ms |
21040 KB |
Output is correct |
112 |
Correct |
127 ms |
20996 KB |
Output is correct |
113 |
Correct |
203 ms |
30928 KB |
Output is correct |
114 |
Correct |
177 ms |
27468 KB |
Output is correct |
115 |
Correct |
169 ms |
25732 KB |
Output is correct |
116 |
Correct |
159 ms |
24196 KB |
Output is correct |
117 |
Correct |
136 ms |
21068 KB |
Output is correct |
118 |
Correct |
137 ms |
20952 KB |
Output is correct |
119 |
Correct |
123 ms |
20960 KB |
Output is correct |
120 |
Correct |
127 ms |
21052 KB |
Output is correct |
121 |
Correct |
118 ms |
20708 KB |
Output is correct |
122 |
Correct |
104 ms |
20184 KB |
Output is correct |
123 |
Correct |
62 ms |
17868 KB |
Output is correct |
124 |
Correct |
44 ms |
18924 KB |
Output is correct |
125 |
Correct |
50 ms |
18948 KB |
Output is correct |
126 |
Correct |
51 ms |
19236 KB |
Output is correct |
127 |
Correct |
51 ms |
19016 KB |
Output is correct |
128 |
Correct |
4 ms |
7508 KB |
Output is correct |
129 |
Correct |
4 ms |
7516 KB |
Output is correct |
130 |
Correct |
5 ms |
7520 KB |
Output is correct |
131 |
Correct |
5 ms |
7508 KB |
Output is correct |
132 |
Correct |
4 ms |
7508 KB |
Output is correct |
133 |
Correct |
4 ms |
7380 KB |
Output is correct |
134 |
Correct |
4 ms |
7380 KB |
Output is correct |
135 |
Correct |
4 ms |
7508 KB |
Output is correct |
136 |
Correct |
5 ms |
7380 KB |
Output is correct |
137 |
Correct |
4 ms |
7380 KB |
Output is correct |
138 |
Correct |
6 ms |
7508 KB |
Output is correct |
139 |
Correct |
5 ms |
7516 KB |
Output is correct |
140 |
Correct |
5 ms |
7516 KB |
Output is correct |
141 |
Correct |
5 ms |
7508 KB |
Output is correct |
142 |
Correct |
5 ms |
7508 KB |
Output is correct |
143 |
Correct |
5 ms |
7508 KB |
Output is correct |
144 |
Correct |
5 ms |
7424 KB |
Output is correct |
145 |
Correct |
5 ms |
7516 KB |
Output is correct |
146 |
Correct |
5 ms |
7428 KB |
Output is correct |
147 |
Correct |
5 ms |
7508 KB |
Output is correct |
148 |
Correct |
5 ms |
7516 KB |
Output is correct |
149 |
Correct |
4 ms |
7508 KB |
Output is correct |
150 |
Correct |
5 ms |
7516 KB |
Output is correct |
151 |
Correct |
5 ms |
7508 KB |
Output is correct |
152 |
Correct |
4 ms |
7464 KB |
Output is correct |
153 |
Correct |
4 ms |
7380 KB |
Output is correct |
154 |
Correct |
4 ms |
7380 KB |
Output is correct |
155 |
Correct |
122 ms |
19928 KB |
Output is correct |
156 |
Correct |
151 ms |
21196 KB |
Output is correct |
157 |
Correct |
187 ms |
20784 KB |
Output is correct |
158 |
Correct |
126 ms |
19660 KB |
Output is correct |
159 |
Correct |
105 ms |
18208 KB |
Output is correct |
160 |
Correct |
119 ms |
17672 KB |
Output is correct |
161 |
Correct |
91 ms |
17344 KB |
Output is correct |
162 |
Correct |
94 ms |
16860 KB |
Output is correct |
163 |
Correct |
65 ms |
16700 KB |
Output is correct |
164 |
Correct |
73 ms |
16676 KB |
Output is correct |
165 |
Correct |
87 ms |
16416 KB |
Output is correct |
166 |
Correct |
58 ms |
16316 KB |
Output is correct |
167 |
Correct |
70 ms |
16336 KB |
Output is correct |
168 |
Correct |
63 ms |
15912 KB |
Output is correct |
169 |
Correct |
162 ms |
27212 KB |
Output is correct |
170 |
Correct |
161 ms |
24904 KB |
Output is correct |
171 |
Correct |
139 ms |
25444 KB |
Output is correct |
172 |
Correct |
156 ms |
23596 KB |
Output is correct |
173 |
Correct |
130 ms |
19720 KB |
Output is correct |
174 |
Correct |
121 ms |
19588 KB |
Output is correct |
175 |
Correct |
115 ms |
19704 KB |
Output is correct |
176 |
Correct |
104 ms |
19148 KB |
Output is correct |
177 |
Correct |
86 ms |
18568 KB |
Output is correct |
178 |
Correct |
82 ms |
20344 KB |
Output is correct |
179 |
Correct |
101 ms |
20516 KB |
Output is correct |
180 |
Correct |
85 ms |
19756 KB |
Output is correct |
181 |
Correct |
85 ms |
19792 KB |
Output is correct |
182 |
Correct |
4 ms |
7380 KB |
Output is correct |
183 |
Correct |
4 ms |
7492 KB |
Output is correct |
184 |
Correct |
4 ms |
7508 KB |
Output is correct |
185 |
Correct |
4 ms |
7528 KB |
Output is correct |
186 |
Correct |
5 ms |
7552 KB |
Output is correct |
187 |
Correct |
4 ms |
7520 KB |
Output is correct |
188 |
Correct |
5 ms |
7508 KB |
Output is correct |
189 |
Correct |
4 ms |
7520 KB |
Output is correct |
190 |
Correct |
4 ms |
7520 KB |
Output is correct |
191 |
Correct |
5 ms |
7528 KB |
Output is correct |
192 |
Correct |
5 ms |
7380 KB |
Output is correct |
193 |
Correct |
5 ms |
7520 KB |
Output is correct |
194 |
Correct |
5 ms |
7508 KB |
Output is correct |
195 |
Correct |
4 ms |
7380 KB |
Output is correct |
196 |
Correct |
4 ms |
7380 KB |
Output is correct |
197 |
Correct |
4 ms |
7452 KB |
Output is correct |
198 |
Correct |
4 ms |
7524 KB |
Output is correct |
199 |
Correct |
4 ms |
7524 KB |
Output is correct |
200 |
Correct |
5 ms |
7508 KB |
Output is correct |
201 |
Correct |
5 ms |
7524 KB |
Output is correct |
202 |
Correct |
6 ms |
7508 KB |
Output is correct |
203 |
Correct |
5 ms |
7392 KB |
Output is correct |
204 |
Correct |
4 ms |
7508 KB |
Output is correct |
205 |
Correct |
4 ms |
7508 KB |
Output is correct |
206 |
Correct |
5 ms |
7516 KB |
Output is correct |
207 |
Correct |
5 ms |
7508 KB |
Output is correct |
208 |
Correct |
5 ms |
7508 KB |
Output is correct |
209 |
Correct |
8 ms |
9172 KB |
Output is correct |
210 |
Correct |
65 ms |
17352 KB |
Output is correct |
211 |
Correct |
87 ms |
19640 KB |
Output is correct |
212 |
Correct |
107 ms |
20896 KB |
Output is correct |
213 |
Correct |
152 ms |
22196 KB |
Output is correct |
214 |
Correct |
46 ms |
18524 KB |
Output is correct |
215 |
Correct |
49 ms |
18124 KB |
Output is correct |
216 |
Correct |
108 ms |
19984 KB |
Output is correct |
217 |
Correct |
107 ms |
18648 KB |
Output is correct |
218 |
Correct |
87 ms |
17036 KB |
Output is correct |
219 |
Correct |
79 ms |
16700 KB |
Output is correct |
220 |
Correct |
79 ms |
16432 KB |
Output is correct |
221 |
Correct |
69 ms |
16240 KB |
Output is correct |
222 |
Correct |
72 ms |
14788 KB |
Output is correct |
223 |
Correct |
118 ms |
21240 KB |
Output is correct |
224 |
Correct |
115 ms |
20408 KB |
Output is correct |
225 |
Correct |
94 ms |
18388 KB |
Output is correct |
226 |
Correct |
86 ms |
18420 KB |
Output is correct |
227 |
Correct |
101 ms |
18308 KB |
Output is correct |
228 |
Correct |
92 ms |
18188 KB |
Output is correct |
229 |
Correct |
72 ms |
17996 KB |
Output is correct |
230 |
Correct |
64 ms |
17244 KB |
Output is correct |
231 |
Correct |
72 ms |
17404 KB |
Output is correct |