#include <iostream>
#include <fstream>
#include <vector>
using namespace std;
const int nmax=300005;
vector <pair<int,int> > v[nmax];
vector<int> agatat[nmax],ad[nmax],li[nmax],vec[nmax];
long long ans;
long long sum[nmax],w[nmax];
int a[nmax],b[nmax],st[nmax],lev[nmax],low[nmax],unic[nmax],rada[nmax],ap[nmax],tt[nmax],L[nmax],gr[nmax];
int n,m,i,j,bcc,u,Xul;
void chestie(int x)
{
if(unic[x]&&unic[x]!=bcc) unic[x]=-1;
else unic[x]=bcc;
}
void mark(int P)
{
li[bcc].push_back(a[st[u]]);
li[bcc].push_back(b[st[u]]);
chestie(a[st[u]]);
chestie(b[st[u]]);
while(!agatat[u].empty())
{
ad[n+bcc].push_back(agatat[u].back());
ad[agatat[u].back()].push_back(n+bcc);
agatat[u].pop_back();
}
if(st[u]==P)
{
u--;
agatat[u].push_back(Xul);
return;
}
u--;
mark(P);
}
void dfs(int x)
{
int nod=0;
low[x]=lev[x];
for(int i=0;i<v[x].size();i++)
if(!lev[v[x][i].first])
{
nod=v[x][i].first;st[++u]=v[x][i].second;
lev[nod]=lev[x]+1;
dfs(nod);
if(low[nod]<low[x]) low[x]=low[nod];
if(low[nod]>=lev[x])
{
bcc++;
ad[x].push_back(n+bcc);
ad[n+bcc].push_back(x);
Xul=x;
mark(v[x][i].second);
}
}
else low[x]=min(low[x],lev[v[x][i].first]);
}
void defeseu(int x)
{
int nod=0;
if(x<=n){sum[x]=1LL*L[x];w[x]=1;}
for(int i=0;i<vec[x].size();i++)
{
nod=vec[x][i];
if(!tt[nod])
{
tt[nod]=x;
L[nod]=L[x]+gr[nod];
defeseu(nod);
ans+=2LL*(1LL*sum[nod]*w[x]+1LL*sum[x]*w[nod]-1LL*w[x]*w[nod]*L[tt[x]]-1LL*w[x]*w[nod]*L[x]);
sum[x]+=1LL*sum[nod];
w[x]+=w[nod];
}
}
}
int main()
{
//freopen("data.in","r",stdin);
cin>>n>>m;
for(i=1;i<=m;i++)
{
cin>>a[i]>>b[i];
v[a[i]].push_back({b[i],i});
v[b[i]].push_back({a[i],i});
}
for(int rr=1;rr<=n;rr++)
if(!lev[rr])
{
rada[rr]=1;
lev[rr]=1;
dfs(rr);
}
for(i=1;i<=n;i++)
if(rada[i]==0&&unic[i]!=-1)
{
ad[n+unic[i]].push_back(i);
ad[i].push_back(unic[i]+n);
}
for(i=1;i<=n+bcc;i++)
{
for(j=0;j<ad[i].size();j++)
ap[ad[i][j]]=1;
for(j=0;j<ad[i].size();j++)
if(ap[ad[i][j]])
ap[ad[i][j]]=0,vec[i].push_back(ad[i][j]);
if(i>n) gr[i]=vec[i].size()-1;
}
//O(n) pana aici
for(int rr=1;rr<=n;rr++)
if(!tt[rr])
{
tt[rr]=n+bcc+1;
defeseu(rr);
ans-=1LL*w[rr]*(w[rr]-1);
}
//brutulica aici
cout<<ans;
return 0;
}
Compilation message
count_triplets.cpp: In function 'void dfs(int)':
count_triplets.cpp:42:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<v[x].size();i++)
~^~~~~~~~~~~~
count_triplets.cpp: In function 'void defeseu(int)':
count_triplets.cpp:64:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;i<vec[x].size();i++)
~^~~~~~~~~~~~~~
count_triplets.cpp: In function 'int main()':
count_triplets.cpp:103:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0;j<ad[i].size();j++)
~^~~~~~~~~~~~~
count_triplets.cpp:105:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(j=0;j<ad[i].size();j++)
~^~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
35576 KB |
Output is correct |
2 |
Correct |
32 ms |
35688 KB |
Output is correct |
3 |
Correct |
30 ms |
35688 KB |
Output is correct |
4 |
Correct |
30 ms |
35688 KB |
Output is correct |
5 |
Correct |
34 ms |
35756 KB |
Output is correct |
6 |
Correct |
30 ms |
35812 KB |
Output is correct |
7 |
Correct |
31 ms |
35968 KB |
Output is correct |
8 |
Correct |
32 ms |
35968 KB |
Output is correct |
9 |
Correct |
39 ms |
35968 KB |
Output is correct |
10 |
Correct |
33 ms |
35968 KB |
Output is correct |
11 |
Correct |
34 ms |
35968 KB |
Output is correct |
12 |
Correct |
38 ms |
35968 KB |
Output is correct |
13 |
Correct |
31 ms |
35968 KB |
Output is correct |
14 |
Correct |
30 ms |
35968 KB |
Output is correct |
15 |
Correct |
31 ms |
35968 KB |
Output is correct |
16 |
Correct |
32 ms |
35968 KB |
Output is correct |
17 |
Correct |
30 ms |
35968 KB |
Output is correct |
18 |
Correct |
36 ms |
35968 KB |
Output is correct |
19 |
Correct |
30 ms |
35968 KB |
Output is correct |
20 |
Correct |
32 ms |
35968 KB |
Output is correct |
21 |
Correct |
33 ms |
35968 KB |
Output is correct |
22 |
Correct |
31 ms |
35968 KB |
Output is correct |
23 |
Correct |
31 ms |
35968 KB |
Output is correct |
24 |
Correct |
32 ms |
36008 KB |
Output is correct |
25 |
Correct |
34 ms |
36008 KB |
Output is correct |
26 |
Correct |
31 ms |
36008 KB |
Output is correct |
27 |
Correct |
30 ms |
36008 KB |
Output is correct |
28 |
Correct |
32 ms |
36008 KB |
Output is correct |
29 |
Correct |
31 ms |
36008 KB |
Output is correct |
30 |
Correct |
32 ms |
36008 KB |
Output is correct |
31 |
Correct |
32 ms |
36008 KB |
Output is correct |
32 |
Correct |
31 ms |
36008 KB |
Output is correct |
33 |
Correct |
33 ms |
36008 KB |
Output is correct |
34 |
Correct |
31 ms |
36008 KB |
Output is correct |
35 |
Correct |
31 ms |
36008 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
35576 KB |
Output is correct |
2 |
Correct |
32 ms |
35688 KB |
Output is correct |
3 |
Correct |
30 ms |
35688 KB |
Output is correct |
4 |
Correct |
30 ms |
35688 KB |
Output is correct |
5 |
Correct |
34 ms |
35756 KB |
Output is correct |
6 |
Correct |
30 ms |
35812 KB |
Output is correct |
7 |
Correct |
31 ms |
35968 KB |
Output is correct |
8 |
Correct |
32 ms |
35968 KB |
Output is correct |
9 |
Correct |
39 ms |
35968 KB |
Output is correct |
10 |
Correct |
33 ms |
35968 KB |
Output is correct |
11 |
Correct |
34 ms |
35968 KB |
Output is correct |
12 |
Correct |
38 ms |
35968 KB |
Output is correct |
13 |
Correct |
31 ms |
35968 KB |
Output is correct |
14 |
Correct |
30 ms |
35968 KB |
Output is correct |
15 |
Correct |
31 ms |
35968 KB |
Output is correct |
16 |
Correct |
32 ms |
35968 KB |
Output is correct |
17 |
Correct |
30 ms |
35968 KB |
Output is correct |
18 |
Correct |
36 ms |
35968 KB |
Output is correct |
19 |
Correct |
30 ms |
35968 KB |
Output is correct |
20 |
Correct |
32 ms |
35968 KB |
Output is correct |
21 |
Correct |
33 ms |
35968 KB |
Output is correct |
22 |
Correct |
31 ms |
35968 KB |
Output is correct |
23 |
Correct |
31 ms |
35968 KB |
Output is correct |
24 |
Correct |
32 ms |
36008 KB |
Output is correct |
25 |
Correct |
34 ms |
36008 KB |
Output is correct |
26 |
Correct |
31 ms |
36008 KB |
Output is correct |
27 |
Correct |
30 ms |
36008 KB |
Output is correct |
28 |
Correct |
32 ms |
36008 KB |
Output is correct |
29 |
Correct |
31 ms |
36008 KB |
Output is correct |
30 |
Correct |
32 ms |
36008 KB |
Output is correct |
31 |
Correct |
32 ms |
36008 KB |
Output is correct |
32 |
Correct |
31 ms |
36008 KB |
Output is correct |
33 |
Correct |
33 ms |
36008 KB |
Output is correct |
34 |
Correct |
31 ms |
36008 KB |
Output is correct |
35 |
Correct |
31 ms |
36008 KB |
Output is correct |
36 |
Correct |
32 ms |
36008 KB |
Output is correct |
37 |
Correct |
32 ms |
36008 KB |
Output is correct |
38 |
Correct |
33 ms |
36008 KB |
Output is correct |
39 |
Correct |
31 ms |
36008 KB |
Output is correct |
40 |
Correct |
33 ms |
36008 KB |
Output is correct |
41 |
Correct |
33 ms |
36008 KB |
Output is correct |
42 |
Correct |
32 ms |
36008 KB |
Output is correct |
43 |
Correct |
31 ms |
36008 KB |
Output is correct |
44 |
Correct |
31 ms |
36008 KB |
Output is correct |
45 |
Correct |
31 ms |
36008 KB |
Output is correct |
46 |
Correct |
33 ms |
36008 KB |
Output is correct |
47 |
Correct |
34 ms |
36008 KB |
Output is correct |
48 |
Correct |
30 ms |
36008 KB |
Output is correct |
49 |
Correct |
31 ms |
36008 KB |
Output is correct |
50 |
Correct |
30 ms |
36008 KB |
Output is correct |
51 |
Correct |
31 ms |
36008 KB |
Output is correct |
52 |
Correct |
31 ms |
36008 KB |
Output is correct |
53 |
Correct |
33 ms |
36008 KB |
Output is correct |
54 |
Correct |
31 ms |
36008 KB |
Output is correct |
55 |
Correct |
30 ms |
36008 KB |
Output is correct |
56 |
Correct |
31 ms |
36008 KB |
Output is correct |
57 |
Correct |
30 ms |
36008 KB |
Output is correct |
58 |
Correct |
30 ms |
36008 KB |
Output is correct |
59 |
Correct |
29 ms |
36008 KB |
Output is correct |
60 |
Correct |
30 ms |
36008 KB |
Output is correct |
61 |
Correct |
29 ms |
36008 KB |
Output is correct |
62 |
Correct |
31 ms |
36008 KB |
Output is correct |
63 |
Correct |
31 ms |
36008 KB |
Output is correct |
64 |
Correct |
31 ms |
36008 KB |
Output is correct |
65 |
Correct |
31 ms |
36008 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
200 ms |
58664 KB |
Output is correct |
2 |
Correct |
193 ms |
58736 KB |
Output is correct |
3 |
Correct |
309 ms |
62460 KB |
Output is correct |
4 |
Correct |
255 ms |
62460 KB |
Output is correct |
5 |
Correct |
294 ms |
62460 KB |
Output is correct |
6 |
Correct |
315 ms |
62460 KB |
Output is correct |
7 |
Correct |
332 ms |
62460 KB |
Output is correct |
8 |
Correct |
299 ms |
62460 KB |
Output is correct |
9 |
Correct |
345 ms |
62460 KB |
Output is correct |
10 |
Correct |
320 ms |
62460 KB |
Output is correct |
11 |
Correct |
240 ms |
62460 KB |
Output is correct |
12 |
Correct |
237 ms |
62460 KB |
Output is correct |
13 |
Correct |
241 ms |
62460 KB |
Output is correct |
14 |
Correct |
257 ms |
62460 KB |
Output is correct |
15 |
Correct |
179 ms |
62460 KB |
Output is correct |
16 |
Correct |
186 ms |
62460 KB |
Output is correct |
17 |
Correct |
39 ms |
62460 KB |
Output is correct |
18 |
Correct |
35 ms |
62460 KB |
Output is correct |
19 |
Correct |
37 ms |
62460 KB |
Output is correct |
20 |
Correct |
39 ms |
62460 KB |
Output is correct |
21 |
Correct |
39 ms |
62460 KB |
Output is correct |
22 |
Correct |
38 ms |
62460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
62460 KB |
Output is correct |
2 |
Correct |
35 ms |
62460 KB |
Output is correct |
3 |
Correct |
33 ms |
62460 KB |
Output is correct |
4 |
Correct |
36 ms |
62460 KB |
Output is correct |
5 |
Correct |
34 ms |
62460 KB |
Output is correct |
6 |
Correct |
36 ms |
62460 KB |
Output is correct |
7 |
Correct |
33 ms |
62460 KB |
Output is correct |
8 |
Correct |
33 ms |
62460 KB |
Output is correct |
9 |
Correct |
33 ms |
62460 KB |
Output is correct |
10 |
Correct |
32 ms |
62460 KB |
Output is correct |
11 |
Correct |
32 ms |
62460 KB |
Output is correct |
12 |
Correct |
32 ms |
62460 KB |
Output is correct |
13 |
Correct |
35 ms |
62460 KB |
Output is correct |
14 |
Correct |
32 ms |
62460 KB |
Output is correct |
15 |
Correct |
32 ms |
62460 KB |
Output is correct |
16 |
Correct |
32 ms |
62460 KB |
Output is correct |
17 |
Correct |
32 ms |
62460 KB |
Output is correct |
18 |
Correct |
34 ms |
62460 KB |
Output is correct |
19 |
Correct |
34 ms |
62460 KB |
Output is correct |
20 |
Correct |
33 ms |
62460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
317 ms |
63768 KB |
Output is correct |
2 |
Correct |
331 ms |
63768 KB |
Output is correct |
3 |
Correct |
344 ms |
63768 KB |
Output is correct |
4 |
Correct |
330 ms |
63768 KB |
Output is correct |
5 |
Correct |
389 ms |
63768 KB |
Output is correct |
6 |
Correct |
363 ms |
69720 KB |
Output is correct |
7 |
Correct |
373 ms |
69720 KB |
Output is correct |
8 |
Correct |
351 ms |
69720 KB |
Output is correct |
9 |
Correct |
339 ms |
69720 KB |
Output is correct |
10 |
Correct |
330 ms |
69720 KB |
Output is correct |
11 |
Correct |
319 ms |
69720 KB |
Output is correct |
12 |
Correct |
319 ms |
69720 KB |
Output is correct |
13 |
Correct |
330 ms |
69720 KB |
Output is correct |
14 |
Correct |
305 ms |
69720 KB |
Output is correct |
15 |
Correct |
253 ms |
69720 KB |
Output is correct |
16 |
Correct |
211 ms |
69720 KB |
Output is correct |
17 |
Correct |
306 ms |
69720 KB |
Output is correct |
18 |
Correct |
277 ms |
69720 KB |
Output is correct |
19 |
Correct |
290 ms |
69720 KB |
Output is correct |
20 |
Correct |
302 ms |
69720 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
32 ms |
69720 KB |
Output is correct |
2 |
Correct |
32 ms |
69720 KB |
Output is correct |
3 |
Correct |
33 ms |
69720 KB |
Output is correct |
4 |
Correct |
38 ms |
69720 KB |
Output is correct |
5 |
Correct |
36 ms |
69720 KB |
Output is correct |
6 |
Correct |
42 ms |
69720 KB |
Output is correct |
7 |
Correct |
31 ms |
69720 KB |
Output is correct |
8 |
Correct |
32 ms |
69720 KB |
Output is correct |
9 |
Correct |
33 ms |
69720 KB |
Output is correct |
10 |
Correct |
32 ms |
69720 KB |
Output is correct |
11 |
Correct |
32 ms |
69720 KB |
Output is correct |
12 |
Correct |
32 ms |
69720 KB |
Output is correct |
13 |
Correct |
43 ms |
69720 KB |
Output is correct |
14 |
Correct |
33 ms |
69720 KB |
Output is correct |
15 |
Correct |
32 ms |
69720 KB |
Output is correct |
16 |
Correct |
33 ms |
69720 KB |
Output is correct |
17 |
Correct |
32 ms |
69720 KB |
Output is correct |
18 |
Correct |
37 ms |
69720 KB |
Output is correct |
19 |
Correct |
40 ms |
69720 KB |
Output is correct |
20 |
Correct |
35 ms |
69720 KB |
Output is correct |
21 |
Correct |
33 ms |
69720 KB |
Output is correct |
22 |
Correct |
34 ms |
69720 KB |
Output is correct |
23 |
Correct |
30 ms |
69720 KB |
Output is correct |
24 |
Correct |
32 ms |
69720 KB |
Output is correct |
25 |
Correct |
32 ms |
69720 KB |
Output is correct |
26 |
Correct |
31 ms |
69720 KB |
Output is correct |
27 |
Correct |
30 ms |
69720 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
321 ms |
69720 KB |
Output is correct |
2 |
Correct |
357 ms |
69720 KB |
Output is correct |
3 |
Correct |
361 ms |
69720 KB |
Output is correct |
4 |
Correct |
304 ms |
69720 KB |
Output is correct |
5 |
Correct |
267 ms |
69720 KB |
Output is correct |
6 |
Correct |
281 ms |
69720 KB |
Output is correct |
7 |
Correct |
250 ms |
69720 KB |
Output is correct |
8 |
Correct |
277 ms |
69720 KB |
Output is correct |
9 |
Correct |
251 ms |
69720 KB |
Output is correct |
10 |
Correct |
220 ms |
69720 KB |
Output is correct |
11 |
Correct |
204 ms |
69720 KB |
Output is correct |
12 |
Correct |
269 ms |
69720 KB |
Output is correct |
13 |
Correct |
199 ms |
69720 KB |
Output is correct |
14 |
Correct |
189 ms |
69720 KB |
Output is correct |
15 |
Correct |
349 ms |
69720 KB |
Output is correct |
16 |
Correct |
402 ms |
69720 KB |
Output is correct |
17 |
Correct |
486 ms |
69720 KB |
Output is correct |
18 |
Correct |
352 ms |
69720 KB |
Output is correct |
19 |
Correct |
317 ms |
69720 KB |
Output is correct |
20 |
Correct |
365 ms |
69720 KB |
Output is correct |
21 |
Correct |
333 ms |
69720 KB |
Output is correct |
22 |
Correct |
383 ms |
69720 KB |
Output is correct |
23 |
Correct |
251 ms |
69720 KB |
Output is correct |
24 |
Correct |
419 ms |
69720 KB |
Output is correct |
25 |
Correct |
398 ms |
69720 KB |
Output is correct |
26 |
Correct |
374 ms |
69720 KB |
Output is correct |
27 |
Correct |
373 ms |
69720 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
35576 KB |
Output is correct |
2 |
Correct |
32 ms |
35688 KB |
Output is correct |
3 |
Correct |
30 ms |
35688 KB |
Output is correct |
4 |
Correct |
30 ms |
35688 KB |
Output is correct |
5 |
Correct |
34 ms |
35756 KB |
Output is correct |
6 |
Correct |
30 ms |
35812 KB |
Output is correct |
7 |
Correct |
31 ms |
35968 KB |
Output is correct |
8 |
Correct |
32 ms |
35968 KB |
Output is correct |
9 |
Correct |
39 ms |
35968 KB |
Output is correct |
10 |
Correct |
33 ms |
35968 KB |
Output is correct |
11 |
Correct |
34 ms |
35968 KB |
Output is correct |
12 |
Correct |
38 ms |
35968 KB |
Output is correct |
13 |
Correct |
31 ms |
35968 KB |
Output is correct |
14 |
Correct |
30 ms |
35968 KB |
Output is correct |
15 |
Correct |
31 ms |
35968 KB |
Output is correct |
16 |
Correct |
32 ms |
35968 KB |
Output is correct |
17 |
Correct |
30 ms |
35968 KB |
Output is correct |
18 |
Correct |
36 ms |
35968 KB |
Output is correct |
19 |
Correct |
30 ms |
35968 KB |
Output is correct |
20 |
Correct |
32 ms |
35968 KB |
Output is correct |
21 |
Correct |
33 ms |
35968 KB |
Output is correct |
22 |
Correct |
31 ms |
35968 KB |
Output is correct |
23 |
Correct |
31 ms |
35968 KB |
Output is correct |
24 |
Correct |
32 ms |
36008 KB |
Output is correct |
25 |
Correct |
34 ms |
36008 KB |
Output is correct |
26 |
Correct |
31 ms |
36008 KB |
Output is correct |
27 |
Correct |
30 ms |
36008 KB |
Output is correct |
28 |
Correct |
32 ms |
36008 KB |
Output is correct |
29 |
Correct |
31 ms |
36008 KB |
Output is correct |
30 |
Correct |
32 ms |
36008 KB |
Output is correct |
31 |
Correct |
32 ms |
36008 KB |
Output is correct |
32 |
Correct |
31 ms |
36008 KB |
Output is correct |
33 |
Correct |
33 ms |
36008 KB |
Output is correct |
34 |
Correct |
31 ms |
36008 KB |
Output is correct |
35 |
Correct |
31 ms |
36008 KB |
Output is correct |
36 |
Correct |
32 ms |
36008 KB |
Output is correct |
37 |
Correct |
32 ms |
36008 KB |
Output is correct |
38 |
Correct |
33 ms |
36008 KB |
Output is correct |
39 |
Correct |
31 ms |
36008 KB |
Output is correct |
40 |
Correct |
33 ms |
36008 KB |
Output is correct |
41 |
Correct |
33 ms |
36008 KB |
Output is correct |
42 |
Correct |
32 ms |
36008 KB |
Output is correct |
43 |
Correct |
31 ms |
36008 KB |
Output is correct |
44 |
Correct |
31 ms |
36008 KB |
Output is correct |
45 |
Correct |
31 ms |
36008 KB |
Output is correct |
46 |
Correct |
33 ms |
36008 KB |
Output is correct |
47 |
Correct |
34 ms |
36008 KB |
Output is correct |
48 |
Correct |
30 ms |
36008 KB |
Output is correct |
49 |
Correct |
31 ms |
36008 KB |
Output is correct |
50 |
Correct |
30 ms |
36008 KB |
Output is correct |
51 |
Correct |
31 ms |
36008 KB |
Output is correct |
52 |
Correct |
31 ms |
36008 KB |
Output is correct |
53 |
Correct |
33 ms |
36008 KB |
Output is correct |
54 |
Correct |
31 ms |
36008 KB |
Output is correct |
55 |
Correct |
30 ms |
36008 KB |
Output is correct |
56 |
Correct |
31 ms |
36008 KB |
Output is correct |
57 |
Correct |
30 ms |
36008 KB |
Output is correct |
58 |
Correct |
30 ms |
36008 KB |
Output is correct |
59 |
Correct |
29 ms |
36008 KB |
Output is correct |
60 |
Correct |
30 ms |
36008 KB |
Output is correct |
61 |
Correct |
29 ms |
36008 KB |
Output is correct |
62 |
Correct |
31 ms |
36008 KB |
Output is correct |
63 |
Correct |
31 ms |
36008 KB |
Output is correct |
64 |
Correct |
31 ms |
36008 KB |
Output is correct |
65 |
Correct |
31 ms |
36008 KB |
Output is correct |
66 |
Correct |
30 ms |
69720 KB |
Output is correct |
67 |
Correct |
32 ms |
69720 KB |
Output is correct |
68 |
Correct |
38 ms |
69720 KB |
Output is correct |
69 |
Correct |
35 ms |
69720 KB |
Output is correct |
70 |
Correct |
36 ms |
69720 KB |
Output is correct |
71 |
Correct |
34 ms |
69720 KB |
Output is correct |
72 |
Correct |
32 ms |
69720 KB |
Output is correct |
73 |
Correct |
33 ms |
69720 KB |
Output is correct |
74 |
Correct |
32 ms |
69720 KB |
Output is correct |
75 |
Correct |
32 ms |
69720 KB |
Output is correct |
76 |
Correct |
31 ms |
69720 KB |
Output is correct |
77 |
Correct |
34 ms |
69720 KB |
Output is correct |
78 |
Correct |
34 ms |
69720 KB |
Output is correct |
79 |
Correct |
32 ms |
69720 KB |
Output is correct |
80 |
Correct |
32 ms |
69720 KB |
Output is correct |
81 |
Correct |
32 ms |
69720 KB |
Output is correct |
82 |
Correct |
32 ms |
69720 KB |
Output is correct |
83 |
Correct |
31 ms |
69720 KB |
Output is correct |
84 |
Correct |
34 ms |
69720 KB |
Output is correct |
85 |
Correct |
32 ms |
69720 KB |
Output is correct |
86 |
Correct |
32 ms |
69720 KB |
Output is correct |
87 |
Correct |
33 ms |
69720 KB |
Output is correct |
88 |
Correct |
34 ms |
69720 KB |
Output is correct |
89 |
Correct |
33 ms |
69720 KB |
Output is correct |
90 |
Correct |
31 ms |
69720 KB |
Output is correct |
91 |
Correct |
32 ms |
69720 KB |
Output is correct |
92 |
Correct |
33 ms |
69720 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
31 ms |
35576 KB |
Output is correct |
2 |
Correct |
32 ms |
35688 KB |
Output is correct |
3 |
Correct |
30 ms |
35688 KB |
Output is correct |
4 |
Correct |
30 ms |
35688 KB |
Output is correct |
5 |
Correct |
34 ms |
35756 KB |
Output is correct |
6 |
Correct |
30 ms |
35812 KB |
Output is correct |
7 |
Correct |
31 ms |
35968 KB |
Output is correct |
8 |
Correct |
32 ms |
35968 KB |
Output is correct |
9 |
Correct |
39 ms |
35968 KB |
Output is correct |
10 |
Correct |
33 ms |
35968 KB |
Output is correct |
11 |
Correct |
34 ms |
35968 KB |
Output is correct |
12 |
Correct |
38 ms |
35968 KB |
Output is correct |
13 |
Correct |
31 ms |
35968 KB |
Output is correct |
14 |
Correct |
30 ms |
35968 KB |
Output is correct |
15 |
Correct |
31 ms |
35968 KB |
Output is correct |
16 |
Correct |
32 ms |
35968 KB |
Output is correct |
17 |
Correct |
30 ms |
35968 KB |
Output is correct |
18 |
Correct |
36 ms |
35968 KB |
Output is correct |
19 |
Correct |
30 ms |
35968 KB |
Output is correct |
20 |
Correct |
32 ms |
35968 KB |
Output is correct |
21 |
Correct |
33 ms |
35968 KB |
Output is correct |
22 |
Correct |
31 ms |
35968 KB |
Output is correct |
23 |
Correct |
31 ms |
35968 KB |
Output is correct |
24 |
Correct |
32 ms |
36008 KB |
Output is correct |
25 |
Correct |
34 ms |
36008 KB |
Output is correct |
26 |
Correct |
31 ms |
36008 KB |
Output is correct |
27 |
Correct |
30 ms |
36008 KB |
Output is correct |
28 |
Correct |
32 ms |
36008 KB |
Output is correct |
29 |
Correct |
31 ms |
36008 KB |
Output is correct |
30 |
Correct |
32 ms |
36008 KB |
Output is correct |
31 |
Correct |
32 ms |
36008 KB |
Output is correct |
32 |
Correct |
31 ms |
36008 KB |
Output is correct |
33 |
Correct |
33 ms |
36008 KB |
Output is correct |
34 |
Correct |
31 ms |
36008 KB |
Output is correct |
35 |
Correct |
31 ms |
36008 KB |
Output is correct |
36 |
Correct |
32 ms |
36008 KB |
Output is correct |
37 |
Correct |
32 ms |
36008 KB |
Output is correct |
38 |
Correct |
33 ms |
36008 KB |
Output is correct |
39 |
Correct |
31 ms |
36008 KB |
Output is correct |
40 |
Correct |
33 ms |
36008 KB |
Output is correct |
41 |
Correct |
33 ms |
36008 KB |
Output is correct |
42 |
Correct |
32 ms |
36008 KB |
Output is correct |
43 |
Correct |
31 ms |
36008 KB |
Output is correct |
44 |
Correct |
31 ms |
36008 KB |
Output is correct |
45 |
Correct |
31 ms |
36008 KB |
Output is correct |
46 |
Correct |
33 ms |
36008 KB |
Output is correct |
47 |
Correct |
34 ms |
36008 KB |
Output is correct |
48 |
Correct |
30 ms |
36008 KB |
Output is correct |
49 |
Correct |
31 ms |
36008 KB |
Output is correct |
50 |
Correct |
30 ms |
36008 KB |
Output is correct |
51 |
Correct |
31 ms |
36008 KB |
Output is correct |
52 |
Correct |
31 ms |
36008 KB |
Output is correct |
53 |
Correct |
33 ms |
36008 KB |
Output is correct |
54 |
Correct |
31 ms |
36008 KB |
Output is correct |
55 |
Correct |
30 ms |
36008 KB |
Output is correct |
56 |
Correct |
31 ms |
36008 KB |
Output is correct |
57 |
Correct |
30 ms |
36008 KB |
Output is correct |
58 |
Correct |
30 ms |
36008 KB |
Output is correct |
59 |
Correct |
29 ms |
36008 KB |
Output is correct |
60 |
Correct |
30 ms |
36008 KB |
Output is correct |
61 |
Correct |
29 ms |
36008 KB |
Output is correct |
62 |
Correct |
31 ms |
36008 KB |
Output is correct |
63 |
Correct |
31 ms |
36008 KB |
Output is correct |
64 |
Correct |
31 ms |
36008 KB |
Output is correct |
65 |
Correct |
31 ms |
36008 KB |
Output is correct |
66 |
Correct |
200 ms |
58664 KB |
Output is correct |
67 |
Correct |
193 ms |
58736 KB |
Output is correct |
68 |
Correct |
309 ms |
62460 KB |
Output is correct |
69 |
Correct |
255 ms |
62460 KB |
Output is correct |
70 |
Correct |
294 ms |
62460 KB |
Output is correct |
71 |
Correct |
315 ms |
62460 KB |
Output is correct |
72 |
Correct |
332 ms |
62460 KB |
Output is correct |
73 |
Correct |
299 ms |
62460 KB |
Output is correct |
74 |
Correct |
345 ms |
62460 KB |
Output is correct |
75 |
Correct |
320 ms |
62460 KB |
Output is correct |
76 |
Correct |
240 ms |
62460 KB |
Output is correct |
77 |
Correct |
237 ms |
62460 KB |
Output is correct |
78 |
Correct |
241 ms |
62460 KB |
Output is correct |
79 |
Correct |
257 ms |
62460 KB |
Output is correct |
80 |
Correct |
179 ms |
62460 KB |
Output is correct |
81 |
Correct |
186 ms |
62460 KB |
Output is correct |
82 |
Correct |
39 ms |
62460 KB |
Output is correct |
83 |
Correct |
35 ms |
62460 KB |
Output is correct |
84 |
Correct |
37 ms |
62460 KB |
Output is correct |
85 |
Correct |
39 ms |
62460 KB |
Output is correct |
86 |
Correct |
39 ms |
62460 KB |
Output is correct |
87 |
Correct |
38 ms |
62460 KB |
Output is correct |
88 |
Correct |
32 ms |
62460 KB |
Output is correct |
89 |
Correct |
35 ms |
62460 KB |
Output is correct |
90 |
Correct |
33 ms |
62460 KB |
Output is correct |
91 |
Correct |
36 ms |
62460 KB |
Output is correct |
92 |
Correct |
34 ms |
62460 KB |
Output is correct |
93 |
Correct |
36 ms |
62460 KB |
Output is correct |
94 |
Correct |
33 ms |
62460 KB |
Output is correct |
95 |
Correct |
33 ms |
62460 KB |
Output is correct |
96 |
Correct |
33 ms |
62460 KB |
Output is correct |
97 |
Correct |
32 ms |
62460 KB |
Output is correct |
98 |
Correct |
32 ms |
62460 KB |
Output is correct |
99 |
Correct |
32 ms |
62460 KB |
Output is correct |
100 |
Correct |
35 ms |
62460 KB |
Output is correct |
101 |
Correct |
32 ms |
62460 KB |
Output is correct |
102 |
Correct |
32 ms |
62460 KB |
Output is correct |
103 |
Correct |
32 ms |
62460 KB |
Output is correct |
104 |
Correct |
32 ms |
62460 KB |
Output is correct |
105 |
Correct |
34 ms |
62460 KB |
Output is correct |
106 |
Correct |
34 ms |
62460 KB |
Output is correct |
107 |
Correct |
33 ms |
62460 KB |
Output is correct |
108 |
Correct |
317 ms |
63768 KB |
Output is correct |
109 |
Correct |
331 ms |
63768 KB |
Output is correct |
110 |
Correct |
344 ms |
63768 KB |
Output is correct |
111 |
Correct |
330 ms |
63768 KB |
Output is correct |
112 |
Correct |
389 ms |
63768 KB |
Output is correct |
113 |
Correct |
363 ms |
69720 KB |
Output is correct |
114 |
Correct |
373 ms |
69720 KB |
Output is correct |
115 |
Correct |
351 ms |
69720 KB |
Output is correct |
116 |
Correct |
339 ms |
69720 KB |
Output is correct |
117 |
Correct |
330 ms |
69720 KB |
Output is correct |
118 |
Correct |
319 ms |
69720 KB |
Output is correct |
119 |
Correct |
319 ms |
69720 KB |
Output is correct |
120 |
Correct |
330 ms |
69720 KB |
Output is correct |
121 |
Correct |
305 ms |
69720 KB |
Output is correct |
122 |
Correct |
253 ms |
69720 KB |
Output is correct |
123 |
Correct |
211 ms |
69720 KB |
Output is correct |
124 |
Correct |
306 ms |
69720 KB |
Output is correct |
125 |
Correct |
277 ms |
69720 KB |
Output is correct |
126 |
Correct |
290 ms |
69720 KB |
Output is correct |
127 |
Correct |
302 ms |
69720 KB |
Output is correct |
128 |
Correct |
32 ms |
69720 KB |
Output is correct |
129 |
Correct |
32 ms |
69720 KB |
Output is correct |
130 |
Correct |
33 ms |
69720 KB |
Output is correct |
131 |
Correct |
38 ms |
69720 KB |
Output is correct |
132 |
Correct |
36 ms |
69720 KB |
Output is correct |
133 |
Correct |
42 ms |
69720 KB |
Output is correct |
134 |
Correct |
31 ms |
69720 KB |
Output is correct |
135 |
Correct |
32 ms |
69720 KB |
Output is correct |
136 |
Correct |
33 ms |
69720 KB |
Output is correct |
137 |
Correct |
32 ms |
69720 KB |
Output is correct |
138 |
Correct |
32 ms |
69720 KB |
Output is correct |
139 |
Correct |
32 ms |
69720 KB |
Output is correct |
140 |
Correct |
43 ms |
69720 KB |
Output is correct |
141 |
Correct |
33 ms |
69720 KB |
Output is correct |
142 |
Correct |
32 ms |
69720 KB |
Output is correct |
143 |
Correct |
33 ms |
69720 KB |
Output is correct |
144 |
Correct |
32 ms |
69720 KB |
Output is correct |
145 |
Correct |
37 ms |
69720 KB |
Output is correct |
146 |
Correct |
40 ms |
69720 KB |
Output is correct |
147 |
Correct |
35 ms |
69720 KB |
Output is correct |
148 |
Correct |
33 ms |
69720 KB |
Output is correct |
149 |
Correct |
34 ms |
69720 KB |
Output is correct |
150 |
Correct |
30 ms |
69720 KB |
Output is correct |
151 |
Correct |
32 ms |
69720 KB |
Output is correct |
152 |
Correct |
32 ms |
69720 KB |
Output is correct |
153 |
Correct |
31 ms |
69720 KB |
Output is correct |
154 |
Correct |
30 ms |
69720 KB |
Output is correct |
155 |
Correct |
321 ms |
69720 KB |
Output is correct |
156 |
Correct |
357 ms |
69720 KB |
Output is correct |
157 |
Correct |
361 ms |
69720 KB |
Output is correct |
158 |
Correct |
304 ms |
69720 KB |
Output is correct |
159 |
Correct |
267 ms |
69720 KB |
Output is correct |
160 |
Correct |
281 ms |
69720 KB |
Output is correct |
161 |
Correct |
250 ms |
69720 KB |
Output is correct |
162 |
Correct |
277 ms |
69720 KB |
Output is correct |
163 |
Correct |
251 ms |
69720 KB |
Output is correct |
164 |
Correct |
220 ms |
69720 KB |
Output is correct |
165 |
Correct |
204 ms |
69720 KB |
Output is correct |
166 |
Correct |
269 ms |
69720 KB |
Output is correct |
167 |
Correct |
199 ms |
69720 KB |
Output is correct |
168 |
Correct |
189 ms |
69720 KB |
Output is correct |
169 |
Correct |
349 ms |
69720 KB |
Output is correct |
170 |
Correct |
402 ms |
69720 KB |
Output is correct |
171 |
Correct |
486 ms |
69720 KB |
Output is correct |
172 |
Correct |
352 ms |
69720 KB |
Output is correct |
173 |
Correct |
317 ms |
69720 KB |
Output is correct |
174 |
Correct |
365 ms |
69720 KB |
Output is correct |
175 |
Correct |
333 ms |
69720 KB |
Output is correct |
176 |
Correct |
383 ms |
69720 KB |
Output is correct |
177 |
Correct |
251 ms |
69720 KB |
Output is correct |
178 |
Correct |
419 ms |
69720 KB |
Output is correct |
179 |
Correct |
398 ms |
69720 KB |
Output is correct |
180 |
Correct |
374 ms |
69720 KB |
Output is correct |
181 |
Correct |
373 ms |
69720 KB |
Output is correct |
182 |
Correct |
30 ms |
69720 KB |
Output is correct |
183 |
Correct |
32 ms |
69720 KB |
Output is correct |
184 |
Correct |
38 ms |
69720 KB |
Output is correct |
185 |
Correct |
35 ms |
69720 KB |
Output is correct |
186 |
Correct |
36 ms |
69720 KB |
Output is correct |
187 |
Correct |
34 ms |
69720 KB |
Output is correct |
188 |
Correct |
32 ms |
69720 KB |
Output is correct |
189 |
Correct |
33 ms |
69720 KB |
Output is correct |
190 |
Correct |
32 ms |
69720 KB |
Output is correct |
191 |
Correct |
32 ms |
69720 KB |
Output is correct |
192 |
Correct |
31 ms |
69720 KB |
Output is correct |
193 |
Correct |
34 ms |
69720 KB |
Output is correct |
194 |
Correct |
34 ms |
69720 KB |
Output is correct |
195 |
Correct |
32 ms |
69720 KB |
Output is correct |
196 |
Correct |
32 ms |
69720 KB |
Output is correct |
197 |
Correct |
32 ms |
69720 KB |
Output is correct |
198 |
Correct |
32 ms |
69720 KB |
Output is correct |
199 |
Correct |
31 ms |
69720 KB |
Output is correct |
200 |
Correct |
34 ms |
69720 KB |
Output is correct |
201 |
Correct |
32 ms |
69720 KB |
Output is correct |
202 |
Correct |
32 ms |
69720 KB |
Output is correct |
203 |
Correct |
33 ms |
69720 KB |
Output is correct |
204 |
Correct |
34 ms |
69720 KB |
Output is correct |
205 |
Correct |
33 ms |
69720 KB |
Output is correct |
206 |
Correct |
31 ms |
69720 KB |
Output is correct |
207 |
Correct |
32 ms |
69720 KB |
Output is correct |
208 |
Correct |
33 ms |
69720 KB |
Output is correct |
209 |
Correct |
37 ms |
69720 KB |
Output is correct |
210 |
Correct |
200 ms |
69720 KB |
Output is correct |
211 |
Correct |
318 ms |
69720 KB |
Output is correct |
212 |
Correct |
296 ms |
69720 KB |
Output is correct |
213 |
Correct |
397 ms |
69720 KB |
Output is correct |
214 |
Correct |
282 ms |
69720 KB |
Output is correct |
215 |
Correct |
199 ms |
69720 KB |
Output is correct |
216 |
Correct |
389 ms |
69720 KB |
Output is correct |
217 |
Correct |
422 ms |
69720 KB |
Output is correct |
218 |
Correct |
297 ms |
69720 KB |
Output is correct |
219 |
Correct |
224 ms |
69720 KB |
Output is correct |
220 |
Correct |
204 ms |
69720 KB |
Output is correct |
221 |
Correct |
199 ms |
69720 KB |
Output is correct |
222 |
Correct |
197 ms |
69720 KB |
Output is correct |
223 |
Correct |
322 ms |
69720 KB |
Output is correct |
224 |
Correct |
355 ms |
69720 KB |
Output is correct |
225 |
Correct |
324 ms |
69720 KB |
Output is correct |
226 |
Correct |
279 ms |
69720 KB |
Output is correct |
227 |
Correct |
393 ms |
69720 KB |
Output is correct |
228 |
Correct |
310 ms |
69720 KB |
Output is correct |
229 |
Correct |
254 ms |
69720 KB |
Output is correct |
230 |
Correct |
339 ms |
69720 KB |
Output is correct |
231 |
Correct |
318 ms |
69720 KB |
Output is correct |