#include<bits/stdc++.h>
using namespace std;
struct DDS{
int par[1<<18];
int abp(int n){
return par[n]?par[n]=abp(par[n]):n;
}
void merge(int a,int b){
a=abp(a),b=abp(b);
if(a-b)par[a]=b;
}
} dsu;
vector<int>adj[1<<17],adj2[1<<18];
set<pair<int,int>>st[1<<17];
long long par[1<<17],dep[1<<17],cycpar[1<<17],CC,N,N2,sz[1<<17];
void dfsC(int n,int p){
N++;
dep[n]=dep[p]+1;
par[n]=p;
for(auto i:adj[n]){
if(i==p)continue;
if(!dep[i])
dfsC(i,n);
else if(dep[i]<dep[n])
st[n].insert({dep[i],++CC});
}
}
void dfsM(int n,int p){
for(auto i:adj[n]) {
if(par[i]-n)continue;
dfsM(i,n);
if(st[i].empty())continue;
if(st[i].begin()->first<dep[n]) {
if(st[n].size())
dsu.merge(st[i].begin()->second,st[n].begin()->second);
st[n].insert(*st[i].begin());
} else adj2[n].push_back(dsu.abp(st[i].begin()->second));
}
if(st[n].size())
cycpar[n]=st[n].begin()->second;
else adj2[p].push_back(n);
}
void dfsP(int n,int p){
for(auto i:adj[n])
if(par[i]==n)
dfsP(i,n);
if(cycpar[n])
adj2[dsu.abp(cycpar[n])].push_back(n);
}
long long TOT;
void dfsA(int n){
sz[n]=n<=N2;
long long k=(N-sz[n])*(N-sz[n]);
for(auto i:adj2[n])dfsA(i),
sz[n]+=sz[i],k-=sz[i]*sz[i];
k-=(N-sz[n])*(N-sz[n]);
if(n>N2)k*=adj2[n].size()-1;
TOT+=k;
}
int main(){
cin.tie(0)->sync_with_stdio(0);
int n,m;
cin>>n>>m;
for(int i=0;i<m;i++){
int a,b;cin>>a>>b;
adj[a].push_back(b);
adj[b].push_back(a);
}
CC=N2=n;
for(int K=1;K<=n;K++) {
if(dep[K])continue;
N=0;
dfsC(K,0);
dfsM(K,0);
dfsP(K,0);
dfsA(K);
}
cout<<TOT<<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
15708 KB |
Output is correct |
2 |
Correct |
6 ms |
15680 KB |
Output is correct |
3 |
Correct |
6 ms |
15704 KB |
Output is correct |
4 |
Correct |
6 ms |
15656 KB |
Output is correct |
5 |
Correct |
6 ms |
15740 KB |
Output is correct |
6 |
Correct |
6 ms |
15708 KB |
Output is correct |
7 |
Correct |
6 ms |
15708 KB |
Output is correct |
8 |
Correct |
6 ms |
15708 KB |
Output is correct |
9 |
Correct |
6 ms |
15720 KB |
Output is correct |
10 |
Correct |
6 ms |
15708 KB |
Output is correct |
11 |
Correct |
6 ms |
15708 KB |
Output is correct |
12 |
Correct |
6 ms |
15704 KB |
Output is correct |
13 |
Correct |
6 ms |
15708 KB |
Output is correct |
14 |
Correct |
7 ms |
15708 KB |
Output is correct |
15 |
Correct |
6 ms |
15708 KB |
Output is correct |
16 |
Correct |
7 ms |
15708 KB |
Output is correct |
17 |
Correct |
6 ms |
15836 KB |
Output is correct |
18 |
Correct |
7 ms |
15708 KB |
Output is correct |
19 |
Correct |
6 ms |
15708 KB |
Output is correct |
20 |
Correct |
6 ms |
15708 KB |
Output is correct |
21 |
Correct |
6 ms |
15708 KB |
Output is correct |
22 |
Correct |
7 ms |
15760 KB |
Output is correct |
23 |
Correct |
6 ms |
15704 KB |
Output is correct |
24 |
Correct |
6 ms |
15708 KB |
Output is correct |
25 |
Correct |
6 ms |
15708 KB |
Output is correct |
26 |
Correct |
8 ms |
15708 KB |
Output is correct |
27 |
Correct |
6 ms |
15708 KB |
Output is correct |
28 |
Correct |
6 ms |
15644 KB |
Output is correct |
29 |
Correct |
6 ms |
15708 KB |
Output is correct |
30 |
Correct |
6 ms |
15708 KB |
Output is correct |
31 |
Correct |
7 ms |
15708 KB |
Output is correct |
32 |
Correct |
6 ms |
15876 KB |
Output is correct |
33 |
Correct |
6 ms |
15708 KB |
Output is correct |
34 |
Correct |
6 ms |
15708 KB |
Output is correct |
35 |
Correct |
7 ms |
15828 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
15708 KB |
Output is correct |
2 |
Correct |
6 ms |
15680 KB |
Output is correct |
3 |
Correct |
6 ms |
15704 KB |
Output is correct |
4 |
Correct |
6 ms |
15656 KB |
Output is correct |
5 |
Correct |
6 ms |
15740 KB |
Output is correct |
6 |
Correct |
6 ms |
15708 KB |
Output is correct |
7 |
Correct |
6 ms |
15708 KB |
Output is correct |
8 |
Correct |
6 ms |
15708 KB |
Output is correct |
9 |
Correct |
6 ms |
15720 KB |
Output is correct |
10 |
Correct |
6 ms |
15708 KB |
Output is correct |
11 |
Correct |
6 ms |
15708 KB |
Output is correct |
12 |
Correct |
6 ms |
15704 KB |
Output is correct |
13 |
Correct |
6 ms |
15708 KB |
Output is correct |
14 |
Correct |
7 ms |
15708 KB |
Output is correct |
15 |
Correct |
6 ms |
15708 KB |
Output is correct |
16 |
Correct |
7 ms |
15708 KB |
Output is correct |
17 |
Correct |
6 ms |
15836 KB |
Output is correct |
18 |
Correct |
7 ms |
15708 KB |
Output is correct |
19 |
Correct |
6 ms |
15708 KB |
Output is correct |
20 |
Correct |
6 ms |
15708 KB |
Output is correct |
21 |
Correct |
6 ms |
15708 KB |
Output is correct |
22 |
Correct |
7 ms |
15760 KB |
Output is correct |
23 |
Correct |
6 ms |
15704 KB |
Output is correct |
24 |
Correct |
6 ms |
15708 KB |
Output is correct |
25 |
Correct |
6 ms |
15708 KB |
Output is correct |
26 |
Correct |
8 ms |
15708 KB |
Output is correct |
27 |
Correct |
6 ms |
15708 KB |
Output is correct |
28 |
Correct |
6 ms |
15644 KB |
Output is correct |
29 |
Correct |
6 ms |
15708 KB |
Output is correct |
30 |
Correct |
6 ms |
15708 KB |
Output is correct |
31 |
Correct |
7 ms |
15708 KB |
Output is correct |
32 |
Correct |
6 ms |
15876 KB |
Output is correct |
33 |
Correct |
6 ms |
15708 KB |
Output is correct |
34 |
Correct |
6 ms |
15708 KB |
Output is correct |
35 |
Correct |
7 ms |
15828 KB |
Output is correct |
36 |
Correct |
10 ms |
15708 KB |
Output is correct |
37 |
Correct |
7 ms |
15708 KB |
Output is correct |
38 |
Correct |
7 ms |
15708 KB |
Output is correct |
39 |
Correct |
8 ms |
15708 KB |
Output is correct |
40 |
Correct |
7 ms |
15708 KB |
Output is correct |
41 |
Correct |
7 ms |
15668 KB |
Output is correct |
42 |
Correct |
6 ms |
15708 KB |
Output is correct |
43 |
Correct |
6 ms |
15872 KB |
Output is correct |
44 |
Correct |
6 ms |
15708 KB |
Output is correct |
45 |
Correct |
6 ms |
15872 KB |
Output is correct |
46 |
Correct |
7 ms |
15708 KB |
Output is correct |
47 |
Correct |
6 ms |
15708 KB |
Output is correct |
48 |
Correct |
7 ms |
15964 KB |
Output is correct |
49 |
Correct |
6 ms |
15708 KB |
Output is correct |
50 |
Correct |
6 ms |
15856 KB |
Output is correct |
51 |
Correct |
7 ms |
15708 KB |
Output is correct |
52 |
Correct |
7 ms |
15708 KB |
Output is correct |
53 |
Correct |
6 ms |
15708 KB |
Output is correct |
54 |
Correct |
7 ms |
15704 KB |
Output is correct |
55 |
Correct |
7 ms |
15708 KB |
Output is correct |
56 |
Correct |
7 ms |
15708 KB |
Output is correct |
57 |
Correct |
9 ms |
15708 KB |
Output is correct |
58 |
Correct |
7 ms |
15708 KB |
Output is correct |
59 |
Correct |
7 ms |
15708 KB |
Output is correct |
60 |
Correct |
6 ms |
15708 KB |
Output is correct |
61 |
Correct |
8 ms |
15708 KB |
Output is correct |
62 |
Correct |
6 ms |
15800 KB |
Output is correct |
63 |
Correct |
6 ms |
15708 KB |
Output is correct |
64 |
Correct |
7 ms |
15708 KB |
Output is correct |
65 |
Correct |
6 ms |
15716 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
81 ms |
44184 KB |
Output is correct |
2 |
Correct |
77 ms |
44052 KB |
Output is correct |
3 |
Correct |
73 ms |
35276 KB |
Output is correct |
4 |
Correct |
85 ms |
39816 KB |
Output is correct |
5 |
Correct |
67 ms |
32848 KB |
Output is correct |
6 |
Correct |
66 ms |
32464 KB |
Output is correct |
7 |
Correct |
67 ms |
30496 KB |
Output is correct |
8 |
Correct |
79 ms |
31540 KB |
Output is correct |
9 |
Correct |
61 ms |
28732 KB |
Output is correct |
10 |
Correct |
63 ms |
30292 KB |
Output is correct |
11 |
Correct |
43 ms |
26716 KB |
Output is correct |
12 |
Correct |
42 ms |
26448 KB |
Output is correct |
13 |
Correct |
39 ms |
26196 KB |
Output is correct |
14 |
Correct |
38 ms |
25940 KB |
Output is correct |
15 |
Correct |
37 ms |
24508 KB |
Output is correct |
16 |
Correct |
33 ms |
24536 KB |
Output is correct |
17 |
Correct |
10 ms |
18660 KB |
Output is correct |
18 |
Correct |
9 ms |
18656 KB |
Output is correct |
19 |
Correct |
9 ms |
18652 KB |
Output is correct |
20 |
Correct |
9 ms |
18736 KB |
Output is correct |
21 |
Correct |
10 ms |
18644 KB |
Output is correct |
22 |
Correct |
10 ms |
18644 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
15704 KB |
Output is correct |
2 |
Correct |
7 ms |
15708 KB |
Output is correct |
3 |
Correct |
6 ms |
15904 KB |
Output is correct |
4 |
Correct |
7 ms |
15964 KB |
Output is correct |
5 |
Correct |
6 ms |
15964 KB |
Output is correct |
6 |
Correct |
7 ms |
15900 KB |
Output is correct |
7 |
Correct |
6 ms |
15964 KB |
Output is correct |
8 |
Correct |
6 ms |
15964 KB |
Output is correct |
9 |
Correct |
6 ms |
15964 KB |
Output is correct |
10 |
Correct |
6 ms |
15708 KB |
Output is correct |
11 |
Correct |
7 ms |
15864 KB |
Output is correct |
12 |
Correct |
7 ms |
15708 KB |
Output is correct |
13 |
Correct |
7 ms |
15708 KB |
Output is correct |
14 |
Correct |
6 ms |
15708 KB |
Output is correct |
15 |
Correct |
6 ms |
15708 KB |
Output is correct |
16 |
Correct |
6 ms |
15708 KB |
Output is correct |
17 |
Correct |
7 ms |
15708 KB |
Output is correct |
18 |
Correct |
7 ms |
15708 KB |
Output is correct |
19 |
Correct |
7 ms |
15704 KB |
Output is correct |
20 |
Correct |
8 ms |
15864 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
24068 KB |
Output is correct |
2 |
Correct |
46 ms |
24144 KB |
Output is correct |
3 |
Correct |
59 ms |
24144 KB |
Output is correct |
4 |
Correct |
47 ms |
24148 KB |
Output is correct |
5 |
Correct |
56 ms |
24296 KB |
Output is correct |
6 |
Correct |
67 ms |
34132 KB |
Output is correct |
7 |
Correct |
61 ms |
30544 KB |
Output is correct |
8 |
Correct |
62 ms |
29012 KB |
Output is correct |
9 |
Correct |
62 ms |
27292 KB |
Output is correct |
10 |
Correct |
47 ms |
24188 KB |
Output is correct |
11 |
Correct |
54 ms |
24240 KB |
Output is correct |
12 |
Correct |
46 ms |
24148 KB |
Output is correct |
13 |
Correct |
49 ms |
24176 KB |
Output is correct |
14 |
Correct |
51 ms |
24148 KB |
Output is correct |
15 |
Correct |
40 ms |
23896 KB |
Output is correct |
16 |
Correct |
28 ms |
22476 KB |
Output is correct |
17 |
Correct |
30 ms |
23364 KB |
Output is correct |
18 |
Correct |
31 ms |
23368 KB |
Output is correct |
19 |
Correct |
34 ms |
23748 KB |
Output is correct |
20 |
Correct |
35 ms |
23636 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
15708 KB |
Output is correct |
2 |
Correct |
7 ms |
15744 KB |
Output is correct |
3 |
Correct |
7 ms |
15960 KB |
Output is correct |
4 |
Correct |
7 ms |
15960 KB |
Output is correct |
5 |
Correct |
7 ms |
15964 KB |
Output is correct |
6 |
Correct |
6 ms |
15964 KB |
Output is correct |
7 |
Correct |
8 ms |
15964 KB |
Output is correct |
8 |
Correct |
7 ms |
15964 KB |
Output is correct |
9 |
Correct |
6 ms |
15964 KB |
Output is correct |
10 |
Correct |
6 ms |
15964 KB |
Output is correct |
11 |
Correct |
6 ms |
15868 KB |
Output is correct |
12 |
Correct |
7 ms |
15960 KB |
Output is correct |
13 |
Correct |
7 ms |
15964 KB |
Output is correct |
14 |
Correct |
7 ms |
15960 KB |
Output is correct |
15 |
Correct |
7 ms |
15960 KB |
Output is correct |
16 |
Correct |
6 ms |
16000 KB |
Output is correct |
17 |
Correct |
7 ms |
15964 KB |
Output is correct |
18 |
Correct |
7 ms |
15964 KB |
Output is correct |
19 |
Correct |
7 ms |
15868 KB |
Output is correct |
20 |
Correct |
6 ms |
15964 KB |
Output is correct |
21 |
Correct |
6 ms |
15964 KB |
Output is correct |
22 |
Correct |
7 ms |
15836 KB |
Output is correct |
23 |
Correct |
7 ms |
16216 KB |
Output is correct |
24 |
Correct |
7 ms |
15964 KB |
Output is correct |
25 |
Correct |
6 ms |
15708 KB |
Output is correct |
26 |
Correct |
6 ms |
15860 KB |
Output is correct |
27 |
Correct |
6 ms |
15812 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
47 ms |
24144 KB |
Output is correct |
2 |
Correct |
53 ms |
24404 KB |
Output is correct |
3 |
Correct |
68 ms |
27440 KB |
Output is correct |
4 |
Correct |
74 ms |
28516 KB |
Output is correct |
5 |
Correct |
65 ms |
28884 KB |
Output is correct |
6 |
Correct |
71 ms |
28724 KB |
Output is correct |
7 |
Correct |
77 ms |
28752 KB |
Output is correct |
8 |
Correct |
83 ms |
28672 KB |
Output is correct |
9 |
Correct |
65 ms |
28724 KB |
Output is correct |
10 |
Correct |
65 ms |
28756 KB |
Output is correct |
11 |
Correct |
65 ms |
28596 KB |
Output is correct |
12 |
Correct |
65 ms |
28936 KB |
Output is correct |
13 |
Correct |
62 ms |
29008 KB |
Output is correct |
14 |
Correct |
69 ms |
32596 KB |
Output is correct |
15 |
Correct |
81 ms |
34284 KB |
Output is correct |
16 |
Correct |
74 ms |
31904 KB |
Output is correct |
17 |
Correct |
76 ms |
34384 KB |
Output is correct |
18 |
Correct |
91 ms |
32336 KB |
Output is correct |
19 |
Correct |
70 ms |
28496 KB |
Output is correct |
20 |
Correct |
70 ms |
28496 KB |
Output is correct |
21 |
Correct |
77 ms |
28416 KB |
Output is correct |
22 |
Correct |
61 ms |
28248 KB |
Output is correct |
23 |
Correct |
55 ms |
27920 KB |
Output is correct |
24 |
Correct |
53 ms |
27216 KB |
Output is correct |
25 |
Correct |
54 ms |
27264 KB |
Output is correct |
26 |
Correct |
58 ms |
27856 KB |
Output is correct |
27 |
Correct |
62 ms |
27932 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
15708 KB |
Output is correct |
2 |
Correct |
6 ms |
15680 KB |
Output is correct |
3 |
Correct |
6 ms |
15704 KB |
Output is correct |
4 |
Correct |
6 ms |
15656 KB |
Output is correct |
5 |
Correct |
6 ms |
15740 KB |
Output is correct |
6 |
Correct |
6 ms |
15708 KB |
Output is correct |
7 |
Correct |
6 ms |
15708 KB |
Output is correct |
8 |
Correct |
6 ms |
15708 KB |
Output is correct |
9 |
Correct |
6 ms |
15720 KB |
Output is correct |
10 |
Correct |
6 ms |
15708 KB |
Output is correct |
11 |
Correct |
6 ms |
15708 KB |
Output is correct |
12 |
Correct |
6 ms |
15704 KB |
Output is correct |
13 |
Correct |
6 ms |
15708 KB |
Output is correct |
14 |
Correct |
7 ms |
15708 KB |
Output is correct |
15 |
Correct |
6 ms |
15708 KB |
Output is correct |
16 |
Correct |
7 ms |
15708 KB |
Output is correct |
17 |
Correct |
6 ms |
15836 KB |
Output is correct |
18 |
Correct |
7 ms |
15708 KB |
Output is correct |
19 |
Correct |
6 ms |
15708 KB |
Output is correct |
20 |
Correct |
6 ms |
15708 KB |
Output is correct |
21 |
Correct |
6 ms |
15708 KB |
Output is correct |
22 |
Correct |
7 ms |
15760 KB |
Output is correct |
23 |
Correct |
6 ms |
15704 KB |
Output is correct |
24 |
Correct |
6 ms |
15708 KB |
Output is correct |
25 |
Correct |
6 ms |
15708 KB |
Output is correct |
26 |
Correct |
8 ms |
15708 KB |
Output is correct |
27 |
Correct |
6 ms |
15708 KB |
Output is correct |
28 |
Correct |
6 ms |
15644 KB |
Output is correct |
29 |
Correct |
6 ms |
15708 KB |
Output is correct |
30 |
Correct |
6 ms |
15708 KB |
Output is correct |
31 |
Correct |
7 ms |
15708 KB |
Output is correct |
32 |
Correct |
6 ms |
15876 KB |
Output is correct |
33 |
Correct |
6 ms |
15708 KB |
Output is correct |
34 |
Correct |
6 ms |
15708 KB |
Output is correct |
35 |
Correct |
7 ms |
15828 KB |
Output is correct |
36 |
Correct |
10 ms |
15708 KB |
Output is correct |
37 |
Correct |
7 ms |
15708 KB |
Output is correct |
38 |
Correct |
7 ms |
15708 KB |
Output is correct |
39 |
Correct |
8 ms |
15708 KB |
Output is correct |
40 |
Correct |
7 ms |
15708 KB |
Output is correct |
41 |
Correct |
7 ms |
15668 KB |
Output is correct |
42 |
Correct |
6 ms |
15708 KB |
Output is correct |
43 |
Correct |
6 ms |
15872 KB |
Output is correct |
44 |
Correct |
6 ms |
15708 KB |
Output is correct |
45 |
Correct |
6 ms |
15872 KB |
Output is correct |
46 |
Correct |
7 ms |
15708 KB |
Output is correct |
47 |
Correct |
6 ms |
15708 KB |
Output is correct |
48 |
Correct |
7 ms |
15964 KB |
Output is correct |
49 |
Correct |
6 ms |
15708 KB |
Output is correct |
50 |
Correct |
6 ms |
15856 KB |
Output is correct |
51 |
Correct |
7 ms |
15708 KB |
Output is correct |
52 |
Correct |
7 ms |
15708 KB |
Output is correct |
53 |
Correct |
6 ms |
15708 KB |
Output is correct |
54 |
Correct |
7 ms |
15704 KB |
Output is correct |
55 |
Correct |
7 ms |
15708 KB |
Output is correct |
56 |
Correct |
7 ms |
15708 KB |
Output is correct |
57 |
Correct |
9 ms |
15708 KB |
Output is correct |
58 |
Correct |
7 ms |
15708 KB |
Output is correct |
59 |
Correct |
7 ms |
15708 KB |
Output is correct |
60 |
Correct |
6 ms |
15708 KB |
Output is correct |
61 |
Correct |
8 ms |
15708 KB |
Output is correct |
62 |
Correct |
6 ms |
15800 KB |
Output is correct |
63 |
Correct |
6 ms |
15708 KB |
Output is correct |
64 |
Correct |
7 ms |
15708 KB |
Output is correct |
65 |
Correct |
6 ms |
15716 KB |
Output is correct |
66 |
Correct |
6 ms |
15708 KB |
Output is correct |
67 |
Correct |
7 ms |
15708 KB |
Output is correct |
68 |
Correct |
7 ms |
15964 KB |
Output is correct |
69 |
Correct |
6 ms |
15996 KB |
Output is correct |
70 |
Correct |
6 ms |
16092 KB |
Output is correct |
71 |
Correct |
7 ms |
15964 KB |
Output is correct |
72 |
Correct |
6 ms |
15996 KB |
Output is correct |
73 |
Correct |
6 ms |
15964 KB |
Output is correct |
74 |
Correct |
7 ms |
15840 KB |
Output is correct |
75 |
Correct |
6 ms |
15960 KB |
Output is correct |
76 |
Correct |
7 ms |
15704 KB |
Output is correct |
77 |
Correct |
7 ms |
15964 KB |
Output is correct |
78 |
Correct |
7 ms |
15960 KB |
Output is correct |
79 |
Correct |
8 ms |
15912 KB |
Output is correct |
80 |
Correct |
7 ms |
15800 KB |
Output is correct |
81 |
Correct |
7 ms |
15964 KB |
Output is correct |
82 |
Correct |
7 ms |
15964 KB |
Output is correct |
83 |
Correct |
7 ms |
15944 KB |
Output is correct |
84 |
Correct |
7 ms |
15964 KB |
Output is correct |
85 |
Correct |
7 ms |
15964 KB |
Output is correct |
86 |
Correct |
6 ms |
15964 KB |
Output is correct |
87 |
Correct |
7 ms |
15960 KB |
Output is correct |
88 |
Correct |
6 ms |
15964 KB |
Output is correct |
89 |
Correct |
6 ms |
15964 KB |
Output is correct |
90 |
Correct |
6 ms |
15964 KB |
Output is correct |
91 |
Correct |
7 ms |
15964 KB |
Output is correct |
92 |
Correct |
7 ms |
15964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
7 ms |
15708 KB |
Output is correct |
2 |
Correct |
6 ms |
15680 KB |
Output is correct |
3 |
Correct |
6 ms |
15704 KB |
Output is correct |
4 |
Correct |
6 ms |
15656 KB |
Output is correct |
5 |
Correct |
6 ms |
15740 KB |
Output is correct |
6 |
Correct |
6 ms |
15708 KB |
Output is correct |
7 |
Correct |
6 ms |
15708 KB |
Output is correct |
8 |
Correct |
6 ms |
15708 KB |
Output is correct |
9 |
Correct |
6 ms |
15720 KB |
Output is correct |
10 |
Correct |
6 ms |
15708 KB |
Output is correct |
11 |
Correct |
6 ms |
15708 KB |
Output is correct |
12 |
Correct |
6 ms |
15704 KB |
Output is correct |
13 |
Correct |
6 ms |
15708 KB |
Output is correct |
14 |
Correct |
7 ms |
15708 KB |
Output is correct |
15 |
Correct |
6 ms |
15708 KB |
Output is correct |
16 |
Correct |
7 ms |
15708 KB |
Output is correct |
17 |
Correct |
6 ms |
15836 KB |
Output is correct |
18 |
Correct |
7 ms |
15708 KB |
Output is correct |
19 |
Correct |
6 ms |
15708 KB |
Output is correct |
20 |
Correct |
6 ms |
15708 KB |
Output is correct |
21 |
Correct |
6 ms |
15708 KB |
Output is correct |
22 |
Correct |
7 ms |
15760 KB |
Output is correct |
23 |
Correct |
6 ms |
15704 KB |
Output is correct |
24 |
Correct |
6 ms |
15708 KB |
Output is correct |
25 |
Correct |
6 ms |
15708 KB |
Output is correct |
26 |
Correct |
8 ms |
15708 KB |
Output is correct |
27 |
Correct |
6 ms |
15708 KB |
Output is correct |
28 |
Correct |
6 ms |
15644 KB |
Output is correct |
29 |
Correct |
6 ms |
15708 KB |
Output is correct |
30 |
Correct |
6 ms |
15708 KB |
Output is correct |
31 |
Correct |
7 ms |
15708 KB |
Output is correct |
32 |
Correct |
6 ms |
15876 KB |
Output is correct |
33 |
Correct |
6 ms |
15708 KB |
Output is correct |
34 |
Correct |
6 ms |
15708 KB |
Output is correct |
35 |
Correct |
7 ms |
15828 KB |
Output is correct |
36 |
Correct |
10 ms |
15708 KB |
Output is correct |
37 |
Correct |
7 ms |
15708 KB |
Output is correct |
38 |
Correct |
7 ms |
15708 KB |
Output is correct |
39 |
Correct |
8 ms |
15708 KB |
Output is correct |
40 |
Correct |
7 ms |
15708 KB |
Output is correct |
41 |
Correct |
7 ms |
15668 KB |
Output is correct |
42 |
Correct |
6 ms |
15708 KB |
Output is correct |
43 |
Correct |
6 ms |
15872 KB |
Output is correct |
44 |
Correct |
6 ms |
15708 KB |
Output is correct |
45 |
Correct |
6 ms |
15872 KB |
Output is correct |
46 |
Correct |
7 ms |
15708 KB |
Output is correct |
47 |
Correct |
6 ms |
15708 KB |
Output is correct |
48 |
Correct |
7 ms |
15964 KB |
Output is correct |
49 |
Correct |
6 ms |
15708 KB |
Output is correct |
50 |
Correct |
6 ms |
15856 KB |
Output is correct |
51 |
Correct |
7 ms |
15708 KB |
Output is correct |
52 |
Correct |
7 ms |
15708 KB |
Output is correct |
53 |
Correct |
6 ms |
15708 KB |
Output is correct |
54 |
Correct |
7 ms |
15704 KB |
Output is correct |
55 |
Correct |
7 ms |
15708 KB |
Output is correct |
56 |
Correct |
7 ms |
15708 KB |
Output is correct |
57 |
Correct |
9 ms |
15708 KB |
Output is correct |
58 |
Correct |
7 ms |
15708 KB |
Output is correct |
59 |
Correct |
7 ms |
15708 KB |
Output is correct |
60 |
Correct |
6 ms |
15708 KB |
Output is correct |
61 |
Correct |
8 ms |
15708 KB |
Output is correct |
62 |
Correct |
6 ms |
15800 KB |
Output is correct |
63 |
Correct |
6 ms |
15708 KB |
Output is correct |
64 |
Correct |
7 ms |
15708 KB |
Output is correct |
65 |
Correct |
6 ms |
15716 KB |
Output is correct |
66 |
Correct |
81 ms |
44184 KB |
Output is correct |
67 |
Correct |
77 ms |
44052 KB |
Output is correct |
68 |
Correct |
73 ms |
35276 KB |
Output is correct |
69 |
Correct |
85 ms |
39816 KB |
Output is correct |
70 |
Correct |
67 ms |
32848 KB |
Output is correct |
71 |
Correct |
66 ms |
32464 KB |
Output is correct |
72 |
Correct |
67 ms |
30496 KB |
Output is correct |
73 |
Correct |
79 ms |
31540 KB |
Output is correct |
74 |
Correct |
61 ms |
28732 KB |
Output is correct |
75 |
Correct |
63 ms |
30292 KB |
Output is correct |
76 |
Correct |
43 ms |
26716 KB |
Output is correct |
77 |
Correct |
42 ms |
26448 KB |
Output is correct |
78 |
Correct |
39 ms |
26196 KB |
Output is correct |
79 |
Correct |
38 ms |
25940 KB |
Output is correct |
80 |
Correct |
37 ms |
24508 KB |
Output is correct |
81 |
Correct |
33 ms |
24536 KB |
Output is correct |
82 |
Correct |
10 ms |
18660 KB |
Output is correct |
83 |
Correct |
9 ms |
18656 KB |
Output is correct |
84 |
Correct |
9 ms |
18652 KB |
Output is correct |
85 |
Correct |
9 ms |
18736 KB |
Output is correct |
86 |
Correct |
10 ms |
18644 KB |
Output is correct |
87 |
Correct |
10 ms |
18644 KB |
Output is correct |
88 |
Correct |
7 ms |
15704 KB |
Output is correct |
89 |
Correct |
7 ms |
15708 KB |
Output is correct |
90 |
Correct |
6 ms |
15904 KB |
Output is correct |
91 |
Correct |
7 ms |
15964 KB |
Output is correct |
92 |
Correct |
6 ms |
15964 KB |
Output is correct |
93 |
Correct |
7 ms |
15900 KB |
Output is correct |
94 |
Correct |
6 ms |
15964 KB |
Output is correct |
95 |
Correct |
6 ms |
15964 KB |
Output is correct |
96 |
Correct |
6 ms |
15964 KB |
Output is correct |
97 |
Correct |
6 ms |
15708 KB |
Output is correct |
98 |
Correct |
7 ms |
15864 KB |
Output is correct |
99 |
Correct |
7 ms |
15708 KB |
Output is correct |
100 |
Correct |
7 ms |
15708 KB |
Output is correct |
101 |
Correct |
6 ms |
15708 KB |
Output is correct |
102 |
Correct |
6 ms |
15708 KB |
Output is correct |
103 |
Correct |
6 ms |
15708 KB |
Output is correct |
104 |
Correct |
7 ms |
15708 KB |
Output is correct |
105 |
Correct |
7 ms |
15708 KB |
Output is correct |
106 |
Correct |
7 ms |
15704 KB |
Output is correct |
107 |
Correct |
8 ms |
15864 KB |
Output is correct |
108 |
Correct |
52 ms |
24068 KB |
Output is correct |
109 |
Correct |
46 ms |
24144 KB |
Output is correct |
110 |
Correct |
59 ms |
24144 KB |
Output is correct |
111 |
Correct |
47 ms |
24148 KB |
Output is correct |
112 |
Correct |
56 ms |
24296 KB |
Output is correct |
113 |
Correct |
67 ms |
34132 KB |
Output is correct |
114 |
Correct |
61 ms |
30544 KB |
Output is correct |
115 |
Correct |
62 ms |
29012 KB |
Output is correct |
116 |
Correct |
62 ms |
27292 KB |
Output is correct |
117 |
Correct |
47 ms |
24188 KB |
Output is correct |
118 |
Correct |
54 ms |
24240 KB |
Output is correct |
119 |
Correct |
46 ms |
24148 KB |
Output is correct |
120 |
Correct |
49 ms |
24176 KB |
Output is correct |
121 |
Correct |
51 ms |
24148 KB |
Output is correct |
122 |
Correct |
40 ms |
23896 KB |
Output is correct |
123 |
Correct |
28 ms |
22476 KB |
Output is correct |
124 |
Correct |
30 ms |
23364 KB |
Output is correct |
125 |
Correct |
31 ms |
23368 KB |
Output is correct |
126 |
Correct |
34 ms |
23748 KB |
Output is correct |
127 |
Correct |
35 ms |
23636 KB |
Output is correct |
128 |
Correct |
7 ms |
15708 KB |
Output is correct |
129 |
Correct |
7 ms |
15744 KB |
Output is correct |
130 |
Correct |
7 ms |
15960 KB |
Output is correct |
131 |
Correct |
7 ms |
15960 KB |
Output is correct |
132 |
Correct |
7 ms |
15964 KB |
Output is correct |
133 |
Correct |
6 ms |
15964 KB |
Output is correct |
134 |
Correct |
8 ms |
15964 KB |
Output is correct |
135 |
Correct |
7 ms |
15964 KB |
Output is correct |
136 |
Correct |
6 ms |
15964 KB |
Output is correct |
137 |
Correct |
6 ms |
15964 KB |
Output is correct |
138 |
Correct |
6 ms |
15868 KB |
Output is correct |
139 |
Correct |
7 ms |
15960 KB |
Output is correct |
140 |
Correct |
7 ms |
15964 KB |
Output is correct |
141 |
Correct |
7 ms |
15960 KB |
Output is correct |
142 |
Correct |
7 ms |
15960 KB |
Output is correct |
143 |
Correct |
6 ms |
16000 KB |
Output is correct |
144 |
Correct |
7 ms |
15964 KB |
Output is correct |
145 |
Correct |
7 ms |
15964 KB |
Output is correct |
146 |
Correct |
7 ms |
15868 KB |
Output is correct |
147 |
Correct |
6 ms |
15964 KB |
Output is correct |
148 |
Correct |
6 ms |
15964 KB |
Output is correct |
149 |
Correct |
7 ms |
15836 KB |
Output is correct |
150 |
Correct |
7 ms |
16216 KB |
Output is correct |
151 |
Correct |
7 ms |
15964 KB |
Output is correct |
152 |
Correct |
6 ms |
15708 KB |
Output is correct |
153 |
Correct |
6 ms |
15860 KB |
Output is correct |
154 |
Correct |
6 ms |
15812 KB |
Output is correct |
155 |
Correct |
47 ms |
24144 KB |
Output is correct |
156 |
Correct |
53 ms |
24404 KB |
Output is correct |
157 |
Correct |
68 ms |
27440 KB |
Output is correct |
158 |
Correct |
74 ms |
28516 KB |
Output is correct |
159 |
Correct |
65 ms |
28884 KB |
Output is correct |
160 |
Correct |
71 ms |
28724 KB |
Output is correct |
161 |
Correct |
77 ms |
28752 KB |
Output is correct |
162 |
Correct |
83 ms |
28672 KB |
Output is correct |
163 |
Correct |
65 ms |
28724 KB |
Output is correct |
164 |
Correct |
65 ms |
28756 KB |
Output is correct |
165 |
Correct |
65 ms |
28596 KB |
Output is correct |
166 |
Correct |
65 ms |
28936 KB |
Output is correct |
167 |
Correct |
62 ms |
29008 KB |
Output is correct |
168 |
Correct |
69 ms |
32596 KB |
Output is correct |
169 |
Correct |
81 ms |
34284 KB |
Output is correct |
170 |
Correct |
74 ms |
31904 KB |
Output is correct |
171 |
Correct |
76 ms |
34384 KB |
Output is correct |
172 |
Correct |
91 ms |
32336 KB |
Output is correct |
173 |
Correct |
70 ms |
28496 KB |
Output is correct |
174 |
Correct |
70 ms |
28496 KB |
Output is correct |
175 |
Correct |
77 ms |
28416 KB |
Output is correct |
176 |
Correct |
61 ms |
28248 KB |
Output is correct |
177 |
Correct |
55 ms |
27920 KB |
Output is correct |
178 |
Correct |
53 ms |
27216 KB |
Output is correct |
179 |
Correct |
54 ms |
27264 KB |
Output is correct |
180 |
Correct |
58 ms |
27856 KB |
Output is correct |
181 |
Correct |
62 ms |
27932 KB |
Output is correct |
182 |
Correct |
6 ms |
15708 KB |
Output is correct |
183 |
Correct |
7 ms |
15708 KB |
Output is correct |
184 |
Correct |
7 ms |
15964 KB |
Output is correct |
185 |
Correct |
6 ms |
15996 KB |
Output is correct |
186 |
Correct |
6 ms |
16092 KB |
Output is correct |
187 |
Correct |
7 ms |
15964 KB |
Output is correct |
188 |
Correct |
6 ms |
15996 KB |
Output is correct |
189 |
Correct |
6 ms |
15964 KB |
Output is correct |
190 |
Correct |
7 ms |
15840 KB |
Output is correct |
191 |
Correct |
6 ms |
15960 KB |
Output is correct |
192 |
Correct |
7 ms |
15704 KB |
Output is correct |
193 |
Correct |
7 ms |
15964 KB |
Output is correct |
194 |
Correct |
7 ms |
15960 KB |
Output is correct |
195 |
Correct |
8 ms |
15912 KB |
Output is correct |
196 |
Correct |
7 ms |
15800 KB |
Output is correct |
197 |
Correct |
7 ms |
15964 KB |
Output is correct |
198 |
Correct |
7 ms |
15964 KB |
Output is correct |
199 |
Correct |
7 ms |
15944 KB |
Output is correct |
200 |
Correct |
7 ms |
15964 KB |
Output is correct |
201 |
Correct |
7 ms |
15964 KB |
Output is correct |
202 |
Correct |
6 ms |
15964 KB |
Output is correct |
203 |
Correct |
7 ms |
15960 KB |
Output is correct |
204 |
Correct |
6 ms |
15964 KB |
Output is correct |
205 |
Correct |
6 ms |
15964 KB |
Output is correct |
206 |
Correct |
6 ms |
15964 KB |
Output is correct |
207 |
Correct |
7 ms |
15964 KB |
Output is correct |
208 |
Correct |
7 ms |
15964 KB |
Output is correct |
209 |
Correct |
12 ms |
18648 KB |
Output is correct |
210 |
Correct |
34 ms |
22224 KB |
Output is correct |
211 |
Correct |
70 ms |
31208 KB |
Output is correct |
212 |
Correct |
90 ms |
38856 KB |
Output is correct |
213 |
Correct |
112 ms |
44632 KB |
Output is correct |
214 |
Incorrect |
36 ms |
29012 KB |
Output isn't correct |
215 |
Halted |
0 ms |
0 KB |
- |