#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
const int N=200050;
vector<int> G[N],E[N];
void AddEdge(int u, int v){ E[u].pb(v);E[v].pb(u);}
int cnt,disc[N],low[N],tid,n,csz[N];
bool in[N];
stack<int> s;
void Tarjan(int u)
{
disc[u]=low[u]=++tid;
in[u]=1;s.push(u);
for(int v:G[u])
{
if(!disc[v])
{
Tarjan(v);
low[u]=min(low[u],low[v]);
if(low[v]>=disc[u])
{
++cnt;
AddEdge(u,cnt);
csz[cnt]++;
int h;
do
{
h=s.top();
s.pop();
in[h]=0;
AddEdge(h,cnt);
csz[cnt]++;
}while(h!=v);
}
}
else if(in[v]) low[u]=min(low[u],disc[v]);
}
}
ll ans;
int sz[N],dep[N],up[N];
void DFSSZ(int u, int p)
{
sz[u]=u<=n;
dep[u]=dep[p]+(u<=n);
up[u]=n;
for(int v:E[u]) if(v!=p) DFSSZ(v,u),sz[u]+=sz[v],up[u]-=sz[v];
}
int rt[N],par[N];
ll all[N],up_all[N],down_all[N];
void Solve(int u, int p, int root)
{
par[u]=p;
all[u]=(ll)(sz[root]-(u<=n))*(sz[root]-(u<=n)-1);
all[u]-=(ll)(sz[root]-sz[u])*(sz[root]-sz[u]-1);
for(int v:E[u]) if(v!=p) all[u]-=(ll)sz[v]*(sz[v]-1);
down_all[u]=(ll)(sz[u]-(u<=n))*(sz[u]-(u<=n)-1);
for(int v:E[u]) if(v!=p) down_all[u]-=(ll)sz[v]*(sz[v]-1);
if(p) up_all[u]=all[p]-(ll)sz[u]*(sz[root]-(p<=n)-sz[u])*2;
for(int v:E[u]) if(v!=p) Solve(v,u,root);
if(u<=n)
{
ans+=all[u];
for(int v:E[u]) if(v!=p) ans+=down_all[v];
if(p) ans+=up_all[u];
}
}
int main()
{
int m,u,v;
scanf("%i %i",&n,&m);
cnt=n;
for(int i=1;i<=m;i++) scanf("%i %i",&u,&v),G[u].pb(v),G[v].pb(u);
vector<int> root;
for(int i=1;i<=n;i++) if(!disc[i]) Tarjan(i),root.pb(i);
for(int i:root) DFSSZ(i,0),Solve(i,0,i);
printf("%lld\n",ans);
return 0;
}
Compilation message
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:71:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%i %i",&n,&m);
~~~~~^~~~~~~~~~~~~~~
count_triplets.cpp:73:55: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i=1;i<=m;i++) scanf("%i %i",&u,&v),G[u].pb(v),G[v].pb(u);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
10 ms |
9856 KB |
Output is correct |
3 |
Correct |
10 ms |
9728 KB |
Output is correct |
4 |
Correct |
9 ms |
9728 KB |
Output is correct |
5 |
Correct |
9 ms |
9728 KB |
Output is correct |
6 |
Correct |
10 ms |
9856 KB |
Output is correct |
7 |
Correct |
11 ms |
9856 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
9 ms |
9728 KB |
Output is correct |
10 |
Correct |
13 ms |
9856 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
13 ms |
9708 KB |
Output is correct |
13 |
Correct |
11 ms |
9856 KB |
Output is correct |
14 |
Correct |
13 ms |
9728 KB |
Output is correct |
15 |
Correct |
12 ms |
9772 KB |
Output is correct |
16 |
Correct |
10 ms |
9712 KB |
Output is correct |
17 |
Correct |
14 ms |
9904 KB |
Output is correct |
18 |
Correct |
14 ms |
9728 KB |
Output is correct |
19 |
Correct |
10 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
11 ms |
9856 KB |
Output is correct |
22 |
Correct |
11 ms |
9728 KB |
Output is correct |
23 |
Correct |
13 ms |
9728 KB |
Output is correct |
24 |
Correct |
10 ms |
9728 KB |
Output is correct |
25 |
Correct |
10 ms |
9740 KB |
Output is correct |
26 |
Correct |
10 ms |
9856 KB |
Output is correct |
27 |
Correct |
11 ms |
9856 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
9 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9856 KB |
Output is correct |
31 |
Correct |
9 ms |
9856 KB |
Output is correct |
32 |
Correct |
10 ms |
9856 KB |
Output is correct |
33 |
Correct |
9 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9856 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
10 ms |
9856 KB |
Output is correct |
3 |
Correct |
10 ms |
9728 KB |
Output is correct |
4 |
Correct |
9 ms |
9728 KB |
Output is correct |
5 |
Correct |
9 ms |
9728 KB |
Output is correct |
6 |
Correct |
10 ms |
9856 KB |
Output is correct |
7 |
Correct |
11 ms |
9856 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
9 ms |
9728 KB |
Output is correct |
10 |
Correct |
13 ms |
9856 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
13 ms |
9708 KB |
Output is correct |
13 |
Correct |
11 ms |
9856 KB |
Output is correct |
14 |
Correct |
13 ms |
9728 KB |
Output is correct |
15 |
Correct |
12 ms |
9772 KB |
Output is correct |
16 |
Correct |
10 ms |
9712 KB |
Output is correct |
17 |
Correct |
14 ms |
9904 KB |
Output is correct |
18 |
Correct |
14 ms |
9728 KB |
Output is correct |
19 |
Correct |
10 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
11 ms |
9856 KB |
Output is correct |
22 |
Correct |
11 ms |
9728 KB |
Output is correct |
23 |
Correct |
13 ms |
9728 KB |
Output is correct |
24 |
Correct |
10 ms |
9728 KB |
Output is correct |
25 |
Correct |
10 ms |
9740 KB |
Output is correct |
26 |
Correct |
10 ms |
9856 KB |
Output is correct |
27 |
Correct |
11 ms |
9856 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
9 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9856 KB |
Output is correct |
31 |
Correct |
9 ms |
9856 KB |
Output is correct |
32 |
Correct |
10 ms |
9856 KB |
Output is correct |
33 |
Correct |
9 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9856 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
36 |
Correct |
11 ms |
9728 KB |
Output is correct |
37 |
Correct |
11 ms |
9864 KB |
Output is correct |
38 |
Correct |
11 ms |
9856 KB |
Output is correct |
39 |
Correct |
10 ms |
9856 KB |
Output is correct |
40 |
Correct |
10 ms |
9856 KB |
Output is correct |
41 |
Correct |
11 ms |
9856 KB |
Output is correct |
42 |
Correct |
10 ms |
9856 KB |
Output is correct |
43 |
Correct |
10 ms |
9856 KB |
Output is correct |
44 |
Correct |
10 ms |
9856 KB |
Output is correct |
45 |
Correct |
10 ms |
9856 KB |
Output is correct |
46 |
Correct |
10 ms |
9856 KB |
Output is correct |
47 |
Correct |
10 ms |
9728 KB |
Output is correct |
48 |
Correct |
10 ms |
9856 KB |
Output is correct |
49 |
Correct |
10 ms |
9856 KB |
Output is correct |
50 |
Correct |
10 ms |
9728 KB |
Output is correct |
51 |
Correct |
9 ms |
9856 KB |
Output is correct |
52 |
Correct |
10 ms |
9856 KB |
Output is correct |
53 |
Correct |
10 ms |
9856 KB |
Output is correct |
54 |
Correct |
11 ms |
9856 KB |
Output is correct |
55 |
Correct |
10 ms |
9728 KB |
Output is correct |
56 |
Correct |
12 ms |
9856 KB |
Output is correct |
57 |
Correct |
10 ms |
9856 KB |
Output is correct |
58 |
Correct |
11 ms |
9856 KB |
Output is correct |
59 |
Correct |
10 ms |
9856 KB |
Output is correct |
60 |
Correct |
32 ms |
9728 KB |
Output is correct |
61 |
Correct |
10 ms |
9856 KB |
Output is correct |
62 |
Correct |
11 ms |
9856 KB |
Output is correct |
63 |
Correct |
10 ms |
9856 KB |
Output is correct |
64 |
Correct |
11 ms |
9856 KB |
Output is correct |
65 |
Correct |
11 ms |
9728 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
149 ms |
32648 KB |
Output is correct |
2 |
Correct |
168 ms |
32596 KB |
Output is correct |
3 |
Correct |
267 ms |
31604 KB |
Output is correct |
4 |
Correct |
253 ms |
31600 KB |
Output is correct |
5 |
Correct |
174 ms |
28276 KB |
Output is correct |
6 |
Correct |
200 ms |
30760 KB |
Output is correct |
7 |
Correct |
217 ms |
28792 KB |
Output is correct |
8 |
Correct |
188 ms |
29304 KB |
Output is correct |
9 |
Correct |
200 ms |
27456 KB |
Output is correct |
10 |
Correct |
155 ms |
27256 KB |
Output is correct |
11 |
Correct |
144 ms |
24980 KB |
Output is correct |
12 |
Correct |
159 ms |
24824 KB |
Output is correct |
13 |
Correct |
153 ms |
24692 KB |
Output is correct |
14 |
Correct |
134 ms |
24336 KB |
Output is correct |
15 |
Correct |
108 ms |
23540 KB |
Output is correct |
16 |
Correct |
105 ms |
23152 KB |
Output is correct |
17 |
Correct |
19 ms |
15096 KB |
Output is correct |
18 |
Correct |
20 ms |
15096 KB |
Output is correct |
19 |
Correct |
18 ms |
15096 KB |
Output is correct |
20 |
Correct |
18 ms |
14968 KB |
Output is correct |
21 |
Correct |
19 ms |
14840 KB |
Output is correct |
22 |
Correct |
19 ms |
14968 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
9984 KB |
Output is correct |
2 |
Correct |
11 ms |
9984 KB |
Output is correct |
3 |
Correct |
12 ms |
9984 KB |
Output is correct |
4 |
Correct |
13 ms |
10112 KB |
Output is correct |
5 |
Correct |
13 ms |
9984 KB |
Output is correct |
6 |
Correct |
11 ms |
9984 KB |
Output is correct |
7 |
Correct |
11 ms |
9984 KB |
Output is correct |
8 |
Correct |
11 ms |
10032 KB |
Output is correct |
9 |
Correct |
11 ms |
9984 KB |
Output is correct |
10 |
Correct |
11 ms |
9928 KB |
Output is correct |
11 |
Correct |
11 ms |
9984 KB |
Output is correct |
12 |
Correct |
10 ms |
9984 KB |
Output is correct |
13 |
Correct |
11 ms |
9984 KB |
Output is correct |
14 |
Correct |
11 ms |
9984 KB |
Output is correct |
15 |
Correct |
11 ms |
9984 KB |
Output is correct |
16 |
Correct |
10 ms |
9984 KB |
Output is correct |
17 |
Correct |
11 ms |
9984 KB |
Output is correct |
18 |
Correct |
12 ms |
9984 KB |
Output is correct |
19 |
Correct |
12 ms |
9984 KB |
Output is correct |
20 |
Correct |
11 ms |
9984 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
207 ms |
29080 KB |
Output is correct |
2 |
Correct |
192 ms |
29048 KB |
Output is correct |
3 |
Correct |
207 ms |
29176 KB |
Output is correct |
4 |
Correct |
234 ms |
29108 KB |
Output is correct |
5 |
Correct |
242 ms |
29184 KB |
Output is correct |
6 |
Correct |
219 ms |
37496 KB |
Output is correct |
7 |
Correct |
219 ms |
34704 KB |
Output is correct |
8 |
Correct |
217 ms |
33144 KB |
Output is correct |
9 |
Correct |
211 ms |
31840 KB |
Output is correct |
10 |
Correct |
207 ms |
29176 KB |
Output is correct |
11 |
Correct |
190 ms |
29048 KB |
Output is correct |
12 |
Correct |
201 ms |
29176 KB |
Output is correct |
13 |
Correct |
268 ms |
29132 KB |
Output is correct |
14 |
Correct |
181 ms |
28360 KB |
Output is correct |
15 |
Correct |
159 ms |
27384 KB |
Output is correct |
16 |
Correct |
101 ms |
23956 KB |
Output is correct |
17 |
Correct |
135 ms |
29796 KB |
Output is correct |
18 |
Correct |
170 ms |
29684 KB |
Output is correct |
19 |
Correct |
141 ms |
29804 KB |
Output is correct |
20 |
Correct |
160 ms |
29688 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9984 KB |
Output is correct |
2 |
Correct |
12 ms |
10044 KB |
Output is correct |
3 |
Correct |
11 ms |
9984 KB |
Output is correct |
4 |
Correct |
12 ms |
9984 KB |
Output is correct |
5 |
Correct |
12 ms |
9968 KB |
Output is correct |
6 |
Correct |
11 ms |
9856 KB |
Output is correct |
7 |
Correct |
12 ms |
9856 KB |
Output is correct |
8 |
Correct |
12 ms |
9984 KB |
Output is correct |
9 |
Correct |
12 ms |
9984 KB |
Output is correct |
10 |
Correct |
11 ms |
9856 KB |
Output is correct |
11 |
Correct |
11 ms |
9984 KB |
Output is correct |
12 |
Correct |
13 ms |
9984 KB |
Output is correct |
13 |
Correct |
11 ms |
9984 KB |
Output is correct |
14 |
Correct |
11 ms |
9984 KB |
Output is correct |
15 |
Correct |
13 ms |
9984 KB |
Output is correct |
16 |
Correct |
11 ms |
9984 KB |
Output is correct |
17 |
Correct |
12 ms |
9984 KB |
Output is correct |
18 |
Correct |
12 ms |
9984 KB |
Output is correct |
19 |
Correct |
14 ms |
9984 KB |
Output is correct |
20 |
Correct |
15 ms |
9984 KB |
Output is correct |
21 |
Correct |
12 ms |
9984 KB |
Output is correct |
22 |
Correct |
12 ms |
9984 KB |
Output is correct |
23 |
Correct |
12 ms |
9984 KB |
Output is correct |
24 |
Correct |
11 ms |
9984 KB |
Output is correct |
25 |
Correct |
11 ms |
9856 KB |
Output is correct |
26 |
Correct |
10 ms |
9856 KB |
Output is correct |
27 |
Correct |
10 ms |
9856 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
196 ms |
29048 KB |
Output is correct |
2 |
Correct |
195 ms |
29048 KB |
Output is correct |
3 |
Correct |
244 ms |
27812 KB |
Output is correct |
4 |
Correct |
202 ms |
26108 KB |
Output is correct |
5 |
Correct |
205 ms |
24312 KB |
Output is correct |
6 |
Correct |
181 ms |
23672 KB |
Output is correct |
7 |
Correct |
161 ms |
23292 KB |
Output is correct |
8 |
Correct |
178 ms |
22864 KB |
Output is correct |
9 |
Correct |
176 ms |
22648 KB |
Output is correct |
10 |
Correct |
167 ms |
22804 KB |
Output is correct |
11 |
Correct |
190 ms |
22392 KB |
Output is correct |
12 |
Correct |
156 ms |
22448 KB |
Output is correct |
13 |
Correct |
150 ms |
22492 KB |
Output is correct |
14 |
Correct |
155 ms |
24824 KB |
Output is correct |
15 |
Correct |
297 ms |
33740 KB |
Output is correct |
16 |
Correct |
298 ms |
31608 KB |
Output is correct |
17 |
Correct |
308 ms |
31772 KB |
Output is correct |
18 |
Correct |
289 ms |
29904 KB |
Output is correct |
19 |
Correct |
220 ms |
25976 KB |
Output is correct |
20 |
Correct |
214 ms |
25976 KB |
Output is correct |
21 |
Correct |
241 ms |
25916 KB |
Output is correct |
22 |
Correct |
245 ms |
25208 KB |
Output is correct |
23 |
Correct |
169 ms |
24352 KB |
Output is correct |
24 |
Correct |
201 ms |
27868 KB |
Output is correct |
25 |
Correct |
196 ms |
27896 KB |
Output is correct |
26 |
Correct |
193 ms |
26868 KB |
Output is correct |
27 |
Correct |
181 ms |
26872 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
10 ms |
9856 KB |
Output is correct |
3 |
Correct |
10 ms |
9728 KB |
Output is correct |
4 |
Correct |
9 ms |
9728 KB |
Output is correct |
5 |
Correct |
9 ms |
9728 KB |
Output is correct |
6 |
Correct |
10 ms |
9856 KB |
Output is correct |
7 |
Correct |
11 ms |
9856 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
9 ms |
9728 KB |
Output is correct |
10 |
Correct |
13 ms |
9856 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
13 ms |
9708 KB |
Output is correct |
13 |
Correct |
11 ms |
9856 KB |
Output is correct |
14 |
Correct |
13 ms |
9728 KB |
Output is correct |
15 |
Correct |
12 ms |
9772 KB |
Output is correct |
16 |
Correct |
10 ms |
9712 KB |
Output is correct |
17 |
Correct |
14 ms |
9904 KB |
Output is correct |
18 |
Correct |
14 ms |
9728 KB |
Output is correct |
19 |
Correct |
10 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
11 ms |
9856 KB |
Output is correct |
22 |
Correct |
11 ms |
9728 KB |
Output is correct |
23 |
Correct |
13 ms |
9728 KB |
Output is correct |
24 |
Correct |
10 ms |
9728 KB |
Output is correct |
25 |
Correct |
10 ms |
9740 KB |
Output is correct |
26 |
Correct |
10 ms |
9856 KB |
Output is correct |
27 |
Correct |
11 ms |
9856 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
9 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9856 KB |
Output is correct |
31 |
Correct |
9 ms |
9856 KB |
Output is correct |
32 |
Correct |
10 ms |
9856 KB |
Output is correct |
33 |
Correct |
9 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9856 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
36 |
Correct |
11 ms |
9728 KB |
Output is correct |
37 |
Correct |
11 ms |
9864 KB |
Output is correct |
38 |
Correct |
11 ms |
9856 KB |
Output is correct |
39 |
Correct |
10 ms |
9856 KB |
Output is correct |
40 |
Correct |
10 ms |
9856 KB |
Output is correct |
41 |
Correct |
11 ms |
9856 KB |
Output is correct |
42 |
Correct |
10 ms |
9856 KB |
Output is correct |
43 |
Correct |
10 ms |
9856 KB |
Output is correct |
44 |
Correct |
10 ms |
9856 KB |
Output is correct |
45 |
Correct |
10 ms |
9856 KB |
Output is correct |
46 |
Correct |
10 ms |
9856 KB |
Output is correct |
47 |
Correct |
10 ms |
9728 KB |
Output is correct |
48 |
Correct |
10 ms |
9856 KB |
Output is correct |
49 |
Correct |
10 ms |
9856 KB |
Output is correct |
50 |
Correct |
10 ms |
9728 KB |
Output is correct |
51 |
Correct |
9 ms |
9856 KB |
Output is correct |
52 |
Correct |
10 ms |
9856 KB |
Output is correct |
53 |
Correct |
10 ms |
9856 KB |
Output is correct |
54 |
Correct |
11 ms |
9856 KB |
Output is correct |
55 |
Correct |
10 ms |
9728 KB |
Output is correct |
56 |
Correct |
12 ms |
9856 KB |
Output is correct |
57 |
Correct |
10 ms |
9856 KB |
Output is correct |
58 |
Correct |
11 ms |
9856 KB |
Output is correct |
59 |
Correct |
10 ms |
9856 KB |
Output is correct |
60 |
Correct |
32 ms |
9728 KB |
Output is correct |
61 |
Correct |
10 ms |
9856 KB |
Output is correct |
62 |
Correct |
11 ms |
9856 KB |
Output is correct |
63 |
Correct |
10 ms |
9856 KB |
Output is correct |
64 |
Correct |
11 ms |
9856 KB |
Output is correct |
65 |
Correct |
11 ms |
9728 KB |
Output is correct |
66 |
Correct |
11 ms |
9856 KB |
Output is correct |
67 |
Correct |
10 ms |
9984 KB |
Output is correct |
68 |
Correct |
13 ms |
9984 KB |
Output is correct |
69 |
Correct |
13 ms |
9984 KB |
Output is correct |
70 |
Correct |
10 ms |
9984 KB |
Output is correct |
71 |
Correct |
11 ms |
9984 KB |
Output is correct |
72 |
Correct |
14 ms |
9956 KB |
Output is correct |
73 |
Correct |
12 ms |
9856 KB |
Output is correct |
74 |
Correct |
14 ms |
9956 KB |
Output is correct |
75 |
Correct |
12 ms |
9984 KB |
Output is correct |
76 |
Correct |
12 ms |
9856 KB |
Output is correct |
77 |
Correct |
13 ms |
9984 KB |
Output is correct |
78 |
Correct |
12 ms |
9956 KB |
Output is correct |
79 |
Correct |
14 ms |
9856 KB |
Output is correct |
80 |
Correct |
13 ms |
9984 KB |
Output is correct |
81 |
Correct |
12 ms |
9952 KB |
Output is correct |
82 |
Correct |
11 ms |
9956 KB |
Output is correct |
83 |
Correct |
11 ms |
9984 KB |
Output is correct |
84 |
Correct |
10 ms |
9984 KB |
Output is correct |
85 |
Correct |
10 ms |
9976 KB |
Output is correct |
86 |
Correct |
11 ms |
9856 KB |
Output is correct |
87 |
Correct |
13 ms |
9984 KB |
Output is correct |
88 |
Correct |
11 ms |
9984 KB |
Output is correct |
89 |
Correct |
11 ms |
9984 KB |
Output is correct |
90 |
Correct |
10 ms |
9856 KB |
Output is correct |
91 |
Correct |
11 ms |
9984 KB |
Output is correct |
92 |
Correct |
11 ms |
9984 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
11 ms |
9856 KB |
Output is correct |
2 |
Correct |
10 ms |
9856 KB |
Output is correct |
3 |
Correct |
10 ms |
9728 KB |
Output is correct |
4 |
Correct |
9 ms |
9728 KB |
Output is correct |
5 |
Correct |
9 ms |
9728 KB |
Output is correct |
6 |
Correct |
10 ms |
9856 KB |
Output is correct |
7 |
Correct |
11 ms |
9856 KB |
Output is correct |
8 |
Correct |
10 ms |
9728 KB |
Output is correct |
9 |
Correct |
9 ms |
9728 KB |
Output is correct |
10 |
Correct |
13 ms |
9856 KB |
Output is correct |
11 |
Correct |
11 ms |
9728 KB |
Output is correct |
12 |
Correct |
13 ms |
9708 KB |
Output is correct |
13 |
Correct |
11 ms |
9856 KB |
Output is correct |
14 |
Correct |
13 ms |
9728 KB |
Output is correct |
15 |
Correct |
12 ms |
9772 KB |
Output is correct |
16 |
Correct |
10 ms |
9712 KB |
Output is correct |
17 |
Correct |
14 ms |
9904 KB |
Output is correct |
18 |
Correct |
14 ms |
9728 KB |
Output is correct |
19 |
Correct |
10 ms |
9728 KB |
Output is correct |
20 |
Correct |
10 ms |
9728 KB |
Output is correct |
21 |
Correct |
11 ms |
9856 KB |
Output is correct |
22 |
Correct |
11 ms |
9728 KB |
Output is correct |
23 |
Correct |
13 ms |
9728 KB |
Output is correct |
24 |
Correct |
10 ms |
9728 KB |
Output is correct |
25 |
Correct |
10 ms |
9740 KB |
Output is correct |
26 |
Correct |
10 ms |
9856 KB |
Output is correct |
27 |
Correct |
11 ms |
9856 KB |
Output is correct |
28 |
Correct |
10 ms |
9728 KB |
Output is correct |
29 |
Correct |
9 ms |
9728 KB |
Output is correct |
30 |
Correct |
10 ms |
9856 KB |
Output is correct |
31 |
Correct |
9 ms |
9856 KB |
Output is correct |
32 |
Correct |
10 ms |
9856 KB |
Output is correct |
33 |
Correct |
9 ms |
9728 KB |
Output is correct |
34 |
Correct |
10 ms |
9856 KB |
Output is correct |
35 |
Correct |
10 ms |
9728 KB |
Output is correct |
36 |
Correct |
11 ms |
9728 KB |
Output is correct |
37 |
Correct |
11 ms |
9864 KB |
Output is correct |
38 |
Correct |
11 ms |
9856 KB |
Output is correct |
39 |
Correct |
10 ms |
9856 KB |
Output is correct |
40 |
Correct |
10 ms |
9856 KB |
Output is correct |
41 |
Correct |
11 ms |
9856 KB |
Output is correct |
42 |
Correct |
10 ms |
9856 KB |
Output is correct |
43 |
Correct |
10 ms |
9856 KB |
Output is correct |
44 |
Correct |
10 ms |
9856 KB |
Output is correct |
45 |
Correct |
10 ms |
9856 KB |
Output is correct |
46 |
Correct |
10 ms |
9856 KB |
Output is correct |
47 |
Correct |
10 ms |
9728 KB |
Output is correct |
48 |
Correct |
10 ms |
9856 KB |
Output is correct |
49 |
Correct |
10 ms |
9856 KB |
Output is correct |
50 |
Correct |
10 ms |
9728 KB |
Output is correct |
51 |
Correct |
9 ms |
9856 KB |
Output is correct |
52 |
Correct |
10 ms |
9856 KB |
Output is correct |
53 |
Correct |
10 ms |
9856 KB |
Output is correct |
54 |
Correct |
11 ms |
9856 KB |
Output is correct |
55 |
Correct |
10 ms |
9728 KB |
Output is correct |
56 |
Correct |
12 ms |
9856 KB |
Output is correct |
57 |
Correct |
10 ms |
9856 KB |
Output is correct |
58 |
Correct |
11 ms |
9856 KB |
Output is correct |
59 |
Correct |
10 ms |
9856 KB |
Output is correct |
60 |
Correct |
32 ms |
9728 KB |
Output is correct |
61 |
Correct |
10 ms |
9856 KB |
Output is correct |
62 |
Correct |
11 ms |
9856 KB |
Output is correct |
63 |
Correct |
10 ms |
9856 KB |
Output is correct |
64 |
Correct |
11 ms |
9856 KB |
Output is correct |
65 |
Correct |
11 ms |
9728 KB |
Output is correct |
66 |
Correct |
149 ms |
32648 KB |
Output is correct |
67 |
Correct |
168 ms |
32596 KB |
Output is correct |
68 |
Correct |
267 ms |
31604 KB |
Output is correct |
69 |
Correct |
253 ms |
31600 KB |
Output is correct |
70 |
Correct |
174 ms |
28276 KB |
Output is correct |
71 |
Correct |
200 ms |
30760 KB |
Output is correct |
72 |
Correct |
217 ms |
28792 KB |
Output is correct |
73 |
Correct |
188 ms |
29304 KB |
Output is correct |
74 |
Correct |
200 ms |
27456 KB |
Output is correct |
75 |
Correct |
155 ms |
27256 KB |
Output is correct |
76 |
Correct |
144 ms |
24980 KB |
Output is correct |
77 |
Correct |
159 ms |
24824 KB |
Output is correct |
78 |
Correct |
153 ms |
24692 KB |
Output is correct |
79 |
Correct |
134 ms |
24336 KB |
Output is correct |
80 |
Correct |
108 ms |
23540 KB |
Output is correct |
81 |
Correct |
105 ms |
23152 KB |
Output is correct |
82 |
Correct |
19 ms |
15096 KB |
Output is correct |
83 |
Correct |
20 ms |
15096 KB |
Output is correct |
84 |
Correct |
18 ms |
15096 KB |
Output is correct |
85 |
Correct |
18 ms |
14968 KB |
Output is correct |
86 |
Correct |
19 ms |
14840 KB |
Output is correct |
87 |
Correct |
19 ms |
14968 KB |
Output is correct |
88 |
Correct |
13 ms |
9984 KB |
Output is correct |
89 |
Correct |
11 ms |
9984 KB |
Output is correct |
90 |
Correct |
12 ms |
9984 KB |
Output is correct |
91 |
Correct |
13 ms |
10112 KB |
Output is correct |
92 |
Correct |
13 ms |
9984 KB |
Output is correct |
93 |
Correct |
11 ms |
9984 KB |
Output is correct |
94 |
Correct |
11 ms |
9984 KB |
Output is correct |
95 |
Correct |
11 ms |
10032 KB |
Output is correct |
96 |
Correct |
11 ms |
9984 KB |
Output is correct |
97 |
Correct |
11 ms |
9928 KB |
Output is correct |
98 |
Correct |
11 ms |
9984 KB |
Output is correct |
99 |
Correct |
10 ms |
9984 KB |
Output is correct |
100 |
Correct |
11 ms |
9984 KB |
Output is correct |
101 |
Correct |
11 ms |
9984 KB |
Output is correct |
102 |
Correct |
11 ms |
9984 KB |
Output is correct |
103 |
Correct |
10 ms |
9984 KB |
Output is correct |
104 |
Correct |
11 ms |
9984 KB |
Output is correct |
105 |
Correct |
12 ms |
9984 KB |
Output is correct |
106 |
Correct |
12 ms |
9984 KB |
Output is correct |
107 |
Correct |
11 ms |
9984 KB |
Output is correct |
108 |
Correct |
207 ms |
29080 KB |
Output is correct |
109 |
Correct |
192 ms |
29048 KB |
Output is correct |
110 |
Correct |
207 ms |
29176 KB |
Output is correct |
111 |
Correct |
234 ms |
29108 KB |
Output is correct |
112 |
Correct |
242 ms |
29184 KB |
Output is correct |
113 |
Correct |
219 ms |
37496 KB |
Output is correct |
114 |
Correct |
219 ms |
34704 KB |
Output is correct |
115 |
Correct |
217 ms |
33144 KB |
Output is correct |
116 |
Correct |
211 ms |
31840 KB |
Output is correct |
117 |
Correct |
207 ms |
29176 KB |
Output is correct |
118 |
Correct |
190 ms |
29048 KB |
Output is correct |
119 |
Correct |
201 ms |
29176 KB |
Output is correct |
120 |
Correct |
268 ms |
29132 KB |
Output is correct |
121 |
Correct |
181 ms |
28360 KB |
Output is correct |
122 |
Correct |
159 ms |
27384 KB |
Output is correct |
123 |
Correct |
101 ms |
23956 KB |
Output is correct |
124 |
Correct |
135 ms |
29796 KB |
Output is correct |
125 |
Correct |
170 ms |
29684 KB |
Output is correct |
126 |
Correct |
141 ms |
29804 KB |
Output is correct |
127 |
Correct |
160 ms |
29688 KB |
Output is correct |
128 |
Correct |
11 ms |
9984 KB |
Output is correct |
129 |
Correct |
12 ms |
10044 KB |
Output is correct |
130 |
Correct |
11 ms |
9984 KB |
Output is correct |
131 |
Correct |
12 ms |
9984 KB |
Output is correct |
132 |
Correct |
12 ms |
9968 KB |
Output is correct |
133 |
Correct |
11 ms |
9856 KB |
Output is correct |
134 |
Correct |
12 ms |
9856 KB |
Output is correct |
135 |
Correct |
12 ms |
9984 KB |
Output is correct |
136 |
Correct |
12 ms |
9984 KB |
Output is correct |
137 |
Correct |
11 ms |
9856 KB |
Output is correct |
138 |
Correct |
11 ms |
9984 KB |
Output is correct |
139 |
Correct |
13 ms |
9984 KB |
Output is correct |
140 |
Correct |
11 ms |
9984 KB |
Output is correct |
141 |
Correct |
11 ms |
9984 KB |
Output is correct |
142 |
Correct |
13 ms |
9984 KB |
Output is correct |
143 |
Correct |
11 ms |
9984 KB |
Output is correct |
144 |
Correct |
12 ms |
9984 KB |
Output is correct |
145 |
Correct |
12 ms |
9984 KB |
Output is correct |
146 |
Correct |
14 ms |
9984 KB |
Output is correct |
147 |
Correct |
15 ms |
9984 KB |
Output is correct |
148 |
Correct |
12 ms |
9984 KB |
Output is correct |
149 |
Correct |
12 ms |
9984 KB |
Output is correct |
150 |
Correct |
12 ms |
9984 KB |
Output is correct |
151 |
Correct |
11 ms |
9984 KB |
Output is correct |
152 |
Correct |
11 ms |
9856 KB |
Output is correct |
153 |
Correct |
10 ms |
9856 KB |
Output is correct |
154 |
Correct |
10 ms |
9856 KB |
Output is correct |
155 |
Correct |
196 ms |
29048 KB |
Output is correct |
156 |
Correct |
195 ms |
29048 KB |
Output is correct |
157 |
Correct |
244 ms |
27812 KB |
Output is correct |
158 |
Correct |
202 ms |
26108 KB |
Output is correct |
159 |
Correct |
205 ms |
24312 KB |
Output is correct |
160 |
Correct |
181 ms |
23672 KB |
Output is correct |
161 |
Correct |
161 ms |
23292 KB |
Output is correct |
162 |
Correct |
178 ms |
22864 KB |
Output is correct |
163 |
Correct |
176 ms |
22648 KB |
Output is correct |
164 |
Correct |
167 ms |
22804 KB |
Output is correct |
165 |
Correct |
190 ms |
22392 KB |
Output is correct |
166 |
Correct |
156 ms |
22448 KB |
Output is correct |
167 |
Correct |
150 ms |
22492 KB |
Output is correct |
168 |
Correct |
155 ms |
24824 KB |
Output is correct |
169 |
Correct |
297 ms |
33740 KB |
Output is correct |
170 |
Correct |
298 ms |
31608 KB |
Output is correct |
171 |
Correct |
308 ms |
31772 KB |
Output is correct |
172 |
Correct |
289 ms |
29904 KB |
Output is correct |
173 |
Correct |
220 ms |
25976 KB |
Output is correct |
174 |
Correct |
214 ms |
25976 KB |
Output is correct |
175 |
Correct |
241 ms |
25916 KB |
Output is correct |
176 |
Correct |
245 ms |
25208 KB |
Output is correct |
177 |
Correct |
169 ms |
24352 KB |
Output is correct |
178 |
Correct |
201 ms |
27868 KB |
Output is correct |
179 |
Correct |
196 ms |
27896 KB |
Output is correct |
180 |
Correct |
193 ms |
26868 KB |
Output is correct |
181 |
Correct |
181 ms |
26872 KB |
Output is correct |
182 |
Correct |
11 ms |
9856 KB |
Output is correct |
183 |
Correct |
10 ms |
9984 KB |
Output is correct |
184 |
Correct |
13 ms |
9984 KB |
Output is correct |
185 |
Correct |
13 ms |
9984 KB |
Output is correct |
186 |
Correct |
10 ms |
9984 KB |
Output is correct |
187 |
Correct |
11 ms |
9984 KB |
Output is correct |
188 |
Correct |
14 ms |
9956 KB |
Output is correct |
189 |
Correct |
12 ms |
9856 KB |
Output is correct |
190 |
Correct |
14 ms |
9956 KB |
Output is correct |
191 |
Correct |
12 ms |
9984 KB |
Output is correct |
192 |
Correct |
12 ms |
9856 KB |
Output is correct |
193 |
Correct |
13 ms |
9984 KB |
Output is correct |
194 |
Correct |
12 ms |
9956 KB |
Output is correct |
195 |
Correct |
14 ms |
9856 KB |
Output is correct |
196 |
Correct |
13 ms |
9984 KB |
Output is correct |
197 |
Correct |
12 ms |
9952 KB |
Output is correct |
198 |
Correct |
11 ms |
9956 KB |
Output is correct |
199 |
Correct |
11 ms |
9984 KB |
Output is correct |
200 |
Correct |
10 ms |
9984 KB |
Output is correct |
201 |
Correct |
10 ms |
9976 KB |
Output is correct |
202 |
Correct |
11 ms |
9856 KB |
Output is correct |
203 |
Correct |
13 ms |
9984 KB |
Output is correct |
204 |
Correct |
11 ms |
9984 KB |
Output is correct |
205 |
Correct |
11 ms |
9984 KB |
Output is correct |
206 |
Correct |
10 ms |
9856 KB |
Output is correct |
207 |
Correct |
11 ms |
9984 KB |
Output is correct |
208 |
Correct |
11 ms |
9984 KB |
Output is correct |
209 |
Correct |
17 ms |
14584 KB |
Output is correct |
210 |
Correct |
141 ms |
23032 KB |
Output is correct |
211 |
Correct |
179 ms |
26356 KB |
Output is correct |
212 |
Correct |
212 ms |
27952 KB |
Output is correct |
213 |
Correct |
226 ms |
29168 KB |
Output is correct |
214 |
Correct |
72 ms |
24056 KB |
Output is correct |
215 |
Correct |
74 ms |
23260 KB |
Output is correct |
216 |
Correct |
179 ms |
26472 KB |
Output is correct |
217 |
Correct |
170 ms |
24384 KB |
Output is correct |
218 |
Correct |
157 ms |
22440 KB |
Output is correct |
219 |
Correct |
166 ms |
22236 KB |
Output is correct |
220 |
Correct |
147 ms |
21880 KB |
Output is correct |
221 |
Correct |
131 ms |
22008 KB |
Output is correct |
222 |
Correct |
123 ms |
23160 KB |
Output is correct |
223 |
Correct |
248 ms |
27256 KB |
Output is correct |
224 |
Correct |
200 ms |
26232 KB |
Output is correct |
225 |
Correct |
182 ms |
24056 KB |
Output is correct |
226 |
Correct |
181 ms |
23948 KB |
Output is correct |
227 |
Correct |
189 ms |
23956 KB |
Output is correct |
228 |
Correct |
186 ms |
23544 KB |
Output is correct |
229 |
Correct |
170 ms |
23416 KB |
Output is correct |
230 |
Correct |
189 ms |
24440 KB |
Output is correct |
231 |
Correct |
185 ms |
24568 KB |
Output is correct |