#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
//#pragma GCC optimize("Ofast")
#define sz(x) (x.size())
using namespace std;
using namespace __gnu_pbds;
template <class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
//#define int long long
const int MAXN = 1e5, MAXM = 2e5, MAXK = 3e5;
int timer = 0, n, m, all = 0;
int tin[MAXN], up[MAXN], sz[MAXK];
vector<int> gr[MAXK], arr;
vector<pair<int, int> > g[MAXN], gt[MAXN];
bool used[MAXK], was[MAXM], vis[MAXN];
deque<int> q;
ll ans = 0;
void dfs0(int v, int p)
{
used[v] = 1;
tin[v] = up[v] = timer++;
for (auto& [u, id] : g[v])
{
if (u == p) {continue;}
if (used[u])
{
up[v] = min(up[v], tin[u]);
if (tin[u] < tin[v])
{
gt[v].push_back({u, id});
}
}
else
{
if (p == -1)
{
q.push_back(id);
was[id] = 1;
}
dfs0(u, v);
gt[v].push_back({u, id});
up[v] = min(up[v], up[u]);
}
}
}
void dfs1(int v)
{
if (vis[v])
{
return;
}
vis[v] = 1;
for (auto& [u, id] : gt[v])
{
if (was[id])
{
continue;
}
was[id] = 1;
if (up[u] < tin[v])
{
arr.push_back(id);
dfs1(u);
}
else
{
q.push_back(id);
}
}
}
void dfs2(int v, int p)
{
used[v] = 1;
if (v < n)
{
sz[v] = 1;
}
for (auto& u : gr[v])
{
if (u != p)
{
dfs2(u, v);
sz[v] += sz[u];
}
}
}
void dfs3(int v, int p)
{
int cur = all - sz[v];
if (v >= n)
{
int k = gr[v].size();
ans -= cur * 1ll * (cur - 1) * (k - 1);
for (auto& u : gr[v])
{
if (u != p)
{
ans -= sz[u] * 1ll * (sz[u] - 1) * (k - 1);
}
}
}
for (auto& u : gr[v])
{
if (u != p)
{
dfs3(u, v);
}
}
}
void solve()
{
cin >> n >> m;
vector<pair<int, int> > es(m);
for (int i = 0; i < m; i++)
{
int x, y;
cin >> x >> y;
x--; y--;
es[i] = {x, y};
g[x].push_back({y, i});
g[y].push_back({x, i});
}
int now = n;
for (int i = 0; i < n; i++)
{
if (!used[i])
{
int was_cnt = timer;
dfs0(i, -1);
int dif = timer - was_cnt;
ans += dif * 1ll * (dif - 1) * (dif - 2);
while (q.size() > 0)
{
int j = q.front();
q.pop_front();
arr.clear();
arr.push_back(j);
dfs1(es[j].first);
dfs1(es[j].second);
set<int> st;
for (auto& j : arr)
{
st.insert(es[j].first);
st.insert(es[j].second);
}
for (auto& u : st)
{
gr[u].push_back(now);
gr[now].push_back(u);
}
now++;
}
}
}
fill(used, used + MAXK, 0);
for (int i = n; i < now; i++)
{
if (!used[i])
{
dfs2(i, -1);
all = sz[i];
dfs3(i, -1);
}
}
cout << ans;
}
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t;
t = 1;
while (t--)
{
solve();
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
12340 KB |
Output is correct |
2 |
Correct |
7 ms |
12372 KB |
Output is correct |
3 |
Correct |
8 ms |
12332 KB |
Output is correct |
4 |
Correct |
7 ms |
12384 KB |
Output is correct |
5 |
Correct |
7 ms |
12372 KB |
Output is correct |
6 |
Correct |
7 ms |
12332 KB |
Output is correct |
7 |
Correct |
8 ms |
12372 KB |
Output is correct |
8 |
Correct |
7 ms |
12372 KB |
Output is correct |
9 |
Correct |
7 ms |
12372 KB |
Output is correct |
10 |
Correct |
7 ms |
12284 KB |
Output is correct |
11 |
Correct |
7 ms |
12372 KB |
Output is correct |
12 |
Correct |
7 ms |
12336 KB |
Output is correct |
13 |
Correct |
7 ms |
12340 KB |
Output is correct |
14 |
Correct |
7 ms |
12372 KB |
Output is correct |
15 |
Correct |
7 ms |
12372 KB |
Output is correct |
16 |
Correct |
7 ms |
12372 KB |
Output is correct |
17 |
Correct |
7 ms |
12372 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
7 ms |
12372 KB |
Output is correct |
20 |
Correct |
7 ms |
12320 KB |
Output is correct |
21 |
Correct |
7 ms |
12300 KB |
Output is correct |
22 |
Correct |
7 ms |
12336 KB |
Output is correct |
23 |
Correct |
7 ms |
12336 KB |
Output is correct |
24 |
Correct |
6 ms |
12372 KB |
Output is correct |
25 |
Correct |
6 ms |
12372 KB |
Output is correct |
26 |
Correct |
7 ms |
12336 KB |
Output is correct |
27 |
Correct |
8 ms |
12332 KB |
Output is correct |
28 |
Correct |
6 ms |
12372 KB |
Output is correct |
29 |
Correct |
7 ms |
12344 KB |
Output is correct |
30 |
Correct |
7 ms |
12372 KB |
Output is correct |
31 |
Correct |
7 ms |
12372 KB |
Output is correct |
32 |
Correct |
7 ms |
12372 KB |
Output is correct |
33 |
Correct |
6 ms |
12372 KB |
Output is correct |
34 |
Correct |
6 ms |
12372 KB |
Output is correct |
35 |
Correct |
9 ms |
12264 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
12340 KB |
Output is correct |
2 |
Correct |
7 ms |
12372 KB |
Output is correct |
3 |
Correct |
8 ms |
12332 KB |
Output is correct |
4 |
Correct |
7 ms |
12384 KB |
Output is correct |
5 |
Correct |
7 ms |
12372 KB |
Output is correct |
6 |
Correct |
7 ms |
12332 KB |
Output is correct |
7 |
Correct |
8 ms |
12372 KB |
Output is correct |
8 |
Correct |
7 ms |
12372 KB |
Output is correct |
9 |
Correct |
7 ms |
12372 KB |
Output is correct |
10 |
Correct |
7 ms |
12284 KB |
Output is correct |
11 |
Correct |
7 ms |
12372 KB |
Output is correct |
12 |
Correct |
7 ms |
12336 KB |
Output is correct |
13 |
Correct |
7 ms |
12340 KB |
Output is correct |
14 |
Correct |
7 ms |
12372 KB |
Output is correct |
15 |
Correct |
7 ms |
12372 KB |
Output is correct |
16 |
Correct |
7 ms |
12372 KB |
Output is correct |
17 |
Correct |
7 ms |
12372 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
7 ms |
12372 KB |
Output is correct |
20 |
Correct |
7 ms |
12320 KB |
Output is correct |
21 |
Correct |
7 ms |
12300 KB |
Output is correct |
22 |
Correct |
7 ms |
12336 KB |
Output is correct |
23 |
Correct |
7 ms |
12336 KB |
Output is correct |
24 |
Correct |
6 ms |
12372 KB |
Output is correct |
25 |
Correct |
6 ms |
12372 KB |
Output is correct |
26 |
Correct |
7 ms |
12336 KB |
Output is correct |
27 |
Correct |
8 ms |
12332 KB |
Output is correct |
28 |
Correct |
6 ms |
12372 KB |
Output is correct |
29 |
Correct |
7 ms |
12344 KB |
Output is correct |
30 |
Correct |
7 ms |
12372 KB |
Output is correct |
31 |
Correct |
7 ms |
12372 KB |
Output is correct |
32 |
Correct |
7 ms |
12372 KB |
Output is correct |
33 |
Correct |
6 ms |
12372 KB |
Output is correct |
34 |
Correct |
6 ms |
12372 KB |
Output is correct |
35 |
Correct |
9 ms |
12264 KB |
Output is correct |
36 |
Correct |
7 ms |
12340 KB |
Output is correct |
37 |
Correct |
7 ms |
12372 KB |
Output is correct |
38 |
Correct |
7 ms |
12388 KB |
Output is correct |
39 |
Correct |
6 ms |
12340 KB |
Output is correct |
40 |
Correct |
7 ms |
12372 KB |
Output is correct |
41 |
Correct |
7 ms |
12372 KB |
Output is correct |
42 |
Correct |
7 ms |
12372 KB |
Output is correct |
43 |
Correct |
7 ms |
12372 KB |
Output is correct |
44 |
Correct |
7 ms |
12336 KB |
Output is correct |
45 |
Correct |
7 ms |
12372 KB |
Output is correct |
46 |
Correct |
7 ms |
12348 KB |
Output is correct |
47 |
Correct |
7 ms |
12372 KB |
Output is correct |
48 |
Correct |
7 ms |
12372 KB |
Output is correct |
49 |
Correct |
7 ms |
12372 KB |
Output is correct |
50 |
Correct |
7 ms |
12336 KB |
Output is correct |
51 |
Correct |
7 ms |
12372 KB |
Output is correct |
52 |
Correct |
7 ms |
12372 KB |
Output is correct |
53 |
Correct |
7 ms |
12372 KB |
Output is correct |
54 |
Correct |
7 ms |
12372 KB |
Output is correct |
55 |
Correct |
7 ms |
12372 KB |
Output is correct |
56 |
Correct |
7 ms |
12388 KB |
Output is correct |
57 |
Correct |
7 ms |
12372 KB |
Output is correct |
58 |
Correct |
7 ms |
12396 KB |
Output is correct |
59 |
Correct |
7 ms |
12372 KB |
Output is correct |
60 |
Correct |
8 ms |
12312 KB |
Output is correct |
61 |
Correct |
8 ms |
12372 KB |
Output is correct |
62 |
Correct |
7 ms |
12336 KB |
Output is correct |
63 |
Correct |
7 ms |
12372 KB |
Output is correct |
64 |
Correct |
7 ms |
12372 KB |
Output is correct |
65 |
Correct |
7 ms |
12340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
109 ms |
39968 KB |
Output is correct |
2 |
Correct |
138 ms |
39972 KB |
Output is correct |
3 |
Correct |
144 ms |
32384 KB |
Output is correct |
4 |
Correct |
132 ms |
37108 KB |
Output is correct |
5 |
Correct |
122 ms |
29972 KB |
Output is correct |
6 |
Correct |
146 ms |
32064 KB |
Output is correct |
7 |
Correct |
151 ms |
30832 KB |
Output is correct |
8 |
Correct |
154 ms |
31764 KB |
Output is correct |
9 |
Correct |
155 ms |
28740 KB |
Output is correct |
10 |
Correct |
134 ms |
28968 KB |
Output is correct |
11 |
Correct |
110 ms |
25896 KB |
Output is correct |
12 |
Correct |
109 ms |
25676 KB |
Output is correct |
13 |
Correct |
90 ms |
25160 KB |
Output is correct |
14 |
Correct |
99 ms |
24864 KB |
Output is correct |
15 |
Correct |
76 ms |
23020 KB |
Output is correct |
16 |
Correct |
67 ms |
22744 KB |
Output is correct |
17 |
Correct |
8 ms |
13652 KB |
Output is correct |
18 |
Correct |
8 ms |
13652 KB |
Output is correct |
19 |
Correct |
8 ms |
13648 KB |
Output is correct |
20 |
Correct |
9 ms |
13652 KB |
Output is correct |
21 |
Correct |
8 ms |
13524 KB |
Output is correct |
22 |
Correct |
9 ms |
13524 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
12516 KB |
Output is correct |
2 |
Correct |
8 ms |
12468 KB |
Output is correct |
3 |
Correct |
7 ms |
12472 KB |
Output is correct |
4 |
Correct |
7 ms |
12628 KB |
Output is correct |
5 |
Correct |
8 ms |
12500 KB |
Output is correct |
6 |
Correct |
10 ms |
12468 KB |
Output is correct |
7 |
Correct |
7 ms |
12596 KB |
Output is correct |
8 |
Correct |
9 ms |
12472 KB |
Output is correct |
9 |
Correct |
8 ms |
12500 KB |
Output is correct |
10 |
Correct |
8 ms |
12500 KB |
Output is correct |
11 |
Correct |
8 ms |
12500 KB |
Output is correct |
12 |
Correct |
7 ms |
12500 KB |
Output is correct |
13 |
Correct |
8 ms |
12500 KB |
Output is correct |
14 |
Correct |
11 ms |
12500 KB |
Output is correct |
15 |
Correct |
9 ms |
12516 KB |
Output is correct |
16 |
Correct |
7 ms |
12464 KB |
Output is correct |
17 |
Correct |
7 ms |
12468 KB |
Output is correct |
18 |
Correct |
7 ms |
12500 KB |
Output is correct |
19 |
Correct |
8 ms |
12552 KB |
Output is correct |
20 |
Correct |
8 ms |
12452 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
173 ms |
28100 KB |
Output is correct |
2 |
Correct |
155 ms |
28068 KB |
Output is correct |
3 |
Correct |
135 ms |
28132 KB |
Output is correct |
4 |
Correct |
142 ms |
28128 KB |
Output is correct |
5 |
Correct |
166 ms |
28072 KB |
Output is correct |
6 |
Correct |
130 ms |
35420 KB |
Output is correct |
7 |
Correct |
142 ms |
32808 KB |
Output is correct |
8 |
Correct |
140 ms |
31548 KB |
Output is correct |
9 |
Correct |
146 ms |
30364 KB |
Output is correct |
10 |
Correct |
141 ms |
28060 KB |
Output is correct |
11 |
Correct |
143 ms |
28144 KB |
Output is correct |
12 |
Correct |
147 ms |
28120 KB |
Output is correct |
13 |
Correct |
133 ms |
28076 KB |
Output is correct |
14 |
Correct |
127 ms |
27288 KB |
Output is correct |
15 |
Correct |
132 ms |
26188 KB |
Output is correct |
16 |
Correct |
65 ms |
22468 KB |
Output is correct |
17 |
Correct |
86 ms |
27516 KB |
Output is correct |
18 |
Correct |
97 ms |
27480 KB |
Output is correct |
19 |
Correct |
92 ms |
27608 KB |
Output is correct |
20 |
Correct |
116 ms |
27460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
12500 KB |
Output is correct |
2 |
Correct |
8 ms |
12472 KB |
Output is correct |
3 |
Correct |
7 ms |
12500 KB |
Output is correct |
4 |
Correct |
8 ms |
12476 KB |
Output is correct |
5 |
Correct |
8 ms |
12472 KB |
Output is correct |
6 |
Correct |
8 ms |
12472 KB |
Output is correct |
7 |
Correct |
8 ms |
12464 KB |
Output is correct |
8 |
Correct |
8 ms |
12500 KB |
Output is correct |
9 |
Correct |
8 ms |
12500 KB |
Output is correct |
10 |
Correct |
8 ms |
12500 KB |
Output is correct |
11 |
Correct |
8 ms |
12500 KB |
Output is correct |
12 |
Correct |
8 ms |
12476 KB |
Output is correct |
13 |
Correct |
7 ms |
12500 KB |
Output is correct |
14 |
Correct |
7 ms |
12500 KB |
Output is correct |
15 |
Correct |
7 ms |
12468 KB |
Output is correct |
16 |
Correct |
7 ms |
12500 KB |
Output is correct |
17 |
Correct |
8 ms |
12472 KB |
Output is correct |
18 |
Correct |
8 ms |
12504 KB |
Output is correct |
19 |
Correct |
8 ms |
12500 KB |
Output is correct |
20 |
Correct |
7 ms |
12500 KB |
Output is correct |
21 |
Correct |
8 ms |
12500 KB |
Output is correct |
22 |
Correct |
9 ms |
12500 KB |
Output is correct |
23 |
Correct |
8 ms |
12500 KB |
Output is correct |
24 |
Correct |
11 ms |
12500 KB |
Output is correct |
25 |
Correct |
8 ms |
12372 KB |
Output is correct |
26 |
Correct |
9 ms |
12372 KB |
Output is correct |
27 |
Correct |
7 ms |
12408 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
143 ms |
28144 KB |
Output is correct |
2 |
Correct |
162 ms |
28196 KB |
Output is correct |
3 |
Correct |
140 ms |
28708 KB |
Output is correct |
4 |
Correct |
151 ms |
28296 KB |
Output is correct |
5 |
Correct |
151 ms |
27432 KB |
Output is correct |
6 |
Correct |
141 ms |
26828 KB |
Output is correct |
7 |
Correct |
132 ms |
26648 KB |
Output is correct |
8 |
Correct |
127 ms |
26252 KB |
Output is correct |
9 |
Correct |
133 ms |
26220 KB |
Output is correct |
10 |
Correct |
113 ms |
26044 KB |
Output is correct |
11 |
Correct |
115 ms |
26064 KB |
Output is correct |
12 |
Correct |
134 ms |
26188 KB |
Output is correct |
13 |
Correct |
119 ms |
26144 KB |
Output is correct |
14 |
Correct |
139 ms |
28620 KB |
Output is correct |
15 |
Correct |
157 ms |
33412 KB |
Output is correct |
16 |
Correct |
161 ms |
31860 KB |
Output is correct |
17 |
Correct |
157 ms |
32468 KB |
Output is correct |
18 |
Correct |
165 ms |
31180 KB |
Output is correct |
19 |
Correct |
172 ms |
28296 KB |
Output is correct |
20 |
Correct |
153 ms |
28296 KB |
Output is correct |
21 |
Correct |
138 ms |
28220 KB |
Output is correct |
22 |
Correct |
145 ms |
27324 KB |
Output is correct |
23 |
Correct |
115 ms |
26336 KB |
Output is correct |
24 |
Correct |
140 ms |
28596 KB |
Output is correct |
25 |
Correct |
139 ms |
28676 KB |
Output is correct |
26 |
Correct |
139 ms |
28536 KB |
Output is correct |
27 |
Correct |
130 ms |
28468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
12340 KB |
Output is correct |
2 |
Correct |
7 ms |
12372 KB |
Output is correct |
3 |
Correct |
8 ms |
12332 KB |
Output is correct |
4 |
Correct |
7 ms |
12384 KB |
Output is correct |
5 |
Correct |
7 ms |
12372 KB |
Output is correct |
6 |
Correct |
7 ms |
12332 KB |
Output is correct |
7 |
Correct |
8 ms |
12372 KB |
Output is correct |
8 |
Correct |
7 ms |
12372 KB |
Output is correct |
9 |
Correct |
7 ms |
12372 KB |
Output is correct |
10 |
Correct |
7 ms |
12284 KB |
Output is correct |
11 |
Correct |
7 ms |
12372 KB |
Output is correct |
12 |
Correct |
7 ms |
12336 KB |
Output is correct |
13 |
Correct |
7 ms |
12340 KB |
Output is correct |
14 |
Correct |
7 ms |
12372 KB |
Output is correct |
15 |
Correct |
7 ms |
12372 KB |
Output is correct |
16 |
Correct |
7 ms |
12372 KB |
Output is correct |
17 |
Correct |
7 ms |
12372 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
7 ms |
12372 KB |
Output is correct |
20 |
Correct |
7 ms |
12320 KB |
Output is correct |
21 |
Correct |
7 ms |
12300 KB |
Output is correct |
22 |
Correct |
7 ms |
12336 KB |
Output is correct |
23 |
Correct |
7 ms |
12336 KB |
Output is correct |
24 |
Correct |
6 ms |
12372 KB |
Output is correct |
25 |
Correct |
6 ms |
12372 KB |
Output is correct |
26 |
Correct |
7 ms |
12336 KB |
Output is correct |
27 |
Correct |
8 ms |
12332 KB |
Output is correct |
28 |
Correct |
6 ms |
12372 KB |
Output is correct |
29 |
Correct |
7 ms |
12344 KB |
Output is correct |
30 |
Correct |
7 ms |
12372 KB |
Output is correct |
31 |
Correct |
7 ms |
12372 KB |
Output is correct |
32 |
Correct |
7 ms |
12372 KB |
Output is correct |
33 |
Correct |
6 ms |
12372 KB |
Output is correct |
34 |
Correct |
6 ms |
12372 KB |
Output is correct |
35 |
Correct |
9 ms |
12264 KB |
Output is correct |
36 |
Correct |
7 ms |
12340 KB |
Output is correct |
37 |
Correct |
7 ms |
12372 KB |
Output is correct |
38 |
Correct |
7 ms |
12388 KB |
Output is correct |
39 |
Correct |
6 ms |
12340 KB |
Output is correct |
40 |
Correct |
7 ms |
12372 KB |
Output is correct |
41 |
Correct |
7 ms |
12372 KB |
Output is correct |
42 |
Correct |
7 ms |
12372 KB |
Output is correct |
43 |
Correct |
7 ms |
12372 KB |
Output is correct |
44 |
Correct |
7 ms |
12336 KB |
Output is correct |
45 |
Correct |
7 ms |
12372 KB |
Output is correct |
46 |
Correct |
7 ms |
12348 KB |
Output is correct |
47 |
Correct |
7 ms |
12372 KB |
Output is correct |
48 |
Correct |
7 ms |
12372 KB |
Output is correct |
49 |
Correct |
7 ms |
12372 KB |
Output is correct |
50 |
Correct |
7 ms |
12336 KB |
Output is correct |
51 |
Correct |
7 ms |
12372 KB |
Output is correct |
52 |
Correct |
7 ms |
12372 KB |
Output is correct |
53 |
Correct |
7 ms |
12372 KB |
Output is correct |
54 |
Correct |
7 ms |
12372 KB |
Output is correct |
55 |
Correct |
7 ms |
12372 KB |
Output is correct |
56 |
Correct |
7 ms |
12388 KB |
Output is correct |
57 |
Correct |
7 ms |
12372 KB |
Output is correct |
58 |
Correct |
7 ms |
12396 KB |
Output is correct |
59 |
Correct |
7 ms |
12372 KB |
Output is correct |
60 |
Correct |
8 ms |
12312 KB |
Output is correct |
61 |
Correct |
8 ms |
12372 KB |
Output is correct |
62 |
Correct |
7 ms |
12336 KB |
Output is correct |
63 |
Correct |
7 ms |
12372 KB |
Output is correct |
64 |
Correct |
7 ms |
12372 KB |
Output is correct |
65 |
Correct |
7 ms |
12340 KB |
Output is correct |
66 |
Correct |
6 ms |
12372 KB |
Output is correct |
67 |
Correct |
7 ms |
12372 KB |
Output is correct |
68 |
Correct |
7 ms |
12500 KB |
Output is correct |
69 |
Correct |
7 ms |
12600 KB |
Output is correct |
70 |
Correct |
8 ms |
12604 KB |
Output is correct |
71 |
Correct |
7 ms |
12500 KB |
Output is correct |
72 |
Correct |
8 ms |
12500 KB |
Output is correct |
73 |
Correct |
8 ms |
12500 KB |
Output is correct |
74 |
Correct |
7 ms |
12500 KB |
Output is correct |
75 |
Correct |
8 ms |
12472 KB |
Output is correct |
76 |
Correct |
6 ms |
12372 KB |
Output is correct |
77 |
Correct |
8 ms |
12500 KB |
Output is correct |
78 |
Correct |
7 ms |
12432 KB |
Output is correct |
79 |
Correct |
9 ms |
12436 KB |
Output is correct |
80 |
Correct |
8 ms |
12520 KB |
Output is correct |
81 |
Correct |
7 ms |
12500 KB |
Output is correct |
82 |
Correct |
7 ms |
12472 KB |
Output is correct |
83 |
Correct |
7 ms |
12628 KB |
Output is correct |
84 |
Correct |
7 ms |
12480 KB |
Output is correct |
85 |
Correct |
8 ms |
12500 KB |
Output is correct |
86 |
Correct |
8 ms |
12500 KB |
Output is correct |
87 |
Correct |
7 ms |
12500 KB |
Output is correct |
88 |
Correct |
9 ms |
12532 KB |
Output is correct |
89 |
Correct |
8 ms |
12448 KB |
Output is correct |
90 |
Correct |
8 ms |
12428 KB |
Output is correct |
91 |
Correct |
8 ms |
12500 KB |
Output is correct |
92 |
Correct |
7 ms |
12472 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
12340 KB |
Output is correct |
2 |
Correct |
7 ms |
12372 KB |
Output is correct |
3 |
Correct |
8 ms |
12332 KB |
Output is correct |
4 |
Correct |
7 ms |
12384 KB |
Output is correct |
5 |
Correct |
7 ms |
12372 KB |
Output is correct |
6 |
Correct |
7 ms |
12332 KB |
Output is correct |
7 |
Correct |
8 ms |
12372 KB |
Output is correct |
8 |
Correct |
7 ms |
12372 KB |
Output is correct |
9 |
Correct |
7 ms |
12372 KB |
Output is correct |
10 |
Correct |
7 ms |
12284 KB |
Output is correct |
11 |
Correct |
7 ms |
12372 KB |
Output is correct |
12 |
Correct |
7 ms |
12336 KB |
Output is correct |
13 |
Correct |
7 ms |
12340 KB |
Output is correct |
14 |
Correct |
7 ms |
12372 KB |
Output is correct |
15 |
Correct |
7 ms |
12372 KB |
Output is correct |
16 |
Correct |
7 ms |
12372 KB |
Output is correct |
17 |
Correct |
7 ms |
12372 KB |
Output is correct |
18 |
Correct |
8 ms |
12372 KB |
Output is correct |
19 |
Correct |
7 ms |
12372 KB |
Output is correct |
20 |
Correct |
7 ms |
12320 KB |
Output is correct |
21 |
Correct |
7 ms |
12300 KB |
Output is correct |
22 |
Correct |
7 ms |
12336 KB |
Output is correct |
23 |
Correct |
7 ms |
12336 KB |
Output is correct |
24 |
Correct |
6 ms |
12372 KB |
Output is correct |
25 |
Correct |
6 ms |
12372 KB |
Output is correct |
26 |
Correct |
7 ms |
12336 KB |
Output is correct |
27 |
Correct |
8 ms |
12332 KB |
Output is correct |
28 |
Correct |
6 ms |
12372 KB |
Output is correct |
29 |
Correct |
7 ms |
12344 KB |
Output is correct |
30 |
Correct |
7 ms |
12372 KB |
Output is correct |
31 |
Correct |
7 ms |
12372 KB |
Output is correct |
32 |
Correct |
7 ms |
12372 KB |
Output is correct |
33 |
Correct |
6 ms |
12372 KB |
Output is correct |
34 |
Correct |
6 ms |
12372 KB |
Output is correct |
35 |
Correct |
9 ms |
12264 KB |
Output is correct |
36 |
Correct |
7 ms |
12340 KB |
Output is correct |
37 |
Correct |
7 ms |
12372 KB |
Output is correct |
38 |
Correct |
7 ms |
12388 KB |
Output is correct |
39 |
Correct |
6 ms |
12340 KB |
Output is correct |
40 |
Correct |
7 ms |
12372 KB |
Output is correct |
41 |
Correct |
7 ms |
12372 KB |
Output is correct |
42 |
Correct |
7 ms |
12372 KB |
Output is correct |
43 |
Correct |
7 ms |
12372 KB |
Output is correct |
44 |
Correct |
7 ms |
12336 KB |
Output is correct |
45 |
Correct |
7 ms |
12372 KB |
Output is correct |
46 |
Correct |
7 ms |
12348 KB |
Output is correct |
47 |
Correct |
7 ms |
12372 KB |
Output is correct |
48 |
Correct |
7 ms |
12372 KB |
Output is correct |
49 |
Correct |
7 ms |
12372 KB |
Output is correct |
50 |
Correct |
7 ms |
12336 KB |
Output is correct |
51 |
Correct |
7 ms |
12372 KB |
Output is correct |
52 |
Correct |
7 ms |
12372 KB |
Output is correct |
53 |
Correct |
7 ms |
12372 KB |
Output is correct |
54 |
Correct |
7 ms |
12372 KB |
Output is correct |
55 |
Correct |
7 ms |
12372 KB |
Output is correct |
56 |
Correct |
7 ms |
12388 KB |
Output is correct |
57 |
Correct |
7 ms |
12372 KB |
Output is correct |
58 |
Correct |
7 ms |
12396 KB |
Output is correct |
59 |
Correct |
7 ms |
12372 KB |
Output is correct |
60 |
Correct |
8 ms |
12312 KB |
Output is correct |
61 |
Correct |
8 ms |
12372 KB |
Output is correct |
62 |
Correct |
7 ms |
12336 KB |
Output is correct |
63 |
Correct |
7 ms |
12372 KB |
Output is correct |
64 |
Correct |
7 ms |
12372 KB |
Output is correct |
65 |
Correct |
7 ms |
12340 KB |
Output is correct |
66 |
Correct |
109 ms |
39968 KB |
Output is correct |
67 |
Correct |
138 ms |
39972 KB |
Output is correct |
68 |
Correct |
144 ms |
32384 KB |
Output is correct |
69 |
Correct |
132 ms |
37108 KB |
Output is correct |
70 |
Correct |
122 ms |
29972 KB |
Output is correct |
71 |
Correct |
146 ms |
32064 KB |
Output is correct |
72 |
Correct |
151 ms |
30832 KB |
Output is correct |
73 |
Correct |
154 ms |
31764 KB |
Output is correct |
74 |
Correct |
155 ms |
28740 KB |
Output is correct |
75 |
Correct |
134 ms |
28968 KB |
Output is correct |
76 |
Correct |
110 ms |
25896 KB |
Output is correct |
77 |
Correct |
109 ms |
25676 KB |
Output is correct |
78 |
Correct |
90 ms |
25160 KB |
Output is correct |
79 |
Correct |
99 ms |
24864 KB |
Output is correct |
80 |
Correct |
76 ms |
23020 KB |
Output is correct |
81 |
Correct |
67 ms |
22744 KB |
Output is correct |
82 |
Correct |
8 ms |
13652 KB |
Output is correct |
83 |
Correct |
8 ms |
13652 KB |
Output is correct |
84 |
Correct |
8 ms |
13648 KB |
Output is correct |
85 |
Correct |
9 ms |
13652 KB |
Output is correct |
86 |
Correct |
8 ms |
13524 KB |
Output is correct |
87 |
Correct |
9 ms |
13524 KB |
Output is correct |
88 |
Correct |
9 ms |
12516 KB |
Output is correct |
89 |
Correct |
8 ms |
12468 KB |
Output is correct |
90 |
Correct |
7 ms |
12472 KB |
Output is correct |
91 |
Correct |
7 ms |
12628 KB |
Output is correct |
92 |
Correct |
8 ms |
12500 KB |
Output is correct |
93 |
Correct |
10 ms |
12468 KB |
Output is correct |
94 |
Correct |
7 ms |
12596 KB |
Output is correct |
95 |
Correct |
9 ms |
12472 KB |
Output is correct |
96 |
Correct |
8 ms |
12500 KB |
Output is correct |
97 |
Correct |
8 ms |
12500 KB |
Output is correct |
98 |
Correct |
8 ms |
12500 KB |
Output is correct |
99 |
Correct |
7 ms |
12500 KB |
Output is correct |
100 |
Correct |
8 ms |
12500 KB |
Output is correct |
101 |
Correct |
11 ms |
12500 KB |
Output is correct |
102 |
Correct |
9 ms |
12516 KB |
Output is correct |
103 |
Correct |
7 ms |
12464 KB |
Output is correct |
104 |
Correct |
7 ms |
12468 KB |
Output is correct |
105 |
Correct |
7 ms |
12500 KB |
Output is correct |
106 |
Correct |
8 ms |
12552 KB |
Output is correct |
107 |
Correct |
8 ms |
12452 KB |
Output is correct |
108 |
Correct |
173 ms |
28100 KB |
Output is correct |
109 |
Correct |
155 ms |
28068 KB |
Output is correct |
110 |
Correct |
135 ms |
28132 KB |
Output is correct |
111 |
Correct |
142 ms |
28128 KB |
Output is correct |
112 |
Correct |
166 ms |
28072 KB |
Output is correct |
113 |
Correct |
130 ms |
35420 KB |
Output is correct |
114 |
Correct |
142 ms |
32808 KB |
Output is correct |
115 |
Correct |
140 ms |
31548 KB |
Output is correct |
116 |
Correct |
146 ms |
30364 KB |
Output is correct |
117 |
Correct |
141 ms |
28060 KB |
Output is correct |
118 |
Correct |
143 ms |
28144 KB |
Output is correct |
119 |
Correct |
147 ms |
28120 KB |
Output is correct |
120 |
Correct |
133 ms |
28076 KB |
Output is correct |
121 |
Correct |
127 ms |
27288 KB |
Output is correct |
122 |
Correct |
132 ms |
26188 KB |
Output is correct |
123 |
Correct |
65 ms |
22468 KB |
Output is correct |
124 |
Correct |
86 ms |
27516 KB |
Output is correct |
125 |
Correct |
97 ms |
27480 KB |
Output is correct |
126 |
Correct |
92 ms |
27608 KB |
Output is correct |
127 |
Correct |
116 ms |
27460 KB |
Output is correct |
128 |
Correct |
7 ms |
12500 KB |
Output is correct |
129 |
Correct |
8 ms |
12472 KB |
Output is correct |
130 |
Correct |
7 ms |
12500 KB |
Output is correct |
131 |
Correct |
8 ms |
12476 KB |
Output is correct |
132 |
Correct |
8 ms |
12472 KB |
Output is correct |
133 |
Correct |
8 ms |
12472 KB |
Output is correct |
134 |
Correct |
8 ms |
12464 KB |
Output is correct |
135 |
Correct |
8 ms |
12500 KB |
Output is correct |
136 |
Correct |
8 ms |
12500 KB |
Output is correct |
137 |
Correct |
8 ms |
12500 KB |
Output is correct |
138 |
Correct |
8 ms |
12500 KB |
Output is correct |
139 |
Correct |
8 ms |
12476 KB |
Output is correct |
140 |
Correct |
7 ms |
12500 KB |
Output is correct |
141 |
Correct |
7 ms |
12500 KB |
Output is correct |
142 |
Correct |
7 ms |
12468 KB |
Output is correct |
143 |
Correct |
7 ms |
12500 KB |
Output is correct |
144 |
Correct |
8 ms |
12472 KB |
Output is correct |
145 |
Correct |
8 ms |
12504 KB |
Output is correct |
146 |
Correct |
8 ms |
12500 KB |
Output is correct |
147 |
Correct |
7 ms |
12500 KB |
Output is correct |
148 |
Correct |
8 ms |
12500 KB |
Output is correct |
149 |
Correct |
9 ms |
12500 KB |
Output is correct |
150 |
Correct |
8 ms |
12500 KB |
Output is correct |
151 |
Correct |
11 ms |
12500 KB |
Output is correct |
152 |
Correct |
8 ms |
12372 KB |
Output is correct |
153 |
Correct |
9 ms |
12372 KB |
Output is correct |
154 |
Correct |
7 ms |
12408 KB |
Output is correct |
155 |
Correct |
143 ms |
28144 KB |
Output is correct |
156 |
Correct |
162 ms |
28196 KB |
Output is correct |
157 |
Correct |
140 ms |
28708 KB |
Output is correct |
158 |
Correct |
151 ms |
28296 KB |
Output is correct |
159 |
Correct |
151 ms |
27432 KB |
Output is correct |
160 |
Correct |
141 ms |
26828 KB |
Output is correct |
161 |
Correct |
132 ms |
26648 KB |
Output is correct |
162 |
Correct |
127 ms |
26252 KB |
Output is correct |
163 |
Correct |
133 ms |
26220 KB |
Output is correct |
164 |
Correct |
113 ms |
26044 KB |
Output is correct |
165 |
Correct |
115 ms |
26064 KB |
Output is correct |
166 |
Correct |
134 ms |
26188 KB |
Output is correct |
167 |
Correct |
119 ms |
26144 KB |
Output is correct |
168 |
Correct |
139 ms |
28620 KB |
Output is correct |
169 |
Correct |
157 ms |
33412 KB |
Output is correct |
170 |
Correct |
161 ms |
31860 KB |
Output is correct |
171 |
Correct |
157 ms |
32468 KB |
Output is correct |
172 |
Correct |
165 ms |
31180 KB |
Output is correct |
173 |
Correct |
172 ms |
28296 KB |
Output is correct |
174 |
Correct |
153 ms |
28296 KB |
Output is correct |
175 |
Correct |
138 ms |
28220 KB |
Output is correct |
176 |
Correct |
145 ms |
27324 KB |
Output is correct |
177 |
Correct |
115 ms |
26336 KB |
Output is correct |
178 |
Correct |
140 ms |
28596 KB |
Output is correct |
179 |
Correct |
139 ms |
28676 KB |
Output is correct |
180 |
Correct |
139 ms |
28536 KB |
Output is correct |
181 |
Correct |
130 ms |
28468 KB |
Output is correct |
182 |
Correct |
6 ms |
12372 KB |
Output is correct |
183 |
Correct |
7 ms |
12372 KB |
Output is correct |
184 |
Correct |
7 ms |
12500 KB |
Output is correct |
185 |
Correct |
7 ms |
12600 KB |
Output is correct |
186 |
Correct |
8 ms |
12604 KB |
Output is correct |
187 |
Correct |
7 ms |
12500 KB |
Output is correct |
188 |
Correct |
8 ms |
12500 KB |
Output is correct |
189 |
Correct |
8 ms |
12500 KB |
Output is correct |
190 |
Correct |
7 ms |
12500 KB |
Output is correct |
191 |
Correct |
8 ms |
12472 KB |
Output is correct |
192 |
Correct |
6 ms |
12372 KB |
Output is correct |
193 |
Correct |
8 ms |
12500 KB |
Output is correct |
194 |
Correct |
7 ms |
12432 KB |
Output is correct |
195 |
Correct |
9 ms |
12436 KB |
Output is correct |
196 |
Correct |
8 ms |
12520 KB |
Output is correct |
197 |
Correct |
7 ms |
12500 KB |
Output is correct |
198 |
Correct |
7 ms |
12472 KB |
Output is correct |
199 |
Correct |
7 ms |
12628 KB |
Output is correct |
200 |
Correct |
7 ms |
12480 KB |
Output is correct |
201 |
Correct |
8 ms |
12500 KB |
Output is correct |
202 |
Correct |
8 ms |
12500 KB |
Output is correct |
203 |
Correct |
7 ms |
12500 KB |
Output is correct |
204 |
Correct |
9 ms |
12532 KB |
Output is correct |
205 |
Correct |
8 ms |
12448 KB |
Output is correct |
206 |
Correct |
8 ms |
12428 KB |
Output is correct |
207 |
Correct |
8 ms |
12500 KB |
Output is correct |
208 |
Correct |
7 ms |
12472 KB |
Output is correct |
209 |
Correct |
8 ms |
13140 KB |
Output is correct |
210 |
Correct |
68 ms |
21776 KB |
Output is correct |
211 |
Correct |
129 ms |
28076 KB |
Output is correct |
212 |
Correct |
206 ms |
35668 KB |
Output is correct |
213 |
Correct |
261 ms |
40768 KB |
Output is correct |
214 |
Correct |
68 ms |
26816 KB |
Output is correct |
215 |
Correct |
74 ms |
27308 KB |
Output is correct |
216 |
Correct |
154 ms |
28972 KB |
Output is correct |
217 |
Correct |
141 ms |
28068 KB |
Output is correct |
218 |
Correct |
157 ms |
26612 KB |
Output is correct |
219 |
Correct |
140 ms |
26044 KB |
Output is correct |
220 |
Correct |
117 ms |
26012 KB |
Output is correct |
221 |
Correct |
99 ms |
26016 KB |
Output is correct |
222 |
Correct |
141 ms |
27480 KB |
Output is correct |
223 |
Correct |
155 ms |
30812 KB |
Output is correct |
224 |
Correct |
167 ms |
29984 KB |
Output is correct |
225 |
Correct |
153 ms |
27964 KB |
Output is correct |
226 |
Correct |
158 ms |
28016 KB |
Output is correct |
227 |
Correct |
159 ms |
28056 KB |
Output is correct |
228 |
Correct |
114 ms |
27136 KB |
Output is correct |
229 |
Correct |
122 ms |
26420 KB |
Output is correct |
230 |
Correct |
137 ms |
28452 KB |
Output is correct |
231 |
Correct |
148 ms |
28564 KB |
Output is correct |