#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 2e5;
int N, M;
vector<int> adj[MAXN+10];
int idx[MAXN+10], low[MAXN+10], cnt, S;
ll ans;
void dfs(int now, int bef)
{
S++;
idx[now]=low[now]=++cnt;
for(auto nxt : adj[now])
{
if(nxt==bef) continue;
if(!idx[nxt])
{
dfs(nxt, now);
low[now]=min(low[now], low[nxt]);
}
else
{
low[now]=min(low[now], idx[nxt]);
}
}
}
bool vis[MAXN+10];
int sz[MAXN+10];
vector<int> bcc[MAXN+10], adj2[MAXN+10];
int ccnt;
void color(int now, int col)
{
vis[now]=true;
if(col)
{
bcc[now].push_back(col);
adj2[now].push_back(col);
adj2[col].push_back(now);
}
for(int nxt : adj[now])
{
if(vis[nxt]) continue;
if(idx[now]<=low[nxt])
{
ccnt++;
bcc[now].push_back(ccnt);
adj2[now].push_back(ccnt);
adj2[ccnt].push_back(now);
color(nxt, ccnt);
}
else
{
color(nxt, col);
}
}
}
void calc(int now, int bef)
{
if(now<=N) sz[now]=1;
for(auto nxt : adj2[now])
{
if(nxt==bef) continue;
calc(nxt, now);
sz[now]+=sz[nxt];
}
if(now>N)
{
for(auto nxt : adj2[now])
{
if(nxt!=bef) ans-=(ll)sz[nxt]*(sz[nxt]-1)*(adj2[now].size()-1);
else ans-=(ll)(S-sz[now])*(S-sz[now]-1)*(adj2[now].size()-1);
}
}
}
int main()
{
int i, j;
scanf("%d%d", &N, &M);
for(i=1; i<=M; i++)
{
int u, v;
scanf("%d%d", &u, &v);
adj[u].push_back(v);
adj[v].push_back(u);
}
ccnt=N;
for(i=1; i<=N; i++)
{
if(vis[i]) continue;
S=0;
dfs(i, i);
color(i, 0);
ans+=(ll)S*(S-1)*(S-2);
calc(i, i);
}
printf("%lld", ans);
}
Compilation message
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:89:12: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
count_triplets.cpp:91:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &N, &M);
~~~~~^~~~~~~~~~~~~~~~
count_triplets.cpp:95:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &u, &v);
~~~~~^~~~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
15 ms |
14456 KB |
Output is correct |
3 |
Correct |
14 ms |
14456 KB |
Output is correct |
4 |
Correct |
14 ms |
14460 KB |
Output is correct |
5 |
Correct |
15 ms |
14456 KB |
Output is correct |
6 |
Correct |
15 ms |
14456 KB |
Output is correct |
7 |
Correct |
15 ms |
14456 KB |
Output is correct |
8 |
Correct |
15 ms |
14456 KB |
Output is correct |
9 |
Correct |
15 ms |
14456 KB |
Output is correct |
10 |
Correct |
14 ms |
14456 KB |
Output is correct |
11 |
Correct |
15 ms |
14456 KB |
Output is correct |
12 |
Correct |
14 ms |
14456 KB |
Output is correct |
13 |
Correct |
14 ms |
14456 KB |
Output is correct |
14 |
Correct |
15 ms |
14456 KB |
Output is correct |
15 |
Correct |
14 ms |
14456 KB |
Output is correct |
16 |
Correct |
14 ms |
14456 KB |
Output is correct |
17 |
Correct |
14 ms |
14456 KB |
Output is correct |
18 |
Correct |
14 ms |
14456 KB |
Output is correct |
19 |
Correct |
15 ms |
14456 KB |
Output is correct |
20 |
Correct |
14 ms |
14456 KB |
Output is correct |
21 |
Correct |
14 ms |
14456 KB |
Output is correct |
22 |
Correct |
14 ms |
14456 KB |
Output is correct |
23 |
Correct |
15 ms |
14456 KB |
Output is correct |
24 |
Correct |
14 ms |
14456 KB |
Output is correct |
25 |
Correct |
15 ms |
14456 KB |
Output is correct |
26 |
Correct |
14 ms |
14456 KB |
Output is correct |
27 |
Correct |
14 ms |
14456 KB |
Output is correct |
28 |
Correct |
15 ms |
14456 KB |
Output is correct |
29 |
Correct |
14 ms |
14400 KB |
Output is correct |
30 |
Correct |
14 ms |
14456 KB |
Output is correct |
31 |
Correct |
14 ms |
14456 KB |
Output is correct |
32 |
Correct |
14 ms |
14456 KB |
Output is correct |
33 |
Correct |
14 ms |
14456 KB |
Output is correct |
34 |
Correct |
14 ms |
14456 KB |
Output is correct |
35 |
Correct |
15 ms |
14456 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
15 ms |
14456 KB |
Output is correct |
3 |
Correct |
14 ms |
14456 KB |
Output is correct |
4 |
Correct |
14 ms |
14460 KB |
Output is correct |
5 |
Correct |
15 ms |
14456 KB |
Output is correct |
6 |
Correct |
15 ms |
14456 KB |
Output is correct |
7 |
Correct |
15 ms |
14456 KB |
Output is correct |
8 |
Correct |
15 ms |
14456 KB |
Output is correct |
9 |
Correct |
15 ms |
14456 KB |
Output is correct |
10 |
Correct |
14 ms |
14456 KB |
Output is correct |
11 |
Correct |
15 ms |
14456 KB |
Output is correct |
12 |
Correct |
14 ms |
14456 KB |
Output is correct |
13 |
Correct |
14 ms |
14456 KB |
Output is correct |
14 |
Correct |
15 ms |
14456 KB |
Output is correct |
15 |
Correct |
14 ms |
14456 KB |
Output is correct |
16 |
Correct |
14 ms |
14456 KB |
Output is correct |
17 |
Correct |
14 ms |
14456 KB |
Output is correct |
18 |
Correct |
14 ms |
14456 KB |
Output is correct |
19 |
Correct |
15 ms |
14456 KB |
Output is correct |
20 |
Correct |
14 ms |
14456 KB |
Output is correct |
21 |
Correct |
14 ms |
14456 KB |
Output is correct |
22 |
Correct |
14 ms |
14456 KB |
Output is correct |
23 |
Correct |
15 ms |
14456 KB |
Output is correct |
24 |
Correct |
14 ms |
14456 KB |
Output is correct |
25 |
Correct |
15 ms |
14456 KB |
Output is correct |
26 |
Correct |
14 ms |
14456 KB |
Output is correct |
27 |
Correct |
14 ms |
14456 KB |
Output is correct |
28 |
Correct |
15 ms |
14456 KB |
Output is correct |
29 |
Correct |
14 ms |
14400 KB |
Output is correct |
30 |
Correct |
14 ms |
14456 KB |
Output is correct |
31 |
Correct |
14 ms |
14456 KB |
Output is correct |
32 |
Correct |
14 ms |
14456 KB |
Output is correct |
33 |
Correct |
14 ms |
14456 KB |
Output is correct |
34 |
Correct |
14 ms |
14456 KB |
Output is correct |
35 |
Correct |
15 ms |
14456 KB |
Output is correct |
36 |
Correct |
14 ms |
14456 KB |
Output is correct |
37 |
Correct |
15 ms |
14456 KB |
Output is correct |
38 |
Correct |
14 ms |
14456 KB |
Output is correct |
39 |
Correct |
14 ms |
14456 KB |
Output is correct |
40 |
Correct |
14 ms |
14456 KB |
Output is correct |
41 |
Correct |
14 ms |
14456 KB |
Output is correct |
42 |
Correct |
14 ms |
14456 KB |
Output is correct |
43 |
Correct |
14 ms |
14456 KB |
Output is correct |
44 |
Correct |
15 ms |
14456 KB |
Output is correct |
45 |
Correct |
15 ms |
14584 KB |
Output is correct |
46 |
Correct |
14 ms |
14456 KB |
Output is correct |
47 |
Correct |
15 ms |
14456 KB |
Output is correct |
48 |
Correct |
14 ms |
14456 KB |
Output is correct |
49 |
Correct |
15 ms |
14456 KB |
Output is correct |
50 |
Correct |
14 ms |
14456 KB |
Output is correct |
51 |
Correct |
14 ms |
14456 KB |
Output is correct |
52 |
Correct |
14 ms |
14456 KB |
Output is correct |
53 |
Correct |
14 ms |
14456 KB |
Output is correct |
54 |
Correct |
15 ms |
14456 KB |
Output is correct |
55 |
Correct |
15 ms |
14408 KB |
Output is correct |
56 |
Correct |
14 ms |
14456 KB |
Output is correct |
57 |
Correct |
14 ms |
14456 KB |
Output is correct |
58 |
Correct |
14 ms |
14456 KB |
Output is correct |
59 |
Correct |
14 ms |
14456 KB |
Output is correct |
60 |
Correct |
18 ms |
14456 KB |
Output is correct |
61 |
Correct |
15 ms |
14500 KB |
Output is correct |
62 |
Correct |
15 ms |
14456 KB |
Output is correct |
63 |
Correct |
14 ms |
14456 KB |
Output is correct |
64 |
Correct |
14 ms |
14456 KB |
Output is correct |
65 |
Correct |
14 ms |
14456 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
166 ms |
33036 KB |
Output is correct |
2 |
Correct |
154 ms |
33020 KB |
Output is correct |
3 |
Correct |
163 ms |
34768 KB |
Output is correct |
4 |
Correct |
174 ms |
32256 KB |
Output is correct |
5 |
Correct |
186 ms |
31988 KB |
Output is correct |
6 |
Correct |
182 ms |
33836 KB |
Output is correct |
7 |
Correct |
161 ms |
31608 KB |
Output is correct |
8 |
Correct |
198 ms |
32064 KB |
Output is correct |
9 |
Correct |
160 ms |
30200 KB |
Output is correct |
10 |
Correct |
159 ms |
30596 KB |
Output is correct |
11 |
Correct |
141 ms |
27768 KB |
Output is correct |
12 |
Correct |
131 ms |
27444 KB |
Output is correct |
13 |
Correct |
154 ms |
27256 KB |
Output is correct |
14 |
Correct |
118 ms |
26932 KB |
Output is correct |
15 |
Correct |
89 ms |
25600 KB |
Output is correct |
16 |
Correct |
84 ms |
25080 KB |
Output is correct |
17 |
Correct |
17 ms |
15740 KB |
Output is correct |
18 |
Correct |
17 ms |
15736 KB |
Output is correct |
19 |
Correct |
17 ms |
15736 KB |
Output is correct |
20 |
Correct |
17 ms |
15736 KB |
Output is correct |
21 |
Correct |
17 ms |
15736 KB |
Output is correct |
22 |
Correct |
18 ms |
15736 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
16 ms |
14584 KB |
Output is correct |
2 |
Correct |
15 ms |
14584 KB |
Output is correct |
3 |
Correct |
15 ms |
14584 KB |
Output is correct |
4 |
Correct |
15 ms |
14712 KB |
Output is correct |
5 |
Correct |
15 ms |
14712 KB |
Output is correct |
6 |
Correct |
15 ms |
14712 KB |
Output is correct |
7 |
Correct |
14 ms |
14584 KB |
Output is correct |
8 |
Correct |
15 ms |
14576 KB |
Output is correct |
9 |
Correct |
14 ms |
14584 KB |
Output is correct |
10 |
Correct |
15 ms |
14584 KB |
Output is correct |
11 |
Correct |
15 ms |
14584 KB |
Output is correct |
12 |
Correct |
16 ms |
14584 KB |
Output is correct |
13 |
Correct |
15 ms |
14584 KB |
Output is correct |
14 |
Correct |
15 ms |
14584 KB |
Output is correct |
15 |
Correct |
15 ms |
14584 KB |
Output is correct |
16 |
Correct |
15 ms |
14456 KB |
Output is correct |
17 |
Correct |
15 ms |
14584 KB |
Output is correct |
18 |
Correct |
15 ms |
14584 KB |
Output is correct |
19 |
Correct |
15 ms |
14584 KB |
Output is correct |
20 |
Correct |
15 ms |
14584 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
160 ms |
30224 KB |
Output is correct |
2 |
Correct |
169 ms |
30200 KB |
Output is correct |
3 |
Correct |
161 ms |
30200 KB |
Output is correct |
4 |
Correct |
168 ms |
30332 KB |
Output is correct |
5 |
Correct |
169 ms |
30200 KB |
Output is correct |
6 |
Correct |
195 ms |
38392 KB |
Output is correct |
7 |
Correct |
179 ms |
35572 KB |
Output is correct |
8 |
Correct |
169 ms |
34068 KB |
Output is correct |
9 |
Correct |
174 ms |
32732 KB |
Output is correct |
10 |
Correct |
157 ms |
30260 KB |
Output is correct |
11 |
Correct |
159 ms |
30304 KB |
Output is correct |
12 |
Correct |
150 ms |
30228 KB |
Output is correct |
13 |
Correct |
158 ms |
30120 KB |
Output is correct |
14 |
Correct |
137 ms |
29428 KB |
Output is correct |
15 |
Correct |
128 ms |
28588 KB |
Output is correct |
16 |
Correct |
87 ms |
25080 KB |
Output is correct |
17 |
Correct |
136 ms |
31088 KB |
Output is correct |
18 |
Correct |
142 ms |
31060 KB |
Output is correct |
19 |
Correct |
161 ms |
31212 KB |
Output is correct |
20 |
Correct |
150 ms |
31096 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
17 ms |
14584 KB |
Output is correct |
2 |
Correct |
16 ms |
14588 KB |
Output is correct |
3 |
Correct |
16 ms |
14584 KB |
Output is correct |
4 |
Correct |
16 ms |
14584 KB |
Output is correct |
5 |
Correct |
15 ms |
14584 KB |
Output is correct |
6 |
Correct |
16 ms |
14584 KB |
Output is correct |
7 |
Correct |
16 ms |
14584 KB |
Output is correct |
8 |
Correct |
15 ms |
14584 KB |
Output is correct |
9 |
Correct |
16 ms |
14584 KB |
Output is correct |
10 |
Correct |
15 ms |
14584 KB |
Output is correct |
11 |
Correct |
19 ms |
14584 KB |
Output is correct |
12 |
Correct |
19 ms |
14584 KB |
Output is correct |
13 |
Correct |
15 ms |
14584 KB |
Output is correct |
14 |
Correct |
16 ms |
14584 KB |
Output is correct |
15 |
Correct |
15 ms |
14588 KB |
Output is correct |
16 |
Correct |
18 ms |
14584 KB |
Output is correct |
17 |
Correct |
16 ms |
14556 KB |
Output is correct |
18 |
Correct |
19 ms |
14648 KB |
Output is correct |
19 |
Correct |
15 ms |
14584 KB |
Output is correct |
20 |
Correct |
15 ms |
14584 KB |
Output is correct |
21 |
Correct |
19 ms |
14584 KB |
Output is correct |
22 |
Correct |
15 ms |
14584 KB |
Output is correct |
23 |
Correct |
15 ms |
14620 KB |
Output is correct |
24 |
Correct |
15 ms |
14584 KB |
Output is correct |
25 |
Correct |
14 ms |
14456 KB |
Output is correct |
26 |
Correct |
14 ms |
14456 KB |
Output is correct |
27 |
Correct |
15 ms |
14584 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
161 ms |
30200 KB |
Output is correct |
2 |
Correct |
166 ms |
29964 KB |
Output is correct |
3 |
Correct |
158 ms |
29604 KB |
Output is correct |
4 |
Correct |
156 ms |
28948 KB |
Output is correct |
5 |
Correct |
142 ms |
28040 KB |
Output is correct |
6 |
Correct |
140 ms |
27640 KB |
Output is correct |
7 |
Correct |
138 ms |
27580 KB |
Output is correct |
8 |
Correct |
137 ms |
27276 KB |
Output is correct |
9 |
Correct |
132 ms |
27356 KB |
Output is correct |
10 |
Correct |
130 ms |
27272 KB |
Output is correct |
11 |
Correct |
121 ms |
27128 KB |
Output is correct |
12 |
Correct |
139 ms |
27132 KB |
Output is correct |
13 |
Correct |
133 ms |
27256 KB |
Output is correct |
14 |
Correct |
133 ms |
28416 KB |
Output is correct |
15 |
Correct |
176 ms |
35448 KB |
Output is correct |
16 |
Correct |
185 ms |
33496 KB |
Output is correct |
17 |
Correct |
193 ms |
34040 KB |
Output is correct |
18 |
Correct |
174 ms |
32388 KB |
Output is correct |
19 |
Correct |
166 ms |
28896 KB |
Output is correct |
20 |
Correct |
157 ms |
28932 KB |
Output is correct |
21 |
Correct |
178 ms |
28832 KB |
Output is correct |
22 |
Correct |
145 ms |
28476 KB |
Output is correct |
23 |
Correct |
133 ms |
27632 KB |
Output is correct |
24 |
Correct |
158 ms |
30028 KB |
Output is correct |
25 |
Correct |
181 ms |
30200 KB |
Output is correct |
26 |
Correct |
161 ms |
29684 KB |
Output is correct |
27 |
Correct |
170 ms |
29724 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
15 ms |
14456 KB |
Output is correct |
3 |
Correct |
14 ms |
14456 KB |
Output is correct |
4 |
Correct |
14 ms |
14460 KB |
Output is correct |
5 |
Correct |
15 ms |
14456 KB |
Output is correct |
6 |
Correct |
15 ms |
14456 KB |
Output is correct |
7 |
Correct |
15 ms |
14456 KB |
Output is correct |
8 |
Correct |
15 ms |
14456 KB |
Output is correct |
9 |
Correct |
15 ms |
14456 KB |
Output is correct |
10 |
Correct |
14 ms |
14456 KB |
Output is correct |
11 |
Correct |
15 ms |
14456 KB |
Output is correct |
12 |
Correct |
14 ms |
14456 KB |
Output is correct |
13 |
Correct |
14 ms |
14456 KB |
Output is correct |
14 |
Correct |
15 ms |
14456 KB |
Output is correct |
15 |
Correct |
14 ms |
14456 KB |
Output is correct |
16 |
Correct |
14 ms |
14456 KB |
Output is correct |
17 |
Correct |
14 ms |
14456 KB |
Output is correct |
18 |
Correct |
14 ms |
14456 KB |
Output is correct |
19 |
Correct |
15 ms |
14456 KB |
Output is correct |
20 |
Correct |
14 ms |
14456 KB |
Output is correct |
21 |
Correct |
14 ms |
14456 KB |
Output is correct |
22 |
Correct |
14 ms |
14456 KB |
Output is correct |
23 |
Correct |
15 ms |
14456 KB |
Output is correct |
24 |
Correct |
14 ms |
14456 KB |
Output is correct |
25 |
Correct |
15 ms |
14456 KB |
Output is correct |
26 |
Correct |
14 ms |
14456 KB |
Output is correct |
27 |
Correct |
14 ms |
14456 KB |
Output is correct |
28 |
Correct |
15 ms |
14456 KB |
Output is correct |
29 |
Correct |
14 ms |
14400 KB |
Output is correct |
30 |
Correct |
14 ms |
14456 KB |
Output is correct |
31 |
Correct |
14 ms |
14456 KB |
Output is correct |
32 |
Correct |
14 ms |
14456 KB |
Output is correct |
33 |
Correct |
14 ms |
14456 KB |
Output is correct |
34 |
Correct |
14 ms |
14456 KB |
Output is correct |
35 |
Correct |
15 ms |
14456 KB |
Output is correct |
36 |
Correct |
14 ms |
14456 KB |
Output is correct |
37 |
Correct |
15 ms |
14456 KB |
Output is correct |
38 |
Correct |
14 ms |
14456 KB |
Output is correct |
39 |
Correct |
14 ms |
14456 KB |
Output is correct |
40 |
Correct |
14 ms |
14456 KB |
Output is correct |
41 |
Correct |
14 ms |
14456 KB |
Output is correct |
42 |
Correct |
14 ms |
14456 KB |
Output is correct |
43 |
Correct |
14 ms |
14456 KB |
Output is correct |
44 |
Correct |
15 ms |
14456 KB |
Output is correct |
45 |
Correct |
15 ms |
14584 KB |
Output is correct |
46 |
Correct |
14 ms |
14456 KB |
Output is correct |
47 |
Correct |
15 ms |
14456 KB |
Output is correct |
48 |
Correct |
14 ms |
14456 KB |
Output is correct |
49 |
Correct |
15 ms |
14456 KB |
Output is correct |
50 |
Correct |
14 ms |
14456 KB |
Output is correct |
51 |
Correct |
14 ms |
14456 KB |
Output is correct |
52 |
Correct |
14 ms |
14456 KB |
Output is correct |
53 |
Correct |
14 ms |
14456 KB |
Output is correct |
54 |
Correct |
15 ms |
14456 KB |
Output is correct |
55 |
Correct |
15 ms |
14408 KB |
Output is correct |
56 |
Correct |
14 ms |
14456 KB |
Output is correct |
57 |
Correct |
14 ms |
14456 KB |
Output is correct |
58 |
Correct |
14 ms |
14456 KB |
Output is correct |
59 |
Correct |
14 ms |
14456 KB |
Output is correct |
60 |
Correct |
18 ms |
14456 KB |
Output is correct |
61 |
Correct |
15 ms |
14500 KB |
Output is correct |
62 |
Correct |
15 ms |
14456 KB |
Output is correct |
63 |
Correct |
14 ms |
14456 KB |
Output is correct |
64 |
Correct |
14 ms |
14456 KB |
Output is correct |
65 |
Correct |
14 ms |
14456 KB |
Output is correct |
66 |
Correct |
15 ms |
14456 KB |
Output is correct |
67 |
Correct |
14 ms |
14584 KB |
Output is correct |
68 |
Correct |
15 ms |
14584 KB |
Output is correct |
69 |
Correct |
15 ms |
14588 KB |
Output is correct |
70 |
Correct |
15 ms |
14584 KB |
Output is correct |
71 |
Correct |
15 ms |
14584 KB |
Output is correct |
72 |
Correct |
15 ms |
14584 KB |
Output is correct |
73 |
Correct |
15 ms |
14584 KB |
Output is correct |
74 |
Correct |
15 ms |
14584 KB |
Output is correct |
75 |
Correct |
15 ms |
14584 KB |
Output is correct |
76 |
Correct |
14 ms |
14456 KB |
Output is correct |
77 |
Correct |
15 ms |
14552 KB |
Output is correct |
78 |
Correct |
15 ms |
14588 KB |
Output is correct |
79 |
Correct |
15 ms |
14584 KB |
Output is correct |
80 |
Correct |
15 ms |
14584 KB |
Output is correct |
81 |
Correct |
15 ms |
14584 KB |
Output is correct |
82 |
Correct |
15 ms |
14632 KB |
Output is correct |
83 |
Correct |
15 ms |
14584 KB |
Output is correct |
84 |
Correct |
16 ms |
14584 KB |
Output is correct |
85 |
Correct |
15 ms |
14584 KB |
Output is correct |
86 |
Correct |
15 ms |
14584 KB |
Output is correct |
87 |
Correct |
15 ms |
14712 KB |
Output is correct |
88 |
Correct |
15 ms |
14584 KB |
Output is correct |
89 |
Correct |
15 ms |
14584 KB |
Output is correct |
90 |
Correct |
15 ms |
14584 KB |
Output is correct |
91 |
Correct |
15 ms |
14656 KB |
Output is correct |
92 |
Correct |
15 ms |
14584 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
14456 KB |
Output is correct |
2 |
Correct |
15 ms |
14456 KB |
Output is correct |
3 |
Correct |
14 ms |
14456 KB |
Output is correct |
4 |
Correct |
14 ms |
14460 KB |
Output is correct |
5 |
Correct |
15 ms |
14456 KB |
Output is correct |
6 |
Correct |
15 ms |
14456 KB |
Output is correct |
7 |
Correct |
15 ms |
14456 KB |
Output is correct |
8 |
Correct |
15 ms |
14456 KB |
Output is correct |
9 |
Correct |
15 ms |
14456 KB |
Output is correct |
10 |
Correct |
14 ms |
14456 KB |
Output is correct |
11 |
Correct |
15 ms |
14456 KB |
Output is correct |
12 |
Correct |
14 ms |
14456 KB |
Output is correct |
13 |
Correct |
14 ms |
14456 KB |
Output is correct |
14 |
Correct |
15 ms |
14456 KB |
Output is correct |
15 |
Correct |
14 ms |
14456 KB |
Output is correct |
16 |
Correct |
14 ms |
14456 KB |
Output is correct |
17 |
Correct |
14 ms |
14456 KB |
Output is correct |
18 |
Correct |
14 ms |
14456 KB |
Output is correct |
19 |
Correct |
15 ms |
14456 KB |
Output is correct |
20 |
Correct |
14 ms |
14456 KB |
Output is correct |
21 |
Correct |
14 ms |
14456 KB |
Output is correct |
22 |
Correct |
14 ms |
14456 KB |
Output is correct |
23 |
Correct |
15 ms |
14456 KB |
Output is correct |
24 |
Correct |
14 ms |
14456 KB |
Output is correct |
25 |
Correct |
15 ms |
14456 KB |
Output is correct |
26 |
Correct |
14 ms |
14456 KB |
Output is correct |
27 |
Correct |
14 ms |
14456 KB |
Output is correct |
28 |
Correct |
15 ms |
14456 KB |
Output is correct |
29 |
Correct |
14 ms |
14400 KB |
Output is correct |
30 |
Correct |
14 ms |
14456 KB |
Output is correct |
31 |
Correct |
14 ms |
14456 KB |
Output is correct |
32 |
Correct |
14 ms |
14456 KB |
Output is correct |
33 |
Correct |
14 ms |
14456 KB |
Output is correct |
34 |
Correct |
14 ms |
14456 KB |
Output is correct |
35 |
Correct |
15 ms |
14456 KB |
Output is correct |
36 |
Correct |
14 ms |
14456 KB |
Output is correct |
37 |
Correct |
15 ms |
14456 KB |
Output is correct |
38 |
Correct |
14 ms |
14456 KB |
Output is correct |
39 |
Correct |
14 ms |
14456 KB |
Output is correct |
40 |
Correct |
14 ms |
14456 KB |
Output is correct |
41 |
Correct |
14 ms |
14456 KB |
Output is correct |
42 |
Correct |
14 ms |
14456 KB |
Output is correct |
43 |
Correct |
14 ms |
14456 KB |
Output is correct |
44 |
Correct |
15 ms |
14456 KB |
Output is correct |
45 |
Correct |
15 ms |
14584 KB |
Output is correct |
46 |
Correct |
14 ms |
14456 KB |
Output is correct |
47 |
Correct |
15 ms |
14456 KB |
Output is correct |
48 |
Correct |
14 ms |
14456 KB |
Output is correct |
49 |
Correct |
15 ms |
14456 KB |
Output is correct |
50 |
Correct |
14 ms |
14456 KB |
Output is correct |
51 |
Correct |
14 ms |
14456 KB |
Output is correct |
52 |
Correct |
14 ms |
14456 KB |
Output is correct |
53 |
Correct |
14 ms |
14456 KB |
Output is correct |
54 |
Correct |
15 ms |
14456 KB |
Output is correct |
55 |
Correct |
15 ms |
14408 KB |
Output is correct |
56 |
Correct |
14 ms |
14456 KB |
Output is correct |
57 |
Correct |
14 ms |
14456 KB |
Output is correct |
58 |
Correct |
14 ms |
14456 KB |
Output is correct |
59 |
Correct |
14 ms |
14456 KB |
Output is correct |
60 |
Correct |
18 ms |
14456 KB |
Output is correct |
61 |
Correct |
15 ms |
14500 KB |
Output is correct |
62 |
Correct |
15 ms |
14456 KB |
Output is correct |
63 |
Correct |
14 ms |
14456 KB |
Output is correct |
64 |
Correct |
14 ms |
14456 KB |
Output is correct |
65 |
Correct |
14 ms |
14456 KB |
Output is correct |
66 |
Correct |
166 ms |
33036 KB |
Output is correct |
67 |
Correct |
154 ms |
33020 KB |
Output is correct |
68 |
Correct |
163 ms |
34768 KB |
Output is correct |
69 |
Correct |
174 ms |
32256 KB |
Output is correct |
70 |
Correct |
186 ms |
31988 KB |
Output is correct |
71 |
Correct |
182 ms |
33836 KB |
Output is correct |
72 |
Correct |
161 ms |
31608 KB |
Output is correct |
73 |
Correct |
198 ms |
32064 KB |
Output is correct |
74 |
Correct |
160 ms |
30200 KB |
Output is correct |
75 |
Correct |
159 ms |
30596 KB |
Output is correct |
76 |
Correct |
141 ms |
27768 KB |
Output is correct |
77 |
Correct |
131 ms |
27444 KB |
Output is correct |
78 |
Correct |
154 ms |
27256 KB |
Output is correct |
79 |
Correct |
118 ms |
26932 KB |
Output is correct |
80 |
Correct |
89 ms |
25600 KB |
Output is correct |
81 |
Correct |
84 ms |
25080 KB |
Output is correct |
82 |
Correct |
17 ms |
15740 KB |
Output is correct |
83 |
Correct |
17 ms |
15736 KB |
Output is correct |
84 |
Correct |
17 ms |
15736 KB |
Output is correct |
85 |
Correct |
17 ms |
15736 KB |
Output is correct |
86 |
Correct |
17 ms |
15736 KB |
Output is correct |
87 |
Correct |
18 ms |
15736 KB |
Output is correct |
88 |
Correct |
16 ms |
14584 KB |
Output is correct |
89 |
Correct |
15 ms |
14584 KB |
Output is correct |
90 |
Correct |
15 ms |
14584 KB |
Output is correct |
91 |
Correct |
15 ms |
14712 KB |
Output is correct |
92 |
Correct |
15 ms |
14712 KB |
Output is correct |
93 |
Correct |
15 ms |
14712 KB |
Output is correct |
94 |
Correct |
14 ms |
14584 KB |
Output is correct |
95 |
Correct |
15 ms |
14576 KB |
Output is correct |
96 |
Correct |
14 ms |
14584 KB |
Output is correct |
97 |
Correct |
15 ms |
14584 KB |
Output is correct |
98 |
Correct |
15 ms |
14584 KB |
Output is correct |
99 |
Correct |
16 ms |
14584 KB |
Output is correct |
100 |
Correct |
15 ms |
14584 KB |
Output is correct |
101 |
Correct |
15 ms |
14584 KB |
Output is correct |
102 |
Correct |
15 ms |
14584 KB |
Output is correct |
103 |
Correct |
15 ms |
14456 KB |
Output is correct |
104 |
Correct |
15 ms |
14584 KB |
Output is correct |
105 |
Correct |
15 ms |
14584 KB |
Output is correct |
106 |
Correct |
15 ms |
14584 KB |
Output is correct |
107 |
Correct |
15 ms |
14584 KB |
Output is correct |
108 |
Correct |
160 ms |
30224 KB |
Output is correct |
109 |
Correct |
169 ms |
30200 KB |
Output is correct |
110 |
Correct |
161 ms |
30200 KB |
Output is correct |
111 |
Correct |
168 ms |
30332 KB |
Output is correct |
112 |
Correct |
169 ms |
30200 KB |
Output is correct |
113 |
Correct |
195 ms |
38392 KB |
Output is correct |
114 |
Correct |
179 ms |
35572 KB |
Output is correct |
115 |
Correct |
169 ms |
34068 KB |
Output is correct |
116 |
Correct |
174 ms |
32732 KB |
Output is correct |
117 |
Correct |
157 ms |
30260 KB |
Output is correct |
118 |
Correct |
159 ms |
30304 KB |
Output is correct |
119 |
Correct |
150 ms |
30228 KB |
Output is correct |
120 |
Correct |
158 ms |
30120 KB |
Output is correct |
121 |
Correct |
137 ms |
29428 KB |
Output is correct |
122 |
Correct |
128 ms |
28588 KB |
Output is correct |
123 |
Correct |
87 ms |
25080 KB |
Output is correct |
124 |
Correct |
136 ms |
31088 KB |
Output is correct |
125 |
Correct |
142 ms |
31060 KB |
Output is correct |
126 |
Correct |
161 ms |
31212 KB |
Output is correct |
127 |
Correct |
150 ms |
31096 KB |
Output is correct |
128 |
Correct |
17 ms |
14584 KB |
Output is correct |
129 |
Correct |
16 ms |
14588 KB |
Output is correct |
130 |
Correct |
16 ms |
14584 KB |
Output is correct |
131 |
Correct |
16 ms |
14584 KB |
Output is correct |
132 |
Correct |
15 ms |
14584 KB |
Output is correct |
133 |
Correct |
16 ms |
14584 KB |
Output is correct |
134 |
Correct |
16 ms |
14584 KB |
Output is correct |
135 |
Correct |
15 ms |
14584 KB |
Output is correct |
136 |
Correct |
16 ms |
14584 KB |
Output is correct |
137 |
Correct |
15 ms |
14584 KB |
Output is correct |
138 |
Correct |
19 ms |
14584 KB |
Output is correct |
139 |
Correct |
19 ms |
14584 KB |
Output is correct |
140 |
Correct |
15 ms |
14584 KB |
Output is correct |
141 |
Correct |
16 ms |
14584 KB |
Output is correct |
142 |
Correct |
15 ms |
14588 KB |
Output is correct |
143 |
Correct |
18 ms |
14584 KB |
Output is correct |
144 |
Correct |
16 ms |
14556 KB |
Output is correct |
145 |
Correct |
19 ms |
14648 KB |
Output is correct |
146 |
Correct |
15 ms |
14584 KB |
Output is correct |
147 |
Correct |
15 ms |
14584 KB |
Output is correct |
148 |
Correct |
19 ms |
14584 KB |
Output is correct |
149 |
Correct |
15 ms |
14584 KB |
Output is correct |
150 |
Correct |
15 ms |
14620 KB |
Output is correct |
151 |
Correct |
15 ms |
14584 KB |
Output is correct |
152 |
Correct |
14 ms |
14456 KB |
Output is correct |
153 |
Correct |
14 ms |
14456 KB |
Output is correct |
154 |
Correct |
15 ms |
14584 KB |
Output is correct |
155 |
Correct |
161 ms |
30200 KB |
Output is correct |
156 |
Correct |
166 ms |
29964 KB |
Output is correct |
157 |
Correct |
158 ms |
29604 KB |
Output is correct |
158 |
Correct |
156 ms |
28948 KB |
Output is correct |
159 |
Correct |
142 ms |
28040 KB |
Output is correct |
160 |
Correct |
140 ms |
27640 KB |
Output is correct |
161 |
Correct |
138 ms |
27580 KB |
Output is correct |
162 |
Correct |
137 ms |
27276 KB |
Output is correct |
163 |
Correct |
132 ms |
27356 KB |
Output is correct |
164 |
Correct |
130 ms |
27272 KB |
Output is correct |
165 |
Correct |
121 ms |
27128 KB |
Output is correct |
166 |
Correct |
139 ms |
27132 KB |
Output is correct |
167 |
Correct |
133 ms |
27256 KB |
Output is correct |
168 |
Correct |
133 ms |
28416 KB |
Output is correct |
169 |
Correct |
176 ms |
35448 KB |
Output is correct |
170 |
Correct |
185 ms |
33496 KB |
Output is correct |
171 |
Correct |
193 ms |
34040 KB |
Output is correct |
172 |
Correct |
174 ms |
32388 KB |
Output is correct |
173 |
Correct |
166 ms |
28896 KB |
Output is correct |
174 |
Correct |
157 ms |
28932 KB |
Output is correct |
175 |
Correct |
178 ms |
28832 KB |
Output is correct |
176 |
Correct |
145 ms |
28476 KB |
Output is correct |
177 |
Correct |
133 ms |
27632 KB |
Output is correct |
178 |
Correct |
158 ms |
30028 KB |
Output is correct |
179 |
Correct |
181 ms |
30200 KB |
Output is correct |
180 |
Correct |
161 ms |
29684 KB |
Output is correct |
181 |
Correct |
170 ms |
29724 KB |
Output is correct |
182 |
Correct |
15 ms |
14456 KB |
Output is correct |
183 |
Correct |
14 ms |
14584 KB |
Output is correct |
184 |
Correct |
15 ms |
14584 KB |
Output is correct |
185 |
Correct |
15 ms |
14588 KB |
Output is correct |
186 |
Correct |
15 ms |
14584 KB |
Output is correct |
187 |
Correct |
15 ms |
14584 KB |
Output is correct |
188 |
Correct |
15 ms |
14584 KB |
Output is correct |
189 |
Correct |
15 ms |
14584 KB |
Output is correct |
190 |
Correct |
15 ms |
14584 KB |
Output is correct |
191 |
Correct |
15 ms |
14584 KB |
Output is correct |
192 |
Correct |
14 ms |
14456 KB |
Output is correct |
193 |
Correct |
15 ms |
14552 KB |
Output is correct |
194 |
Correct |
15 ms |
14588 KB |
Output is correct |
195 |
Correct |
15 ms |
14584 KB |
Output is correct |
196 |
Correct |
15 ms |
14584 KB |
Output is correct |
197 |
Correct |
15 ms |
14584 KB |
Output is correct |
198 |
Correct |
15 ms |
14632 KB |
Output is correct |
199 |
Correct |
15 ms |
14584 KB |
Output is correct |
200 |
Correct |
16 ms |
14584 KB |
Output is correct |
201 |
Correct |
15 ms |
14584 KB |
Output is correct |
202 |
Correct |
15 ms |
14584 KB |
Output is correct |
203 |
Correct |
15 ms |
14712 KB |
Output is correct |
204 |
Correct |
15 ms |
14584 KB |
Output is correct |
205 |
Correct |
15 ms |
14584 KB |
Output is correct |
206 |
Correct |
15 ms |
14584 KB |
Output is correct |
207 |
Correct |
15 ms |
14656 KB |
Output is correct |
208 |
Correct |
15 ms |
14584 KB |
Output is correct |
209 |
Correct |
17 ms |
15736 KB |
Output is correct |
210 |
Correct |
90 ms |
24076 KB |
Output is correct |
211 |
Correct |
140 ms |
28356 KB |
Output is correct |
212 |
Correct |
176 ms |
30652 KB |
Output is correct |
213 |
Correct |
212 ms |
32516 KB |
Output is correct |
214 |
Correct |
89 ms |
27640 KB |
Output is correct |
215 |
Correct |
92 ms |
27468 KB |
Output is correct |
216 |
Correct |
156 ms |
29688 KB |
Output is correct |
217 |
Correct |
155 ms |
28664 KB |
Output is correct |
218 |
Correct |
135 ms |
27384 KB |
Output is correct |
219 |
Correct |
246 ms |
27128 KB |
Output is correct |
220 |
Correct |
214 ms |
27256 KB |
Output is correct |
221 |
Correct |
134 ms |
27128 KB |
Output is correct |
222 |
Correct |
127 ms |
27768 KB |
Output is correct |
223 |
Correct |
167 ms |
30808 KB |
Output is correct |
224 |
Correct |
178 ms |
30080 KB |
Output is correct |
225 |
Correct |
158 ms |
28324 KB |
Output is correct |
226 |
Correct |
152 ms |
28280 KB |
Output is correct |
227 |
Correct |
158 ms |
28280 KB |
Output is correct |
228 |
Correct |
144 ms |
27944 KB |
Output is correct |
229 |
Correct |
132 ms |
27640 KB |
Output is correct |
230 |
Correct |
152 ms |
28920 KB |
Output is correct |
231 |
Correct |
155 ms |
29008 KB |
Output is correct |