#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define mp make_pair
typedef pair<int, int> ii;
typedef long long ll;
const int len = 2e5+5;
int num[len], low[len], art[len], sz[len], vis[len], par[len], subtree[len];
int cnt_dfs, cnt_com, n, m;
ii edge[len];
vector<int> com[len], nex[len], stck;
vector<ii> adj[len];
// this dfs works fine because the graph is simple
// (no multiple edges or self loops)
void dfs(int u, int root = 0){
num[u] = low[u] = ++cnt_dfs;
int children = 0;
for (auto v: adj[u]){
if (!vis[v.se] && !num[v.fi]){
children++;
vis[v.se] = 1, stck.pb(v.se);
dfs(v.fi);
low[u] = min(low[u], low[v.fi]);
if (low[v.fi] >= num[u]){
cnt_com++;
art[u] = 1;
while (true){
int e = stck.back();
stck.pop_back();
com[cnt_com].pb(e);
if (e == v.se)
break;
}
}
}
else if (!vis[v.se] && num[v.fi]){
vis[v.se] = 1, stck.pb(v.se);
low[u] = min(low[u], num[v.fi]);
}
}
if (root)
art[u] = (children > 1);
//printf("finished dfs: u = %d, art = %d, num = %d, low = %d\n", u, art[u], num[u], low[u]);
}
void decompose(){
set<ii> mys;
for (int i = 1; i <= n; i++)
vis[i] = 0;
for (int i = 1; i <= cnt_com; i++){
/*
printf("component $%d:", i);
for (auto e: com[i])
printf(" (%d, %d)", edge[e].fi, edge[e].se);
printf("\n");
*/
for (auto e: com[i]){
int a = edge[e].fi, b = edge[e].se;
if (!vis[a] && !art[a])
vis[a] = 1, sz[i+n]++;
if (!art[b] && !vis[b])
vis[b] = 1, sz[i+n]++;
if (art[a] && !mys.count(mp(a, i+n))){
mys.insert(mp(a, i+n));
nex[a].pb(i+n);
nex[i+n].pb(a);
}
if (art[b] && !mys.count(mp(b, i+n))){
mys.insert(mp(b, i+n));
nex[b].pb(i+n);
nex[i+n].pb(b);
}
}
//printf("sz = %d\n", sz[i+n]);
}
}
void fix(int u){
/*
printf("u = %d\n", u);
if (art[u])
printf("i am articulation point\n");
else
printf("i am a 2-vertext cc\n");
*/
subtree[u] = 1;
if (!art[u])
subtree[u] = sz[u];
for (auto v: nex[u]){
if (v == par[u]) continue;
par[v] = u;
fix(v);
subtree[u] += subtree[v];
}
//printf("ins fix: u = %d, subtree = %d\n", u, subtree[u]);
}
ll solve(int u, int all){
//printf("u = %d, all = %d\n", u, all);
ll ans = 0;
for (auto v: nex[u])
if (v != par[u])
ans += solve(v, all);
ll sum = 0;
for (auto v: nex[u]){
int sub = subtree[v];
if (v == par[u])
sub = all-subtree[u];
//printf("%d -> %d, sub = %d\n", u, v, sub);
sum += sub;
}
//printf("u = %d, sum = %lld\n", u, sum);
if (art[u]){
for (auto v: nex[u]){
int sub = subtree[v];
if (v == par[u])
sub = all-subtree[u];
// two different subtrees
ans += sub*1LL*(sum-sub);
// same subtree - not all cases
ans += sz[v]*1LL*(sz[v]-1);
ans += 2*sz[v]*1LL*(sub-sz[v]);
}
}
else{
int mul = 0;
for (auto v: nex[u]){
int sub = subtree[v];
if (v == par[u])
sub = all-subtree[u];
mul += sub*1LL*(sum-sub);
}
for (auto v: nex[u]){
int sub = subtree[v];
if (v == par[u])
sub = all-subtree[u];
// two different subtrees
ans += sz[u]*1LL*sub*1LL*(sum-sub);
// 1 from my cc and one from a subtree
ans += 2*sz[u]*1LL*(sz[u]-1)*1LL*sub;
// center is adjacent art
ans += mul - 2*sub*1LL*(sum-sub);
}
// 2 from my cc
ans += sz[u]*1LL*(sz[u]-1)*1LL*(sz[u]-2);
}
return ans;
}
int main(){
scanf("%d %d", &n, &m);
for (int i = 0; i < m; i++){
int a, b;
scanf("%d %d", &a, &b);
adj[a].pb(mp(b, i));
adj[b].pb(mp(a, i));
edge[i] = mp(a, b);
}
for (int i = 1; i <= n; i++)
if (!num[i])
dfs(i, 1);
//printf("after dfs\n");
decompose();
//printf("after decompose\n");
//printf("cnt_com = %d\n", cnt_com);
ll ans = 0;
for (int i = 1; i <= n+cnt_com; i++)
if ((art[i] || i >= n+1) && !par[i])
fix(i), ans += solve(i, subtree[i]);
//printf("after solve\n");
printf("%lld\n", ans);
return 0;
}
/*
4 3
1 2
2 3
3 4
4 4
1 2
2 3
3 4
4 2
*/
Compilation message
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:185:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
185 | scanf("%d %d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~~
count_triplets.cpp:188:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
188 | scanf("%d %d", &a, &b);
| ~~~~~^~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
14464 KB |
Output is correct |
2 |
Correct |
10 ms |
14464 KB |
Output is correct |
3 |
Correct |
10 ms |
14464 KB |
Output is correct |
4 |
Correct |
11 ms |
14464 KB |
Output is correct |
5 |
Correct |
10 ms |
14592 KB |
Output is correct |
6 |
Correct |
10 ms |
14464 KB |
Output is correct |
7 |
Correct |
11 ms |
14464 KB |
Output is correct |
8 |
Correct |
11 ms |
14464 KB |
Output is correct |
9 |
Correct |
11 ms |
14464 KB |
Output is correct |
10 |
Correct |
10 ms |
14464 KB |
Output is correct |
11 |
Correct |
11 ms |
14464 KB |
Output is correct |
12 |
Correct |
10 ms |
14464 KB |
Output is correct |
13 |
Correct |
10 ms |
14464 KB |
Output is correct |
14 |
Correct |
10 ms |
14464 KB |
Output is correct |
15 |
Correct |
10 ms |
14464 KB |
Output is correct |
16 |
Correct |
10 ms |
14464 KB |
Output is correct |
17 |
Correct |
10 ms |
14464 KB |
Output is correct |
18 |
Correct |
10 ms |
14464 KB |
Output is correct |
19 |
Correct |
11 ms |
14496 KB |
Output is correct |
20 |
Correct |
10 ms |
14464 KB |
Output is correct |
21 |
Correct |
11 ms |
14464 KB |
Output is correct |
22 |
Correct |
10 ms |
14464 KB |
Output is correct |
23 |
Correct |
11 ms |
14464 KB |
Output is correct |
24 |
Correct |
10 ms |
14464 KB |
Output is correct |
25 |
Correct |
10 ms |
14464 KB |
Output is correct |
26 |
Correct |
10 ms |
14464 KB |
Output is correct |
27 |
Correct |
10 ms |
14464 KB |
Output is correct |
28 |
Correct |
10 ms |
14464 KB |
Output is correct |
29 |
Correct |
10 ms |
14464 KB |
Output is correct |
30 |
Correct |
10 ms |
14464 KB |
Output is correct |
31 |
Correct |
10 ms |
14512 KB |
Output is correct |
32 |
Correct |
11 ms |
14592 KB |
Output is correct |
33 |
Correct |
13 ms |
14464 KB |
Output is correct |
34 |
Correct |
12 ms |
14464 KB |
Output is correct |
35 |
Correct |
12 ms |
14464 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
14464 KB |
Output is correct |
2 |
Correct |
10 ms |
14464 KB |
Output is correct |
3 |
Correct |
10 ms |
14464 KB |
Output is correct |
4 |
Correct |
11 ms |
14464 KB |
Output is correct |
5 |
Correct |
10 ms |
14592 KB |
Output is correct |
6 |
Correct |
10 ms |
14464 KB |
Output is correct |
7 |
Correct |
11 ms |
14464 KB |
Output is correct |
8 |
Correct |
11 ms |
14464 KB |
Output is correct |
9 |
Correct |
11 ms |
14464 KB |
Output is correct |
10 |
Correct |
10 ms |
14464 KB |
Output is correct |
11 |
Correct |
11 ms |
14464 KB |
Output is correct |
12 |
Correct |
10 ms |
14464 KB |
Output is correct |
13 |
Correct |
10 ms |
14464 KB |
Output is correct |
14 |
Correct |
10 ms |
14464 KB |
Output is correct |
15 |
Correct |
10 ms |
14464 KB |
Output is correct |
16 |
Correct |
10 ms |
14464 KB |
Output is correct |
17 |
Correct |
10 ms |
14464 KB |
Output is correct |
18 |
Correct |
10 ms |
14464 KB |
Output is correct |
19 |
Correct |
11 ms |
14496 KB |
Output is correct |
20 |
Correct |
10 ms |
14464 KB |
Output is correct |
21 |
Correct |
11 ms |
14464 KB |
Output is correct |
22 |
Correct |
10 ms |
14464 KB |
Output is correct |
23 |
Correct |
11 ms |
14464 KB |
Output is correct |
24 |
Correct |
10 ms |
14464 KB |
Output is correct |
25 |
Correct |
10 ms |
14464 KB |
Output is correct |
26 |
Correct |
10 ms |
14464 KB |
Output is correct |
27 |
Correct |
10 ms |
14464 KB |
Output is correct |
28 |
Correct |
10 ms |
14464 KB |
Output is correct |
29 |
Correct |
10 ms |
14464 KB |
Output is correct |
30 |
Correct |
10 ms |
14464 KB |
Output is correct |
31 |
Correct |
10 ms |
14512 KB |
Output is correct |
32 |
Correct |
11 ms |
14592 KB |
Output is correct |
33 |
Correct |
13 ms |
14464 KB |
Output is correct |
34 |
Correct |
12 ms |
14464 KB |
Output is correct |
35 |
Correct |
12 ms |
14464 KB |
Output is correct |
36 |
Correct |
14 ms |
14464 KB |
Output is correct |
37 |
Correct |
10 ms |
14464 KB |
Output is correct |
38 |
Correct |
10 ms |
14464 KB |
Output is correct |
39 |
Correct |
10 ms |
14464 KB |
Output is correct |
40 |
Correct |
10 ms |
14464 KB |
Output is correct |
41 |
Correct |
10 ms |
14464 KB |
Output is correct |
42 |
Correct |
10 ms |
14464 KB |
Output is correct |
43 |
Correct |
12 ms |
14464 KB |
Output is correct |
44 |
Correct |
10 ms |
14464 KB |
Output is correct |
45 |
Correct |
10 ms |
14464 KB |
Output is correct |
46 |
Correct |
10 ms |
14464 KB |
Output is correct |
47 |
Correct |
11 ms |
14464 KB |
Output is correct |
48 |
Correct |
10 ms |
14464 KB |
Output is correct |
49 |
Correct |
10 ms |
14464 KB |
Output is correct |
50 |
Correct |
10 ms |
14464 KB |
Output is correct |
51 |
Correct |
11 ms |
14464 KB |
Output is correct |
52 |
Correct |
12 ms |
14464 KB |
Output is correct |
53 |
Correct |
11 ms |
14464 KB |
Output is correct |
54 |
Correct |
12 ms |
14464 KB |
Output is correct |
55 |
Correct |
12 ms |
14464 KB |
Output is correct |
56 |
Correct |
10 ms |
14464 KB |
Output is correct |
57 |
Correct |
10 ms |
14488 KB |
Output is correct |
58 |
Correct |
12 ms |
14464 KB |
Output is correct |
59 |
Correct |
10 ms |
14464 KB |
Output is correct |
60 |
Correct |
13 ms |
14464 KB |
Output is correct |
61 |
Correct |
11 ms |
14556 KB |
Output is correct |
62 |
Correct |
10 ms |
14464 KB |
Output is correct |
63 |
Correct |
10 ms |
14464 KB |
Output is correct |
64 |
Correct |
10 ms |
14464 KB |
Output is correct |
65 |
Correct |
11 ms |
14464 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
113 ms |
28532 KB |
Output is correct |
2 |
Correct |
113 ms |
29816 KB |
Output is correct |
3 |
Correct |
247 ms |
40052 KB |
Output is correct |
4 |
Correct |
157 ms |
33372 KB |
Output is correct |
5 |
Correct |
184 ms |
33908 KB |
Output is correct |
6 |
Correct |
255 ms |
39412 KB |
Output is correct |
7 |
Correct |
317 ms |
37624 KB |
Output is correct |
8 |
Correct |
317 ms |
38264 KB |
Output is correct |
9 |
Correct |
239 ms |
35960 KB |
Output is correct |
10 |
Correct |
202 ms |
34680 KB |
Output is correct |
11 |
Correct |
159 ms |
28152 KB |
Output is correct |
12 |
Correct |
159 ms |
28152 KB |
Output is correct |
13 |
Correct |
135 ms |
26744 KB |
Output is correct |
14 |
Correct |
130 ms |
26872 KB |
Output is correct |
15 |
Correct |
87 ms |
23928 KB |
Output is correct |
16 |
Correct |
100 ms |
23932 KB |
Output is correct |
17 |
Correct |
14 ms |
16000 KB |
Output is correct |
18 |
Correct |
12 ms |
16000 KB |
Output is correct |
19 |
Correct |
15 ms |
16000 KB |
Output is correct |
20 |
Correct |
12 ms |
16000 KB |
Output is correct |
21 |
Correct |
15 ms |
16000 KB |
Output is correct |
22 |
Correct |
12 ms |
16000 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
14720 KB |
Output is correct |
2 |
Correct |
14 ms |
14720 KB |
Output is correct |
3 |
Correct |
11 ms |
14720 KB |
Output is correct |
4 |
Correct |
12 ms |
14848 KB |
Output is correct |
5 |
Correct |
14 ms |
14848 KB |
Output is correct |
6 |
Correct |
12 ms |
14720 KB |
Output is correct |
7 |
Correct |
12 ms |
14848 KB |
Output is correct |
8 |
Correct |
11 ms |
14720 KB |
Output is correct |
9 |
Correct |
12 ms |
14720 KB |
Output is correct |
10 |
Correct |
11 ms |
14720 KB |
Output is correct |
11 |
Correct |
11 ms |
14720 KB |
Output is correct |
12 |
Correct |
13 ms |
14720 KB |
Output is correct |
13 |
Correct |
11 ms |
14720 KB |
Output is correct |
14 |
Correct |
11 ms |
14720 KB |
Output is correct |
15 |
Correct |
14 ms |
14592 KB |
Output is correct |
16 |
Correct |
11 ms |
14592 KB |
Output is correct |
17 |
Correct |
11 ms |
14592 KB |
Output is correct |
18 |
Correct |
11 ms |
14720 KB |
Output is correct |
19 |
Correct |
13 ms |
14592 KB |
Output is correct |
20 |
Correct |
11 ms |
14592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
246 ms |
37404 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
14720 KB |
Output is correct |
2 |
Correct |
11 ms |
14720 KB |
Output is correct |
3 |
Correct |
11 ms |
14592 KB |
Output is correct |
4 |
Correct |
14 ms |
14592 KB |
Output is correct |
5 |
Correct |
13 ms |
14592 KB |
Output is correct |
6 |
Correct |
13 ms |
14592 KB |
Output is correct |
7 |
Correct |
12 ms |
14592 KB |
Output is correct |
8 |
Correct |
12 ms |
14592 KB |
Output is correct |
9 |
Correct |
11 ms |
14592 KB |
Output is correct |
10 |
Correct |
14 ms |
14592 KB |
Output is correct |
11 |
Correct |
11 ms |
14592 KB |
Output is correct |
12 |
Correct |
12 ms |
14720 KB |
Output is correct |
13 |
Correct |
14 ms |
14760 KB |
Output is correct |
14 |
Correct |
12 ms |
14720 KB |
Output is correct |
15 |
Correct |
12 ms |
14720 KB |
Output is correct |
16 |
Correct |
14 ms |
14592 KB |
Output is correct |
17 |
Correct |
12 ms |
14592 KB |
Output is correct |
18 |
Correct |
12 ms |
14592 KB |
Output is correct |
19 |
Correct |
16 ms |
14592 KB |
Output is correct |
20 |
Correct |
15 ms |
14592 KB |
Output is correct |
21 |
Correct |
14 ms |
14592 KB |
Output is correct |
22 |
Correct |
11 ms |
14720 KB |
Output is correct |
23 |
Correct |
11 ms |
14624 KB |
Output is correct |
24 |
Correct |
13 ms |
14592 KB |
Output is correct |
25 |
Correct |
10 ms |
14464 KB |
Output is correct |
26 |
Correct |
12 ms |
14464 KB |
Output is correct |
27 |
Correct |
10 ms |
14464 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
326 ms |
37600 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
14464 KB |
Output is correct |
2 |
Correct |
10 ms |
14464 KB |
Output is correct |
3 |
Correct |
10 ms |
14464 KB |
Output is correct |
4 |
Correct |
11 ms |
14464 KB |
Output is correct |
5 |
Correct |
10 ms |
14592 KB |
Output is correct |
6 |
Correct |
10 ms |
14464 KB |
Output is correct |
7 |
Correct |
11 ms |
14464 KB |
Output is correct |
8 |
Correct |
11 ms |
14464 KB |
Output is correct |
9 |
Correct |
11 ms |
14464 KB |
Output is correct |
10 |
Correct |
10 ms |
14464 KB |
Output is correct |
11 |
Correct |
11 ms |
14464 KB |
Output is correct |
12 |
Correct |
10 ms |
14464 KB |
Output is correct |
13 |
Correct |
10 ms |
14464 KB |
Output is correct |
14 |
Correct |
10 ms |
14464 KB |
Output is correct |
15 |
Correct |
10 ms |
14464 KB |
Output is correct |
16 |
Correct |
10 ms |
14464 KB |
Output is correct |
17 |
Correct |
10 ms |
14464 KB |
Output is correct |
18 |
Correct |
10 ms |
14464 KB |
Output is correct |
19 |
Correct |
11 ms |
14496 KB |
Output is correct |
20 |
Correct |
10 ms |
14464 KB |
Output is correct |
21 |
Correct |
11 ms |
14464 KB |
Output is correct |
22 |
Correct |
10 ms |
14464 KB |
Output is correct |
23 |
Correct |
11 ms |
14464 KB |
Output is correct |
24 |
Correct |
10 ms |
14464 KB |
Output is correct |
25 |
Correct |
10 ms |
14464 KB |
Output is correct |
26 |
Correct |
10 ms |
14464 KB |
Output is correct |
27 |
Correct |
10 ms |
14464 KB |
Output is correct |
28 |
Correct |
10 ms |
14464 KB |
Output is correct |
29 |
Correct |
10 ms |
14464 KB |
Output is correct |
30 |
Correct |
10 ms |
14464 KB |
Output is correct |
31 |
Correct |
10 ms |
14512 KB |
Output is correct |
32 |
Correct |
11 ms |
14592 KB |
Output is correct |
33 |
Correct |
13 ms |
14464 KB |
Output is correct |
34 |
Correct |
12 ms |
14464 KB |
Output is correct |
35 |
Correct |
12 ms |
14464 KB |
Output is correct |
36 |
Correct |
14 ms |
14464 KB |
Output is correct |
37 |
Correct |
10 ms |
14464 KB |
Output is correct |
38 |
Correct |
10 ms |
14464 KB |
Output is correct |
39 |
Correct |
10 ms |
14464 KB |
Output is correct |
40 |
Correct |
10 ms |
14464 KB |
Output is correct |
41 |
Correct |
10 ms |
14464 KB |
Output is correct |
42 |
Correct |
10 ms |
14464 KB |
Output is correct |
43 |
Correct |
12 ms |
14464 KB |
Output is correct |
44 |
Correct |
10 ms |
14464 KB |
Output is correct |
45 |
Correct |
10 ms |
14464 KB |
Output is correct |
46 |
Correct |
10 ms |
14464 KB |
Output is correct |
47 |
Correct |
11 ms |
14464 KB |
Output is correct |
48 |
Correct |
10 ms |
14464 KB |
Output is correct |
49 |
Correct |
10 ms |
14464 KB |
Output is correct |
50 |
Correct |
10 ms |
14464 KB |
Output is correct |
51 |
Correct |
11 ms |
14464 KB |
Output is correct |
52 |
Correct |
12 ms |
14464 KB |
Output is correct |
53 |
Correct |
11 ms |
14464 KB |
Output is correct |
54 |
Correct |
12 ms |
14464 KB |
Output is correct |
55 |
Correct |
12 ms |
14464 KB |
Output is correct |
56 |
Correct |
10 ms |
14464 KB |
Output is correct |
57 |
Correct |
10 ms |
14488 KB |
Output is correct |
58 |
Correct |
12 ms |
14464 KB |
Output is correct |
59 |
Correct |
10 ms |
14464 KB |
Output is correct |
60 |
Correct |
13 ms |
14464 KB |
Output is correct |
61 |
Correct |
11 ms |
14556 KB |
Output is correct |
62 |
Correct |
10 ms |
14464 KB |
Output is correct |
63 |
Correct |
10 ms |
14464 KB |
Output is correct |
64 |
Correct |
10 ms |
14464 KB |
Output is correct |
65 |
Correct |
11 ms |
14464 KB |
Output is correct |
66 |
Correct |
10 ms |
14464 KB |
Output is correct |
67 |
Correct |
11 ms |
14592 KB |
Output is correct |
68 |
Correct |
11 ms |
14592 KB |
Output is correct |
69 |
Correct |
11 ms |
14592 KB |
Output is correct |
70 |
Correct |
11 ms |
14592 KB |
Output is correct |
71 |
Correct |
10 ms |
14592 KB |
Output is correct |
72 |
Correct |
12 ms |
14592 KB |
Output is correct |
73 |
Correct |
11 ms |
14592 KB |
Output is correct |
74 |
Correct |
11 ms |
14592 KB |
Output is correct |
75 |
Correct |
11 ms |
14592 KB |
Output is correct |
76 |
Correct |
10 ms |
14464 KB |
Output is correct |
77 |
Correct |
11 ms |
14592 KB |
Output is correct |
78 |
Correct |
14 ms |
14592 KB |
Output is correct |
79 |
Correct |
11 ms |
14592 KB |
Output is correct |
80 |
Correct |
13 ms |
14592 KB |
Output is correct |
81 |
Correct |
11 ms |
14592 KB |
Output is correct |
82 |
Correct |
15 ms |
14592 KB |
Output is correct |
83 |
Correct |
10 ms |
14592 KB |
Output is correct |
84 |
Correct |
20 ms |
14592 KB |
Output is correct |
85 |
Correct |
11 ms |
14592 KB |
Output is correct |
86 |
Correct |
11 ms |
14592 KB |
Output is correct |
87 |
Correct |
12 ms |
14592 KB |
Output is correct |
88 |
Correct |
13 ms |
14592 KB |
Output is correct |
89 |
Correct |
14 ms |
14592 KB |
Output is correct |
90 |
Correct |
13 ms |
14592 KB |
Output is correct |
91 |
Correct |
11 ms |
14592 KB |
Output is correct |
92 |
Correct |
13 ms |
14592 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
10 ms |
14464 KB |
Output is correct |
2 |
Correct |
10 ms |
14464 KB |
Output is correct |
3 |
Correct |
10 ms |
14464 KB |
Output is correct |
4 |
Correct |
11 ms |
14464 KB |
Output is correct |
5 |
Correct |
10 ms |
14592 KB |
Output is correct |
6 |
Correct |
10 ms |
14464 KB |
Output is correct |
7 |
Correct |
11 ms |
14464 KB |
Output is correct |
8 |
Correct |
11 ms |
14464 KB |
Output is correct |
9 |
Correct |
11 ms |
14464 KB |
Output is correct |
10 |
Correct |
10 ms |
14464 KB |
Output is correct |
11 |
Correct |
11 ms |
14464 KB |
Output is correct |
12 |
Correct |
10 ms |
14464 KB |
Output is correct |
13 |
Correct |
10 ms |
14464 KB |
Output is correct |
14 |
Correct |
10 ms |
14464 KB |
Output is correct |
15 |
Correct |
10 ms |
14464 KB |
Output is correct |
16 |
Correct |
10 ms |
14464 KB |
Output is correct |
17 |
Correct |
10 ms |
14464 KB |
Output is correct |
18 |
Correct |
10 ms |
14464 KB |
Output is correct |
19 |
Correct |
11 ms |
14496 KB |
Output is correct |
20 |
Correct |
10 ms |
14464 KB |
Output is correct |
21 |
Correct |
11 ms |
14464 KB |
Output is correct |
22 |
Correct |
10 ms |
14464 KB |
Output is correct |
23 |
Correct |
11 ms |
14464 KB |
Output is correct |
24 |
Correct |
10 ms |
14464 KB |
Output is correct |
25 |
Correct |
10 ms |
14464 KB |
Output is correct |
26 |
Correct |
10 ms |
14464 KB |
Output is correct |
27 |
Correct |
10 ms |
14464 KB |
Output is correct |
28 |
Correct |
10 ms |
14464 KB |
Output is correct |
29 |
Correct |
10 ms |
14464 KB |
Output is correct |
30 |
Correct |
10 ms |
14464 KB |
Output is correct |
31 |
Correct |
10 ms |
14512 KB |
Output is correct |
32 |
Correct |
11 ms |
14592 KB |
Output is correct |
33 |
Correct |
13 ms |
14464 KB |
Output is correct |
34 |
Correct |
12 ms |
14464 KB |
Output is correct |
35 |
Correct |
12 ms |
14464 KB |
Output is correct |
36 |
Correct |
14 ms |
14464 KB |
Output is correct |
37 |
Correct |
10 ms |
14464 KB |
Output is correct |
38 |
Correct |
10 ms |
14464 KB |
Output is correct |
39 |
Correct |
10 ms |
14464 KB |
Output is correct |
40 |
Correct |
10 ms |
14464 KB |
Output is correct |
41 |
Correct |
10 ms |
14464 KB |
Output is correct |
42 |
Correct |
10 ms |
14464 KB |
Output is correct |
43 |
Correct |
12 ms |
14464 KB |
Output is correct |
44 |
Correct |
10 ms |
14464 KB |
Output is correct |
45 |
Correct |
10 ms |
14464 KB |
Output is correct |
46 |
Correct |
10 ms |
14464 KB |
Output is correct |
47 |
Correct |
11 ms |
14464 KB |
Output is correct |
48 |
Correct |
10 ms |
14464 KB |
Output is correct |
49 |
Correct |
10 ms |
14464 KB |
Output is correct |
50 |
Correct |
10 ms |
14464 KB |
Output is correct |
51 |
Correct |
11 ms |
14464 KB |
Output is correct |
52 |
Correct |
12 ms |
14464 KB |
Output is correct |
53 |
Correct |
11 ms |
14464 KB |
Output is correct |
54 |
Correct |
12 ms |
14464 KB |
Output is correct |
55 |
Correct |
12 ms |
14464 KB |
Output is correct |
56 |
Correct |
10 ms |
14464 KB |
Output is correct |
57 |
Correct |
10 ms |
14488 KB |
Output is correct |
58 |
Correct |
12 ms |
14464 KB |
Output is correct |
59 |
Correct |
10 ms |
14464 KB |
Output is correct |
60 |
Correct |
13 ms |
14464 KB |
Output is correct |
61 |
Correct |
11 ms |
14556 KB |
Output is correct |
62 |
Correct |
10 ms |
14464 KB |
Output is correct |
63 |
Correct |
10 ms |
14464 KB |
Output is correct |
64 |
Correct |
10 ms |
14464 KB |
Output is correct |
65 |
Correct |
11 ms |
14464 KB |
Output is correct |
66 |
Correct |
113 ms |
28532 KB |
Output is correct |
67 |
Correct |
113 ms |
29816 KB |
Output is correct |
68 |
Correct |
247 ms |
40052 KB |
Output is correct |
69 |
Correct |
157 ms |
33372 KB |
Output is correct |
70 |
Correct |
184 ms |
33908 KB |
Output is correct |
71 |
Correct |
255 ms |
39412 KB |
Output is correct |
72 |
Correct |
317 ms |
37624 KB |
Output is correct |
73 |
Correct |
317 ms |
38264 KB |
Output is correct |
74 |
Correct |
239 ms |
35960 KB |
Output is correct |
75 |
Correct |
202 ms |
34680 KB |
Output is correct |
76 |
Correct |
159 ms |
28152 KB |
Output is correct |
77 |
Correct |
159 ms |
28152 KB |
Output is correct |
78 |
Correct |
135 ms |
26744 KB |
Output is correct |
79 |
Correct |
130 ms |
26872 KB |
Output is correct |
80 |
Correct |
87 ms |
23928 KB |
Output is correct |
81 |
Correct |
100 ms |
23932 KB |
Output is correct |
82 |
Correct |
14 ms |
16000 KB |
Output is correct |
83 |
Correct |
12 ms |
16000 KB |
Output is correct |
84 |
Correct |
15 ms |
16000 KB |
Output is correct |
85 |
Correct |
12 ms |
16000 KB |
Output is correct |
86 |
Correct |
15 ms |
16000 KB |
Output is correct |
87 |
Correct |
12 ms |
16000 KB |
Output is correct |
88 |
Correct |
11 ms |
14720 KB |
Output is correct |
89 |
Correct |
14 ms |
14720 KB |
Output is correct |
90 |
Correct |
11 ms |
14720 KB |
Output is correct |
91 |
Correct |
12 ms |
14848 KB |
Output is correct |
92 |
Correct |
14 ms |
14848 KB |
Output is correct |
93 |
Correct |
12 ms |
14720 KB |
Output is correct |
94 |
Correct |
12 ms |
14848 KB |
Output is correct |
95 |
Correct |
11 ms |
14720 KB |
Output is correct |
96 |
Correct |
12 ms |
14720 KB |
Output is correct |
97 |
Correct |
11 ms |
14720 KB |
Output is correct |
98 |
Correct |
11 ms |
14720 KB |
Output is correct |
99 |
Correct |
13 ms |
14720 KB |
Output is correct |
100 |
Correct |
11 ms |
14720 KB |
Output is correct |
101 |
Correct |
11 ms |
14720 KB |
Output is correct |
102 |
Correct |
14 ms |
14592 KB |
Output is correct |
103 |
Correct |
11 ms |
14592 KB |
Output is correct |
104 |
Correct |
11 ms |
14592 KB |
Output is correct |
105 |
Correct |
11 ms |
14720 KB |
Output is correct |
106 |
Correct |
13 ms |
14592 KB |
Output is correct |
107 |
Correct |
11 ms |
14592 KB |
Output is correct |
108 |
Incorrect |
246 ms |
37404 KB |
Output isn't correct |
109 |
Halted |
0 ms |
0 KB |
- |