#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
using ll = long long;
int lst[100005], to[200005], pre[200005], tot;
int low[100005], dfn[100005], st[100005], clk, tp;
int sz[200005], n, m, t_cnt;
std::vector<int> son[200005];
ll ans;
inline void add_edge(int u, int v)
{
to[tot] = v;
pre[tot] = lst[u];
lst[u] = tot++;
}
void tarjan(int u, int fa = -1)
{
dfn[u] = low[u] = clk++;
st[tp++] = u;
for (int i = lst[u]; ~i; i = pre[i])
{
int v = to[i];
if (-1 == dfn[v])
{
tarjan(v, i ^ 1);
low[u] = std::min(low[u], low[v]);
if (low[v] >= dfn[u])
{
son[u].push_back(t_cnt);
do
son[t_cnt].push_back(st[--tp]);
while (st[tp] != v);
t_cnt++;
}
}
else if (i != fa)
low[u] = std::min(low[u], dfn[v]);
}
}
void dfs(int u)
{
sz[u] = u < n;
for (int v : son[u])
{
dfs(v);
sz[u] += sz[v];
}
}
void work(int u, int rt, int fa = -1)
{
for (int v : son[u])
{
if (u < n)
ans += (ll)sz[v] * (sz[rt] - sz[v] - 1);
else
ans += (ll)sz[v] * (sz[rt] - sz[v]) * (son[u].size() - 1);
work(v, rt, u);
}
if (~fa)
{
if (u < n)
ans += (ll)(sz[rt] - sz[u]) * (sz[u] - 1);
else
ans += (ll)(sz[rt] - sz[u]) * sz[u] * (son[u].size() - 1);
}
}
int main()
{
// freopen("uoj-416.in", "r", stdin);
memset(lst, -1, sizeof(lst));
memset(dfn, -1, sizeof(dfn));
scanf("%d%d", &n, &m);
for (int i = 0; i < m; i++)
{
int u, v;
scanf("%d%d", &u, &v);
add_edge(--u, --v);
add_edge(v, u);
}
t_cnt = n;
for (int i = 0; i < n; i++)
{
if (-1 == dfn[i])
{
tarjan(i);
dfs(i);
work(i, i);
}
}
printf("%lld\n", ans);
return 0;
}
Compilation message
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:73:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~
count_triplets.cpp:77:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
5888 KB |
Output is correct |
2 |
Correct |
6 ms |
5760 KB |
Output is correct |
3 |
Correct |
6 ms |
5760 KB |
Output is correct |
4 |
Correct |
7 ms |
5888 KB |
Output is correct |
5 |
Correct |
6 ms |
5760 KB |
Output is correct |
6 |
Correct |
7 ms |
5760 KB |
Output is correct |
7 |
Correct |
7 ms |
5888 KB |
Output is correct |
8 |
Correct |
7 ms |
5888 KB |
Output is correct |
9 |
Correct |
6 ms |
5760 KB |
Output is correct |
10 |
Correct |
8 ms |
5888 KB |
Output is correct |
11 |
Correct |
7 ms |
5888 KB |
Output is correct |
12 |
Correct |
7 ms |
5888 KB |
Output is correct |
13 |
Correct |
8 ms |
5888 KB |
Output is correct |
14 |
Correct |
7 ms |
5760 KB |
Output is correct |
15 |
Correct |
8 ms |
5888 KB |
Output is correct |
16 |
Correct |
7 ms |
5760 KB |
Output is correct |
17 |
Correct |
8 ms |
5800 KB |
Output is correct |
18 |
Correct |
7 ms |
5760 KB |
Output is correct |
19 |
Correct |
6 ms |
5760 KB |
Output is correct |
20 |
Correct |
7 ms |
5760 KB |
Output is correct |
21 |
Correct |
9 ms |
5760 KB |
Output is correct |
22 |
Correct |
5 ms |
5760 KB |
Output is correct |
23 |
Correct |
6 ms |
5760 KB |
Output is correct |
24 |
Correct |
7 ms |
5760 KB |
Output is correct |
25 |
Correct |
8 ms |
5888 KB |
Output is correct |
26 |
Correct |
6 ms |
5888 KB |
Output is correct |
27 |
Correct |
7 ms |
5888 KB |
Output is correct |
28 |
Correct |
6 ms |
5888 KB |
Output is correct |
29 |
Correct |
7 ms |
5888 KB |
Output is correct |
30 |
Correct |
7 ms |
5888 KB |
Output is correct |
31 |
Correct |
8 ms |
5760 KB |
Output is correct |
32 |
Correct |
6 ms |
5760 KB |
Output is correct |
33 |
Correct |
7 ms |
5888 KB |
Output is correct |
34 |
Correct |
6 ms |
5760 KB |
Output is correct |
35 |
Correct |
7 ms |
5760 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
5888 KB |
Output is correct |
2 |
Correct |
6 ms |
5760 KB |
Output is correct |
3 |
Correct |
6 ms |
5760 KB |
Output is correct |
4 |
Correct |
7 ms |
5888 KB |
Output is correct |
5 |
Correct |
6 ms |
5760 KB |
Output is correct |
6 |
Correct |
7 ms |
5760 KB |
Output is correct |
7 |
Correct |
7 ms |
5888 KB |
Output is correct |
8 |
Correct |
7 ms |
5888 KB |
Output is correct |
9 |
Correct |
6 ms |
5760 KB |
Output is correct |
10 |
Correct |
8 ms |
5888 KB |
Output is correct |
11 |
Correct |
7 ms |
5888 KB |
Output is correct |
12 |
Correct |
7 ms |
5888 KB |
Output is correct |
13 |
Correct |
8 ms |
5888 KB |
Output is correct |
14 |
Correct |
7 ms |
5760 KB |
Output is correct |
15 |
Correct |
8 ms |
5888 KB |
Output is correct |
16 |
Correct |
7 ms |
5760 KB |
Output is correct |
17 |
Correct |
8 ms |
5800 KB |
Output is correct |
18 |
Correct |
7 ms |
5760 KB |
Output is correct |
19 |
Correct |
6 ms |
5760 KB |
Output is correct |
20 |
Correct |
7 ms |
5760 KB |
Output is correct |
21 |
Correct |
9 ms |
5760 KB |
Output is correct |
22 |
Correct |
5 ms |
5760 KB |
Output is correct |
23 |
Correct |
6 ms |
5760 KB |
Output is correct |
24 |
Correct |
7 ms |
5760 KB |
Output is correct |
25 |
Correct |
8 ms |
5888 KB |
Output is correct |
26 |
Correct |
6 ms |
5888 KB |
Output is correct |
27 |
Correct |
7 ms |
5888 KB |
Output is correct |
28 |
Correct |
6 ms |
5888 KB |
Output is correct |
29 |
Correct |
7 ms |
5888 KB |
Output is correct |
30 |
Correct |
7 ms |
5888 KB |
Output is correct |
31 |
Correct |
8 ms |
5760 KB |
Output is correct |
32 |
Correct |
6 ms |
5760 KB |
Output is correct |
33 |
Correct |
7 ms |
5888 KB |
Output is correct |
34 |
Correct |
6 ms |
5760 KB |
Output is correct |
35 |
Correct |
7 ms |
5760 KB |
Output is correct |
36 |
Correct |
5 ms |
5760 KB |
Output is correct |
37 |
Correct |
6 ms |
5760 KB |
Output is correct |
38 |
Correct |
6 ms |
5760 KB |
Output is correct |
39 |
Correct |
6 ms |
5760 KB |
Output is correct |
40 |
Correct |
7 ms |
5760 KB |
Output is correct |
41 |
Correct |
6 ms |
5888 KB |
Output is correct |
42 |
Correct |
6 ms |
5860 KB |
Output is correct |
43 |
Correct |
6 ms |
5760 KB |
Output is correct |
44 |
Correct |
6 ms |
5760 KB |
Output is correct |
45 |
Correct |
7 ms |
5760 KB |
Output is correct |
46 |
Correct |
7 ms |
5760 KB |
Output is correct |
47 |
Correct |
6 ms |
5760 KB |
Output is correct |
48 |
Correct |
7 ms |
5888 KB |
Output is correct |
49 |
Correct |
7 ms |
5760 KB |
Output is correct |
50 |
Correct |
8 ms |
5760 KB |
Output is correct |
51 |
Correct |
8 ms |
5888 KB |
Output is correct |
52 |
Correct |
8 ms |
5888 KB |
Output is correct |
53 |
Correct |
5 ms |
5760 KB |
Output is correct |
54 |
Correct |
6 ms |
5888 KB |
Output is correct |
55 |
Correct |
7 ms |
5760 KB |
Output is correct |
56 |
Correct |
6 ms |
5760 KB |
Output is correct |
57 |
Correct |
6 ms |
5760 KB |
Output is correct |
58 |
Correct |
8 ms |
5760 KB |
Output is correct |
59 |
Correct |
7 ms |
5760 KB |
Output is correct |
60 |
Correct |
6 ms |
5760 KB |
Output is correct |
61 |
Correct |
7 ms |
5888 KB |
Output is correct |
62 |
Correct |
7 ms |
5760 KB |
Output is correct |
63 |
Correct |
6 ms |
5888 KB |
Output is correct |
64 |
Correct |
7 ms |
5760 KB |
Output is correct |
65 |
Correct |
6 ms |
5632 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
70 ms |
16908 KB |
Output is correct |
2 |
Correct |
75 ms |
16880 KB |
Output is correct |
3 |
Correct |
139 ms |
19572 KB |
Output is correct |
4 |
Correct |
96 ms |
16632 KB |
Output is correct |
5 |
Correct |
71 ms |
15732 KB |
Output is correct |
6 |
Correct |
169 ms |
18420 KB |
Output is correct |
7 |
Correct |
123 ms |
16120 KB |
Output is correct |
8 |
Correct |
117 ms |
16760 KB |
Output is correct |
9 |
Correct |
115 ms |
14300 KB |
Output is correct |
10 |
Correct |
75 ms |
14328 KB |
Output is correct |
11 |
Correct |
52 ms |
11128 KB |
Output is correct |
12 |
Correct |
55 ms |
11056 KB |
Output is correct |
13 |
Correct |
63 ms |
11000 KB |
Output is correct |
14 |
Correct |
48 ms |
10872 KB |
Output is correct |
15 |
Correct |
42 ms |
10360 KB |
Output is correct |
16 |
Correct |
45 ms |
10240 KB |
Output is correct |
17 |
Correct |
12 ms |
7040 KB |
Output is correct |
18 |
Correct |
8 ms |
7040 KB |
Output is correct |
19 |
Correct |
9 ms |
6912 KB |
Output is correct |
20 |
Correct |
8 ms |
6912 KB |
Output is correct |
21 |
Correct |
11 ms |
6912 KB |
Output is correct |
22 |
Correct |
12 ms |
6912 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
5888 KB |
Output is correct |
2 |
Correct |
8 ms |
5888 KB |
Output is correct |
3 |
Correct |
6 ms |
5888 KB |
Output is correct |
4 |
Correct |
7 ms |
6016 KB |
Output is correct |
5 |
Correct |
6 ms |
6016 KB |
Output is correct |
6 |
Correct |
8 ms |
6016 KB |
Output is correct |
7 |
Correct |
8 ms |
6016 KB |
Output is correct |
8 |
Correct |
8 ms |
5888 KB |
Output is correct |
9 |
Correct |
8 ms |
5888 KB |
Output is correct |
10 |
Correct |
8 ms |
5888 KB |
Output is correct |
11 |
Correct |
8 ms |
5888 KB |
Output is correct |
12 |
Correct |
8 ms |
5888 KB |
Output is correct |
13 |
Correct |
8 ms |
5888 KB |
Output is correct |
14 |
Correct |
9 ms |
5888 KB |
Output is correct |
15 |
Correct |
7 ms |
5888 KB |
Output is correct |
16 |
Correct |
6 ms |
5888 KB |
Output is correct |
17 |
Correct |
8 ms |
5888 KB |
Output is correct |
18 |
Correct |
8 ms |
5888 KB |
Output is correct |
19 |
Correct |
6 ms |
5888 KB |
Output is correct |
20 |
Correct |
9 ms |
5888 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
127 ms |
13288 KB |
Output is correct |
2 |
Correct |
105 ms |
13304 KB |
Output is correct |
3 |
Correct |
99 ms |
13232 KB |
Output is correct |
4 |
Correct |
117 ms |
13320 KB |
Output is correct |
5 |
Correct |
105 ms |
13304 KB |
Output is correct |
6 |
Correct |
136 ms |
25288 KB |
Output is correct |
7 |
Correct |
160 ms |
21124 KB |
Output is correct |
8 |
Correct |
165 ms |
19104 KB |
Output is correct |
9 |
Correct |
149 ms |
17320 KB |
Output is correct |
10 |
Correct |
107 ms |
13364 KB |
Output is correct |
11 |
Correct |
131 ms |
13244 KB |
Output is correct |
12 |
Correct |
104 ms |
13216 KB |
Output is correct |
13 |
Correct |
90 ms |
13304 KB |
Output is correct |
14 |
Correct |
98 ms |
12792 KB |
Output is correct |
15 |
Correct |
65 ms |
12408 KB |
Output is correct |
16 |
Correct |
55 ms |
10616 KB |
Output is correct |
17 |
Correct |
72 ms |
12144 KB |
Output is correct |
18 |
Correct |
89 ms |
12020 KB |
Output is correct |
19 |
Correct |
62 ms |
12148 KB |
Output is correct |
20 |
Correct |
84 ms |
12152 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
5888 KB |
Output is correct |
2 |
Correct |
8 ms |
5888 KB |
Output is correct |
3 |
Correct |
9 ms |
5888 KB |
Output is correct |
4 |
Correct |
7 ms |
5888 KB |
Output is correct |
5 |
Correct |
7 ms |
5888 KB |
Output is correct |
6 |
Correct |
8 ms |
5888 KB |
Output is correct |
7 |
Correct |
8 ms |
5888 KB |
Output is correct |
8 |
Correct |
7 ms |
5888 KB |
Output is correct |
9 |
Correct |
6 ms |
6016 KB |
Output is correct |
10 |
Correct |
8 ms |
5888 KB |
Output is correct |
11 |
Correct |
8 ms |
5888 KB |
Output is correct |
12 |
Correct |
8 ms |
6016 KB |
Output is correct |
13 |
Correct |
8 ms |
6016 KB |
Output is correct |
14 |
Correct |
7 ms |
5888 KB |
Output is correct |
15 |
Correct |
8 ms |
6016 KB |
Output is correct |
16 |
Correct |
8 ms |
5888 KB |
Output is correct |
17 |
Correct |
7 ms |
5888 KB |
Output is correct |
18 |
Correct |
8 ms |
5888 KB |
Output is correct |
19 |
Correct |
8 ms |
5860 KB |
Output is correct |
20 |
Correct |
8 ms |
5888 KB |
Output is correct |
21 |
Correct |
8 ms |
5888 KB |
Output is correct |
22 |
Correct |
9 ms |
5888 KB |
Output is correct |
23 |
Correct |
7 ms |
5888 KB |
Output is correct |
24 |
Correct |
8 ms |
5888 KB |
Output is correct |
25 |
Correct |
8 ms |
5888 KB |
Output is correct |
26 |
Correct |
8 ms |
5888 KB |
Output is correct |
27 |
Correct |
7 ms |
5760 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
136 ms |
13280 KB |
Output is correct |
2 |
Correct |
142 ms |
13812 KB |
Output is correct |
3 |
Runtime error |
50 ms |
14712 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
5888 KB |
Output is correct |
2 |
Correct |
6 ms |
5760 KB |
Output is correct |
3 |
Correct |
6 ms |
5760 KB |
Output is correct |
4 |
Correct |
7 ms |
5888 KB |
Output is correct |
5 |
Correct |
6 ms |
5760 KB |
Output is correct |
6 |
Correct |
7 ms |
5760 KB |
Output is correct |
7 |
Correct |
7 ms |
5888 KB |
Output is correct |
8 |
Correct |
7 ms |
5888 KB |
Output is correct |
9 |
Correct |
6 ms |
5760 KB |
Output is correct |
10 |
Correct |
8 ms |
5888 KB |
Output is correct |
11 |
Correct |
7 ms |
5888 KB |
Output is correct |
12 |
Correct |
7 ms |
5888 KB |
Output is correct |
13 |
Correct |
8 ms |
5888 KB |
Output is correct |
14 |
Correct |
7 ms |
5760 KB |
Output is correct |
15 |
Correct |
8 ms |
5888 KB |
Output is correct |
16 |
Correct |
7 ms |
5760 KB |
Output is correct |
17 |
Correct |
8 ms |
5800 KB |
Output is correct |
18 |
Correct |
7 ms |
5760 KB |
Output is correct |
19 |
Correct |
6 ms |
5760 KB |
Output is correct |
20 |
Correct |
7 ms |
5760 KB |
Output is correct |
21 |
Correct |
9 ms |
5760 KB |
Output is correct |
22 |
Correct |
5 ms |
5760 KB |
Output is correct |
23 |
Correct |
6 ms |
5760 KB |
Output is correct |
24 |
Correct |
7 ms |
5760 KB |
Output is correct |
25 |
Correct |
8 ms |
5888 KB |
Output is correct |
26 |
Correct |
6 ms |
5888 KB |
Output is correct |
27 |
Correct |
7 ms |
5888 KB |
Output is correct |
28 |
Correct |
6 ms |
5888 KB |
Output is correct |
29 |
Correct |
7 ms |
5888 KB |
Output is correct |
30 |
Correct |
7 ms |
5888 KB |
Output is correct |
31 |
Correct |
8 ms |
5760 KB |
Output is correct |
32 |
Correct |
6 ms |
5760 KB |
Output is correct |
33 |
Correct |
7 ms |
5888 KB |
Output is correct |
34 |
Correct |
6 ms |
5760 KB |
Output is correct |
35 |
Correct |
7 ms |
5760 KB |
Output is correct |
36 |
Correct |
5 ms |
5760 KB |
Output is correct |
37 |
Correct |
6 ms |
5760 KB |
Output is correct |
38 |
Correct |
6 ms |
5760 KB |
Output is correct |
39 |
Correct |
6 ms |
5760 KB |
Output is correct |
40 |
Correct |
7 ms |
5760 KB |
Output is correct |
41 |
Correct |
6 ms |
5888 KB |
Output is correct |
42 |
Correct |
6 ms |
5860 KB |
Output is correct |
43 |
Correct |
6 ms |
5760 KB |
Output is correct |
44 |
Correct |
6 ms |
5760 KB |
Output is correct |
45 |
Correct |
7 ms |
5760 KB |
Output is correct |
46 |
Correct |
7 ms |
5760 KB |
Output is correct |
47 |
Correct |
6 ms |
5760 KB |
Output is correct |
48 |
Correct |
7 ms |
5888 KB |
Output is correct |
49 |
Correct |
7 ms |
5760 KB |
Output is correct |
50 |
Correct |
8 ms |
5760 KB |
Output is correct |
51 |
Correct |
8 ms |
5888 KB |
Output is correct |
52 |
Correct |
8 ms |
5888 KB |
Output is correct |
53 |
Correct |
5 ms |
5760 KB |
Output is correct |
54 |
Correct |
6 ms |
5888 KB |
Output is correct |
55 |
Correct |
7 ms |
5760 KB |
Output is correct |
56 |
Correct |
6 ms |
5760 KB |
Output is correct |
57 |
Correct |
6 ms |
5760 KB |
Output is correct |
58 |
Correct |
8 ms |
5760 KB |
Output is correct |
59 |
Correct |
7 ms |
5760 KB |
Output is correct |
60 |
Correct |
6 ms |
5760 KB |
Output is correct |
61 |
Correct |
7 ms |
5888 KB |
Output is correct |
62 |
Correct |
7 ms |
5760 KB |
Output is correct |
63 |
Correct |
6 ms |
5888 KB |
Output is correct |
64 |
Correct |
7 ms |
5760 KB |
Output is correct |
65 |
Correct |
6 ms |
5632 KB |
Output is correct |
66 |
Correct |
7 ms |
5888 KB |
Output is correct |
67 |
Correct |
7 ms |
5888 KB |
Output is correct |
68 |
Correct |
6 ms |
5888 KB |
Output is correct |
69 |
Correct |
7 ms |
5888 KB |
Output is correct |
70 |
Correct |
7 ms |
5888 KB |
Output is correct |
71 |
Correct |
9 ms |
5860 KB |
Output is correct |
72 |
Correct |
7 ms |
5888 KB |
Output is correct |
73 |
Correct |
8 ms |
5888 KB |
Output is correct |
74 |
Correct |
9 ms |
5888 KB |
Output is correct |
75 |
Correct |
7 ms |
5888 KB |
Output is correct |
76 |
Correct |
8 ms |
5888 KB |
Output is correct |
77 |
Correct |
6 ms |
5884 KB |
Output is correct |
78 |
Correct |
7 ms |
5888 KB |
Output is correct |
79 |
Correct |
7 ms |
5888 KB |
Output is correct |
80 |
Correct |
7 ms |
5888 KB |
Output is correct |
81 |
Correct |
7 ms |
5888 KB |
Output is correct |
82 |
Correct |
7 ms |
5888 KB |
Output is correct |
83 |
Correct |
7 ms |
5888 KB |
Output is correct |
84 |
Correct |
7 ms |
5888 KB |
Output is correct |
85 |
Correct |
7 ms |
5888 KB |
Output is correct |
86 |
Correct |
9 ms |
5888 KB |
Output is correct |
87 |
Correct |
7 ms |
5888 KB |
Output is correct |
88 |
Correct |
7 ms |
5888 KB |
Output is correct |
89 |
Correct |
7 ms |
5888 KB |
Output is correct |
90 |
Correct |
8 ms |
5888 KB |
Output is correct |
91 |
Correct |
8 ms |
5888 KB |
Output is correct |
92 |
Correct |
7 ms |
5888 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
5888 KB |
Output is correct |
2 |
Correct |
6 ms |
5760 KB |
Output is correct |
3 |
Correct |
6 ms |
5760 KB |
Output is correct |
4 |
Correct |
7 ms |
5888 KB |
Output is correct |
5 |
Correct |
6 ms |
5760 KB |
Output is correct |
6 |
Correct |
7 ms |
5760 KB |
Output is correct |
7 |
Correct |
7 ms |
5888 KB |
Output is correct |
8 |
Correct |
7 ms |
5888 KB |
Output is correct |
9 |
Correct |
6 ms |
5760 KB |
Output is correct |
10 |
Correct |
8 ms |
5888 KB |
Output is correct |
11 |
Correct |
7 ms |
5888 KB |
Output is correct |
12 |
Correct |
7 ms |
5888 KB |
Output is correct |
13 |
Correct |
8 ms |
5888 KB |
Output is correct |
14 |
Correct |
7 ms |
5760 KB |
Output is correct |
15 |
Correct |
8 ms |
5888 KB |
Output is correct |
16 |
Correct |
7 ms |
5760 KB |
Output is correct |
17 |
Correct |
8 ms |
5800 KB |
Output is correct |
18 |
Correct |
7 ms |
5760 KB |
Output is correct |
19 |
Correct |
6 ms |
5760 KB |
Output is correct |
20 |
Correct |
7 ms |
5760 KB |
Output is correct |
21 |
Correct |
9 ms |
5760 KB |
Output is correct |
22 |
Correct |
5 ms |
5760 KB |
Output is correct |
23 |
Correct |
6 ms |
5760 KB |
Output is correct |
24 |
Correct |
7 ms |
5760 KB |
Output is correct |
25 |
Correct |
8 ms |
5888 KB |
Output is correct |
26 |
Correct |
6 ms |
5888 KB |
Output is correct |
27 |
Correct |
7 ms |
5888 KB |
Output is correct |
28 |
Correct |
6 ms |
5888 KB |
Output is correct |
29 |
Correct |
7 ms |
5888 KB |
Output is correct |
30 |
Correct |
7 ms |
5888 KB |
Output is correct |
31 |
Correct |
8 ms |
5760 KB |
Output is correct |
32 |
Correct |
6 ms |
5760 KB |
Output is correct |
33 |
Correct |
7 ms |
5888 KB |
Output is correct |
34 |
Correct |
6 ms |
5760 KB |
Output is correct |
35 |
Correct |
7 ms |
5760 KB |
Output is correct |
36 |
Correct |
5 ms |
5760 KB |
Output is correct |
37 |
Correct |
6 ms |
5760 KB |
Output is correct |
38 |
Correct |
6 ms |
5760 KB |
Output is correct |
39 |
Correct |
6 ms |
5760 KB |
Output is correct |
40 |
Correct |
7 ms |
5760 KB |
Output is correct |
41 |
Correct |
6 ms |
5888 KB |
Output is correct |
42 |
Correct |
6 ms |
5860 KB |
Output is correct |
43 |
Correct |
6 ms |
5760 KB |
Output is correct |
44 |
Correct |
6 ms |
5760 KB |
Output is correct |
45 |
Correct |
7 ms |
5760 KB |
Output is correct |
46 |
Correct |
7 ms |
5760 KB |
Output is correct |
47 |
Correct |
6 ms |
5760 KB |
Output is correct |
48 |
Correct |
7 ms |
5888 KB |
Output is correct |
49 |
Correct |
7 ms |
5760 KB |
Output is correct |
50 |
Correct |
8 ms |
5760 KB |
Output is correct |
51 |
Correct |
8 ms |
5888 KB |
Output is correct |
52 |
Correct |
8 ms |
5888 KB |
Output is correct |
53 |
Correct |
5 ms |
5760 KB |
Output is correct |
54 |
Correct |
6 ms |
5888 KB |
Output is correct |
55 |
Correct |
7 ms |
5760 KB |
Output is correct |
56 |
Correct |
6 ms |
5760 KB |
Output is correct |
57 |
Correct |
6 ms |
5760 KB |
Output is correct |
58 |
Correct |
8 ms |
5760 KB |
Output is correct |
59 |
Correct |
7 ms |
5760 KB |
Output is correct |
60 |
Correct |
6 ms |
5760 KB |
Output is correct |
61 |
Correct |
7 ms |
5888 KB |
Output is correct |
62 |
Correct |
7 ms |
5760 KB |
Output is correct |
63 |
Correct |
6 ms |
5888 KB |
Output is correct |
64 |
Correct |
7 ms |
5760 KB |
Output is correct |
65 |
Correct |
6 ms |
5632 KB |
Output is correct |
66 |
Correct |
70 ms |
16908 KB |
Output is correct |
67 |
Correct |
75 ms |
16880 KB |
Output is correct |
68 |
Correct |
139 ms |
19572 KB |
Output is correct |
69 |
Correct |
96 ms |
16632 KB |
Output is correct |
70 |
Correct |
71 ms |
15732 KB |
Output is correct |
71 |
Correct |
169 ms |
18420 KB |
Output is correct |
72 |
Correct |
123 ms |
16120 KB |
Output is correct |
73 |
Correct |
117 ms |
16760 KB |
Output is correct |
74 |
Correct |
115 ms |
14300 KB |
Output is correct |
75 |
Correct |
75 ms |
14328 KB |
Output is correct |
76 |
Correct |
52 ms |
11128 KB |
Output is correct |
77 |
Correct |
55 ms |
11056 KB |
Output is correct |
78 |
Correct |
63 ms |
11000 KB |
Output is correct |
79 |
Correct |
48 ms |
10872 KB |
Output is correct |
80 |
Correct |
42 ms |
10360 KB |
Output is correct |
81 |
Correct |
45 ms |
10240 KB |
Output is correct |
82 |
Correct |
12 ms |
7040 KB |
Output is correct |
83 |
Correct |
8 ms |
7040 KB |
Output is correct |
84 |
Correct |
9 ms |
6912 KB |
Output is correct |
85 |
Correct |
8 ms |
6912 KB |
Output is correct |
86 |
Correct |
11 ms |
6912 KB |
Output is correct |
87 |
Correct |
12 ms |
6912 KB |
Output is correct |
88 |
Correct |
6 ms |
5888 KB |
Output is correct |
89 |
Correct |
8 ms |
5888 KB |
Output is correct |
90 |
Correct |
6 ms |
5888 KB |
Output is correct |
91 |
Correct |
7 ms |
6016 KB |
Output is correct |
92 |
Correct |
6 ms |
6016 KB |
Output is correct |
93 |
Correct |
8 ms |
6016 KB |
Output is correct |
94 |
Correct |
8 ms |
6016 KB |
Output is correct |
95 |
Correct |
8 ms |
5888 KB |
Output is correct |
96 |
Correct |
8 ms |
5888 KB |
Output is correct |
97 |
Correct |
8 ms |
5888 KB |
Output is correct |
98 |
Correct |
8 ms |
5888 KB |
Output is correct |
99 |
Correct |
8 ms |
5888 KB |
Output is correct |
100 |
Correct |
8 ms |
5888 KB |
Output is correct |
101 |
Correct |
9 ms |
5888 KB |
Output is correct |
102 |
Correct |
7 ms |
5888 KB |
Output is correct |
103 |
Correct |
6 ms |
5888 KB |
Output is correct |
104 |
Correct |
8 ms |
5888 KB |
Output is correct |
105 |
Correct |
8 ms |
5888 KB |
Output is correct |
106 |
Correct |
6 ms |
5888 KB |
Output is correct |
107 |
Correct |
9 ms |
5888 KB |
Output is correct |
108 |
Correct |
127 ms |
13288 KB |
Output is correct |
109 |
Correct |
105 ms |
13304 KB |
Output is correct |
110 |
Correct |
99 ms |
13232 KB |
Output is correct |
111 |
Correct |
117 ms |
13320 KB |
Output is correct |
112 |
Correct |
105 ms |
13304 KB |
Output is correct |
113 |
Correct |
136 ms |
25288 KB |
Output is correct |
114 |
Correct |
160 ms |
21124 KB |
Output is correct |
115 |
Correct |
165 ms |
19104 KB |
Output is correct |
116 |
Correct |
149 ms |
17320 KB |
Output is correct |
117 |
Correct |
107 ms |
13364 KB |
Output is correct |
118 |
Correct |
131 ms |
13244 KB |
Output is correct |
119 |
Correct |
104 ms |
13216 KB |
Output is correct |
120 |
Correct |
90 ms |
13304 KB |
Output is correct |
121 |
Correct |
98 ms |
12792 KB |
Output is correct |
122 |
Correct |
65 ms |
12408 KB |
Output is correct |
123 |
Correct |
55 ms |
10616 KB |
Output is correct |
124 |
Correct |
72 ms |
12144 KB |
Output is correct |
125 |
Correct |
89 ms |
12020 KB |
Output is correct |
126 |
Correct |
62 ms |
12148 KB |
Output is correct |
127 |
Correct |
84 ms |
12152 KB |
Output is correct |
128 |
Correct |
8 ms |
5888 KB |
Output is correct |
129 |
Correct |
8 ms |
5888 KB |
Output is correct |
130 |
Correct |
9 ms |
5888 KB |
Output is correct |
131 |
Correct |
7 ms |
5888 KB |
Output is correct |
132 |
Correct |
7 ms |
5888 KB |
Output is correct |
133 |
Correct |
8 ms |
5888 KB |
Output is correct |
134 |
Correct |
8 ms |
5888 KB |
Output is correct |
135 |
Correct |
7 ms |
5888 KB |
Output is correct |
136 |
Correct |
6 ms |
6016 KB |
Output is correct |
137 |
Correct |
8 ms |
5888 KB |
Output is correct |
138 |
Correct |
8 ms |
5888 KB |
Output is correct |
139 |
Correct |
8 ms |
6016 KB |
Output is correct |
140 |
Correct |
8 ms |
6016 KB |
Output is correct |
141 |
Correct |
7 ms |
5888 KB |
Output is correct |
142 |
Correct |
8 ms |
6016 KB |
Output is correct |
143 |
Correct |
8 ms |
5888 KB |
Output is correct |
144 |
Correct |
7 ms |
5888 KB |
Output is correct |
145 |
Correct |
8 ms |
5888 KB |
Output is correct |
146 |
Correct |
8 ms |
5860 KB |
Output is correct |
147 |
Correct |
8 ms |
5888 KB |
Output is correct |
148 |
Correct |
8 ms |
5888 KB |
Output is correct |
149 |
Correct |
9 ms |
5888 KB |
Output is correct |
150 |
Correct |
7 ms |
5888 KB |
Output is correct |
151 |
Correct |
8 ms |
5888 KB |
Output is correct |
152 |
Correct |
8 ms |
5888 KB |
Output is correct |
153 |
Correct |
8 ms |
5888 KB |
Output is correct |
154 |
Correct |
7 ms |
5760 KB |
Output is correct |
155 |
Correct |
136 ms |
13280 KB |
Output is correct |
156 |
Correct |
142 ms |
13812 KB |
Output is correct |
157 |
Runtime error |
50 ms |
14712 KB |
Execution killed with signal 11 (could be triggered by violating memory limits) |
158 |
Halted |
0 ms |
0 KB |
- |