#include <bits/stdc++.h>
#define lli long long int
#define ld long double
#define pb push_back
#define MP make_pair
#define REP(i, n) for(int i = 0; (i) < (n); (i)++)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
using namespace std;
void fastio() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
}
const int N = 2e5 + 5;
const int INF = 1e9 + 500;
int bcc = 1;
int tim = 0;
vector<int> tin(N, -1), low(N, 0);
vector<vector<int> > adj(N, vector<int>()), nadj(N, vector<int>());
vector<int> stck;
vector<int> sub(N, 0);
int n, m;
int cursz = 0;
lli ans = 0;
void dfs(int node, int par) {
stck.pb(node);
tin[node] = low[node] = tim++;
cursz++;
for(auto c : adj[node]) {
if(c == par) {
continue;
}
if(tin[c] != -1) {
low[node] = min(low[node], tin[c]);
}
else {
dfs(c, node);
low[node] = min(low[node], low[c]);
if(tin[node] <= low[c] ) {
// cout << "artic:" << node << " \n";
assert(stck.size());
// cout << "bcc: ";
while(!nadj[n + bcc].size() || nadj[n + bcc].back() != c) { // equavilant to pop until stck.back equals to c and then pop one more
// cout << stck.back() << " ";
nadj[n + bcc].pb(stck.back());
nadj[stck.back()].pb(n + bcc);
stck.pop_back();
}
assert(stck.size());
nadj[n + bcc].pb(node);
nadj[node].pb(n + bcc);
// cout << node << " \n";
// stck.pop_back();
bcc++;
}
}
}
}
void dfs2(int node, int par) {
sub[node] = (node <= n);
for(auto c : nadj[node]) {
if(c == par) continue;
dfs2(c, node);
sub[node] += sub[c];
if(node > n) {
ans -= 1ll * sub[c] * (sub[c] - 1) * (nadj[node].size() - 1);
}
}
if(node > n) {
//for parent
int sbt = cursz - sub[node];
ans -= 1ll * sbt * (sbt - 1) * (nadj[node].size() - 1);
}
}
void solve() {
cin >> n >> m;
REP(i, m) {
int u, v;
cin >> u >> v;
adj[u].pb(v);
adj[v].pb(u);
}
for(int i = 1; i <= n; i++) {
if(tin[i] != -1) continue;
cursz = 0;
dfs(i, 0);
ans += 1ll * cursz * (cursz - 1) * (cursz - 2);
dfs2(i, 0);
}
cout << ans << "\n";
}
signed main() {
fastio();
solve();
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
12124 KB |
Output is correct |
2 |
Correct |
5 ms |
12124 KB |
Output is correct |
3 |
Correct |
6 ms |
12120 KB |
Output is correct |
4 |
Correct |
5 ms |
12160 KB |
Output is correct |
5 |
Correct |
6 ms |
12124 KB |
Output is correct |
6 |
Correct |
6 ms |
12124 KB |
Output is correct |
7 |
Correct |
5 ms |
12124 KB |
Output is correct |
8 |
Correct |
5 ms |
12224 KB |
Output is correct |
9 |
Correct |
5 ms |
12124 KB |
Output is correct |
10 |
Correct |
6 ms |
12124 KB |
Output is correct |
11 |
Correct |
5 ms |
12124 KB |
Output is correct |
12 |
Correct |
6 ms |
12220 KB |
Output is correct |
13 |
Correct |
5 ms |
12124 KB |
Output is correct |
14 |
Correct |
6 ms |
12224 KB |
Output is correct |
15 |
Correct |
4 ms |
12124 KB |
Output is correct |
16 |
Correct |
5 ms |
12124 KB |
Output is correct |
17 |
Correct |
5 ms |
12124 KB |
Output is correct |
18 |
Correct |
5 ms |
12124 KB |
Output is correct |
19 |
Correct |
6 ms |
12220 KB |
Output is correct |
20 |
Correct |
5 ms |
12124 KB |
Output is correct |
21 |
Correct |
5 ms |
12124 KB |
Output is correct |
22 |
Correct |
6 ms |
12124 KB |
Output is correct |
23 |
Correct |
5 ms |
12124 KB |
Output is correct |
24 |
Correct |
5 ms |
12124 KB |
Output is correct |
25 |
Correct |
5 ms |
12132 KB |
Output is correct |
26 |
Correct |
5 ms |
12124 KB |
Output is correct |
27 |
Correct |
5 ms |
12212 KB |
Output is correct |
28 |
Correct |
5 ms |
12016 KB |
Output is correct |
29 |
Correct |
5 ms |
12124 KB |
Output is correct |
30 |
Correct |
5 ms |
12232 KB |
Output is correct |
31 |
Correct |
5 ms |
12232 KB |
Output is correct |
32 |
Correct |
5 ms |
12124 KB |
Output is correct |
33 |
Correct |
6 ms |
12132 KB |
Output is correct |
34 |
Correct |
5 ms |
12092 KB |
Output is correct |
35 |
Correct |
5 ms |
12124 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
12124 KB |
Output is correct |
2 |
Correct |
5 ms |
12124 KB |
Output is correct |
3 |
Correct |
6 ms |
12120 KB |
Output is correct |
4 |
Correct |
5 ms |
12160 KB |
Output is correct |
5 |
Correct |
6 ms |
12124 KB |
Output is correct |
6 |
Correct |
6 ms |
12124 KB |
Output is correct |
7 |
Correct |
5 ms |
12124 KB |
Output is correct |
8 |
Correct |
5 ms |
12224 KB |
Output is correct |
9 |
Correct |
5 ms |
12124 KB |
Output is correct |
10 |
Correct |
6 ms |
12124 KB |
Output is correct |
11 |
Correct |
5 ms |
12124 KB |
Output is correct |
12 |
Correct |
6 ms |
12220 KB |
Output is correct |
13 |
Correct |
5 ms |
12124 KB |
Output is correct |
14 |
Correct |
6 ms |
12224 KB |
Output is correct |
15 |
Correct |
4 ms |
12124 KB |
Output is correct |
16 |
Correct |
5 ms |
12124 KB |
Output is correct |
17 |
Correct |
5 ms |
12124 KB |
Output is correct |
18 |
Correct |
5 ms |
12124 KB |
Output is correct |
19 |
Correct |
6 ms |
12220 KB |
Output is correct |
20 |
Correct |
5 ms |
12124 KB |
Output is correct |
21 |
Correct |
5 ms |
12124 KB |
Output is correct |
22 |
Correct |
6 ms |
12124 KB |
Output is correct |
23 |
Correct |
5 ms |
12124 KB |
Output is correct |
24 |
Correct |
5 ms |
12124 KB |
Output is correct |
25 |
Correct |
5 ms |
12132 KB |
Output is correct |
26 |
Correct |
5 ms |
12124 KB |
Output is correct |
27 |
Correct |
5 ms |
12212 KB |
Output is correct |
28 |
Correct |
5 ms |
12016 KB |
Output is correct |
29 |
Correct |
5 ms |
12124 KB |
Output is correct |
30 |
Correct |
5 ms |
12232 KB |
Output is correct |
31 |
Correct |
5 ms |
12232 KB |
Output is correct |
32 |
Correct |
5 ms |
12124 KB |
Output is correct |
33 |
Correct |
6 ms |
12132 KB |
Output is correct |
34 |
Correct |
5 ms |
12092 KB |
Output is correct |
35 |
Correct |
5 ms |
12124 KB |
Output is correct |
36 |
Correct |
5 ms |
12132 KB |
Output is correct |
37 |
Correct |
5 ms |
12136 KB |
Output is correct |
38 |
Correct |
7 ms |
12388 KB |
Output is correct |
39 |
Correct |
7 ms |
12132 KB |
Output is correct |
40 |
Correct |
5 ms |
12136 KB |
Output is correct |
41 |
Correct |
6 ms |
12136 KB |
Output is correct |
42 |
Correct |
6 ms |
12192 KB |
Output is correct |
43 |
Correct |
5 ms |
12136 KB |
Output is correct |
44 |
Correct |
6 ms |
12136 KB |
Output is correct |
45 |
Correct |
5 ms |
12136 KB |
Output is correct |
46 |
Correct |
5 ms |
12136 KB |
Output is correct |
47 |
Correct |
5 ms |
12136 KB |
Output is correct |
48 |
Correct |
5 ms |
12228 KB |
Output is correct |
49 |
Correct |
5 ms |
12136 KB |
Output is correct |
50 |
Correct |
5 ms |
12128 KB |
Output is correct |
51 |
Correct |
6 ms |
12136 KB |
Output is correct |
52 |
Correct |
6 ms |
12136 KB |
Output is correct |
53 |
Correct |
6 ms |
12136 KB |
Output is correct |
54 |
Correct |
5 ms |
12136 KB |
Output is correct |
55 |
Correct |
5 ms |
12392 KB |
Output is correct |
56 |
Correct |
5 ms |
12136 KB |
Output is correct |
57 |
Correct |
5 ms |
12132 KB |
Output is correct |
58 |
Correct |
5 ms |
12016 KB |
Output is correct |
59 |
Correct |
6 ms |
12128 KB |
Output is correct |
60 |
Correct |
5 ms |
12020 KB |
Output is correct |
61 |
Correct |
6 ms |
12388 KB |
Output is correct |
62 |
Correct |
5 ms |
12228 KB |
Output is correct |
63 |
Correct |
5 ms |
12128 KB |
Output is correct |
64 |
Correct |
5 ms |
12228 KB |
Output is correct |
65 |
Correct |
5 ms |
12056 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
57 ms |
28440 KB |
Output is correct |
2 |
Correct |
52 ms |
28624 KB |
Output is correct |
3 |
Correct |
66 ms |
26836 KB |
Output is correct |
4 |
Correct |
62 ms |
26768 KB |
Output is correct |
5 |
Correct |
64 ms |
24024 KB |
Output is correct |
6 |
Correct |
73 ms |
25704 KB |
Output is correct |
7 |
Correct |
75 ms |
23528 KB |
Output is correct |
8 |
Correct |
79 ms |
23896 KB |
Output is correct |
9 |
Correct |
75 ms |
21896 KB |
Output is correct |
10 |
Correct |
65 ms |
22368 KB |
Output is correct |
11 |
Correct |
61 ms |
19904 KB |
Output is correct |
12 |
Correct |
44 ms |
19888 KB |
Output is correct |
13 |
Correct |
46 ms |
19904 KB |
Output is correct |
14 |
Correct |
52 ms |
19648 KB |
Output is correct |
15 |
Correct |
38 ms |
18652 KB |
Output is correct |
16 |
Correct |
39 ms |
18548 KB |
Output is correct |
17 |
Correct |
7 ms |
12788 KB |
Output is correct |
18 |
Correct |
7 ms |
12776 KB |
Output is correct |
19 |
Correct |
6 ms |
12844 KB |
Output is correct |
20 |
Correct |
8 ms |
12776 KB |
Output is correct |
21 |
Correct |
10 ms |
12832 KB |
Output is correct |
22 |
Correct |
6 ms |
12856 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
12124 KB |
Output is correct |
2 |
Correct |
5 ms |
12124 KB |
Output is correct |
3 |
Correct |
5 ms |
12124 KB |
Output is correct |
4 |
Correct |
5 ms |
12380 KB |
Output is correct |
5 |
Correct |
5 ms |
12328 KB |
Output is correct |
6 |
Correct |
5 ms |
12296 KB |
Output is correct |
7 |
Correct |
5 ms |
12376 KB |
Output is correct |
8 |
Correct |
5 ms |
12124 KB |
Output is correct |
9 |
Correct |
6 ms |
12120 KB |
Output is correct |
10 |
Correct |
7 ms |
12124 KB |
Output is correct |
11 |
Correct |
5 ms |
12144 KB |
Output is correct |
12 |
Correct |
6 ms |
12124 KB |
Output is correct |
13 |
Correct |
5 ms |
12120 KB |
Output is correct |
14 |
Correct |
5 ms |
12124 KB |
Output is correct |
15 |
Correct |
5 ms |
12124 KB |
Output is correct |
16 |
Correct |
4 ms |
12124 KB |
Output is correct |
17 |
Correct |
5 ms |
12120 KB |
Output is correct |
18 |
Correct |
5 ms |
12124 KB |
Output is correct |
19 |
Correct |
5 ms |
12124 KB |
Output is correct |
20 |
Correct |
7 ms |
12132 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
72 ms |
21588 KB |
Output is correct |
2 |
Correct |
67 ms |
21584 KB |
Output is correct |
3 |
Correct |
69 ms |
21584 KB |
Output is correct |
4 |
Correct |
60 ms |
21656 KB |
Output is correct |
5 |
Correct |
57 ms |
21572 KB |
Output is correct |
6 |
Correct |
64 ms |
30300 KB |
Output is correct |
7 |
Correct |
67 ms |
27300 KB |
Output is correct |
8 |
Correct |
80 ms |
25940 KB |
Output is correct |
9 |
Correct |
73 ms |
24500 KB |
Output is correct |
10 |
Correct |
83 ms |
21636 KB |
Output is correct |
11 |
Correct |
88 ms |
21720 KB |
Output is correct |
12 |
Correct |
57 ms |
21584 KB |
Output is correct |
13 |
Correct |
64 ms |
21736 KB |
Output is correct |
14 |
Correct |
62 ms |
21332 KB |
Output is correct |
15 |
Correct |
51 ms |
20820 KB |
Output is correct |
16 |
Correct |
34 ms |
18560 KB |
Output is correct |
17 |
Correct |
42 ms |
22216 KB |
Output is correct |
18 |
Correct |
62 ms |
22160 KB |
Output is correct |
19 |
Correct |
43 ms |
22468 KB |
Output is correct |
20 |
Correct |
43 ms |
22356 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
12124 KB |
Output is correct |
2 |
Correct |
7 ms |
12124 KB |
Output is correct |
3 |
Correct |
5 ms |
12124 KB |
Output is correct |
4 |
Correct |
6 ms |
12120 KB |
Output is correct |
5 |
Correct |
5 ms |
12120 KB |
Output is correct |
6 |
Correct |
6 ms |
12124 KB |
Output is correct |
7 |
Correct |
5 ms |
12120 KB |
Output is correct |
8 |
Correct |
6 ms |
12124 KB |
Output is correct |
9 |
Correct |
5 ms |
12120 KB |
Output is correct |
10 |
Correct |
5 ms |
12124 KB |
Output is correct |
11 |
Correct |
7 ms |
12124 KB |
Output is correct |
12 |
Correct |
5 ms |
12380 KB |
Output is correct |
13 |
Correct |
5 ms |
12124 KB |
Output is correct |
14 |
Correct |
5 ms |
12120 KB |
Output is correct |
15 |
Correct |
5 ms |
12124 KB |
Output is correct |
16 |
Correct |
5 ms |
12124 KB |
Output is correct |
17 |
Correct |
6 ms |
12120 KB |
Output is correct |
18 |
Correct |
5 ms |
12124 KB |
Output is correct |
19 |
Correct |
5 ms |
12120 KB |
Output is correct |
20 |
Correct |
5 ms |
12124 KB |
Output is correct |
21 |
Correct |
6 ms |
12160 KB |
Output is correct |
22 |
Correct |
7 ms |
12124 KB |
Output is correct |
23 |
Correct |
5 ms |
12124 KB |
Output is correct |
24 |
Correct |
6 ms |
12476 KB |
Output is correct |
25 |
Correct |
5 ms |
12124 KB |
Output is correct |
26 |
Correct |
6 ms |
12220 KB |
Output is correct |
27 |
Correct |
5 ms |
12120 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
66 ms |
21840 KB |
Output is correct |
2 |
Correct |
96 ms |
21604 KB |
Output is correct |
3 |
Correct |
64 ms |
21044 KB |
Output is correct |
4 |
Correct |
56 ms |
21844 KB |
Output is correct |
5 |
Correct |
60 ms |
21284 KB |
Output is correct |
6 |
Correct |
71 ms |
20916 KB |
Output is correct |
7 |
Correct |
61 ms |
20712 KB |
Output is correct |
8 |
Correct |
47 ms |
20488 KB |
Output is correct |
9 |
Correct |
45 ms |
20560 KB |
Output is correct |
10 |
Correct |
45 ms |
20368 KB |
Output is correct |
11 |
Correct |
54 ms |
20560 KB |
Output is correct |
12 |
Correct |
47 ms |
20560 KB |
Output is correct |
13 |
Correct |
43 ms |
20560 KB |
Output is correct |
14 |
Correct |
50 ms |
22636 KB |
Output is correct |
15 |
Correct |
75 ms |
28744 KB |
Output is correct |
16 |
Correct |
90 ms |
26452 KB |
Output is correct |
17 |
Correct |
74 ms |
27344 KB |
Output is correct |
18 |
Correct |
64 ms |
25424 KB |
Output is correct |
19 |
Correct |
57 ms |
21840 KB |
Output is correct |
20 |
Correct |
74 ms |
21964 KB |
Output is correct |
21 |
Correct |
58 ms |
21768 KB |
Output is correct |
22 |
Correct |
49 ms |
21388 KB |
Output is correct |
23 |
Correct |
53 ms |
20820 KB |
Output is correct |
24 |
Correct |
82 ms |
22864 KB |
Output is correct |
25 |
Correct |
55 ms |
22864 KB |
Output is correct |
26 |
Correct |
53 ms |
22476 KB |
Output is correct |
27 |
Correct |
62 ms |
22340 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
12124 KB |
Output is correct |
2 |
Correct |
5 ms |
12124 KB |
Output is correct |
3 |
Correct |
6 ms |
12120 KB |
Output is correct |
4 |
Correct |
5 ms |
12160 KB |
Output is correct |
5 |
Correct |
6 ms |
12124 KB |
Output is correct |
6 |
Correct |
6 ms |
12124 KB |
Output is correct |
7 |
Correct |
5 ms |
12124 KB |
Output is correct |
8 |
Correct |
5 ms |
12224 KB |
Output is correct |
9 |
Correct |
5 ms |
12124 KB |
Output is correct |
10 |
Correct |
6 ms |
12124 KB |
Output is correct |
11 |
Correct |
5 ms |
12124 KB |
Output is correct |
12 |
Correct |
6 ms |
12220 KB |
Output is correct |
13 |
Correct |
5 ms |
12124 KB |
Output is correct |
14 |
Correct |
6 ms |
12224 KB |
Output is correct |
15 |
Correct |
4 ms |
12124 KB |
Output is correct |
16 |
Correct |
5 ms |
12124 KB |
Output is correct |
17 |
Correct |
5 ms |
12124 KB |
Output is correct |
18 |
Correct |
5 ms |
12124 KB |
Output is correct |
19 |
Correct |
6 ms |
12220 KB |
Output is correct |
20 |
Correct |
5 ms |
12124 KB |
Output is correct |
21 |
Correct |
5 ms |
12124 KB |
Output is correct |
22 |
Correct |
6 ms |
12124 KB |
Output is correct |
23 |
Correct |
5 ms |
12124 KB |
Output is correct |
24 |
Correct |
5 ms |
12124 KB |
Output is correct |
25 |
Correct |
5 ms |
12132 KB |
Output is correct |
26 |
Correct |
5 ms |
12124 KB |
Output is correct |
27 |
Correct |
5 ms |
12212 KB |
Output is correct |
28 |
Correct |
5 ms |
12016 KB |
Output is correct |
29 |
Correct |
5 ms |
12124 KB |
Output is correct |
30 |
Correct |
5 ms |
12232 KB |
Output is correct |
31 |
Correct |
5 ms |
12232 KB |
Output is correct |
32 |
Correct |
5 ms |
12124 KB |
Output is correct |
33 |
Correct |
6 ms |
12132 KB |
Output is correct |
34 |
Correct |
5 ms |
12092 KB |
Output is correct |
35 |
Correct |
5 ms |
12124 KB |
Output is correct |
36 |
Correct |
5 ms |
12132 KB |
Output is correct |
37 |
Correct |
5 ms |
12136 KB |
Output is correct |
38 |
Correct |
7 ms |
12388 KB |
Output is correct |
39 |
Correct |
7 ms |
12132 KB |
Output is correct |
40 |
Correct |
5 ms |
12136 KB |
Output is correct |
41 |
Correct |
6 ms |
12136 KB |
Output is correct |
42 |
Correct |
6 ms |
12192 KB |
Output is correct |
43 |
Correct |
5 ms |
12136 KB |
Output is correct |
44 |
Correct |
6 ms |
12136 KB |
Output is correct |
45 |
Correct |
5 ms |
12136 KB |
Output is correct |
46 |
Correct |
5 ms |
12136 KB |
Output is correct |
47 |
Correct |
5 ms |
12136 KB |
Output is correct |
48 |
Correct |
5 ms |
12228 KB |
Output is correct |
49 |
Correct |
5 ms |
12136 KB |
Output is correct |
50 |
Correct |
5 ms |
12128 KB |
Output is correct |
51 |
Correct |
6 ms |
12136 KB |
Output is correct |
52 |
Correct |
6 ms |
12136 KB |
Output is correct |
53 |
Correct |
6 ms |
12136 KB |
Output is correct |
54 |
Correct |
5 ms |
12136 KB |
Output is correct |
55 |
Correct |
5 ms |
12392 KB |
Output is correct |
56 |
Correct |
5 ms |
12136 KB |
Output is correct |
57 |
Correct |
5 ms |
12132 KB |
Output is correct |
58 |
Correct |
5 ms |
12016 KB |
Output is correct |
59 |
Correct |
6 ms |
12128 KB |
Output is correct |
60 |
Correct |
5 ms |
12020 KB |
Output is correct |
61 |
Correct |
6 ms |
12388 KB |
Output is correct |
62 |
Correct |
5 ms |
12228 KB |
Output is correct |
63 |
Correct |
5 ms |
12128 KB |
Output is correct |
64 |
Correct |
5 ms |
12228 KB |
Output is correct |
65 |
Correct |
5 ms |
12056 KB |
Output is correct |
66 |
Correct |
5 ms |
12124 KB |
Output is correct |
67 |
Correct |
5 ms |
12204 KB |
Output is correct |
68 |
Correct |
5 ms |
12124 KB |
Output is correct |
69 |
Correct |
5 ms |
12124 KB |
Output is correct |
70 |
Correct |
6 ms |
12320 KB |
Output is correct |
71 |
Correct |
4 ms |
12124 KB |
Output is correct |
72 |
Correct |
6 ms |
12120 KB |
Output is correct |
73 |
Correct |
7 ms |
12124 KB |
Output is correct |
74 |
Correct |
5 ms |
12120 KB |
Output is correct |
75 |
Correct |
5 ms |
12124 KB |
Output is correct |
76 |
Correct |
5 ms |
12124 KB |
Output is correct |
77 |
Correct |
5 ms |
12124 KB |
Output is correct |
78 |
Correct |
6 ms |
12224 KB |
Output is correct |
79 |
Correct |
6 ms |
12124 KB |
Output is correct |
80 |
Correct |
6 ms |
12376 KB |
Output is correct |
81 |
Correct |
7 ms |
12312 KB |
Output is correct |
82 |
Correct |
6 ms |
12124 KB |
Output is correct |
83 |
Correct |
6 ms |
12124 KB |
Output is correct |
84 |
Correct |
5 ms |
12376 KB |
Output is correct |
85 |
Correct |
5 ms |
12124 KB |
Output is correct |
86 |
Correct |
6 ms |
12228 KB |
Output is correct |
87 |
Correct |
6 ms |
12124 KB |
Output is correct |
88 |
Correct |
5 ms |
12160 KB |
Output is correct |
89 |
Correct |
5 ms |
12124 KB |
Output is correct |
90 |
Correct |
5 ms |
12120 KB |
Output is correct |
91 |
Correct |
5 ms |
12124 KB |
Output is correct |
92 |
Correct |
6 ms |
12124 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
12124 KB |
Output is correct |
2 |
Correct |
5 ms |
12124 KB |
Output is correct |
3 |
Correct |
6 ms |
12120 KB |
Output is correct |
4 |
Correct |
5 ms |
12160 KB |
Output is correct |
5 |
Correct |
6 ms |
12124 KB |
Output is correct |
6 |
Correct |
6 ms |
12124 KB |
Output is correct |
7 |
Correct |
5 ms |
12124 KB |
Output is correct |
8 |
Correct |
5 ms |
12224 KB |
Output is correct |
9 |
Correct |
5 ms |
12124 KB |
Output is correct |
10 |
Correct |
6 ms |
12124 KB |
Output is correct |
11 |
Correct |
5 ms |
12124 KB |
Output is correct |
12 |
Correct |
6 ms |
12220 KB |
Output is correct |
13 |
Correct |
5 ms |
12124 KB |
Output is correct |
14 |
Correct |
6 ms |
12224 KB |
Output is correct |
15 |
Correct |
4 ms |
12124 KB |
Output is correct |
16 |
Correct |
5 ms |
12124 KB |
Output is correct |
17 |
Correct |
5 ms |
12124 KB |
Output is correct |
18 |
Correct |
5 ms |
12124 KB |
Output is correct |
19 |
Correct |
6 ms |
12220 KB |
Output is correct |
20 |
Correct |
5 ms |
12124 KB |
Output is correct |
21 |
Correct |
5 ms |
12124 KB |
Output is correct |
22 |
Correct |
6 ms |
12124 KB |
Output is correct |
23 |
Correct |
5 ms |
12124 KB |
Output is correct |
24 |
Correct |
5 ms |
12124 KB |
Output is correct |
25 |
Correct |
5 ms |
12132 KB |
Output is correct |
26 |
Correct |
5 ms |
12124 KB |
Output is correct |
27 |
Correct |
5 ms |
12212 KB |
Output is correct |
28 |
Correct |
5 ms |
12016 KB |
Output is correct |
29 |
Correct |
5 ms |
12124 KB |
Output is correct |
30 |
Correct |
5 ms |
12232 KB |
Output is correct |
31 |
Correct |
5 ms |
12232 KB |
Output is correct |
32 |
Correct |
5 ms |
12124 KB |
Output is correct |
33 |
Correct |
6 ms |
12132 KB |
Output is correct |
34 |
Correct |
5 ms |
12092 KB |
Output is correct |
35 |
Correct |
5 ms |
12124 KB |
Output is correct |
36 |
Correct |
5 ms |
12132 KB |
Output is correct |
37 |
Correct |
5 ms |
12136 KB |
Output is correct |
38 |
Correct |
7 ms |
12388 KB |
Output is correct |
39 |
Correct |
7 ms |
12132 KB |
Output is correct |
40 |
Correct |
5 ms |
12136 KB |
Output is correct |
41 |
Correct |
6 ms |
12136 KB |
Output is correct |
42 |
Correct |
6 ms |
12192 KB |
Output is correct |
43 |
Correct |
5 ms |
12136 KB |
Output is correct |
44 |
Correct |
6 ms |
12136 KB |
Output is correct |
45 |
Correct |
5 ms |
12136 KB |
Output is correct |
46 |
Correct |
5 ms |
12136 KB |
Output is correct |
47 |
Correct |
5 ms |
12136 KB |
Output is correct |
48 |
Correct |
5 ms |
12228 KB |
Output is correct |
49 |
Correct |
5 ms |
12136 KB |
Output is correct |
50 |
Correct |
5 ms |
12128 KB |
Output is correct |
51 |
Correct |
6 ms |
12136 KB |
Output is correct |
52 |
Correct |
6 ms |
12136 KB |
Output is correct |
53 |
Correct |
6 ms |
12136 KB |
Output is correct |
54 |
Correct |
5 ms |
12136 KB |
Output is correct |
55 |
Correct |
5 ms |
12392 KB |
Output is correct |
56 |
Correct |
5 ms |
12136 KB |
Output is correct |
57 |
Correct |
5 ms |
12132 KB |
Output is correct |
58 |
Correct |
5 ms |
12016 KB |
Output is correct |
59 |
Correct |
6 ms |
12128 KB |
Output is correct |
60 |
Correct |
5 ms |
12020 KB |
Output is correct |
61 |
Correct |
6 ms |
12388 KB |
Output is correct |
62 |
Correct |
5 ms |
12228 KB |
Output is correct |
63 |
Correct |
5 ms |
12128 KB |
Output is correct |
64 |
Correct |
5 ms |
12228 KB |
Output is correct |
65 |
Correct |
5 ms |
12056 KB |
Output is correct |
66 |
Correct |
57 ms |
28440 KB |
Output is correct |
67 |
Correct |
52 ms |
28624 KB |
Output is correct |
68 |
Correct |
66 ms |
26836 KB |
Output is correct |
69 |
Correct |
62 ms |
26768 KB |
Output is correct |
70 |
Correct |
64 ms |
24024 KB |
Output is correct |
71 |
Correct |
73 ms |
25704 KB |
Output is correct |
72 |
Correct |
75 ms |
23528 KB |
Output is correct |
73 |
Correct |
79 ms |
23896 KB |
Output is correct |
74 |
Correct |
75 ms |
21896 KB |
Output is correct |
75 |
Correct |
65 ms |
22368 KB |
Output is correct |
76 |
Correct |
61 ms |
19904 KB |
Output is correct |
77 |
Correct |
44 ms |
19888 KB |
Output is correct |
78 |
Correct |
46 ms |
19904 KB |
Output is correct |
79 |
Correct |
52 ms |
19648 KB |
Output is correct |
80 |
Correct |
38 ms |
18652 KB |
Output is correct |
81 |
Correct |
39 ms |
18548 KB |
Output is correct |
82 |
Correct |
7 ms |
12788 KB |
Output is correct |
83 |
Correct |
7 ms |
12776 KB |
Output is correct |
84 |
Correct |
6 ms |
12844 KB |
Output is correct |
85 |
Correct |
8 ms |
12776 KB |
Output is correct |
86 |
Correct |
10 ms |
12832 KB |
Output is correct |
87 |
Correct |
6 ms |
12856 KB |
Output is correct |
88 |
Correct |
6 ms |
12124 KB |
Output is correct |
89 |
Correct |
5 ms |
12124 KB |
Output is correct |
90 |
Correct |
5 ms |
12124 KB |
Output is correct |
91 |
Correct |
5 ms |
12380 KB |
Output is correct |
92 |
Correct |
5 ms |
12328 KB |
Output is correct |
93 |
Correct |
5 ms |
12296 KB |
Output is correct |
94 |
Correct |
5 ms |
12376 KB |
Output is correct |
95 |
Correct |
5 ms |
12124 KB |
Output is correct |
96 |
Correct |
6 ms |
12120 KB |
Output is correct |
97 |
Correct |
7 ms |
12124 KB |
Output is correct |
98 |
Correct |
5 ms |
12144 KB |
Output is correct |
99 |
Correct |
6 ms |
12124 KB |
Output is correct |
100 |
Correct |
5 ms |
12120 KB |
Output is correct |
101 |
Correct |
5 ms |
12124 KB |
Output is correct |
102 |
Correct |
5 ms |
12124 KB |
Output is correct |
103 |
Correct |
4 ms |
12124 KB |
Output is correct |
104 |
Correct |
5 ms |
12120 KB |
Output is correct |
105 |
Correct |
5 ms |
12124 KB |
Output is correct |
106 |
Correct |
5 ms |
12124 KB |
Output is correct |
107 |
Correct |
7 ms |
12132 KB |
Output is correct |
108 |
Correct |
72 ms |
21588 KB |
Output is correct |
109 |
Correct |
67 ms |
21584 KB |
Output is correct |
110 |
Correct |
69 ms |
21584 KB |
Output is correct |
111 |
Correct |
60 ms |
21656 KB |
Output is correct |
112 |
Correct |
57 ms |
21572 KB |
Output is correct |
113 |
Correct |
64 ms |
30300 KB |
Output is correct |
114 |
Correct |
67 ms |
27300 KB |
Output is correct |
115 |
Correct |
80 ms |
25940 KB |
Output is correct |
116 |
Correct |
73 ms |
24500 KB |
Output is correct |
117 |
Correct |
83 ms |
21636 KB |
Output is correct |
118 |
Correct |
88 ms |
21720 KB |
Output is correct |
119 |
Correct |
57 ms |
21584 KB |
Output is correct |
120 |
Correct |
64 ms |
21736 KB |
Output is correct |
121 |
Correct |
62 ms |
21332 KB |
Output is correct |
122 |
Correct |
51 ms |
20820 KB |
Output is correct |
123 |
Correct |
34 ms |
18560 KB |
Output is correct |
124 |
Correct |
42 ms |
22216 KB |
Output is correct |
125 |
Correct |
62 ms |
22160 KB |
Output is correct |
126 |
Correct |
43 ms |
22468 KB |
Output is correct |
127 |
Correct |
43 ms |
22356 KB |
Output is correct |
128 |
Correct |
5 ms |
12124 KB |
Output is correct |
129 |
Correct |
7 ms |
12124 KB |
Output is correct |
130 |
Correct |
5 ms |
12124 KB |
Output is correct |
131 |
Correct |
6 ms |
12120 KB |
Output is correct |
132 |
Correct |
5 ms |
12120 KB |
Output is correct |
133 |
Correct |
6 ms |
12124 KB |
Output is correct |
134 |
Correct |
5 ms |
12120 KB |
Output is correct |
135 |
Correct |
6 ms |
12124 KB |
Output is correct |
136 |
Correct |
5 ms |
12120 KB |
Output is correct |
137 |
Correct |
5 ms |
12124 KB |
Output is correct |
138 |
Correct |
7 ms |
12124 KB |
Output is correct |
139 |
Correct |
5 ms |
12380 KB |
Output is correct |
140 |
Correct |
5 ms |
12124 KB |
Output is correct |
141 |
Correct |
5 ms |
12120 KB |
Output is correct |
142 |
Correct |
5 ms |
12124 KB |
Output is correct |
143 |
Correct |
5 ms |
12124 KB |
Output is correct |
144 |
Correct |
6 ms |
12120 KB |
Output is correct |
145 |
Correct |
5 ms |
12124 KB |
Output is correct |
146 |
Correct |
5 ms |
12120 KB |
Output is correct |
147 |
Correct |
5 ms |
12124 KB |
Output is correct |
148 |
Correct |
6 ms |
12160 KB |
Output is correct |
149 |
Correct |
7 ms |
12124 KB |
Output is correct |
150 |
Correct |
5 ms |
12124 KB |
Output is correct |
151 |
Correct |
6 ms |
12476 KB |
Output is correct |
152 |
Correct |
5 ms |
12124 KB |
Output is correct |
153 |
Correct |
6 ms |
12220 KB |
Output is correct |
154 |
Correct |
5 ms |
12120 KB |
Output is correct |
155 |
Correct |
66 ms |
21840 KB |
Output is correct |
156 |
Correct |
96 ms |
21604 KB |
Output is correct |
157 |
Correct |
64 ms |
21044 KB |
Output is correct |
158 |
Correct |
56 ms |
21844 KB |
Output is correct |
159 |
Correct |
60 ms |
21284 KB |
Output is correct |
160 |
Correct |
71 ms |
20916 KB |
Output is correct |
161 |
Correct |
61 ms |
20712 KB |
Output is correct |
162 |
Correct |
47 ms |
20488 KB |
Output is correct |
163 |
Correct |
45 ms |
20560 KB |
Output is correct |
164 |
Correct |
45 ms |
20368 KB |
Output is correct |
165 |
Correct |
54 ms |
20560 KB |
Output is correct |
166 |
Correct |
47 ms |
20560 KB |
Output is correct |
167 |
Correct |
43 ms |
20560 KB |
Output is correct |
168 |
Correct |
50 ms |
22636 KB |
Output is correct |
169 |
Correct |
75 ms |
28744 KB |
Output is correct |
170 |
Correct |
90 ms |
26452 KB |
Output is correct |
171 |
Correct |
74 ms |
27344 KB |
Output is correct |
172 |
Correct |
64 ms |
25424 KB |
Output is correct |
173 |
Correct |
57 ms |
21840 KB |
Output is correct |
174 |
Correct |
74 ms |
21964 KB |
Output is correct |
175 |
Correct |
58 ms |
21768 KB |
Output is correct |
176 |
Correct |
49 ms |
21388 KB |
Output is correct |
177 |
Correct |
53 ms |
20820 KB |
Output is correct |
178 |
Correct |
82 ms |
22864 KB |
Output is correct |
179 |
Correct |
55 ms |
22864 KB |
Output is correct |
180 |
Correct |
53 ms |
22476 KB |
Output is correct |
181 |
Correct |
62 ms |
22340 KB |
Output is correct |
182 |
Correct |
5 ms |
12124 KB |
Output is correct |
183 |
Correct |
5 ms |
12204 KB |
Output is correct |
184 |
Correct |
5 ms |
12124 KB |
Output is correct |
185 |
Correct |
5 ms |
12124 KB |
Output is correct |
186 |
Correct |
6 ms |
12320 KB |
Output is correct |
187 |
Correct |
4 ms |
12124 KB |
Output is correct |
188 |
Correct |
6 ms |
12120 KB |
Output is correct |
189 |
Correct |
7 ms |
12124 KB |
Output is correct |
190 |
Correct |
5 ms |
12120 KB |
Output is correct |
191 |
Correct |
5 ms |
12124 KB |
Output is correct |
192 |
Correct |
5 ms |
12124 KB |
Output is correct |
193 |
Correct |
5 ms |
12124 KB |
Output is correct |
194 |
Correct |
6 ms |
12224 KB |
Output is correct |
195 |
Correct |
6 ms |
12124 KB |
Output is correct |
196 |
Correct |
6 ms |
12376 KB |
Output is correct |
197 |
Correct |
7 ms |
12312 KB |
Output is correct |
198 |
Correct |
6 ms |
12124 KB |
Output is correct |
199 |
Correct |
6 ms |
12124 KB |
Output is correct |
200 |
Correct |
5 ms |
12376 KB |
Output is correct |
201 |
Correct |
5 ms |
12124 KB |
Output is correct |
202 |
Correct |
6 ms |
12228 KB |
Output is correct |
203 |
Correct |
6 ms |
12124 KB |
Output is correct |
204 |
Correct |
5 ms |
12160 KB |
Output is correct |
205 |
Correct |
5 ms |
12124 KB |
Output is correct |
206 |
Correct |
5 ms |
12120 KB |
Output is correct |
207 |
Correct |
5 ms |
12124 KB |
Output is correct |
208 |
Correct |
6 ms |
12124 KB |
Output is correct |
209 |
Correct |
6 ms |
12764 KB |
Output is correct |
210 |
Correct |
45 ms |
18372 KB |
Output is correct |
211 |
Correct |
52 ms |
22732 KB |
Output is correct |
212 |
Correct |
63 ms |
25688 KB |
Output is correct |
213 |
Correct |
71 ms |
27848 KB |
Output is correct |
214 |
Correct |
39 ms |
21084 KB |
Output is correct |
215 |
Correct |
41 ms |
20820 KB |
Output is correct |
216 |
Correct |
59 ms |
22636 KB |
Output is correct |
217 |
Correct |
57 ms |
21588 KB |
Output is correct |
218 |
Correct |
49 ms |
20564 KB |
Output is correct |
219 |
Correct |
52 ms |
20264 KB |
Output is correct |
220 |
Correct |
44 ms |
20308 KB |
Output is correct |
221 |
Correct |
48 ms |
20312 KB |
Output is correct |
222 |
Correct |
44 ms |
21588 KB |
Output is correct |
223 |
Correct |
61 ms |
24072 KB |
Output is correct |
224 |
Correct |
59 ms |
23384 KB |
Output is correct |
225 |
Correct |
63 ms |
21452 KB |
Output is correct |
226 |
Correct |
54 ms |
21336 KB |
Output is correct |
227 |
Correct |
60 ms |
21344 KB |
Output is correct |
228 |
Correct |
73 ms |
21072 KB |
Output is correct |
229 |
Correct |
47 ms |
20820 KB |
Output is correct |
230 |
Correct |
51 ms |
21932 KB |
Output is correct |
231 |
Correct |
57 ms |
21956 KB |
Output is correct |