#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
//#define int long long
//#pragma GCC optimize("Ofast")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4")
#define file(s) freopen(s".in","r",stdin); freopen(s".out","w",stdout);
#define fastio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define all(x) x.begin(), x.end()
#define sz(s) (int)s.size()
#define pb push_back
#define ppb pop_back
#define mp make_pair
#define s second
#define f first
typedef pair < long long, long long > pll;
typedef pair < int, int > pii;
typedef unsigned long long ull;
typedef vector < pii > vpii;
typedef vector < int > vi;
typedef long double ldb;
typedef long long ll;
typedef double db;
typedef tree < int, null_type, less < int >, rb_tree_tag, tree_order_statistics_node_update > ordered_set;
const int inf = 1e9, maxn = 2e5 + 48, mod = 998244353, N = 2e5 + 12;
const int dx[] = {1, -1, 0, 0}, dy[] = {0, 0, 1, -1}, block = 300;
const pii base = mp(1171, 3307), Mod = mp(1e9 + 7, 1e9 + 9);
const db eps = 1e-12, pi = acos(-1);
const ll INF = 1e18;
int n, m, v, u, k, col[N], kk, cnt1[N];
int tin[N], fup[N], timer, cnt[N];
stack < int > st;
vi g[N], gg[N];
bool was[N];
ll ans;
void addEdge (int v, int u) {
gg[v].pb(u);
gg[u].pb(v);
col[u] = col[v];
}
void dfs (int v, int p = 0) {
if (p)
st.push(v);
tin[v] = fup[v] = ++timer;
col[v] = kk;
++cnt1[kk];
for (auto to : g[v])
if (to != p) {
if (tin[to])
fup[v] = min(fup[v], tin[to]);
else {
dfs(to, v);
fup[v] = min(fup[v], fup[to]);
if (fup[to] >= tin[v]) {
++k;
addEdge(v, k);
while (1) {
int u = st.top();
st.pop();
addEdge(u, k);
if (u == to)
break;
}
}
}
}
}
ll get (int x) {
return x * 1ll * (x - 1);
}
void dfs1 (int v, int p = 0) {
was[v] = 1;
cnt[v] = (v <= n);
for (auto to : gg[v])
if (to != p) {
dfs1(to, v);
cnt[v] += cnt[to];
}
if (v <= n) {
for (auto to : gg[v])
if (to == p) {
// cerr << v << ' ' << to << ' ' << get(cnt[v]) << ' ' << (sz(gg[to]) - 1) << endl;
ans -= get(cnt[v]) * (sz(gg[to]) - 1);
} else {
// cerr << v << ' ' << to << ' ' << get(cnt1[col[v]] - cnt[to]) << ' ' << (sz(gg[to]) - 1) << endl;
ans -= get(cnt1[col[v]] - cnt[to]) * (sz(gg[to]) - 1);
}
}
}
main () {
cin >> n >> m;
while (m--) {
cin >> v >> u;
g[v].pb(u);
g[u].pb(v);
}
k = n;
for (int i = 1; i <= n; ++i)
if (!tin[i]) {
++kk;
dfs(i);
ans += 1ll * cnt1[kk] * (cnt1[kk] - 1) * (cnt1[kk] - 2);
}
for (int i = 1; i <= n; ++i)
if (!was[i]) {
dfs1(i);
}
cout << ans << endl;
}
Compilation message
count_triplets.cpp:118:7: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main () {
^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
6 ms |
9728 KB |
Output is correct |
4 |
Correct |
7 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
6 ms |
9728 KB |
Output is correct |
7 |
Correct |
6 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9776 KB |
Output is correct |
9 |
Correct |
6 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
6 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
6 ms |
9728 KB |
Output is correct |
14 |
Correct |
7 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
7 ms |
9728 KB |
Output is correct |
17 |
Correct |
6 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9720 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
6 ms |
9792 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
7 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
6 ms |
9728 KB |
Output is correct |
30 |
Correct |
6 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9776 KB |
Output is correct |
32 |
Correct |
6 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9856 KB |
Output is correct |
34 |
Correct |
6 ms |
9728 KB |
Output is correct |
35 |
Correct |
6 ms |
9728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
6 ms |
9728 KB |
Output is correct |
4 |
Correct |
7 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
6 ms |
9728 KB |
Output is correct |
7 |
Correct |
6 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9776 KB |
Output is correct |
9 |
Correct |
6 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
6 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
6 ms |
9728 KB |
Output is correct |
14 |
Correct |
7 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
7 ms |
9728 KB |
Output is correct |
17 |
Correct |
6 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9720 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
6 ms |
9792 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
7 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
6 ms |
9728 KB |
Output is correct |
30 |
Correct |
6 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9776 KB |
Output is correct |
32 |
Correct |
6 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9856 KB |
Output is correct |
34 |
Correct |
6 ms |
9728 KB |
Output is correct |
35 |
Correct |
6 ms |
9728 KB |
Output is correct |
36 |
Correct |
6 ms |
9728 KB |
Output is correct |
37 |
Correct |
6 ms |
9728 KB |
Output is correct |
38 |
Correct |
7 ms |
9728 KB |
Output is correct |
39 |
Correct |
7 ms |
9728 KB |
Output is correct |
40 |
Correct |
7 ms |
9728 KB |
Output is correct |
41 |
Correct |
6 ms |
9728 KB |
Output is correct |
42 |
Correct |
6 ms |
9728 KB |
Output is correct |
43 |
Correct |
6 ms |
9728 KB |
Output is correct |
44 |
Correct |
6 ms |
9728 KB |
Output is correct |
45 |
Correct |
6 ms |
9728 KB |
Output is correct |
46 |
Correct |
6 ms |
9728 KB |
Output is correct |
47 |
Correct |
6 ms |
9728 KB |
Output is correct |
48 |
Correct |
6 ms |
9728 KB |
Output is correct |
49 |
Correct |
7 ms |
9728 KB |
Output is correct |
50 |
Correct |
6 ms |
9728 KB |
Output is correct |
51 |
Correct |
7 ms |
9728 KB |
Output is correct |
52 |
Correct |
7 ms |
9728 KB |
Output is correct |
53 |
Correct |
7 ms |
9728 KB |
Output is correct |
54 |
Correct |
8 ms |
9728 KB |
Output is correct |
55 |
Correct |
8 ms |
9728 KB |
Output is correct |
56 |
Correct |
6 ms |
9728 KB |
Output is correct |
57 |
Correct |
6 ms |
9728 KB |
Output is correct |
58 |
Correct |
6 ms |
9728 KB |
Output is correct |
59 |
Correct |
7 ms |
9728 KB |
Output is correct |
60 |
Correct |
6 ms |
9728 KB |
Output is correct |
61 |
Correct |
7 ms |
9728 KB |
Output is correct |
62 |
Correct |
7 ms |
9728 KB |
Output is correct |
63 |
Correct |
6 ms |
9728 KB |
Output is correct |
64 |
Correct |
7 ms |
9856 KB |
Output is correct |
65 |
Correct |
8 ms |
9728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
166 ms |
25564 KB |
Output is correct |
2 |
Correct |
175 ms |
25584 KB |
Output is correct |
3 |
Correct |
198 ms |
27636 KB |
Output is correct |
4 |
Correct |
167 ms |
24944 KB |
Output is correct |
5 |
Correct |
168 ms |
24688 KB |
Output is correct |
6 |
Correct |
186 ms |
26484 KB |
Output is correct |
7 |
Correct |
181 ms |
24568 KB |
Output is correct |
8 |
Correct |
175 ms |
24952 KB |
Output is correct |
9 |
Correct |
203 ms |
23288 KB |
Output is correct |
10 |
Correct |
207 ms |
23288 KB |
Output is correct |
11 |
Correct |
176 ms |
20796 KB |
Output is correct |
12 |
Correct |
163 ms |
20576 KB |
Output is correct |
13 |
Correct |
134 ms |
20344 KB |
Output is correct |
14 |
Correct |
130 ms |
20220 KB |
Output is correct |
15 |
Correct |
102 ms |
19064 KB |
Output is correct |
16 |
Correct |
106 ms |
18808 KB |
Output is correct |
17 |
Correct |
9 ms |
11776 KB |
Output is correct |
18 |
Correct |
10 ms |
11776 KB |
Output is correct |
19 |
Correct |
10 ms |
11776 KB |
Output is correct |
20 |
Correct |
9 ms |
11788 KB |
Output is correct |
21 |
Correct |
9 ms |
11776 KB |
Output is correct |
22 |
Correct |
9 ms |
11776 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
9856 KB |
Output is correct |
2 |
Correct |
8 ms |
9856 KB |
Output is correct |
3 |
Correct |
8 ms |
9856 KB |
Output is correct |
4 |
Correct |
9 ms |
9984 KB |
Output is correct |
5 |
Correct |
8 ms |
10112 KB |
Output is correct |
6 |
Correct |
9 ms |
9984 KB |
Output is correct |
7 |
Correct |
8 ms |
9984 KB |
Output is correct |
8 |
Correct |
10 ms |
9856 KB |
Output is correct |
9 |
Correct |
8 ms |
9984 KB |
Output is correct |
10 |
Correct |
9 ms |
9856 KB |
Output is correct |
11 |
Correct |
8 ms |
9856 KB |
Output is correct |
12 |
Correct |
9 ms |
9856 KB |
Output is correct |
13 |
Correct |
8 ms |
9856 KB |
Output is correct |
14 |
Correct |
8 ms |
9856 KB |
Output is correct |
15 |
Correct |
9 ms |
9856 KB |
Output is correct |
16 |
Correct |
8 ms |
9824 KB |
Output is correct |
17 |
Correct |
8 ms |
9856 KB |
Output is correct |
18 |
Correct |
8 ms |
9856 KB |
Output is correct |
19 |
Correct |
9 ms |
9856 KB |
Output is correct |
20 |
Correct |
8 ms |
9856 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
195 ms |
23084 KB |
Output is correct |
2 |
Correct |
205 ms |
23152 KB |
Output is correct |
3 |
Correct |
201 ms |
23256 KB |
Output is correct |
4 |
Correct |
190 ms |
23172 KB |
Output is correct |
5 |
Correct |
203 ms |
23160 KB |
Output is correct |
6 |
Correct |
207 ms |
31480 KB |
Output is correct |
7 |
Correct |
199 ms |
28620 KB |
Output is correct |
8 |
Correct |
223 ms |
27228 KB |
Output is correct |
9 |
Correct |
225 ms |
25756 KB |
Output is correct |
10 |
Correct |
209 ms |
23272 KB |
Output is correct |
11 |
Correct |
211 ms |
23160 KB |
Output is correct |
12 |
Correct |
210 ms |
23164 KB |
Output is correct |
13 |
Correct |
202 ms |
23160 KB |
Output is correct |
14 |
Correct |
188 ms |
22520 KB |
Output is correct |
15 |
Correct |
165 ms |
21752 KB |
Output is correct |
16 |
Correct |
105 ms |
18936 KB |
Output is correct |
17 |
Correct |
151 ms |
23664 KB |
Output is correct |
18 |
Correct |
156 ms |
23660 KB |
Output is correct |
19 |
Correct |
155 ms |
23916 KB |
Output is correct |
20 |
Correct |
160 ms |
23656 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
9856 KB |
Output is correct |
2 |
Correct |
7 ms |
9856 KB |
Output is correct |
3 |
Correct |
7 ms |
9856 KB |
Output is correct |
4 |
Correct |
8 ms |
9856 KB |
Output is correct |
5 |
Correct |
7 ms |
9856 KB |
Output is correct |
6 |
Correct |
9 ms |
9984 KB |
Output is correct |
7 |
Correct |
8 ms |
9856 KB |
Output is correct |
8 |
Correct |
7 ms |
9856 KB |
Output is correct |
9 |
Correct |
7 ms |
9856 KB |
Output is correct |
10 |
Correct |
7 ms |
9856 KB |
Output is correct |
11 |
Correct |
7 ms |
9856 KB |
Output is correct |
12 |
Correct |
8 ms |
9984 KB |
Output is correct |
13 |
Correct |
8 ms |
9984 KB |
Output is correct |
14 |
Correct |
8 ms |
9856 KB |
Output is correct |
15 |
Correct |
8 ms |
9856 KB |
Output is correct |
16 |
Correct |
8 ms |
9856 KB |
Output is correct |
17 |
Correct |
9 ms |
9856 KB |
Output is correct |
18 |
Correct |
9 ms |
9856 KB |
Output is correct |
19 |
Correct |
8 ms |
9856 KB |
Output is correct |
20 |
Correct |
7 ms |
9856 KB |
Output is correct |
21 |
Correct |
8 ms |
9856 KB |
Output is correct |
22 |
Correct |
9 ms |
9856 KB |
Output is correct |
23 |
Correct |
9 ms |
9856 KB |
Output is correct |
24 |
Correct |
8 ms |
9856 KB |
Output is correct |
25 |
Correct |
7 ms |
9856 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
205 ms |
23096 KB |
Output is correct |
2 |
Correct |
206 ms |
23032 KB |
Output is correct |
3 |
Correct |
207 ms |
22520 KB |
Output is correct |
4 |
Correct |
206 ms |
21752 KB |
Output is correct |
5 |
Correct |
197 ms |
20728 KB |
Output is correct |
6 |
Correct |
221 ms |
20352 KB |
Output is correct |
7 |
Correct |
212 ms |
20200 KB |
Output is correct |
8 |
Correct |
191 ms |
19960 KB |
Output is correct |
9 |
Correct |
182 ms |
19832 KB |
Output is correct |
10 |
Correct |
192 ms |
19832 KB |
Output is correct |
11 |
Correct |
188 ms |
19704 KB |
Output is correct |
12 |
Correct |
176 ms |
19704 KB |
Output is correct |
13 |
Correct |
173 ms |
19704 KB |
Output is correct |
14 |
Correct |
159 ms |
21112 KB |
Output is correct |
15 |
Correct |
208 ms |
28412 KB |
Output is correct |
16 |
Correct |
230 ms |
26448 KB |
Output is correct |
17 |
Correct |
219 ms |
27000 KB |
Output is correct |
18 |
Correct |
222 ms |
25336 KB |
Output is correct |
19 |
Correct |
213 ms |
21752 KB |
Output is correct |
20 |
Correct |
223 ms |
21752 KB |
Output is correct |
21 |
Correct |
216 ms |
21692 KB |
Output is correct |
22 |
Correct |
202 ms |
21288 KB |
Output is correct |
23 |
Correct |
175 ms |
20604 KB |
Output is correct |
24 |
Correct |
221 ms |
22836 KB |
Output is correct |
25 |
Correct |
205 ms |
23032 KB |
Output is correct |
26 |
Correct |
206 ms |
22392 KB |
Output is correct |
27 |
Correct |
240 ms |
22264 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
6 ms |
9728 KB |
Output is correct |
4 |
Correct |
7 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
6 ms |
9728 KB |
Output is correct |
7 |
Correct |
6 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9776 KB |
Output is correct |
9 |
Correct |
6 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
6 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
6 ms |
9728 KB |
Output is correct |
14 |
Correct |
7 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
7 ms |
9728 KB |
Output is correct |
17 |
Correct |
6 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9720 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
6 ms |
9792 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
7 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
6 ms |
9728 KB |
Output is correct |
30 |
Correct |
6 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9776 KB |
Output is correct |
32 |
Correct |
6 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9856 KB |
Output is correct |
34 |
Correct |
6 ms |
9728 KB |
Output is correct |
35 |
Correct |
6 ms |
9728 KB |
Output is correct |
36 |
Correct |
6 ms |
9728 KB |
Output is correct |
37 |
Correct |
6 ms |
9728 KB |
Output is correct |
38 |
Correct |
7 ms |
9728 KB |
Output is correct |
39 |
Correct |
7 ms |
9728 KB |
Output is correct |
40 |
Correct |
7 ms |
9728 KB |
Output is correct |
41 |
Correct |
6 ms |
9728 KB |
Output is correct |
42 |
Correct |
6 ms |
9728 KB |
Output is correct |
43 |
Correct |
6 ms |
9728 KB |
Output is correct |
44 |
Correct |
6 ms |
9728 KB |
Output is correct |
45 |
Correct |
6 ms |
9728 KB |
Output is correct |
46 |
Correct |
6 ms |
9728 KB |
Output is correct |
47 |
Correct |
6 ms |
9728 KB |
Output is correct |
48 |
Correct |
6 ms |
9728 KB |
Output is correct |
49 |
Correct |
7 ms |
9728 KB |
Output is correct |
50 |
Correct |
6 ms |
9728 KB |
Output is correct |
51 |
Correct |
7 ms |
9728 KB |
Output is correct |
52 |
Correct |
7 ms |
9728 KB |
Output is correct |
53 |
Correct |
7 ms |
9728 KB |
Output is correct |
54 |
Correct |
8 ms |
9728 KB |
Output is correct |
55 |
Correct |
8 ms |
9728 KB |
Output is correct |
56 |
Correct |
6 ms |
9728 KB |
Output is correct |
57 |
Correct |
6 ms |
9728 KB |
Output is correct |
58 |
Correct |
6 ms |
9728 KB |
Output is correct |
59 |
Correct |
7 ms |
9728 KB |
Output is correct |
60 |
Correct |
6 ms |
9728 KB |
Output is correct |
61 |
Correct |
7 ms |
9728 KB |
Output is correct |
62 |
Correct |
7 ms |
9728 KB |
Output is correct |
63 |
Correct |
6 ms |
9728 KB |
Output is correct |
64 |
Correct |
7 ms |
9856 KB |
Output is correct |
65 |
Correct |
8 ms |
9728 KB |
Output is correct |
66 |
Correct |
6 ms |
9728 KB |
Output is correct |
67 |
Correct |
7 ms |
9856 KB |
Output is correct |
68 |
Correct |
7 ms |
9856 KB |
Output is correct |
69 |
Correct |
8 ms |
9856 KB |
Output is correct |
70 |
Correct |
8 ms |
9856 KB |
Output is correct |
71 |
Correct |
7 ms |
9856 KB |
Output is correct |
72 |
Correct |
7 ms |
9856 KB |
Output is correct |
73 |
Correct |
7 ms |
9856 KB |
Output is correct |
74 |
Correct |
7 ms |
9856 KB |
Output is correct |
75 |
Correct |
7 ms |
9856 KB |
Output is correct |
76 |
Correct |
6 ms |
9728 KB |
Output is correct |
77 |
Correct |
8 ms |
9856 KB |
Output is correct |
78 |
Correct |
7 ms |
9856 KB |
Output is correct |
79 |
Correct |
8 ms |
9816 KB |
Output is correct |
80 |
Correct |
7 ms |
9856 KB |
Output is correct |
81 |
Correct |
7 ms |
9856 KB |
Output is correct |
82 |
Correct |
7 ms |
9856 KB |
Output is correct |
83 |
Correct |
7 ms |
9856 KB |
Output is correct |
84 |
Correct |
7 ms |
9856 KB |
Output is correct |
85 |
Correct |
8 ms |
9856 KB |
Output is correct |
86 |
Correct |
8 ms |
9856 KB |
Output is correct |
87 |
Correct |
8 ms |
9856 KB |
Output is correct |
88 |
Correct |
8 ms |
9856 KB |
Output is correct |
89 |
Correct |
8 ms |
9856 KB |
Output is correct |
90 |
Correct |
7 ms |
9856 KB |
Output is correct |
91 |
Correct |
7 ms |
9856 KB |
Output is correct |
92 |
Correct |
7 ms |
9856 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
9728 KB |
Output is correct |
2 |
Correct |
6 ms |
9728 KB |
Output is correct |
3 |
Correct |
6 ms |
9728 KB |
Output is correct |
4 |
Correct |
7 ms |
9728 KB |
Output is correct |
5 |
Correct |
6 ms |
9728 KB |
Output is correct |
6 |
Correct |
6 ms |
9728 KB |
Output is correct |
7 |
Correct |
6 ms |
9728 KB |
Output is correct |
8 |
Correct |
6 ms |
9776 KB |
Output is correct |
9 |
Correct |
6 ms |
9728 KB |
Output is correct |
10 |
Correct |
6 ms |
9728 KB |
Output is correct |
11 |
Correct |
6 ms |
9728 KB |
Output is correct |
12 |
Correct |
6 ms |
9728 KB |
Output is correct |
13 |
Correct |
6 ms |
9728 KB |
Output is correct |
14 |
Correct |
7 ms |
9728 KB |
Output is correct |
15 |
Correct |
6 ms |
9728 KB |
Output is correct |
16 |
Correct |
7 ms |
9728 KB |
Output is correct |
17 |
Correct |
6 ms |
9728 KB |
Output is correct |
18 |
Correct |
6 ms |
9720 KB |
Output is correct |
19 |
Correct |
6 ms |
9728 KB |
Output is correct |
20 |
Correct |
6 ms |
9728 KB |
Output is correct |
21 |
Correct |
6 ms |
9728 KB |
Output is correct |
22 |
Correct |
6 ms |
9792 KB |
Output is correct |
23 |
Correct |
6 ms |
9728 KB |
Output is correct |
24 |
Correct |
6 ms |
9728 KB |
Output is correct |
25 |
Correct |
7 ms |
9728 KB |
Output is correct |
26 |
Correct |
6 ms |
9728 KB |
Output is correct |
27 |
Correct |
7 ms |
9728 KB |
Output is correct |
28 |
Correct |
6 ms |
9728 KB |
Output is correct |
29 |
Correct |
6 ms |
9728 KB |
Output is correct |
30 |
Correct |
6 ms |
9728 KB |
Output is correct |
31 |
Correct |
6 ms |
9776 KB |
Output is correct |
32 |
Correct |
6 ms |
9728 KB |
Output is correct |
33 |
Correct |
7 ms |
9856 KB |
Output is correct |
34 |
Correct |
6 ms |
9728 KB |
Output is correct |
35 |
Correct |
6 ms |
9728 KB |
Output is correct |
36 |
Correct |
6 ms |
9728 KB |
Output is correct |
37 |
Correct |
6 ms |
9728 KB |
Output is correct |
38 |
Correct |
7 ms |
9728 KB |
Output is correct |
39 |
Correct |
7 ms |
9728 KB |
Output is correct |
40 |
Correct |
7 ms |
9728 KB |
Output is correct |
41 |
Correct |
6 ms |
9728 KB |
Output is correct |
42 |
Correct |
6 ms |
9728 KB |
Output is correct |
43 |
Correct |
6 ms |
9728 KB |
Output is correct |
44 |
Correct |
6 ms |
9728 KB |
Output is correct |
45 |
Correct |
6 ms |
9728 KB |
Output is correct |
46 |
Correct |
6 ms |
9728 KB |
Output is correct |
47 |
Correct |
6 ms |
9728 KB |
Output is correct |
48 |
Correct |
6 ms |
9728 KB |
Output is correct |
49 |
Correct |
7 ms |
9728 KB |
Output is correct |
50 |
Correct |
6 ms |
9728 KB |
Output is correct |
51 |
Correct |
7 ms |
9728 KB |
Output is correct |
52 |
Correct |
7 ms |
9728 KB |
Output is correct |
53 |
Correct |
7 ms |
9728 KB |
Output is correct |
54 |
Correct |
8 ms |
9728 KB |
Output is correct |
55 |
Correct |
8 ms |
9728 KB |
Output is correct |
56 |
Correct |
6 ms |
9728 KB |
Output is correct |
57 |
Correct |
6 ms |
9728 KB |
Output is correct |
58 |
Correct |
6 ms |
9728 KB |
Output is correct |
59 |
Correct |
7 ms |
9728 KB |
Output is correct |
60 |
Correct |
6 ms |
9728 KB |
Output is correct |
61 |
Correct |
7 ms |
9728 KB |
Output is correct |
62 |
Correct |
7 ms |
9728 KB |
Output is correct |
63 |
Correct |
6 ms |
9728 KB |
Output is correct |
64 |
Correct |
7 ms |
9856 KB |
Output is correct |
65 |
Correct |
8 ms |
9728 KB |
Output is correct |
66 |
Correct |
166 ms |
25564 KB |
Output is correct |
67 |
Correct |
175 ms |
25584 KB |
Output is correct |
68 |
Correct |
198 ms |
27636 KB |
Output is correct |
69 |
Correct |
167 ms |
24944 KB |
Output is correct |
70 |
Correct |
168 ms |
24688 KB |
Output is correct |
71 |
Correct |
186 ms |
26484 KB |
Output is correct |
72 |
Correct |
181 ms |
24568 KB |
Output is correct |
73 |
Correct |
175 ms |
24952 KB |
Output is correct |
74 |
Correct |
203 ms |
23288 KB |
Output is correct |
75 |
Correct |
207 ms |
23288 KB |
Output is correct |
76 |
Correct |
176 ms |
20796 KB |
Output is correct |
77 |
Correct |
163 ms |
20576 KB |
Output is correct |
78 |
Correct |
134 ms |
20344 KB |
Output is correct |
79 |
Correct |
130 ms |
20220 KB |
Output is correct |
80 |
Correct |
102 ms |
19064 KB |
Output is correct |
81 |
Correct |
106 ms |
18808 KB |
Output is correct |
82 |
Correct |
9 ms |
11776 KB |
Output is correct |
83 |
Correct |
10 ms |
11776 KB |
Output is correct |
84 |
Correct |
10 ms |
11776 KB |
Output is correct |
85 |
Correct |
9 ms |
11788 KB |
Output is correct |
86 |
Correct |
9 ms |
11776 KB |
Output is correct |
87 |
Correct |
9 ms |
11776 KB |
Output is correct |
88 |
Correct |
9 ms |
9856 KB |
Output is correct |
89 |
Correct |
8 ms |
9856 KB |
Output is correct |
90 |
Correct |
8 ms |
9856 KB |
Output is correct |
91 |
Correct |
9 ms |
9984 KB |
Output is correct |
92 |
Correct |
8 ms |
10112 KB |
Output is correct |
93 |
Correct |
9 ms |
9984 KB |
Output is correct |
94 |
Correct |
8 ms |
9984 KB |
Output is correct |
95 |
Correct |
10 ms |
9856 KB |
Output is correct |
96 |
Correct |
8 ms |
9984 KB |
Output is correct |
97 |
Correct |
9 ms |
9856 KB |
Output is correct |
98 |
Correct |
8 ms |
9856 KB |
Output is correct |
99 |
Correct |
9 ms |
9856 KB |
Output is correct |
100 |
Correct |
8 ms |
9856 KB |
Output is correct |
101 |
Correct |
8 ms |
9856 KB |
Output is correct |
102 |
Correct |
9 ms |
9856 KB |
Output is correct |
103 |
Correct |
8 ms |
9824 KB |
Output is correct |
104 |
Correct |
8 ms |
9856 KB |
Output is correct |
105 |
Correct |
8 ms |
9856 KB |
Output is correct |
106 |
Correct |
9 ms |
9856 KB |
Output is correct |
107 |
Correct |
8 ms |
9856 KB |
Output is correct |
108 |
Correct |
195 ms |
23084 KB |
Output is correct |
109 |
Correct |
205 ms |
23152 KB |
Output is correct |
110 |
Correct |
201 ms |
23256 KB |
Output is correct |
111 |
Correct |
190 ms |
23172 KB |
Output is correct |
112 |
Correct |
203 ms |
23160 KB |
Output is correct |
113 |
Correct |
207 ms |
31480 KB |
Output is correct |
114 |
Correct |
199 ms |
28620 KB |
Output is correct |
115 |
Correct |
223 ms |
27228 KB |
Output is correct |
116 |
Correct |
225 ms |
25756 KB |
Output is correct |
117 |
Correct |
209 ms |
23272 KB |
Output is correct |
118 |
Correct |
211 ms |
23160 KB |
Output is correct |
119 |
Correct |
210 ms |
23164 KB |
Output is correct |
120 |
Correct |
202 ms |
23160 KB |
Output is correct |
121 |
Correct |
188 ms |
22520 KB |
Output is correct |
122 |
Correct |
165 ms |
21752 KB |
Output is correct |
123 |
Correct |
105 ms |
18936 KB |
Output is correct |
124 |
Correct |
151 ms |
23664 KB |
Output is correct |
125 |
Correct |
156 ms |
23660 KB |
Output is correct |
126 |
Correct |
155 ms |
23916 KB |
Output is correct |
127 |
Correct |
160 ms |
23656 KB |
Output is correct |
128 |
Correct |
7 ms |
9856 KB |
Output is correct |
129 |
Correct |
7 ms |
9856 KB |
Output is correct |
130 |
Correct |
7 ms |
9856 KB |
Output is correct |
131 |
Correct |
8 ms |
9856 KB |
Output is correct |
132 |
Correct |
7 ms |
9856 KB |
Output is correct |
133 |
Correct |
9 ms |
9984 KB |
Output is correct |
134 |
Correct |
8 ms |
9856 KB |
Output is correct |
135 |
Correct |
7 ms |
9856 KB |
Output is correct |
136 |
Correct |
7 ms |
9856 KB |
Output is correct |
137 |
Correct |
7 ms |
9856 KB |
Output is correct |
138 |
Correct |
7 ms |
9856 KB |
Output is correct |
139 |
Correct |
8 ms |
9984 KB |
Output is correct |
140 |
Correct |
8 ms |
9984 KB |
Output is correct |
141 |
Correct |
8 ms |
9856 KB |
Output is correct |
142 |
Correct |
8 ms |
9856 KB |
Output is correct |
143 |
Correct |
8 ms |
9856 KB |
Output is correct |
144 |
Correct |
9 ms |
9856 KB |
Output is correct |
145 |
Correct |
9 ms |
9856 KB |
Output is correct |
146 |
Correct |
8 ms |
9856 KB |
Output is correct |
147 |
Correct |
7 ms |
9856 KB |
Output is correct |
148 |
Correct |
8 ms |
9856 KB |
Output is correct |
149 |
Correct |
9 ms |
9856 KB |
Output is correct |
150 |
Correct |
9 ms |
9856 KB |
Output is correct |
151 |
Correct |
8 ms |
9856 KB |
Output is correct |
152 |
Correct |
7 ms |
9856 KB |
Output is correct |
153 |
Correct |
6 ms |
9728 KB |
Output is correct |
154 |
Correct |
7 ms |
9728 KB |
Output is correct |
155 |
Correct |
205 ms |
23096 KB |
Output is correct |
156 |
Correct |
206 ms |
23032 KB |
Output is correct |
157 |
Correct |
207 ms |
22520 KB |
Output is correct |
158 |
Correct |
206 ms |
21752 KB |
Output is correct |
159 |
Correct |
197 ms |
20728 KB |
Output is correct |
160 |
Correct |
221 ms |
20352 KB |
Output is correct |
161 |
Correct |
212 ms |
20200 KB |
Output is correct |
162 |
Correct |
191 ms |
19960 KB |
Output is correct |
163 |
Correct |
182 ms |
19832 KB |
Output is correct |
164 |
Correct |
192 ms |
19832 KB |
Output is correct |
165 |
Correct |
188 ms |
19704 KB |
Output is correct |
166 |
Correct |
176 ms |
19704 KB |
Output is correct |
167 |
Correct |
173 ms |
19704 KB |
Output is correct |
168 |
Correct |
159 ms |
21112 KB |
Output is correct |
169 |
Correct |
208 ms |
28412 KB |
Output is correct |
170 |
Correct |
230 ms |
26448 KB |
Output is correct |
171 |
Correct |
219 ms |
27000 KB |
Output is correct |
172 |
Correct |
222 ms |
25336 KB |
Output is correct |
173 |
Correct |
213 ms |
21752 KB |
Output is correct |
174 |
Correct |
223 ms |
21752 KB |
Output is correct |
175 |
Correct |
216 ms |
21692 KB |
Output is correct |
176 |
Correct |
202 ms |
21288 KB |
Output is correct |
177 |
Correct |
175 ms |
20604 KB |
Output is correct |
178 |
Correct |
221 ms |
22836 KB |
Output is correct |
179 |
Correct |
205 ms |
23032 KB |
Output is correct |
180 |
Correct |
206 ms |
22392 KB |
Output is correct |
181 |
Correct |
240 ms |
22264 KB |
Output is correct |
182 |
Correct |
6 ms |
9728 KB |
Output is correct |
183 |
Correct |
7 ms |
9856 KB |
Output is correct |
184 |
Correct |
7 ms |
9856 KB |
Output is correct |
185 |
Correct |
8 ms |
9856 KB |
Output is correct |
186 |
Correct |
8 ms |
9856 KB |
Output is correct |
187 |
Correct |
7 ms |
9856 KB |
Output is correct |
188 |
Correct |
7 ms |
9856 KB |
Output is correct |
189 |
Correct |
7 ms |
9856 KB |
Output is correct |
190 |
Correct |
7 ms |
9856 KB |
Output is correct |
191 |
Correct |
7 ms |
9856 KB |
Output is correct |
192 |
Correct |
6 ms |
9728 KB |
Output is correct |
193 |
Correct |
8 ms |
9856 KB |
Output is correct |
194 |
Correct |
7 ms |
9856 KB |
Output is correct |
195 |
Correct |
8 ms |
9816 KB |
Output is correct |
196 |
Correct |
7 ms |
9856 KB |
Output is correct |
197 |
Correct |
7 ms |
9856 KB |
Output is correct |
198 |
Correct |
7 ms |
9856 KB |
Output is correct |
199 |
Correct |
7 ms |
9856 KB |
Output is correct |
200 |
Correct |
7 ms |
9856 KB |
Output is correct |
201 |
Correct |
8 ms |
9856 KB |
Output is correct |
202 |
Correct |
8 ms |
9856 KB |
Output is correct |
203 |
Correct |
8 ms |
9856 KB |
Output is correct |
204 |
Correct |
8 ms |
9856 KB |
Output is correct |
205 |
Correct |
8 ms |
9856 KB |
Output is correct |
206 |
Correct |
7 ms |
9856 KB |
Output is correct |
207 |
Correct |
7 ms |
9856 KB |
Output is correct |
208 |
Correct |
7 ms |
9856 KB |
Output is correct |
209 |
Correct |
10 ms |
11776 KB |
Output is correct |
210 |
Correct |
98 ms |
18300 KB |
Output is correct |
211 |
Correct |
168 ms |
21620 KB |
Output is correct |
212 |
Correct |
228 ms |
23536 KB |
Output is correct |
213 |
Correct |
280 ms |
25204 KB |
Output is correct |
214 |
Correct |
146 ms |
20728 KB |
Output is correct |
215 |
Correct |
157 ms |
20472 KB |
Output is correct |
216 |
Correct |
224 ms |
22392 KB |
Output is correct |
217 |
Correct |
231 ms |
21368 KB |
Output is correct |
218 |
Correct |
204 ms |
20088 KB |
Output is correct |
219 |
Correct |
191 ms |
19704 KB |
Output is correct |
220 |
Correct |
178 ms |
19664 KB |
Output is correct |
221 |
Correct |
189 ms |
19704 KB |
Output is correct |
222 |
Correct |
185 ms |
20344 KB |
Output is correct |
223 |
Correct |
256 ms |
23672 KB |
Output is correct |
224 |
Correct |
278 ms |
22776 KB |
Output is correct |
225 |
Correct |
204 ms |
20984 KB |
Output is correct |
226 |
Correct |
222 ms |
21180 KB |
Output is correct |
227 |
Correct |
246 ms |
21068 KB |
Output is correct |
228 |
Correct |
189 ms |
20580 KB |
Output is correct |
229 |
Correct |
175 ms |
20348 KB |
Output is correct |
230 |
Correct |
209 ms |
21496 KB |
Output is correct |
231 |
Correct |
214 ms |
21752 KB |
Output is correct |