# include <stdio.h>
# include <bits/stdc++.h>
#define _USE_MATH_DEFINES_
#define ll long long
#define ld long double
#define Accepted 0
#define pb push_back
#define mp make_pair
#define sz(x) (int)(x.size())
#define every(x) x.begin(),x.end()
#define F first
#define S second
#define For(i,x,y) for (int i = x; i <= y; i ++)
#define FOr(i,x,y) for (int i = x; i >= y; i --)
#define SpeedForce ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
// ROAD to... Red
using namespace std;
inline double Time() {return (clock() * 1.0) / CLOCKS_PER_SEC; }
inline bool isvowel (char c) {
c = tolower(c);
if (c == 'a' || c == 'e' || c == 'i' || c == 'y' || c == 'o' || c == 'u') return 1;
return 0;
}
const double eps = 0.000001;
const ld pi = acos(-1);
const int maxn = 1e7 + 9;
const int mod = 1e9 + 7;
const ll MOD = 1e18 + 9;
const ll INF = 1e18 + 123;
const int inf = 2e9 + 11;
const int mxn = 1e6 + 9;
const int N = 6e5 + 123;
const int M = 22;
const int pri = 997;
const int Magic = 2101;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, -1, 0, 1};
int n, m, k;
vector < int > g[N], st, gr[N];
vector < int > comp[N];
int len;
ll ans;
int timer;
ll sz[N];
int fup[N], tin[N];
void dfs (int v, int pr = 0) {
fup[v] = tin[v] = ++ timer;
st.pb(v);
for (auto to : g[v]) {
if (pr == to) continue;
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]) {
vector < int > cur;
cur.pb(v);
while (cur.back() != to) {
cur.pb(st.back());
st.pop_back();
}
comp[len ++] = cur;
}
}
}
}
int u[N];
void calc (int v, int par) {
u[v] = 1;
if (v <= n) sz[v] = 1;
else sz[v] = 0;
for (auto to : gr[v]) {
if (to != par) {
calc (to, v);
sz[v] += sz[to];
}
}
}
void rem (int v, int pr, ll M) {
u[v] = 1;
if (v <= n) {
for (auto to : gr[v]) {
if (to == pr) ans -= sz[v] * (sz[v] - 1ll) * (ll)(comp[to - n - 1].size() - 1);
else ans -= (M - sz[to]) * (M - sz[to] - 1) * (ll)(comp[to - n - 1].size() - 1);;
}
}
for (auto to : gr[v]) {
if (to != pr)
rem(to, v, M);
}
}
int main () {
SpeedForce;
cin >> n >> m;
for (int i = 1; i <= m; i ++) {
int l, r;
cin >> l >> r;
g[l].pb(r);
g[r].pb(l);
}
for (int i = 1; i <= n; i ++) {
if (!tin[i]) {
dfs(i);
while (st.size()) {
comp[len ++] = {st.back()};
st.pop_back();
}
}
}
for (int i = 0; i < len; i ++) {
for (int j = 0; j < comp[i].size(); j ++) {
gr[comp[i][j]].pb(n + i + 1);
gr[n + i + 1].pb(comp[i][j]);
}
}
for (int i = 1; i <= n; i ++) {
if (!u[i]) {
calc (i, 0);
// cout << "<< i << ' ' << sz[i] << '\n';
ans += sz[i] * (sz[i] - 1ll) * (sz[i] - 2ll);
rem (i, 0, sz[i]);
}
}
cout << ans;
return Accepted;
}
// B...a D....
Compilation message
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:127:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < comp[i].size(); j ++) {
~~^~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
43 ms |
42752 KB |
Output is correct |
2 |
Correct |
51 ms |
42588 KB |
Output is correct |
3 |
Correct |
42 ms |
42668 KB |
Output is correct |
4 |
Correct |
41 ms |
42616 KB |
Output is correct |
5 |
Correct |
42 ms |
42616 KB |
Output is correct |
6 |
Correct |
42 ms |
42648 KB |
Output is correct |
7 |
Correct |
39 ms |
42588 KB |
Output is correct |
8 |
Correct |
40 ms |
42624 KB |
Output is correct |
9 |
Correct |
41 ms |
42616 KB |
Output is correct |
10 |
Correct |
43 ms |
42616 KB |
Output is correct |
11 |
Correct |
40 ms |
42616 KB |
Output is correct |
12 |
Correct |
43 ms |
42744 KB |
Output is correct |
13 |
Correct |
47 ms |
42624 KB |
Output is correct |
14 |
Correct |
42 ms |
42752 KB |
Output is correct |
15 |
Correct |
42 ms |
42616 KB |
Output is correct |
16 |
Correct |
39 ms |
42616 KB |
Output is correct |
17 |
Correct |
46 ms |
42684 KB |
Output is correct |
18 |
Correct |
44 ms |
42616 KB |
Output is correct |
19 |
Correct |
43 ms |
42616 KB |
Output is correct |
20 |
Correct |
41 ms |
42624 KB |
Output is correct |
21 |
Correct |
42 ms |
42664 KB |
Output is correct |
22 |
Correct |
50 ms |
42688 KB |
Output is correct |
23 |
Correct |
43 ms |
42744 KB |
Output is correct |
24 |
Correct |
45 ms |
42616 KB |
Output is correct |
25 |
Correct |
42 ms |
42744 KB |
Output is correct |
26 |
Correct |
44 ms |
42624 KB |
Output is correct |
27 |
Correct |
42 ms |
42616 KB |
Output is correct |
28 |
Correct |
42 ms |
42616 KB |
Output is correct |
29 |
Correct |
41 ms |
42624 KB |
Output is correct |
30 |
Correct |
49 ms |
42616 KB |
Output is correct |
31 |
Correct |
41 ms |
42616 KB |
Output is correct |
32 |
Correct |
89 ms |
42616 KB |
Output is correct |
33 |
Correct |
43 ms |
42616 KB |
Output is correct |
34 |
Correct |
42 ms |
42616 KB |
Output is correct |
35 |
Correct |
41 ms |
42616 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
43 ms |
42752 KB |
Output is correct |
2 |
Correct |
51 ms |
42588 KB |
Output is correct |
3 |
Correct |
42 ms |
42668 KB |
Output is correct |
4 |
Correct |
41 ms |
42616 KB |
Output is correct |
5 |
Correct |
42 ms |
42616 KB |
Output is correct |
6 |
Correct |
42 ms |
42648 KB |
Output is correct |
7 |
Correct |
39 ms |
42588 KB |
Output is correct |
8 |
Correct |
40 ms |
42624 KB |
Output is correct |
9 |
Correct |
41 ms |
42616 KB |
Output is correct |
10 |
Correct |
43 ms |
42616 KB |
Output is correct |
11 |
Correct |
40 ms |
42616 KB |
Output is correct |
12 |
Correct |
43 ms |
42744 KB |
Output is correct |
13 |
Correct |
47 ms |
42624 KB |
Output is correct |
14 |
Correct |
42 ms |
42752 KB |
Output is correct |
15 |
Correct |
42 ms |
42616 KB |
Output is correct |
16 |
Correct |
39 ms |
42616 KB |
Output is correct |
17 |
Correct |
46 ms |
42684 KB |
Output is correct |
18 |
Correct |
44 ms |
42616 KB |
Output is correct |
19 |
Correct |
43 ms |
42616 KB |
Output is correct |
20 |
Correct |
41 ms |
42624 KB |
Output is correct |
21 |
Correct |
42 ms |
42664 KB |
Output is correct |
22 |
Correct |
50 ms |
42688 KB |
Output is correct |
23 |
Correct |
43 ms |
42744 KB |
Output is correct |
24 |
Correct |
45 ms |
42616 KB |
Output is correct |
25 |
Correct |
42 ms |
42744 KB |
Output is correct |
26 |
Correct |
44 ms |
42624 KB |
Output is correct |
27 |
Correct |
42 ms |
42616 KB |
Output is correct |
28 |
Correct |
42 ms |
42616 KB |
Output is correct |
29 |
Correct |
41 ms |
42624 KB |
Output is correct |
30 |
Correct |
49 ms |
42616 KB |
Output is correct |
31 |
Correct |
41 ms |
42616 KB |
Output is correct |
32 |
Correct |
89 ms |
42616 KB |
Output is correct |
33 |
Correct |
43 ms |
42616 KB |
Output is correct |
34 |
Correct |
42 ms |
42616 KB |
Output is correct |
35 |
Correct |
41 ms |
42616 KB |
Output is correct |
36 |
Correct |
45 ms |
42624 KB |
Output is correct |
37 |
Correct |
43 ms |
42616 KB |
Output is correct |
38 |
Correct |
43 ms |
42616 KB |
Output is correct |
39 |
Correct |
44 ms |
42616 KB |
Output is correct |
40 |
Correct |
45 ms |
42616 KB |
Output is correct |
41 |
Correct |
41 ms |
42616 KB |
Output is correct |
42 |
Correct |
45 ms |
42616 KB |
Output is correct |
43 |
Correct |
47 ms |
42744 KB |
Output is correct |
44 |
Correct |
41 ms |
42616 KB |
Output is correct |
45 |
Correct |
42 ms |
42744 KB |
Output is correct |
46 |
Correct |
44 ms |
42616 KB |
Output is correct |
47 |
Correct |
42 ms |
42616 KB |
Output is correct |
48 |
Correct |
50 ms |
42744 KB |
Output is correct |
49 |
Correct |
47 ms |
42620 KB |
Output is correct |
50 |
Correct |
42 ms |
42616 KB |
Output is correct |
51 |
Correct |
46 ms |
42604 KB |
Output is correct |
52 |
Correct |
42 ms |
42616 KB |
Output is correct |
53 |
Correct |
42 ms |
42624 KB |
Output is correct |
54 |
Correct |
42 ms |
42624 KB |
Output is correct |
55 |
Correct |
41 ms |
42616 KB |
Output is correct |
56 |
Correct |
43 ms |
42616 KB |
Output is correct |
57 |
Correct |
41 ms |
42664 KB |
Output is correct |
58 |
Correct |
40 ms |
42588 KB |
Output is correct |
59 |
Correct |
43 ms |
42752 KB |
Output is correct |
60 |
Correct |
43 ms |
42616 KB |
Output is correct |
61 |
Correct |
43 ms |
42616 KB |
Output is correct |
62 |
Correct |
41 ms |
42624 KB |
Output is correct |
63 |
Correct |
47 ms |
42616 KB |
Output is correct |
64 |
Correct |
41 ms |
42616 KB |
Output is correct |
65 |
Correct |
36 ms |
42616 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
184 ms |
62684 KB |
Output is correct |
2 |
Correct |
204 ms |
62692 KB |
Output is correct |
3 |
Correct |
254 ms |
61616 KB |
Output is correct |
4 |
Correct |
232 ms |
61892 KB |
Output is correct |
5 |
Correct |
196 ms |
58580 KB |
Output is correct |
6 |
Correct |
236 ms |
60920 KB |
Output is correct |
7 |
Correct |
314 ms |
59468 KB |
Output is correct |
8 |
Correct |
281 ms |
59908 KB |
Output is correct |
9 |
Correct |
271 ms |
58232 KB |
Output is correct |
10 |
Correct |
253 ms |
58156 KB |
Output is correct |
11 |
Correct |
181 ms |
57496 KB |
Output is correct |
12 |
Correct |
196 ms |
57272 KB |
Output is correct |
13 |
Correct |
193 ms |
57724 KB |
Output is correct |
14 |
Correct |
207 ms |
57464 KB |
Output is correct |
15 |
Correct |
156 ms |
57740 KB |
Output is correct |
16 |
Correct |
155 ms |
57564 KB |
Output is correct |
17 |
Correct |
74 ms |
55148 KB |
Output is correct |
18 |
Correct |
75 ms |
55256 KB |
Output is correct |
19 |
Correct |
72 ms |
55160 KB |
Output is correct |
20 |
Correct |
72 ms |
55348 KB |
Output is correct |
21 |
Correct |
71 ms |
55160 KB |
Output is correct |
22 |
Correct |
74 ms |
55288 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
51 ms |
42744 KB |
Output is correct |
2 |
Correct |
46 ms |
42716 KB |
Output is correct |
3 |
Correct |
45 ms |
42844 KB |
Output is correct |
4 |
Correct |
43 ms |
42876 KB |
Output is correct |
5 |
Correct |
46 ms |
42872 KB |
Output is correct |
6 |
Correct |
43 ms |
42872 KB |
Output is correct |
7 |
Correct |
43 ms |
43000 KB |
Output is correct |
8 |
Correct |
47 ms |
42872 KB |
Output is correct |
9 |
Correct |
41 ms |
42744 KB |
Output is correct |
10 |
Correct |
41 ms |
42876 KB |
Output is correct |
11 |
Correct |
43 ms |
42872 KB |
Output is correct |
12 |
Correct |
40 ms |
42752 KB |
Output is correct |
13 |
Correct |
41 ms |
42748 KB |
Output is correct |
14 |
Correct |
41 ms |
42744 KB |
Output is correct |
15 |
Correct |
41 ms |
42744 KB |
Output is correct |
16 |
Correct |
45 ms |
42744 KB |
Output is correct |
17 |
Correct |
45 ms |
42840 KB |
Output is correct |
18 |
Correct |
44 ms |
42744 KB |
Output is correct |
19 |
Correct |
51 ms |
42872 KB |
Output is correct |
20 |
Correct |
45 ms |
42872 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
252 ms |
59756 KB |
Output is correct |
2 |
Correct |
258 ms |
59708 KB |
Output is correct |
3 |
Correct |
253 ms |
59768 KB |
Output is correct |
4 |
Correct |
270 ms |
59768 KB |
Output is correct |
5 |
Correct |
250 ms |
59868 KB |
Output is correct |
6 |
Correct |
270 ms |
66628 KB |
Output is correct |
7 |
Correct |
308 ms |
64368 KB |
Output is correct |
8 |
Correct |
318 ms |
63036 KB |
Output is correct |
9 |
Correct |
320 ms |
61944 KB |
Output is correct |
10 |
Correct |
277 ms |
59744 KB |
Output is correct |
11 |
Correct |
307 ms |
59772 KB |
Output is correct |
12 |
Correct |
246 ms |
59768 KB |
Output is correct |
13 |
Correct |
254 ms |
59768 KB |
Output is correct |
14 |
Correct |
227 ms |
59512 KB |
Output is correct |
15 |
Correct |
232 ms |
59332 KB |
Output is correct |
16 |
Correct |
174 ms |
58104 KB |
Output is correct |
17 |
Correct |
232 ms |
60272 KB |
Output is correct |
18 |
Correct |
221 ms |
60400 KB |
Output is correct |
19 |
Correct |
191 ms |
60396 KB |
Output is correct |
20 |
Correct |
249 ms |
60380 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
46 ms |
42792 KB |
Output is correct |
2 |
Correct |
47 ms |
42744 KB |
Output is correct |
3 |
Correct |
44 ms |
42744 KB |
Output is correct |
4 |
Correct |
46 ms |
42744 KB |
Output is correct |
5 |
Correct |
43 ms |
42744 KB |
Output is correct |
6 |
Correct |
44 ms |
42744 KB |
Output is correct |
7 |
Correct |
47 ms |
42744 KB |
Output is correct |
8 |
Correct |
45 ms |
42752 KB |
Output is correct |
9 |
Correct |
44 ms |
42744 KB |
Output is correct |
10 |
Correct |
49 ms |
42744 KB |
Output is correct |
11 |
Correct |
46 ms |
42744 KB |
Output is correct |
12 |
Correct |
41 ms |
42880 KB |
Output is correct |
13 |
Correct |
42 ms |
42744 KB |
Output is correct |
14 |
Correct |
40 ms |
42744 KB |
Output is correct |
15 |
Correct |
45 ms |
42744 KB |
Output is correct |
16 |
Correct |
43 ms |
42932 KB |
Output is correct |
17 |
Correct |
42 ms |
42744 KB |
Output is correct |
18 |
Correct |
47 ms |
42744 KB |
Output is correct |
19 |
Correct |
43 ms |
42744 KB |
Output is correct |
20 |
Correct |
45 ms |
42744 KB |
Output is correct |
21 |
Correct |
45 ms |
42744 KB |
Output is correct |
22 |
Correct |
45 ms |
43008 KB |
Output is correct |
23 |
Correct |
42 ms |
42744 KB |
Output is correct |
24 |
Correct |
50 ms |
42744 KB |
Output is correct |
25 |
Correct |
48 ms |
42744 KB |
Output is correct |
26 |
Correct |
42 ms |
42928 KB |
Output is correct |
27 |
Correct |
48 ms |
42744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
252 ms |
59816 KB |
Output is correct |
2 |
Correct |
256 ms |
59768 KB |
Output is correct |
3 |
Correct |
255 ms |
58720 KB |
Output is correct |
4 |
Correct |
214 ms |
56952 KB |
Output is correct |
5 |
Correct |
237 ms |
55544 KB |
Output is correct |
6 |
Correct |
199 ms |
54648 KB |
Output is correct |
7 |
Correct |
225 ms |
54312 KB |
Output is correct |
8 |
Correct |
215 ms |
54008 KB |
Output is correct |
9 |
Correct |
197 ms |
53868 KB |
Output is correct |
10 |
Correct |
182 ms |
53752 KB |
Output is correct |
11 |
Correct |
170 ms |
53496 KB |
Output is correct |
12 |
Correct |
161 ms |
53368 KB |
Output is correct |
13 |
Correct |
177 ms |
53532 KB |
Output is correct |
14 |
Correct |
169 ms |
55668 KB |
Output is correct |
15 |
Correct |
304 ms |
63428 KB |
Output is correct |
16 |
Correct |
324 ms |
61924 KB |
Output is correct |
17 |
Correct |
286 ms |
61812 KB |
Output is correct |
18 |
Correct |
303 ms |
60372 KB |
Output is correct |
19 |
Correct |
252 ms |
57080 KB |
Output is correct |
20 |
Correct |
249 ms |
57080 KB |
Output is correct |
21 |
Correct |
241 ms |
57108 KB |
Output is correct |
22 |
Correct |
221 ms |
56824 KB |
Output is correct |
23 |
Correct |
177 ms |
56696 KB |
Output is correct |
24 |
Correct |
262 ms |
59000 KB |
Output is correct |
25 |
Correct |
230 ms |
59024 KB |
Output is correct |
26 |
Correct |
220 ms |
58100 KB |
Output is correct |
27 |
Correct |
236 ms |
57976 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
43 ms |
42752 KB |
Output is correct |
2 |
Correct |
51 ms |
42588 KB |
Output is correct |
3 |
Correct |
42 ms |
42668 KB |
Output is correct |
4 |
Correct |
41 ms |
42616 KB |
Output is correct |
5 |
Correct |
42 ms |
42616 KB |
Output is correct |
6 |
Correct |
42 ms |
42648 KB |
Output is correct |
7 |
Correct |
39 ms |
42588 KB |
Output is correct |
8 |
Correct |
40 ms |
42624 KB |
Output is correct |
9 |
Correct |
41 ms |
42616 KB |
Output is correct |
10 |
Correct |
43 ms |
42616 KB |
Output is correct |
11 |
Correct |
40 ms |
42616 KB |
Output is correct |
12 |
Correct |
43 ms |
42744 KB |
Output is correct |
13 |
Correct |
47 ms |
42624 KB |
Output is correct |
14 |
Correct |
42 ms |
42752 KB |
Output is correct |
15 |
Correct |
42 ms |
42616 KB |
Output is correct |
16 |
Correct |
39 ms |
42616 KB |
Output is correct |
17 |
Correct |
46 ms |
42684 KB |
Output is correct |
18 |
Correct |
44 ms |
42616 KB |
Output is correct |
19 |
Correct |
43 ms |
42616 KB |
Output is correct |
20 |
Correct |
41 ms |
42624 KB |
Output is correct |
21 |
Correct |
42 ms |
42664 KB |
Output is correct |
22 |
Correct |
50 ms |
42688 KB |
Output is correct |
23 |
Correct |
43 ms |
42744 KB |
Output is correct |
24 |
Correct |
45 ms |
42616 KB |
Output is correct |
25 |
Correct |
42 ms |
42744 KB |
Output is correct |
26 |
Correct |
44 ms |
42624 KB |
Output is correct |
27 |
Correct |
42 ms |
42616 KB |
Output is correct |
28 |
Correct |
42 ms |
42616 KB |
Output is correct |
29 |
Correct |
41 ms |
42624 KB |
Output is correct |
30 |
Correct |
49 ms |
42616 KB |
Output is correct |
31 |
Correct |
41 ms |
42616 KB |
Output is correct |
32 |
Correct |
89 ms |
42616 KB |
Output is correct |
33 |
Correct |
43 ms |
42616 KB |
Output is correct |
34 |
Correct |
42 ms |
42616 KB |
Output is correct |
35 |
Correct |
41 ms |
42616 KB |
Output is correct |
36 |
Correct |
45 ms |
42624 KB |
Output is correct |
37 |
Correct |
43 ms |
42616 KB |
Output is correct |
38 |
Correct |
43 ms |
42616 KB |
Output is correct |
39 |
Correct |
44 ms |
42616 KB |
Output is correct |
40 |
Correct |
45 ms |
42616 KB |
Output is correct |
41 |
Correct |
41 ms |
42616 KB |
Output is correct |
42 |
Correct |
45 ms |
42616 KB |
Output is correct |
43 |
Correct |
47 ms |
42744 KB |
Output is correct |
44 |
Correct |
41 ms |
42616 KB |
Output is correct |
45 |
Correct |
42 ms |
42744 KB |
Output is correct |
46 |
Correct |
44 ms |
42616 KB |
Output is correct |
47 |
Correct |
42 ms |
42616 KB |
Output is correct |
48 |
Correct |
50 ms |
42744 KB |
Output is correct |
49 |
Correct |
47 ms |
42620 KB |
Output is correct |
50 |
Correct |
42 ms |
42616 KB |
Output is correct |
51 |
Correct |
46 ms |
42604 KB |
Output is correct |
52 |
Correct |
42 ms |
42616 KB |
Output is correct |
53 |
Correct |
42 ms |
42624 KB |
Output is correct |
54 |
Correct |
42 ms |
42624 KB |
Output is correct |
55 |
Correct |
41 ms |
42616 KB |
Output is correct |
56 |
Correct |
43 ms |
42616 KB |
Output is correct |
57 |
Correct |
41 ms |
42664 KB |
Output is correct |
58 |
Correct |
40 ms |
42588 KB |
Output is correct |
59 |
Correct |
43 ms |
42752 KB |
Output is correct |
60 |
Correct |
43 ms |
42616 KB |
Output is correct |
61 |
Correct |
43 ms |
42616 KB |
Output is correct |
62 |
Correct |
41 ms |
42624 KB |
Output is correct |
63 |
Correct |
47 ms |
42616 KB |
Output is correct |
64 |
Correct |
41 ms |
42616 KB |
Output is correct |
65 |
Correct |
36 ms |
42616 KB |
Output is correct |
66 |
Correct |
43 ms |
42724 KB |
Output is correct |
67 |
Correct |
46 ms |
42872 KB |
Output is correct |
68 |
Correct |
42 ms |
42872 KB |
Output is correct |
69 |
Correct |
45 ms |
42744 KB |
Output is correct |
70 |
Correct |
48 ms |
42872 KB |
Output is correct |
71 |
Correct |
44 ms |
42872 KB |
Output is correct |
72 |
Correct |
48 ms |
42880 KB |
Output is correct |
73 |
Correct |
44 ms |
42872 KB |
Output is correct |
74 |
Correct |
46 ms |
42744 KB |
Output is correct |
75 |
Correct |
44 ms |
42872 KB |
Output is correct |
76 |
Correct |
46 ms |
42616 KB |
Output is correct |
77 |
Correct |
46 ms |
42872 KB |
Output is correct |
78 |
Correct |
43 ms |
42752 KB |
Output is correct |
79 |
Correct |
45 ms |
43000 KB |
Output is correct |
80 |
Correct |
44 ms |
42744 KB |
Output is correct |
81 |
Correct |
52 ms |
42720 KB |
Output is correct |
82 |
Correct |
44 ms |
42744 KB |
Output is correct |
83 |
Correct |
44 ms |
42872 KB |
Output is correct |
84 |
Correct |
44 ms |
42748 KB |
Output is correct |
85 |
Correct |
42 ms |
42744 KB |
Output is correct |
86 |
Correct |
50 ms |
42744 KB |
Output is correct |
87 |
Correct |
52 ms |
42744 KB |
Output is correct |
88 |
Correct |
46 ms |
42744 KB |
Output is correct |
89 |
Correct |
45 ms |
42744 KB |
Output is correct |
90 |
Correct |
46 ms |
42872 KB |
Output is correct |
91 |
Correct |
119 ms |
42744 KB |
Output is correct |
92 |
Correct |
44 ms |
42744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
43 ms |
42752 KB |
Output is correct |
2 |
Correct |
51 ms |
42588 KB |
Output is correct |
3 |
Correct |
42 ms |
42668 KB |
Output is correct |
4 |
Correct |
41 ms |
42616 KB |
Output is correct |
5 |
Correct |
42 ms |
42616 KB |
Output is correct |
6 |
Correct |
42 ms |
42648 KB |
Output is correct |
7 |
Correct |
39 ms |
42588 KB |
Output is correct |
8 |
Correct |
40 ms |
42624 KB |
Output is correct |
9 |
Correct |
41 ms |
42616 KB |
Output is correct |
10 |
Correct |
43 ms |
42616 KB |
Output is correct |
11 |
Correct |
40 ms |
42616 KB |
Output is correct |
12 |
Correct |
43 ms |
42744 KB |
Output is correct |
13 |
Correct |
47 ms |
42624 KB |
Output is correct |
14 |
Correct |
42 ms |
42752 KB |
Output is correct |
15 |
Correct |
42 ms |
42616 KB |
Output is correct |
16 |
Correct |
39 ms |
42616 KB |
Output is correct |
17 |
Correct |
46 ms |
42684 KB |
Output is correct |
18 |
Correct |
44 ms |
42616 KB |
Output is correct |
19 |
Correct |
43 ms |
42616 KB |
Output is correct |
20 |
Correct |
41 ms |
42624 KB |
Output is correct |
21 |
Correct |
42 ms |
42664 KB |
Output is correct |
22 |
Correct |
50 ms |
42688 KB |
Output is correct |
23 |
Correct |
43 ms |
42744 KB |
Output is correct |
24 |
Correct |
45 ms |
42616 KB |
Output is correct |
25 |
Correct |
42 ms |
42744 KB |
Output is correct |
26 |
Correct |
44 ms |
42624 KB |
Output is correct |
27 |
Correct |
42 ms |
42616 KB |
Output is correct |
28 |
Correct |
42 ms |
42616 KB |
Output is correct |
29 |
Correct |
41 ms |
42624 KB |
Output is correct |
30 |
Correct |
49 ms |
42616 KB |
Output is correct |
31 |
Correct |
41 ms |
42616 KB |
Output is correct |
32 |
Correct |
89 ms |
42616 KB |
Output is correct |
33 |
Correct |
43 ms |
42616 KB |
Output is correct |
34 |
Correct |
42 ms |
42616 KB |
Output is correct |
35 |
Correct |
41 ms |
42616 KB |
Output is correct |
36 |
Correct |
45 ms |
42624 KB |
Output is correct |
37 |
Correct |
43 ms |
42616 KB |
Output is correct |
38 |
Correct |
43 ms |
42616 KB |
Output is correct |
39 |
Correct |
44 ms |
42616 KB |
Output is correct |
40 |
Correct |
45 ms |
42616 KB |
Output is correct |
41 |
Correct |
41 ms |
42616 KB |
Output is correct |
42 |
Correct |
45 ms |
42616 KB |
Output is correct |
43 |
Correct |
47 ms |
42744 KB |
Output is correct |
44 |
Correct |
41 ms |
42616 KB |
Output is correct |
45 |
Correct |
42 ms |
42744 KB |
Output is correct |
46 |
Correct |
44 ms |
42616 KB |
Output is correct |
47 |
Correct |
42 ms |
42616 KB |
Output is correct |
48 |
Correct |
50 ms |
42744 KB |
Output is correct |
49 |
Correct |
47 ms |
42620 KB |
Output is correct |
50 |
Correct |
42 ms |
42616 KB |
Output is correct |
51 |
Correct |
46 ms |
42604 KB |
Output is correct |
52 |
Correct |
42 ms |
42616 KB |
Output is correct |
53 |
Correct |
42 ms |
42624 KB |
Output is correct |
54 |
Correct |
42 ms |
42624 KB |
Output is correct |
55 |
Correct |
41 ms |
42616 KB |
Output is correct |
56 |
Correct |
43 ms |
42616 KB |
Output is correct |
57 |
Correct |
41 ms |
42664 KB |
Output is correct |
58 |
Correct |
40 ms |
42588 KB |
Output is correct |
59 |
Correct |
43 ms |
42752 KB |
Output is correct |
60 |
Correct |
43 ms |
42616 KB |
Output is correct |
61 |
Correct |
43 ms |
42616 KB |
Output is correct |
62 |
Correct |
41 ms |
42624 KB |
Output is correct |
63 |
Correct |
47 ms |
42616 KB |
Output is correct |
64 |
Correct |
41 ms |
42616 KB |
Output is correct |
65 |
Correct |
36 ms |
42616 KB |
Output is correct |
66 |
Correct |
184 ms |
62684 KB |
Output is correct |
67 |
Correct |
204 ms |
62692 KB |
Output is correct |
68 |
Correct |
254 ms |
61616 KB |
Output is correct |
69 |
Correct |
232 ms |
61892 KB |
Output is correct |
70 |
Correct |
196 ms |
58580 KB |
Output is correct |
71 |
Correct |
236 ms |
60920 KB |
Output is correct |
72 |
Correct |
314 ms |
59468 KB |
Output is correct |
73 |
Correct |
281 ms |
59908 KB |
Output is correct |
74 |
Correct |
271 ms |
58232 KB |
Output is correct |
75 |
Correct |
253 ms |
58156 KB |
Output is correct |
76 |
Correct |
181 ms |
57496 KB |
Output is correct |
77 |
Correct |
196 ms |
57272 KB |
Output is correct |
78 |
Correct |
193 ms |
57724 KB |
Output is correct |
79 |
Correct |
207 ms |
57464 KB |
Output is correct |
80 |
Correct |
156 ms |
57740 KB |
Output is correct |
81 |
Correct |
155 ms |
57564 KB |
Output is correct |
82 |
Correct |
74 ms |
55148 KB |
Output is correct |
83 |
Correct |
75 ms |
55256 KB |
Output is correct |
84 |
Correct |
72 ms |
55160 KB |
Output is correct |
85 |
Correct |
72 ms |
55348 KB |
Output is correct |
86 |
Correct |
71 ms |
55160 KB |
Output is correct |
87 |
Correct |
74 ms |
55288 KB |
Output is correct |
88 |
Correct |
51 ms |
42744 KB |
Output is correct |
89 |
Correct |
46 ms |
42716 KB |
Output is correct |
90 |
Correct |
45 ms |
42844 KB |
Output is correct |
91 |
Correct |
43 ms |
42876 KB |
Output is correct |
92 |
Correct |
46 ms |
42872 KB |
Output is correct |
93 |
Correct |
43 ms |
42872 KB |
Output is correct |
94 |
Correct |
43 ms |
43000 KB |
Output is correct |
95 |
Correct |
47 ms |
42872 KB |
Output is correct |
96 |
Correct |
41 ms |
42744 KB |
Output is correct |
97 |
Correct |
41 ms |
42876 KB |
Output is correct |
98 |
Correct |
43 ms |
42872 KB |
Output is correct |
99 |
Correct |
40 ms |
42752 KB |
Output is correct |
100 |
Correct |
41 ms |
42748 KB |
Output is correct |
101 |
Correct |
41 ms |
42744 KB |
Output is correct |
102 |
Correct |
41 ms |
42744 KB |
Output is correct |
103 |
Correct |
45 ms |
42744 KB |
Output is correct |
104 |
Correct |
45 ms |
42840 KB |
Output is correct |
105 |
Correct |
44 ms |
42744 KB |
Output is correct |
106 |
Correct |
51 ms |
42872 KB |
Output is correct |
107 |
Correct |
45 ms |
42872 KB |
Output is correct |
108 |
Correct |
252 ms |
59756 KB |
Output is correct |
109 |
Correct |
258 ms |
59708 KB |
Output is correct |
110 |
Correct |
253 ms |
59768 KB |
Output is correct |
111 |
Correct |
270 ms |
59768 KB |
Output is correct |
112 |
Correct |
250 ms |
59868 KB |
Output is correct |
113 |
Correct |
270 ms |
66628 KB |
Output is correct |
114 |
Correct |
308 ms |
64368 KB |
Output is correct |
115 |
Correct |
318 ms |
63036 KB |
Output is correct |
116 |
Correct |
320 ms |
61944 KB |
Output is correct |
117 |
Correct |
277 ms |
59744 KB |
Output is correct |
118 |
Correct |
307 ms |
59772 KB |
Output is correct |
119 |
Correct |
246 ms |
59768 KB |
Output is correct |
120 |
Correct |
254 ms |
59768 KB |
Output is correct |
121 |
Correct |
227 ms |
59512 KB |
Output is correct |
122 |
Correct |
232 ms |
59332 KB |
Output is correct |
123 |
Correct |
174 ms |
58104 KB |
Output is correct |
124 |
Correct |
232 ms |
60272 KB |
Output is correct |
125 |
Correct |
221 ms |
60400 KB |
Output is correct |
126 |
Correct |
191 ms |
60396 KB |
Output is correct |
127 |
Correct |
249 ms |
60380 KB |
Output is correct |
128 |
Correct |
46 ms |
42792 KB |
Output is correct |
129 |
Correct |
47 ms |
42744 KB |
Output is correct |
130 |
Correct |
44 ms |
42744 KB |
Output is correct |
131 |
Correct |
46 ms |
42744 KB |
Output is correct |
132 |
Correct |
43 ms |
42744 KB |
Output is correct |
133 |
Correct |
44 ms |
42744 KB |
Output is correct |
134 |
Correct |
47 ms |
42744 KB |
Output is correct |
135 |
Correct |
45 ms |
42752 KB |
Output is correct |
136 |
Correct |
44 ms |
42744 KB |
Output is correct |
137 |
Correct |
49 ms |
42744 KB |
Output is correct |
138 |
Correct |
46 ms |
42744 KB |
Output is correct |
139 |
Correct |
41 ms |
42880 KB |
Output is correct |
140 |
Correct |
42 ms |
42744 KB |
Output is correct |
141 |
Correct |
40 ms |
42744 KB |
Output is correct |
142 |
Correct |
45 ms |
42744 KB |
Output is correct |
143 |
Correct |
43 ms |
42932 KB |
Output is correct |
144 |
Correct |
42 ms |
42744 KB |
Output is correct |
145 |
Correct |
47 ms |
42744 KB |
Output is correct |
146 |
Correct |
43 ms |
42744 KB |
Output is correct |
147 |
Correct |
45 ms |
42744 KB |
Output is correct |
148 |
Correct |
45 ms |
42744 KB |
Output is correct |
149 |
Correct |
45 ms |
43008 KB |
Output is correct |
150 |
Correct |
42 ms |
42744 KB |
Output is correct |
151 |
Correct |
50 ms |
42744 KB |
Output is correct |
152 |
Correct |
48 ms |
42744 KB |
Output is correct |
153 |
Correct |
42 ms |
42928 KB |
Output is correct |
154 |
Correct |
48 ms |
42744 KB |
Output is correct |
155 |
Correct |
252 ms |
59816 KB |
Output is correct |
156 |
Correct |
256 ms |
59768 KB |
Output is correct |
157 |
Correct |
255 ms |
58720 KB |
Output is correct |
158 |
Correct |
214 ms |
56952 KB |
Output is correct |
159 |
Correct |
237 ms |
55544 KB |
Output is correct |
160 |
Correct |
199 ms |
54648 KB |
Output is correct |
161 |
Correct |
225 ms |
54312 KB |
Output is correct |
162 |
Correct |
215 ms |
54008 KB |
Output is correct |
163 |
Correct |
197 ms |
53868 KB |
Output is correct |
164 |
Correct |
182 ms |
53752 KB |
Output is correct |
165 |
Correct |
170 ms |
53496 KB |
Output is correct |
166 |
Correct |
161 ms |
53368 KB |
Output is correct |
167 |
Correct |
177 ms |
53532 KB |
Output is correct |
168 |
Correct |
169 ms |
55668 KB |
Output is correct |
169 |
Correct |
304 ms |
63428 KB |
Output is correct |
170 |
Correct |
324 ms |
61924 KB |
Output is correct |
171 |
Correct |
286 ms |
61812 KB |
Output is correct |
172 |
Correct |
303 ms |
60372 KB |
Output is correct |
173 |
Correct |
252 ms |
57080 KB |
Output is correct |
174 |
Correct |
249 ms |
57080 KB |
Output is correct |
175 |
Correct |
241 ms |
57108 KB |
Output is correct |
176 |
Correct |
221 ms |
56824 KB |
Output is correct |
177 |
Correct |
177 ms |
56696 KB |
Output is correct |
178 |
Correct |
262 ms |
59000 KB |
Output is correct |
179 |
Correct |
230 ms |
59024 KB |
Output is correct |
180 |
Correct |
220 ms |
58100 KB |
Output is correct |
181 |
Correct |
236 ms |
57976 KB |
Output is correct |
182 |
Correct |
43 ms |
42724 KB |
Output is correct |
183 |
Correct |
46 ms |
42872 KB |
Output is correct |
184 |
Correct |
42 ms |
42872 KB |
Output is correct |
185 |
Correct |
45 ms |
42744 KB |
Output is correct |
186 |
Correct |
48 ms |
42872 KB |
Output is correct |
187 |
Correct |
44 ms |
42872 KB |
Output is correct |
188 |
Correct |
48 ms |
42880 KB |
Output is correct |
189 |
Correct |
44 ms |
42872 KB |
Output is correct |
190 |
Correct |
46 ms |
42744 KB |
Output is correct |
191 |
Correct |
44 ms |
42872 KB |
Output is correct |
192 |
Correct |
46 ms |
42616 KB |
Output is correct |
193 |
Correct |
46 ms |
42872 KB |
Output is correct |
194 |
Correct |
43 ms |
42752 KB |
Output is correct |
195 |
Correct |
45 ms |
43000 KB |
Output is correct |
196 |
Correct |
44 ms |
42744 KB |
Output is correct |
197 |
Correct |
52 ms |
42720 KB |
Output is correct |
198 |
Correct |
44 ms |
42744 KB |
Output is correct |
199 |
Correct |
44 ms |
42872 KB |
Output is correct |
200 |
Correct |
44 ms |
42748 KB |
Output is correct |
201 |
Correct |
42 ms |
42744 KB |
Output is correct |
202 |
Correct |
50 ms |
42744 KB |
Output is correct |
203 |
Correct |
52 ms |
42744 KB |
Output is correct |
204 |
Correct |
46 ms |
42744 KB |
Output is correct |
205 |
Correct |
45 ms |
42744 KB |
Output is correct |
206 |
Correct |
46 ms |
42872 KB |
Output is correct |
207 |
Correct |
119 ms |
42744 KB |
Output is correct |
208 |
Correct |
44 ms |
42744 KB |
Output is correct |
209 |
Correct |
79 ms |
55132 KB |
Output is correct |
210 |
Correct |
154 ms |
57848 KB |
Output is correct |
211 |
Correct |
197 ms |
58936 KB |
Output is correct |
212 |
Correct |
280 ms |
60100 KB |
Output is correct |
213 |
Correct |
262 ms |
61552 KB |
Output is correct |
214 |
Correct |
111 ms |
57080 KB |
Output is correct |
215 |
Correct |
132 ms |
56056 KB |
Output is correct |
216 |
Correct |
286 ms |
57936 KB |
Output is correct |
217 |
Correct |
226 ms |
55928 KB |
Output is correct |
218 |
Correct |
192 ms |
54032 KB |
Output is correct |
219 |
Correct |
190 ms |
53524 KB |
Output is correct |
220 |
Correct |
185 ms |
53368 KB |
Output is correct |
221 |
Correct |
175 ms |
53368 KB |
Output is correct |
222 |
Correct |
177 ms |
54564 KB |
Output is correct |
223 |
Correct |
289 ms |
58468 KB |
Output is correct |
224 |
Correct |
233 ms |
57620 KB |
Output is correct |
225 |
Correct |
183 ms |
55416 KB |
Output is correct |
226 |
Correct |
203 ms |
55416 KB |
Output is correct |
227 |
Correct |
196 ms |
55416 KB |
Output is correct |
228 |
Correct |
175 ms |
55568 KB |
Output is correct |
229 |
Correct |
148 ms |
55928 KB |
Output is correct |
230 |
Correct |
188 ms |
56108 KB |
Output is correct |
231 |
Correct |
239 ms |
56184 KB |
Output is correct |