/**
* author : Lăng Trọng Đạt
* created: 09-06-2024
**/
#include <bits/stdc++.h>
using namespace std;
#ifndef LANG_DAT
#define db(...) ;
#endif // LANG_DAT
#define int long long
#define mp make_pair
#define f first
#define se second
#define pb push_back
#define all(v) (v).begin(), (v).end()
using pii = pair<int, int>;
using vi = vector<int>;
#define FOR(i, a, b) for (int (i) = a; (i) <= (b); i++)
void mx(int& a, int b) { if (b > a) a = b; }
void mi(int& a, int b) { if (b < a) a = b; }
#define si(x) (int)(x.size())
const int INF = 1e18;
const int MOD = 1e9 + 7;
/*
1. Init (input graph)
2. Finding all cut vertex
3. Transform graph into block-cut tree
4. Calculate subsize of each node (in block-cut tree)
*/
const int MAXN = 2e5 + 5;
int g[MAXN];
int n, m, a, b;
vi adj[MAXN];
int timer = 1;
bool ap[MAXN];
int id[MAXN], low[MAXN];
int bad = 0;
vi path;
vi bcc_adj[MAXN];
int bcc_num = 1;
int N = 0;
void dfs(int v, int prv) {
N++;
path.pb(v);
id[v] = low[v] = timer++;
for (int u : adj[v]) {
if (u == prv) continue;
if (id[u]) mi(low[v], id[u]);
else {
dfs(u, v);
mi(low[v], low[u]);
if (id[v] <= low[u]) {
db(v, u, low[u], id[v], bcc_num)
bcc_adj[v].pb(bcc_num + n);
while (bcc_adj[bcc_num + n].empty() || bcc_adj[bcc_num + n].back() != u) {
bcc_adj[bcc_num + n].pb(path.back());
path.pop_back();
}
bcc_num++;
}
}
}
}
int ans = 0;
int sz[MAXN];
void dfs2(int v, int prv) {
if (v <= n) sz[v] = 1;
for (int u : bcc_adj[v]) {
// if (u == prv) continue;
dfs2(u, v);
sz[v] += sz[u];
if (v > n) ans -= si(bcc_adj[v]) * sz[u] * (sz[u] - 1); // v is change
}
if (v > n) ans -= si(bcc_adj[v]) * (N - sz[v]) * (N - sz[v] - 1);
db(ans, v, sz[v])
}
void init() {
cin >> n >> m;
FOR(i, 1, m) {
cin >> a >> b;
adj[a].pb(b);
adj[b].pb(a);
}
FOR(i, 1, n) {
if (!id[i]) {
N = 0;
dfs(i, -1);
ans += N * (N - 1) * (N - 2);
db(i, ans, N)
dfs2(i, -1);
}
}
// FOR(i, 1, n + bcc_num) {
// for (int u : bcc_adj[i]) {
// cout << i << " " << u << "\n";
// }
// }
}
int32_t main() {
cin.tie(0)->sync_with_stdio(0);
if (fopen("hi.inp", "r")) {
freopen("hi.inp", "r", stdin);
// freopen("hi.out", "w", stdout);
}
init();
cout << ans;
}
Compilation message
count_triplets.cpp: In function 'void init()':
count_triplets.cpp:18:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
18 | #define FOR(i, a, b) for (int (i) = a; (i) <= (b); i++)
| ^
count_triplets.cpp:84:5: note: in expansion of macro 'FOR'
84 | FOR(i, 1, m) {
| ^~~
count_triplets.cpp:18:31: warning: unnecessary parentheses in declaration of 'i' [-Wparentheses]
18 | #define FOR(i, a, b) for (int (i) = a; (i) <= (b); i++)
| ^
count_triplets.cpp:89:5: note: in expansion of macro 'FOR'
89 | FOR(i, 1, n) {
| ^~~
count_triplets.cpp: In function 'int32_t main()':
count_triplets.cpp:108:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
108 | freopen("hi.inp", "r", stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12636 KB |
Output is correct |
2 |
Correct |
2 ms |
12636 KB |
Output is correct |
3 |
Correct |
2 ms |
12636 KB |
Output is correct |
4 |
Correct |
2 ms |
12636 KB |
Output is correct |
5 |
Correct |
2 ms |
12636 KB |
Output is correct |
6 |
Correct |
2 ms |
12636 KB |
Output is correct |
7 |
Correct |
2 ms |
12636 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
2 ms |
12776 KB |
Output is correct |
10 |
Correct |
3 ms |
12744 KB |
Output is correct |
11 |
Correct |
2 ms |
12632 KB |
Output is correct |
12 |
Correct |
2 ms |
12636 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
12632 KB |
Output is correct |
16 |
Correct |
2 ms |
12632 KB |
Output is correct |
17 |
Correct |
2 ms |
12632 KB |
Output is correct |
18 |
Correct |
2 ms |
12636 KB |
Output is correct |
19 |
Correct |
2 ms |
12636 KB |
Output is correct |
20 |
Correct |
2 ms |
12636 KB |
Output is correct |
21 |
Correct |
2 ms |
12636 KB |
Output is correct |
22 |
Correct |
2 ms |
12632 KB |
Output is correct |
23 |
Correct |
2 ms |
12636 KB |
Output is correct |
24 |
Correct |
2 ms |
12780 KB |
Output is correct |
25 |
Correct |
2 ms |
12636 KB |
Output is correct |
26 |
Correct |
2 ms |
12636 KB |
Output is correct |
27 |
Correct |
3 ms |
12776 KB |
Output is correct |
28 |
Correct |
2 ms |
12772 KB |
Output is correct |
29 |
Correct |
2 ms |
12636 KB |
Output is correct |
30 |
Correct |
2 ms |
12720 KB |
Output is correct |
31 |
Correct |
2 ms |
12636 KB |
Output is correct |
32 |
Correct |
2 ms |
12636 KB |
Output is correct |
33 |
Correct |
2 ms |
12776 KB |
Output is correct |
34 |
Correct |
2 ms |
12636 KB |
Output is correct |
35 |
Correct |
2 ms |
12636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12636 KB |
Output is correct |
2 |
Correct |
2 ms |
12636 KB |
Output is correct |
3 |
Correct |
2 ms |
12636 KB |
Output is correct |
4 |
Correct |
2 ms |
12636 KB |
Output is correct |
5 |
Correct |
2 ms |
12636 KB |
Output is correct |
6 |
Correct |
2 ms |
12636 KB |
Output is correct |
7 |
Correct |
2 ms |
12636 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
2 ms |
12776 KB |
Output is correct |
10 |
Correct |
3 ms |
12744 KB |
Output is correct |
11 |
Correct |
2 ms |
12632 KB |
Output is correct |
12 |
Correct |
2 ms |
12636 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
12632 KB |
Output is correct |
16 |
Correct |
2 ms |
12632 KB |
Output is correct |
17 |
Correct |
2 ms |
12632 KB |
Output is correct |
18 |
Correct |
2 ms |
12636 KB |
Output is correct |
19 |
Correct |
2 ms |
12636 KB |
Output is correct |
20 |
Correct |
2 ms |
12636 KB |
Output is correct |
21 |
Correct |
2 ms |
12636 KB |
Output is correct |
22 |
Correct |
2 ms |
12632 KB |
Output is correct |
23 |
Correct |
2 ms |
12636 KB |
Output is correct |
24 |
Correct |
2 ms |
12780 KB |
Output is correct |
25 |
Correct |
2 ms |
12636 KB |
Output is correct |
26 |
Correct |
2 ms |
12636 KB |
Output is correct |
27 |
Correct |
3 ms |
12776 KB |
Output is correct |
28 |
Correct |
2 ms |
12772 KB |
Output is correct |
29 |
Correct |
2 ms |
12636 KB |
Output is correct |
30 |
Correct |
2 ms |
12720 KB |
Output is correct |
31 |
Correct |
2 ms |
12636 KB |
Output is correct |
32 |
Correct |
2 ms |
12636 KB |
Output is correct |
33 |
Correct |
2 ms |
12776 KB |
Output is correct |
34 |
Correct |
2 ms |
12636 KB |
Output is correct |
35 |
Correct |
2 ms |
12636 KB |
Output is correct |
36 |
Correct |
2 ms |
12636 KB |
Output is correct |
37 |
Correct |
2 ms |
12636 KB |
Output is correct |
38 |
Correct |
2 ms |
12636 KB |
Output is correct |
39 |
Correct |
2 ms |
12636 KB |
Output is correct |
40 |
Correct |
2 ms |
12636 KB |
Output is correct |
41 |
Correct |
2 ms |
12636 KB |
Output is correct |
42 |
Correct |
2 ms |
12636 KB |
Output is correct |
43 |
Correct |
2 ms |
12780 KB |
Output is correct |
44 |
Correct |
3 ms |
12636 KB |
Output is correct |
45 |
Correct |
2 ms |
12636 KB |
Output is correct |
46 |
Correct |
2 ms |
12632 KB |
Output is correct |
47 |
Correct |
2 ms |
12636 KB |
Output is correct |
48 |
Correct |
2 ms |
12636 KB |
Output is correct |
49 |
Correct |
2 ms |
12776 KB |
Output is correct |
50 |
Correct |
2 ms |
12636 KB |
Output is correct |
51 |
Correct |
2 ms |
12636 KB |
Output is correct |
52 |
Correct |
2 ms |
12788 KB |
Output is correct |
53 |
Correct |
2 ms |
12668 KB |
Output is correct |
54 |
Correct |
2 ms |
12636 KB |
Output is correct |
55 |
Correct |
2 ms |
12636 KB |
Output is correct |
56 |
Correct |
2 ms |
12636 KB |
Output is correct |
57 |
Correct |
2 ms |
12636 KB |
Output is correct |
58 |
Correct |
2 ms |
12636 KB |
Output is correct |
59 |
Correct |
2 ms |
12636 KB |
Output is correct |
60 |
Correct |
2 ms |
12636 KB |
Output is correct |
61 |
Correct |
2 ms |
12636 KB |
Output is correct |
62 |
Correct |
2 ms |
12636 KB |
Output is correct |
63 |
Correct |
2 ms |
12636 KB |
Output is correct |
64 |
Correct |
2 ms |
12636 KB |
Output is correct |
65 |
Correct |
2 ms |
12636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
40 ms |
29896 KB |
Output is correct |
2 |
Correct |
40 ms |
29892 KB |
Output is correct |
3 |
Correct |
40 ms |
27472 KB |
Output is correct |
4 |
Correct |
41 ms |
29128 KB |
Output is correct |
5 |
Correct |
36 ms |
24596 KB |
Output is correct |
6 |
Correct |
41 ms |
26968 KB |
Output is correct |
7 |
Correct |
44 ms |
25448 KB |
Output is correct |
8 |
Correct |
38 ms |
25808 KB |
Output is correct |
9 |
Correct |
38 ms |
24036 KB |
Output is correct |
10 |
Correct |
37 ms |
24012 KB |
Output is correct |
11 |
Correct |
43 ms |
21548 KB |
Output is correct |
12 |
Correct |
29 ms |
21464 KB |
Output is correct |
13 |
Correct |
30 ms |
21612 KB |
Output is correct |
14 |
Correct |
27 ms |
21328 KB |
Output is correct |
15 |
Correct |
23 ms |
20168 KB |
Output is correct |
16 |
Correct |
24 ms |
20172 KB |
Output is correct |
17 |
Correct |
5 ms |
15328 KB |
Output is correct |
18 |
Correct |
4 ms |
15072 KB |
Output is correct |
19 |
Correct |
5 ms |
15068 KB |
Output is correct |
20 |
Correct |
4 ms |
15068 KB |
Output is correct |
21 |
Correct |
4 ms |
15064 KB |
Output is correct |
22 |
Correct |
4 ms |
15068 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12892 KB |
Output is correct |
2 |
Correct |
2 ms |
12740 KB |
Output is correct |
3 |
Correct |
2 ms |
12892 KB |
Output is correct |
4 |
Correct |
3 ms |
12892 KB |
Output is correct |
5 |
Correct |
3 ms |
12892 KB |
Output is correct |
6 |
Correct |
2 ms |
12784 KB |
Output is correct |
7 |
Correct |
4 ms |
12892 KB |
Output is correct |
8 |
Correct |
4 ms |
12892 KB |
Output is correct |
9 |
Correct |
3 ms |
12892 KB |
Output is correct |
10 |
Correct |
3 ms |
12892 KB |
Output is correct |
11 |
Correct |
3 ms |
12892 KB |
Output is correct |
12 |
Correct |
3 ms |
12892 KB |
Output is correct |
13 |
Correct |
3 ms |
12892 KB |
Output is correct |
14 |
Correct |
2 ms |
12892 KB |
Output is correct |
15 |
Correct |
4 ms |
12636 KB |
Output is correct |
16 |
Correct |
3 ms |
12636 KB |
Output is correct |
17 |
Correct |
2 ms |
12780 KB |
Output is correct |
18 |
Correct |
2 ms |
12892 KB |
Output is correct |
19 |
Correct |
4 ms |
12892 KB |
Output is correct |
20 |
Correct |
3 ms |
12892 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
45 ms |
24148 KB |
Output is correct |
2 |
Correct |
41 ms |
24148 KB |
Output is correct |
3 |
Correct |
40 ms |
24144 KB |
Output is correct |
4 |
Correct |
39 ms |
24144 KB |
Output is correct |
5 |
Correct |
41 ms |
23976 KB |
Output is correct |
6 |
Correct |
49 ms |
32020 KB |
Output is correct |
7 |
Correct |
49 ms |
29144 KB |
Output is correct |
8 |
Correct |
60 ms |
27856 KB |
Output is correct |
9 |
Correct |
41 ms |
26572 KB |
Output is correct |
10 |
Correct |
41 ms |
24144 KB |
Output is correct |
11 |
Correct |
42 ms |
24148 KB |
Output is correct |
12 |
Correct |
39 ms |
24144 KB |
Output is correct |
13 |
Correct |
41 ms |
24172 KB |
Output is correct |
14 |
Correct |
35 ms |
23376 KB |
Output is correct |
15 |
Correct |
31 ms |
22876 KB |
Output is correct |
16 |
Correct |
24 ms |
20368 KB |
Output is correct |
17 |
Correct |
26 ms |
23124 KB |
Output is correct |
18 |
Correct |
27 ms |
23144 KB |
Output is correct |
19 |
Correct |
29 ms |
23492 KB |
Output is correct |
20 |
Correct |
35 ms |
23116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12888 KB |
Output is correct |
2 |
Correct |
2 ms |
12888 KB |
Output is correct |
3 |
Correct |
2 ms |
12892 KB |
Output is correct |
4 |
Correct |
3 ms |
12636 KB |
Output is correct |
5 |
Correct |
3 ms |
12636 KB |
Output is correct |
6 |
Correct |
2 ms |
12636 KB |
Output is correct |
7 |
Correct |
2 ms |
12636 KB |
Output is correct |
8 |
Correct |
3 ms |
12632 KB |
Output is correct |
9 |
Correct |
2 ms |
12636 KB |
Output is correct |
10 |
Correct |
2 ms |
12740 KB |
Output is correct |
11 |
Correct |
2 ms |
12636 KB |
Output is correct |
12 |
Correct |
2 ms |
12892 KB |
Output is correct |
13 |
Correct |
2 ms |
12788 KB |
Output is correct |
14 |
Correct |
2 ms |
12892 KB |
Output is correct |
15 |
Correct |
3 ms |
12892 KB |
Output is correct |
16 |
Correct |
3 ms |
12888 KB |
Output is correct |
17 |
Correct |
3 ms |
12892 KB |
Output is correct |
18 |
Correct |
2 ms |
12636 KB |
Output is correct |
19 |
Correct |
3 ms |
12632 KB |
Output is correct |
20 |
Correct |
2 ms |
12636 KB |
Output is correct |
21 |
Correct |
2 ms |
12892 KB |
Output is correct |
22 |
Correct |
2 ms |
12892 KB |
Output is correct |
23 |
Correct |
4 ms |
12892 KB |
Output is correct |
24 |
Correct |
2 ms |
12888 KB |
Output is correct |
25 |
Correct |
2 ms |
12636 KB |
Output is correct |
26 |
Correct |
2 ms |
12636 KB |
Output is correct |
27 |
Correct |
2 ms |
12816 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
42 ms |
24180 KB |
Output is correct |
2 |
Correct |
58 ms |
24476 KB |
Output is correct |
3 |
Correct |
45 ms |
23888 KB |
Output is correct |
4 |
Correct |
47 ms |
22864 KB |
Output is correct |
5 |
Correct |
46 ms |
21720 KB |
Output is correct |
6 |
Correct |
37 ms |
21072 KB |
Output is correct |
7 |
Correct |
45 ms |
20816 KB |
Output is correct |
8 |
Correct |
32 ms |
20304 KB |
Output is correct |
9 |
Correct |
30 ms |
20160 KB |
Output is correct |
10 |
Correct |
32 ms |
20052 KB |
Output is correct |
11 |
Correct |
31 ms |
20048 KB |
Output is correct |
12 |
Correct |
31 ms |
19792 KB |
Output is correct |
13 |
Correct |
29 ms |
20312 KB |
Output is correct |
14 |
Correct |
34 ms |
22476 KB |
Output is correct |
15 |
Correct |
67 ms |
29148 KB |
Output is correct |
16 |
Correct |
47 ms |
27384 KB |
Output is correct |
17 |
Correct |
47 ms |
28000 KB |
Output is correct |
18 |
Correct |
49 ms |
26476 KB |
Output is correct |
19 |
Correct |
45 ms |
22864 KB |
Output is correct |
20 |
Correct |
41 ms |
22864 KB |
Output is correct |
21 |
Correct |
40 ms |
22868 KB |
Output is correct |
22 |
Correct |
39 ms |
22100 KB |
Output is correct |
23 |
Correct |
34 ms |
21400 KB |
Output is correct |
24 |
Correct |
36 ms |
23376 KB |
Output is correct |
25 |
Correct |
43 ms |
23504 KB |
Output is correct |
26 |
Correct |
41 ms |
22944 KB |
Output is correct |
27 |
Correct |
41 ms |
22868 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12636 KB |
Output is correct |
2 |
Correct |
2 ms |
12636 KB |
Output is correct |
3 |
Correct |
2 ms |
12636 KB |
Output is correct |
4 |
Correct |
2 ms |
12636 KB |
Output is correct |
5 |
Correct |
2 ms |
12636 KB |
Output is correct |
6 |
Correct |
2 ms |
12636 KB |
Output is correct |
7 |
Correct |
2 ms |
12636 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
2 ms |
12776 KB |
Output is correct |
10 |
Correct |
3 ms |
12744 KB |
Output is correct |
11 |
Correct |
2 ms |
12632 KB |
Output is correct |
12 |
Correct |
2 ms |
12636 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
12632 KB |
Output is correct |
16 |
Correct |
2 ms |
12632 KB |
Output is correct |
17 |
Correct |
2 ms |
12632 KB |
Output is correct |
18 |
Correct |
2 ms |
12636 KB |
Output is correct |
19 |
Correct |
2 ms |
12636 KB |
Output is correct |
20 |
Correct |
2 ms |
12636 KB |
Output is correct |
21 |
Correct |
2 ms |
12636 KB |
Output is correct |
22 |
Correct |
2 ms |
12632 KB |
Output is correct |
23 |
Correct |
2 ms |
12636 KB |
Output is correct |
24 |
Correct |
2 ms |
12780 KB |
Output is correct |
25 |
Correct |
2 ms |
12636 KB |
Output is correct |
26 |
Correct |
2 ms |
12636 KB |
Output is correct |
27 |
Correct |
3 ms |
12776 KB |
Output is correct |
28 |
Correct |
2 ms |
12772 KB |
Output is correct |
29 |
Correct |
2 ms |
12636 KB |
Output is correct |
30 |
Correct |
2 ms |
12720 KB |
Output is correct |
31 |
Correct |
2 ms |
12636 KB |
Output is correct |
32 |
Correct |
2 ms |
12636 KB |
Output is correct |
33 |
Correct |
2 ms |
12776 KB |
Output is correct |
34 |
Correct |
2 ms |
12636 KB |
Output is correct |
35 |
Correct |
2 ms |
12636 KB |
Output is correct |
36 |
Correct |
2 ms |
12636 KB |
Output is correct |
37 |
Correct |
2 ms |
12636 KB |
Output is correct |
38 |
Correct |
2 ms |
12636 KB |
Output is correct |
39 |
Correct |
2 ms |
12636 KB |
Output is correct |
40 |
Correct |
2 ms |
12636 KB |
Output is correct |
41 |
Correct |
2 ms |
12636 KB |
Output is correct |
42 |
Correct |
2 ms |
12636 KB |
Output is correct |
43 |
Correct |
2 ms |
12780 KB |
Output is correct |
44 |
Correct |
3 ms |
12636 KB |
Output is correct |
45 |
Correct |
2 ms |
12636 KB |
Output is correct |
46 |
Correct |
2 ms |
12632 KB |
Output is correct |
47 |
Correct |
2 ms |
12636 KB |
Output is correct |
48 |
Correct |
2 ms |
12636 KB |
Output is correct |
49 |
Correct |
2 ms |
12776 KB |
Output is correct |
50 |
Correct |
2 ms |
12636 KB |
Output is correct |
51 |
Correct |
2 ms |
12636 KB |
Output is correct |
52 |
Correct |
2 ms |
12788 KB |
Output is correct |
53 |
Correct |
2 ms |
12668 KB |
Output is correct |
54 |
Correct |
2 ms |
12636 KB |
Output is correct |
55 |
Correct |
2 ms |
12636 KB |
Output is correct |
56 |
Correct |
2 ms |
12636 KB |
Output is correct |
57 |
Correct |
2 ms |
12636 KB |
Output is correct |
58 |
Correct |
2 ms |
12636 KB |
Output is correct |
59 |
Correct |
2 ms |
12636 KB |
Output is correct |
60 |
Correct |
2 ms |
12636 KB |
Output is correct |
61 |
Correct |
2 ms |
12636 KB |
Output is correct |
62 |
Correct |
2 ms |
12636 KB |
Output is correct |
63 |
Correct |
2 ms |
12636 KB |
Output is correct |
64 |
Correct |
2 ms |
12636 KB |
Output is correct |
65 |
Correct |
2 ms |
12636 KB |
Output is correct |
66 |
Correct |
2 ms |
12636 KB |
Output is correct |
67 |
Correct |
2 ms |
12636 KB |
Output is correct |
68 |
Correct |
2 ms |
12892 KB |
Output is correct |
69 |
Correct |
2 ms |
12892 KB |
Output is correct |
70 |
Correct |
4 ms |
12740 KB |
Output is correct |
71 |
Correct |
3 ms |
12636 KB |
Output is correct |
72 |
Correct |
2 ms |
12636 KB |
Output is correct |
73 |
Correct |
2 ms |
12888 KB |
Output is correct |
74 |
Correct |
2 ms |
12636 KB |
Output is correct |
75 |
Correct |
2 ms |
12636 KB |
Output is correct |
76 |
Correct |
2 ms |
12780 KB |
Output is correct |
77 |
Correct |
2 ms |
12892 KB |
Output is correct |
78 |
Correct |
2 ms |
12636 KB |
Output is correct |
79 |
Correct |
2 ms |
12636 KB |
Output is correct |
80 |
Correct |
2 ms |
12888 KB |
Output is correct |
81 |
Correct |
2 ms |
12744 KB |
Output is correct |
82 |
Correct |
2 ms |
12892 KB |
Output is correct |
83 |
Correct |
3 ms |
12780 KB |
Output is correct |
84 |
Correct |
2 ms |
12892 KB |
Output is correct |
85 |
Correct |
3 ms |
12648 KB |
Output is correct |
86 |
Correct |
2 ms |
12716 KB |
Output is correct |
87 |
Correct |
2 ms |
12636 KB |
Output is correct |
88 |
Correct |
2 ms |
12636 KB |
Output is correct |
89 |
Correct |
3 ms |
12636 KB |
Output is correct |
90 |
Correct |
2 ms |
12636 KB |
Output is correct |
91 |
Correct |
2 ms |
12636 KB |
Output is correct |
92 |
Correct |
3 ms |
12636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
12636 KB |
Output is correct |
2 |
Correct |
2 ms |
12636 KB |
Output is correct |
3 |
Correct |
2 ms |
12636 KB |
Output is correct |
4 |
Correct |
2 ms |
12636 KB |
Output is correct |
5 |
Correct |
2 ms |
12636 KB |
Output is correct |
6 |
Correct |
2 ms |
12636 KB |
Output is correct |
7 |
Correct |
2 ms |
12636 KB |
Output is correct |
8 |
Correct |
2 ms |
12636 KB |
Output is correct |
9 |
Correct |
2 ms |
12776 KB |
Output is correct |
10 |
Correct |
3 ms |
12744 KB |
Output is correct |
11 |
Correct |
2 ms |
12632 KB |
Output is correct |
12 |
Correct |
2 ms |
12636 KB |
Output is correct |
13 |
Correct |
2 ms |
12636 KB |
Output is correct |
14 |
Correct |
2 ms |
12636 KB |
Output is correct |
15 |
Correct |
2 ms |
12632 KB |
Output is correct |
16 |
Correct |
2 ms |
12632 KB |
Output is correct |
17 |
Correct |
2 ms |
12632 KB |
Output is correct |
18 |
Correct |
2 ms |
12636 KB |
Output is correct |
19 |
Correct |
2 ms |
12636 KB |
Output is correct |
20 |
Correct |
2 ms |
12636 KB |
Output is correct |
21 |
Correct |
2 ms |
12636 KB |
Output is correct |
22 |
Correct |
2 ms |
12632 KB |
Output is correct |
23 |
Correct |
2 ms |
12636 KB |
Output is correct |
24 |
Correct |
2 ms |
12780 KB |
Output is correct |
25 |
Correct |
2 ms |
12636 KB |
Output is correct |
26 |
Correct |
2 ms |
12636 KB |
Output is correct |
27 |
Correct |
3 ms |
12776 KB |
Output is correct |
28 |
Correct |
2 ms |
12772 KB |
Output is correct |
29 |
Correct |
2 ms |
12636 KB |
Output is correct |
30 |
Correct |
2 ms |
12720 KB |
Output is correct |
31 |
Correct |
2 ms |
12636 KB |
Output is correct |
32 |
Correct |
2 ms |
12636 KB |
Output is correct |
33 |
Correct |
2 ms |
12776 KB |
Output is correct |
34 |
Correct |
2 ms |
12636 KB |
Output is correct |
35 |
Correct |
2 ms |
12636 KB |
Output is correct |
36 |
Correct |
2 ms |
12636 KB |
Output is correct |
37 |
Correct |
2 ms |
12636 KB |
Output is correct |
38 |
Correct |
2 ms |
12636 KB |
Output is correct |
39 |
Correct |
2 ms |
12636 KB |
Output is correct |
40 |
Correct |
2 ms |
12636 KB |
Output is correct |
41 |
Correct |
2 ms |
12636 KB |
Output is correct |
42 |
Correct |
2 ms |
12636 KB |
Output is correct |
43 |
Correct |
2 ms |
12780 KB |
Output is correct |
44 |
Correct |
3 ms |
12636 KB |
Output is correct |
45 |
Correct |
2 ms |
12636 KB |
Output is correct |
46 |
Correct |
2 ms |
12632 KB |
Output is correct |
47 |
Correct |
2 ms |
12636 KB |
Output is correct |
48 |
Correct |
2 ms |
12636 KB |
Output is correct |
49 |
Correct |
2 ms |
12776 KB |
Output is correct |
50 |
Correct |
2 ms |
12636 KB |
Output is correct |
51 |
Correct |
2 ms |
12636 KB |
Output is correct |
52 |
Correct |
2 ms |
12788 KB |
Output is correct |
53 |
Correct |
2 ms |
12668 KB |
Output is correct |
54 |
Correct |
2 ms |
12636 KB |
Output is correct |
55 |
Correct |
2 ms |
12636 KB |
Output is correct |
56 |
Correct |
2 ms |
12636 KB |
Output is correct |
57 |
Correct |
2 ms |
12636 KB |
Output is correct |
58 |
Correct |
2 ms |
12636 KB |
Output is correct |
59 |
Correct |
2 ms |
12636 KB |
Output is correct |
60 |
Correct |
2 ms |
12636 KB |
Output is correct |
61 |
Correct |
2 ms |
12636 KB |
Output is correct |
62 |
Correct |
2 ms |
12636 KB |
Output is correct |
63 |
Correct |
2 ms |
12636 KB |
Output is correct |
64 |
Correct |
2 ms |
12636 KB |
Output is correct |
65 |
Correct |
2 ms |
12636 KB |
Output is correct |
66 |
Correct |
40 ms |
29896 KB |
Output is correct |
67 |
Correct |
40 ms |
29892 KB |
Output is correct |
68 |
Correct |
40 ms |
27472 KB |
Output is correct |
69 |
Correct |
41 ms |
29128 KB |
Output is correct |
70 |
Correct |
36 ms |
24596 KB |
Output is correct |
71 |
Correct |
41 ms |
26968 KB |
Output is correct |
72 |
Correct |
44 ms |
25448 KB |
Output is correct |
73 |
Correct |
38 ms |
25808 KB |
Output is correct |
74 |
Correct |
38 ms |
24036 KB |
Output is correct |
75 |
Correct |
37 ms |
24012 KB |
Output is correct |
76 |
Correct |
43 ms |
21548 KB |
Output is correct |
77 |
Correct |
29 ms |
21464 KB |
Output is correct |
78 |
Correct |
30 ms |
21612 KB |
Output is correct |
79 |
Correct |
27 ms |
21328 KB |
Output is correct |
80 |
Correct |
23 ms |
20168 KB |
Output is correct |
81 |
Correct |
24 ms |
20172 KB |
Output is correct |
82 |
Correct |
5 ms |
15328 KB |
Output is correct |
83 |
Correct |
4 ms |
15072 KB |
Output is correct |
84 |
Correct |
5 ms |
15068 KB |
Output is correct |
85 |
Correct |
4 ms |
15068 KB |
Output is correct |
86 |
Correct |
4 ms |
15064 KB |
Output is correct |
87 |
Correct |
4 ms |
15068 KB |
Output is correct |
88 |
Correct |
2 ms |
12892 KB |
Output is correct |
89 |
Correct |
2 ms |
12740 KB |
Output is correct |
90 |
Correct |
2 ms |
12892 KB |
Output is correct |
91 |
Correct |
3 ms |
12892 KB |
Output is correct |
92 |
Correct |
3 ms |
12892 KB |
Output is correct |
93 |
Correct |
2 ms |
12784 KB |
Output is correct |
94 |
Correct |
4 ms |
12892 KB |
Output is correct |
95 |
Correct |
4 ms |
12892 KB |
Output is correct |
96 |
Correct |
3 ms |
12892 KB |
Output is correct |
97 |
Correct |
3 ms |
12892 KB |
Output is correct |
98 |
Correct |
3 ms |
12892 KB |
Output is correct |
99 |
Correct |
3 ms |
12892 KB |
Output is correct |
100 |
Correct |
3 ms |
12892 KB |
Output is correct |
101 |
Correct |
2 ms |
12892 KB |
Output is correct |
102 |
Correct |
4 ms |
12636 KB |
Output is correct |
103 |
Correct |
3 ms |
12636 KB |
Output is correct |
104 |
Correct |
2 ms |
12780 KB |
Output is correct |
105 |
Correct |
2 ms |
12892 KB |
Output is correct |
106 |
Correct |
4 ms |
12892 KB |
Output is correct |
107 |
Correct |
3 ms |
12892 KB |
Output is correct |
108 |
Correct |
45 ms |
24148 KB |
Output is correct |
109 |
Correct |
41 ms |
24148 KB |
Output is correct |
110 |
Correct |
40 ms |
24144 KB |
Output is correct |
111 |
Correct |
39 ms |
24144 KB |
Output is correct |
112 |
Correct |
41 ms |
23976 KB |
Output is correct |
113 |
Correct |
49 ms |
32020 KB |
Output is correct |
114 |
Correct |
49 ms |
29144 KB |
Output is correct |
115 |
Correct |
60 ms |
27856 KB |
Output is correct |
116 |
Correct |
41 ms |
26572 KB |
Output is correct |
117 |
Correct |
41 ms |
24144 KB |
Output is correct |
118 |
Correct |
42 ms |
24148 KB |
Output is correct |
119 |
Correct |
39 ms |
24144 KB |
Output is correct |
120 |
Correct |
41 ms |
24172 KB |
Output is correct |
121 |
Correct |
35 ms |
23376 KB |
Output is correct |
122 |
Correct |
31 ms |
22876 KB |
Output is correct |
123 |
Correct |
24 ms |
20368 KB |
Output is correct |
124 |
Correct |
26 ms |
23124 KB |
Output is correct |
125 |
Correct |
27 ms |
23144 KB |
Output is correct |
126 |
Correct |
29 ms |
23492 KB |
Output is correct |
127 |
Correct |
35 ms |
23116 KB |
Output is correct |
128 |
Correct |
2 ms |
12888 KB |
Output is correct |
129 |
Correct |
2 ms |
12888 KB |
Output is correct |
130 |
Correct |
2 ms |
12892 KB |
Output is correct |
131 |
Correct |
3 ms |
12636 KB |
Output is correct |
132 |
Correct |
3 ms |
12636 KB |
Output is correct |
133 |
Correct |
2 ms |
12636 KB |
Output is correct |
134 |
Correct |
2 ms |
12636 KB |
Output is correct |
135 |
Correct |
3 ms |
12632 KB |
Output is correct |
136 |
Correct |
2 ms |
12636 KB |
Output is correct |
137 |
Correct |
2 ms |
12740 KB |
Output is correct |
138 |
Correct |
2 ms |
12636 KB |
Output is correct |
139 |
Correct |
2 ms |
12892 KB |
Output is correct |
140 |
Correct |
2 ms |
12788 KB |
Output is correct |
141 |
Correct |
2 ms |
12892 KB |
Output is correct |
142 |
Correct |
3 ms |
12892 KB |
Output is correct |
143 |
Correct |
3 ms |
12888 KB |
Output is correct |
144 |
Correct |
3 ms |
12892 KB |
Output is correct |
145 |
Correct |
2 ms |
12636 KB |
Output is correct |
146 |
Correct |
3 ms |
12632 KB |
Output is correct |
147 |
Correct |
2 ms |
12636 KB |
Output is correct |
148 |
Correct |
2 ms |
12892 KB |
Output is correct |
149 |
Correct |
2 ms |
12892 KB |
Output is correct |
150 |
Correct |
4 ms |
12892 KB |
Output is correct |
151 |
Correct |
2 ms |
12888 KB |
Output is correct |
152 |
Correct |
2 ms |
12636 KB |
Output is correct |
153 |
Correct |
2 ms |
12636 KB |
Output is correct |
154 |
Correct |
2 ms |
12816 KB |
Output is correct |
155 |
Correct |
42 ms |
24180 KB |
Output is correct |
156 |
Correct |
58 ms |
24476 KB |
Output is correct |
157 |
Correct |
45 ms |
23888 KB |
Output is correct |
158 |
Correct |
47 ms |
22864 KB |
Output is correct |
159 |
Correct |
46 ms |
21720 KB |
Output is correct |
160 |
Correct |
37 ms |
21072 KB |
Output is correct |
161 |
Correct |
45 ms |
20816 KB |
Output is correct |
162 |
Correct |
32 ms |
20304 KB |
Output is correct |
163 |
Correct |
30 ms |
20160 KB |
Output is correct |
164 |
Correct |
32 ms |
20052 KB |
Output is correct |
165 |
Correct |
31 ms |
20048 KB |
Output is correct |
166 |
Correct |
31 ms |
19792 KB |
Output is correct |
167 |
Correct |
29 ms |
20312 KB |
Output is correct |
168 |
Correct |
34 ms |
22476 KB |
Output is correct |
169 |
Correct |
67 ms |
29148 KB |
Output is correct |
170 |
Correct |
47 ms |
27384 KB |
Output is correct |
171 |
Correct |
47 ms |
28000 KB |
Output is correct |
172 |
Correct |
49 ms |
26476 KB |
Output is correct |
173 |
Correct |
45 ms |
22864 KB |
Output is correct |
174 |
Correct |
41 ms |
22864 KB |
Output is correct |
175 |
Correct |
40 ms |
22868 KB |
Output is correct |
176 |
Correct |
39 ms |
22100 KB |
Output is correct |
177 |
Correct |
34 ms |
21400 KB |
Output is correct |
178 |
Correct |
36 ms |
23376 KB |
Output is correct |
179 |
Correct |
43 ms |
23504 KB |
Output is correct |
180 |
Correct |
41 ms |
22944 KB |
Output is correct |
181 |
Correct |
41 ms |
22868 KB |
Output is correct |
182 |
Correct |
2 ms |
12636 KB |
Output is correct |
183 |
Correct |
2 ms |
12636 KB |
Output is correct |
184 |
Correct |
2 ms |
12892 KB |
Output is correct |
185 |
Correct |
2 ms |
12892 KB |
Output is correct |
186 |
Correct |
4 ms |
12740 KB |
Output is correct |
187 |
Correct |
3 ms |
12636 KB |
Output is correct |
188 |
Correct |
2 ms |
12636 KB |
Output is correct |
189 |
Correct |
2 ms |
12888 KB |
Output is correct |
190 |
Correct |
2 ms |
12636 KB |
Output is correct |
191 |
Correct |
2 ms |
12636 KB |
Output is correct |
192 |
Correct |
2 ms |
12780 KB |
Output is correct |
193 |
Correct |
2 ms |
12892 KB |
Output is correct |
194 |
Correct |
2 ms |
12636 KB |
Output is correct |
195 |
Correct |
2 ms |
12636 KB |
Output is correct |
196 |
Correct |
2 ms |
12888 KB |
Output is correct |
197 |
Correct |
2 ms |
12744 KB |
Output is correct |
198 |
Correct |
2 ms |
12892 KB |
Output is correct |
199 |
Correct |
3 ms |
12780 KB |
Output is correct |
200 |
Correct |
2 ms |
12892 KB |
Output is correct |
201 |
Correct |
3 ms |
12648 KB |
Output is correct |
202 |
Correct |
2 ms |
12716 KB |
Output is correct |
203 |
Correct |
2 ms |
12636 KB |
Output is correct |
204 |
Correct |
2 ms |
12636 KB |
Output is correct |
205 |
Correct |
3 ms |
12636 KB |
Output is correct |
206 |
Correct |
2 ms |
12636 KB |
Output is correct |
207 |
Correct |
2 ms |
12636 KB |
Output is correct |
208 |
Correct |
3 ms |
12636 KB |
Output is correct |
209 |
Correct |
4 ms |
15068 KB |
Output is correct |
210 |
Correct |
21 ms |
19940 KB |
Output is correct |
211 |
Correct |
38 ms |
24136 KB |
Output is correct |
212 |
Correct |
49 ms |
27812 KB |
Output is correct |
213 |
Correct |
65 ms |
30436 KB |
Output is correct |
214 |
Correct |
30 ms |
21976 KB |
Output is correct |
215 |
Correct |
35 ms |
22120 KB |
Output is correct |
216 |
Correct |
43 ms |
23120 KB |
Output is correct |
217 |
Correct |
47 ms |
21792 KB |
Output is correct |
218 |
Correct |
35 ms |
20564 KB |
Output is correct |
219 |
Correct |
32 ms |
20052 KB |
Output is correct |
220 |
Correct |
31 ms |
19984 KB |
Output is correct |
221 |
Correct |
44 ms |
19796 KB |
Output is correct |
222 |
Correct |
29 ms |
21208 KB |
Output is correct |
223 |
Correct |
49 ms |
24892 KB |
Output is correct |
224 |
Correct |
47 ms |
24184 KB |
Output is correct |
225 |
Correct |
41 ms |
21588 KB |
Output is correct |
226 |
Correct |
44 ms |
21588 KB |
Output is correct |
227 |
Correct |
42 ms |
21584 KB |
Output is correct |
228 |
Correct |
45 ms |
21252 KB |
Output is correct |
229 |
Correct |
33 ms |
20684 KB |
Output is correct |
230 |
Correct |
39 ms |
21448 KB |
Output is correct |
231 |
Correct |
41 ms |
21584 KB |
Output is correct |