#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,popcnt,sse4,abm")
#include<bits/stdc++.h>
#define int long long
#define quick ios::sync_with_stdio(0);cin.tie(0);
#define rep(x,a,b) for(int x=a;x<=b;x++)
#define repd(x,a,b) for(int x=a;x>=b;x--)
#define lowbit(x) (x&-x)
#define sz(x) (int)(x.size())
#define F first
#define S second
#define all(x) x.begin(),x.end()
#define mp make_pair
#define eb emplace_back
using namespace std;
typedef pair<int,int> pii;
void debug(){
cout<<"\n";
}
template <class T,class ... U >
void debug(T a, U ... b){
cout<<a<<" ",debug(b...);
}
const int N=2e5+7;
const int INF=1e18;
vector<int> v[N];
vector<int> v2[N];
vector<int> v3[N];
int in[N];
int low[N];
int t=1;
int num;
int sz[N];
bool cut[N];
stack<int> st;
void add_edge(int a,int b){
v2[a].eb(b);
v2[b].eb(a);
//debug(a,"<->",b);
}
void dfs(int x,int p=-1){
in[x]=low[x]=t++;
st.push(x);
bool ct=false;
for(int i:v[x]){
if(i==p) continue;
if(in[i]) low[x]=min(low[x],in[i]);
else{
dfs(i,x);
if(in[x]<=low[i]) ct=true;
low[x]=min(low[x],low[i]);
}
}
if(p==-1){
ct=(sz(v[x])>=2);
}
if(p==-1||in[p]<=low[x]){
++num;
while(sz(st)){
int x2=st.top();
st.pop();
add_edge(num,x2);
if(x2==x) break;
}
if(p!=-1)add_edge(num,p);
cut[num]=ct;
}
}
pii e[N];
int sum;
int n;
int Sz[N];
int Sz2[N];
bool vis[N];
int fa[N];
int dep[N];
void dfs_sz(int x,int p=-1,int d=0){
dep[x]=d;
Sz[x]=sz[x];
for(int i:v2[x]){
if(i!=p){
dfs_sz(i,x,d+1);
Sz[x]+=Sz[i];
}
}
sum=Sz[x];
}
int C2(int x){
if(x<2) return 0;
return x*(x-1);
}
int C3(int x){
if(x<3) return 0;
return x*(x-1)*(x-2);
}
int ans=0;
void solve(int x,int p=-1){
fa[x]=p;
vis[x]=true;
for(int i:v2[x]){
if(!vis[i]) solve(i,x);
}
if(x<=n){
int s=0;
// 1
for(int i:v2[x]){
int S2;
if(i==p){
S2=sum-Sz[x];
}
else{
S2=Sz[i];
}
ans+=s*S2*2;
s+=S2;
//ans+=C2(S2);
}
/*for(int i:v2[x]){
for(int j:v2[i]){
if(j==x) continue;
int S2;
if(dep[j]<dep[i]){
S2=sum-Sz[j];
}
else{
}
}
}*/
}
else{
int l=sz(v2[x]);
int s=0;
for(int i:v2[x]){
int S2;
if(i==p){
S2=sum-Sz[x];
}
else{
S2=Sz[i];
}
ans+=(l-2)*s*S2*2;
s+=S2;
}
}
}
signed main(){
quick
int m;
cin>>n>>m;
rep(i,1,m){
cin>>e[i].F>>e[i].S;
v[e[i].F].eb(e[i].S);
v[e[i].S].eb(e[i].F);
}
num=n;
rep(i,1,n) sz[i]=1;
rep(i,1,n){
if(!in[i]) dfs(i);
}
ans=0;
rep(i,1,num){
if(!vis[i]){
dfs_sz(i);
solve(i);
}
}
//rep(i,1,n) cout<<Sz[i]<<" \n"[i==n];
cout<<ans<<"\n";
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
14420 KB |
Output is correct |
2 |
Correct |
9 ms |
14352 KB |
Output is correct |
3 |
Correct |
8 ms |
14420 KB |
Output is correct |
4 |
Correct |
9 ms |
14468 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
9 ms |
14468 KB |
Output is correct |
7 |
Correct |
8 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14392 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14420 KB |
Output is correct |
11 |
Correct |
9 ms |
14420 KB |
Output is correct |
12 |
Correct |
8 ms |
14420 KB |
Output is correct |
13 |
Correct |
9 ms |
14468 KB |
Output is correct |
14 |
Correct |
8 ms |
14472 KB |
Output is correct |
15 |
Correct |
8 ms |
14424 KB |
Output is correct |
16 |
Correct |
8 ms |
14420 KB |
Output is correct |
17 |
Correct |
9 ms |
14420 KB |
Output is correct |
18 |
Correct |
8 ms |
14364 KB |
Output is correct |
19 |
Correct |
9 ms |
14420 KB |
Output is correct |
20 |
Correct |
8 ms |
14388 KB |
Output is correct |
21 |
Correct |
8 ms |
14436 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
9 ms |
14420 KB |
Output is correct |
26 |
Correct |
9 ms |
14420 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14420 KB |
Output is correct |
29 |
Correct |
8 ms |
14420 KB |
Output is correct |
30 |
Correct |
8 ms |
14420 KB |
Output is correct |
31 |
Correct |
10 ms |
14424 KB |
Output is correct |
32 |
Correct |
9 ms |
14420 KB |
Output is correct |
33 |
Correct |
8 ms |
14420 KB |
Output is correct |
34 |
Correct |
9 ms |
14380 KB |
Output is correct |
35 |
Correct |
8 ms |
14472 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
14420 KB |
Output is correct |
2 |
Correct |
9 ms |
14352 KB |
Output is correct |
3 |
Correct |
8 ms |
14420 KB |
Output is correct |
4 |
Correct |
9 ms |
14468 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
9 ms |
14468 KB |
Output is correct |
7 |
Correct |
8 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14392 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14420 KB |
Output is correct |
11 |
Correct |
9 ms |
14420 KB |
Output is correct |
12 |
Correct |
8 ms |
14420 KB |
Output is correct |
13 |
Correct |
9 ms |
14468 KB |
Output is correct |
14 |
Correct |
8 ms |
14472 KB |
Output is correct |
15 |
Correct |
8 ms |
14424 KB |
Output is correct |
16 |
Correct |
8 ms |
14420 KB |
Output is correct |
17 |
Correct |
9 ms |
14420 KB |
Output is correct |
18 |
Correct |
8 ms |
14364 KB |
Output is correct |
19 |
Correct |
9 ms |
14420 KB |
Output is correct |
20 |
Correct |
8 ms |
14388 KB |
Output is correct |
21 |
Correct |
8 ms |
14436 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
9 ms |
14420 KB |
Output is correct |
26 |
Correct |
9 ms |
14420 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14420 KB |
Output is correct |
29 |
Correct |
8 ms |
14420 KB |
Output is correct |
30 |
Correct |
8 ms |
14420 KB |
Output is correct |
31 |
Correct |
10 ms |
14424 KB |
Output is correct |
32 |
Correct |
9 ms |
14420 KB |
Output is correct |
33 |
Correct |
8 ms |
14420 KB |
Output is correct |
34 |
Correct |
9 ms |
14380 KB |
Output is correct |
35 |
Correct |
8 ms |
14472 KB |
Output is correct |
36 |
Correct |
8 ms |
14436 KB |
Output is correct |
37 |
Correct |
8 ms |
14420 KB |
Output is correct |
38 |
Correct |
8 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14420 KB |
Output is correct |
40 |
Correct |
8 ms |
14488 KB |
Output is correct |
41 |
Correct |
8 ms |
14420 KB |
Output is correct |
42 |
Correct |
8 ms |
14420 KB |
Output is correct |
43 |
Correct |
8 ms |
14488 KB |
Output is correct |
44 |
Correct |
8 ms |
14420 KB |
Output is correct |
45 |
Correct |
10 ms |
14476 KB |
Output is correct |
46 |
Correct |
9 ms |
14420 KB |
Output is correct |
47 |
Correct |
9 ms |
14408 KB |
Output is correct |
48 |
Correct |
9 ms |
14420 KB |
Output is correct |
49 |
Correct |
8 ms |
14420 KB |
Output is correct |
50 |
Correct |
9 ms |
14420 KB |
Output is correct |
51 |
Correct |
8 ms |
14420 KB |
Output is correct |
52 |
Correct |
8 ms |
14488 KB |
Output is correct |
53 |
Correct |
8 ms |
14420 KB |
Output is correct |
54 |
Correct |
8 ms |
14420 KB |
Output is correct |
55 |
Correct |
9 ms |
14420 KB |
Output is correct |
56 |
Correct |
8 ms |
14420 KB |
Output is correct |
57 |
Correct |
8 ms |
14392 KB |
Output is correct |
58 |
Correct |
8 ms |
14420 KB |
Output is correct |
59 |
Correct |
9 ms |
14488 KB |
Output is correct |
60 |
Correct |
8 ms |
14420 KB |
Output is correct |
61 |
Correct |
8 ms |
14420 KB |
Output is correct |
62 |
Correct |
9 ms |
14412 KB |
Output is correct |
63 |
Correct |
9 ms |
14484 KB |
Output is correct |
64 |
Correct |
8 ms |
14420 KB |
Output is correct |
65 |
Correct |
8 ms |
14420 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
82 ms |
40384 KB |
Output is correct |
2 |
Correct |
83 ms |
41628 KB |
Output is correct |
3 |
Correct |
89 ms |
38004 KB |
Output is correct |
4 |
Correct |
87 ms |
39668 KB |
Output is correct |
5 |
Correct |
92 ms |
34920 KB |
Output is correct |
6 |
Correct |
104 ms |
36984 KB |
Output is correct |
7 |
Correct |
98 ms |
35068 KB |
Output is correct |
8 |
Correct |
98 ms |
35588 KB |
Output is correct |
9 |
Correct |
90 ms |
33700 KB |
Output is correct |
10 |
Correct |
89 ms |
33868 KB |
Output is correct |
11 |
Correct |
74 ms |
32360 KB |
Output is correct |
12 |
Correct |
88 ms |
32204 KB |
Output is correct |
13 |
Correct |
82 ms |
32308 KB |
Output is correct |
14 |
Correct |
73 ms |
32276 KB |
Output is correct |
15 |
Correct |
69 ms |
31740 KB |
Output is correct |
16 |
Correct |
62 ms |
31632 KB |
Output is correct |
17 |
Correct |
23 ms |
27988 KB |
Output is correct |
18 |
Correct |
25 ms |
27948 KB |
Output is correct |
19 |
Correct |
25 ms |
27984 KB |
Output is correct |
20 |
Correct |
23 ms |
28072 KB |
Output is correct |
21 |
Correct |
23 ms |
27992 KB |
Output is correct |
22 |
Correct |
24 ms |
27956 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
14676 KB |
Output is correct |
2 |
Correct |
8 ms |
14756 KB |
Output is correct |
3 |
Correct |
8 ms |
14588 KB |
Output is correct |
4 |
Correct |
10 ms |
14768 KB |
Output is correct |
5 |
Correct |
9 ms |
14732 KB |
Output is correct |
6 |
Correct |
10 ms |
14676 KB |
Output is correct |
7 |
Correct |
8 ms |
14676 KB |
Output is correct |
8 |
Correct |
9 ms |
14700 KB |
Output is correct |
9 |
Correct |
9 ms |
14676 KB |
Output is correct |
10 |
Correct |
9 ms |
14548 KB |
Output is correct |
11 |
Correct |
11 ms |
14548 KB |
Output is correct |
12 |
Correct |
9 ms |
14548 KB |
Output is correct |
13 |
Correct |
9 ms |
14548 KB |
Output is correct |
14 |
Correct |
10 ms |
14548 KB |
Output is correct |
15 |
Correct |
9 ms |
14656 KB |
Output is correct |
16 |
Correct |
9 ms |
14548 KB |
Output is correct |
17 |
Correct |
9 ms |
14676 KB |
Output is correct |
18 |
Correct |
10 ms |
14584 KB |
Output is correct |
19 |
Correct |
9 ms |
14676 KB |
Output is correct |
20 |
Correct |
9 ms |
14676 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
116 ms |
33856 KB |
Output is correct |
2 |
Correct |
102 ms |
33948 KB |
Output is correct |
3 |
Correct |
100 ms |
33928 KB |
Output is correct |
4 |
Correct |
111 ms |
33952 KB |
Output is correct |
5 |
Correct |
121 ms |
33896 KB |
Output is correct |
6 |
Correct |
130 ms |
41260 KB |
Output is correct |
7 |
Correct |
140 ms |
39116 KB |
Output is correct |
8 |
Correct |
141 ms |
37728 KB |
Output is correct |
9 |
Correct |
135 ms |
36340 KB |
Output is correct |
10 |
Correct |
116 ms |
33916 KB |
Output is correct |
11 |
Correct |
113 ms |
33892 KB |
Output is correct |
12 |
Correct |
114 ms |
34060 KB |
Output is correct |
13 |
Correct |
105 ms |
33868 KB |
Output is correct |
14 |
Correct |
91 ms |
33432 KB |
Output is correct |
15 |
Correct |
99 ms |
32824 KB |
Output is correct |
16 |
Correct |
64 ms |
31232 KB |
Output is correct |
17 |
Correct |
89 ms |
34368 KB |
Output is correct |
18 |
Correct |
73 ms |
34288 KB |
Output is correct |
19 |
Correct |
75 ms |
34552 KB |
Output is correct |
20 |
Correct |
70 ms |
34236 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
9 ms |
14560 KB |
Output is correct |
2 |
Correct |
11 ms |
14584 KB |
Output is correct |
3 |
Correct |
9 ms |
14548 KB |
Output is correct |
4 |
Correct |
9 ms |
14548 KB |
Output is correct |
5 |
Correct |
10 ms |
14548 KB |
Output is correct |
6 |
Correct |
9 ms |
14628 KB |
Output is correct |
7 |
Correct |
10 ms |
14548 KB |
Output is correct |
8 |
Correct |
9 ms |
14548 KB |
Output is correct |
9 |
Correct |
8 ms |
14548 KB |
Output is correct |
10 |
Correct |
9 ms |
14548 KB |
Output is correct |
11 |
Correct |
9 ms |
14548 KB |
Output is correct |
12 |
Correct |
9 ms |
14676 KB |
Output is correct |
13 |
Correct |
10 ms |
14660 KB |
Output is correct |
14 |
Correct |
10 ms |
14636 KB |
Output is correct |
15 |
Correct |
9 ms |
14696 KB |
Output is correct |
16 |
Correct |
9 ms |
14656 KB |
Output is correct |
17 |
Correct |
9 ms |
14548 KB |
Output is correct |
18 |
Correct |
10 ms |
14676 KB |
Output is correct |
19 |
Correct |
9 ms |
14548 KB |
Output is correct |
20 |
Correct |
9 ms |
14548 KB |
Output is correct |
21 |
Correct |
9 ms |
14660 KB |
Output is correct |
22 |
Correct |
8 ms |
14608 KB |
Output is correct |
23 |
Correct |
8 ms |
14656 KB |
Output is correct |
24 |
Correct |
9 ms |
14664 KB |
Output is correct |
25 |
Correct |
9 ms |
14548 KB |
Output is correct |
26 |
Correct |
8 ms |
14548 KB |
Output is correct |
27 |
Correct |
9 ms |
14492 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
100 ms |
33896 KB |
Output is correct |
2 |
Correct |
115 ms |
33680 KB |
Output is correct |
3 |
Correct |
102 ms |
33288 KB |
Output is correct |
4 |
Correct |
113 ms |
32144 KB |
Output is correct |
5 |
Correct |
113 ms |
30564 KB |
Output is correct |
6 |
Correct |
100 ms |
29780 KB |
Output is correct |
7 |
Correct |
99 ms |
29496 KB |
Output is correct |
8 |
Correct |
88 ms |
29040 KB |
Output is correct |
9 |
Correct |
87 ms |
28948 KB |
Output is correct |
10 |
Correct |
87 ms |
28748 KB |
Output is correct |
11 |
Correct |
81 ms |
28596 KB |
Output is correct |
12 |
Correct |
82 ms |
28720 KB |
Output is correct |
13 |
Correct |
80 ms |
28620 KB |
Output is correct |
14 |
Correct |
81 ms |
31376 KB |
Output is correct |
15 |
Correct |
128 ms |
40472 KB |
Output is correct |
16 |
Correct |
133 ms |
38640 KB |
Output is correct |
17 |
Correct |
140 ms |
39012 KB |
Output is correct |
18 |
Correct |
132 ms |
37420 KB |
Output is correct |
19 |
Correct |
107 ms |
33672 KB |
Output is correct |
20 |
Correct |
107 ms |
33616 KB |
Output is correct |
21 |
Correct |
111 ms |
33672 KB |
Output is correct |
22 |
Correct |
95 ms |
33024 KB |
Output is correct |
23 |
Correct |
85 ms |
32488 KB |
Output is correct |
24 |
Correct |
98 ms |
34724 KB |
Output is correct |
25 |
Correct |
105 ms |
34848 KB |
Output is correct |
26 |
Correct |
95 ms |
34140 KB |
Output is correct |
27 |
Correct |
95 ms |
34072 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
14420 KB |
Output is correct |
2 |
Correct |
9 ms |
14352 KB |
Output is correct |
3 |
Correct |
8 ms |
14420 KB |
Output is correct |
4 |
Correct |
9 ms |
14468 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
9 ms |
14468 KB |
Output is correct |
7 |
Correct |
8 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14392 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14420 KB |
Output is correct |
11 |
Correct |
9 ms |
14420 KB |
Output is correct |
12 |
Correct |
8 ms |
14420 KB |
Output is correct |
13 |
Correct |
9 ms |
14468 KB |
Output is correct |
14 |
Correct |
8 ms |
14472 KB |
Output is correct |
15 |
Correct |
8 ms |
14424 KB |
Output is correct |
16 |
Correct |
8 ms |
14420 KB |
Output is correct |
17 |
Correct |
9 ms |
14420 KB |
Output is correct |
18 |
Correct |
8 ms |
14364 KB |
Output is correct |
19 |
Correct |
9 ms |
14420 KB |
Output is correct |
20 |
Correct |
8 ms |
14388 KB |
Output is correct |
21 |
Correct |
8 ms |
14436 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
9 ms |
14420 KB |
Output is correct |
26 |
Correct |
9 ms |
14420 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14420 KB |
Output is correct |
29 |
Correct |
8 ms |
14420 KB |
Output is correct |
30 |
Correct |
8 ms |
14420 KB |
Output is correct |
31 |
Correct |
10 ms |
14424 KB |
Output is correct |
32 |
Correct |
9 ms |
14420 KB |
Output is correct |
33 |
Correct |
8 ms |
14420 KB |
Output is correct |
34 |
Correct |
9 ms |
14380 KB |
Output is correct |
35 |
Correct |
8 ms |
14472 KB |
Output is correct |
36 |
Correct |
8 ms |
14436 KB |
Output is correct |
37 |
Correct |
8 ms |
14420 KB |
Output is correct |
38 |
Correct |
8 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14420 KB |
Output is correct |
40 |
Correct |
8 ms |
14488 KB |
Output is correct |
41 |
Correct |
8 ms |
14420 KB |
Output is correct |
42 |
Correct |
8 ms |
14420 KB |
Output is correct |
43 |
Correct |
8 ms |
14488 KB |
Output is correct |
44 |
Correct |
8 ms |
14420 KB |
Output is correct |
45 |
Correct |
10 ms |
14476 KB |
Output is correct |
46 |
Correct |
9 ms |
14420 KB |
Output is correct |
47 |
Correct |
9 ms |
14408 KB |
Output is correct |
48 |
Correct |
9 ms |
14420 KB |
Output is correct |
49 |
Correct |
8 ms |
14420 KB |
Output is correct |
50 |
Correct |
9 ms |
14420 KB |
Output is correct |
51 |
Correct |
8 ms |
14420 KB |
Output is correct |
52 |
Correct |
8 ms |
14488 KB |
Output is correct |
53 |
Correct |
8 ms |
14420 KB |
Output is correct |
54 |
Correct |
8 ms |
14420 KB |
Output is correct |
55 |
Correct |
9 ms |
14420 KB |
Output is correct |
56 |
Correct |
8 ms |
14420 KB |
Output is correct |
57 |
Correct |
8 ms |
14392 KB |
Output is correct |
58 |
Correct |
8 ms |
14420 KB |
Output is correct |
59 |
Correct |
9 ms |
14488 KB |
Output is correct |
60 |
Correct |
8 ms |
14420 KB |
Output is correct |
61 |
Correct |
8 ms |
14420 KB |
Output is correct |
62 |
Correct |
9 ms |
14412 KB |
Output is correct |
63 |
Correct |
9 ms |
14484 KB |
Output is correct |
64 |
Correct |
8 ms |
14420 KB |
Output is correct |
65 |
Correct |
8 ms |
14420 KB |
Output is correct |
66 |
Correct |
8 ms |
14548 KB |
Output is correct |
67 |
Correct |
8 ms |
14644 KB |
Output is correct |
68 |
Correct |
9 ms |
14660 KB |
Output is correct |
69 |
Correct |
8 ms |
14676 KB |
Output is correct |
70 |
Correct |
9 ms |
14676 KB |
Output is correct |
71 |
Correct |
9 ms |
14652 KB |
Output is correct |
72 |
Correct |
8 ms |
14648 KB |
Output is correct |
73 |
Correct |
10 ms |
14548 KB |
Output is correct |
74 |
Correct |
9 ms |
14548 KB |
Output is correct |
75 |
Correct |
10 ms |
14636 KB |
Output is correct |
76 |
Correct |
8 ms |
14420 KB |
Output is correct |
77 |
Correct |
9 ms |
14548 KB |
Output is correct |
78 |
Correct |
9 ms |
14548 KB |
Output is correct |
79 |
Correct |
9 ms |
14548 KB |
Output is correct |
80 |
Correct |
9 ms |
14548 KB |
Output is correct |
81 |
Correct |
8 ms |
14548 KB |
Output is correct |
82 |
Correct |
9 ms |
14676 KB |
Output is correct |
83 |
Correct |
9 ms |
14676 KB |
Output is correct |
84 |
Correct |
9 ms |
14676 KB |
Output is correct |
85 |
Correct |
9 ms |
14552 KB |
Output is correct |
86 |
Correct |
9 ms |
14512 KB |
Output is correct |
87 |
Correct |
9 ms |
14584 KB |
Output is correct |
88 |
Correct |
9 ms |
14548 KB |
Output is correct |
89 |
Correct |
10 ms |
14564 KB |
Output is correct |
90 |
Correct |
9 ms |
14600 KB |
Output is correct |
91 |
Correct |
10 ms |
14648 KB |
Output is correct |
92 |
Correct |
9 ms |
14544 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
14420 KB |
Output is correct |
2 |
Correct |
9 ms |
14352 KB |
Output is correct |
3 |
Correct |
8 ms |
14420 KB |
Output is correct |
4 |
Correct |
9 ms |
14468 KB |
Output is correct |
5 |
Correct |
8 ms |
14420 KB |
Output is correct |
6 |
Correct |
9 ms |
14468 KB |
Output is correct |
7 |
Correct |
8 ms |
14420 KB |
Output is correct |
8 |
Correct |
9 ms |
14392 KB |
Output is correct |
9 |
Correct |
8 ms |
14420 KB |
Output is correct |
10 |
Correct |
8 ms |
14420 KB |
Output is correct |
11 |
Correct |
9 ms |
14420 KB |
Output is correct |
12 |
Correct |
8 ms |
14420 KB |
Output is correct |
13 |
Correct |
9 ms |
14468 KB |
Output is correct |
14 |
Correct |
8 ms |
14472 KB |
Output is correct |
15 |
Correct |
8 ms |
14424 KB |
Output is correct |
16 |
Correct |
8 ms |
14420 KB |
Output is correct |
17 |
Correct |
9 ms |
14420 KB |
Output is correct |
18 |
Correct |
8 ms |
14364 KB |
Output is correct |
19 |
Correct |
9 ms |
14420 KB |
Output is correct |
20 |
Correct |
8 ms |
14388 KB |
Output is correct |
21 |
Correct |
8 ms |
14436 KB |
Output is correct |
22 |
Correct |
8 ms |
14420 KB |
Output is correct |
23 |
Correct |
8 ms |
14420 KB |
Output is correct |
24 |
Correct |
8 ms |
14420 KB |
Output is correct |
25 |
Correct |
9 ms |
14420 KB |
Output is correct |
26 |
Correct |
9 ms |
14420 KB |
Output is correct |
27 |
Correct |
8 ms |
14420 KB |
Output is correct |
28 |
Correct |
8 ms |
14420 KB |
Output is correct |
29 |
Correct |
8 ms |
14420 KB |
Output is correct |
30 |
Correct |
8 ms |
14420 KB |
Output is correct |
31 |
Correct |
10 ms |
14424 KB |
Output is correct |
32 |
Correct |
9 ms |
14420 KB |
Output is correct |
33 |
Correct |
8 ms |
14420 KB |
Output is correct |
34 |
Correct |
9 ms |
14380 KB |
Output is correct |
35 |
Correct |
8 ms |
14472 KB |
Output is correct |
36 |
Correct |
8 ms |
14436 KB |
Output is correct |
37 |
Correct |
8 ms |
14420 KB |
Output is correct |
38 |
Correct |
8 ms |
14420 KB |
Output is correct |
39 |
Correct |
8 ms |
14420 KB |
Output is correct |
40 |
Correct |
8 ms |
14488 KB |
Output is correct |
41 |
Correct |
8 ms |
14420 KB |
Output is correct |
42 |
Correct |
8 ms |
14420 KB |
Output is correct |
43 |
Correct |
8 ms |
14488 KB |
Output is correct |
44 |
Correct |
8 ms |
14420 KB |
Output is correct |
45 |
Correct |
10 ms |
14476 KB |
Output is correct |
46 |
Correct |
9 ms |
14420 KB |
Output is correct |
47 |
Correct |
9 ms |
14408 KB |
Output is correct |
48 |
Correct |
9 ms |
14420 KB |
Output is correct |
49 |
Correct |
8 ms |
14420 KB |
Output is correct |
50 |
Correct |
9 ms |
14420 KB |
Output is correct |
51 |
Correct |
8 ms |
14420 KB |
Output is correct |
52 |
Correct |
8 ms |
14488 KB |
Output is correct |
53 |
Correct |
8 ms |
14420 KB |
Output is correct |
54 |
Correct |
8 ms |
14420 KB |
Output is correct |
55 |
Correct |
9 ms |
14420 KB |
Output is correct |
56 |
Correct |
8 ms |
14420 KB |
Output is correct |
57 |
Correct |
8 ms |
14392 KB |
Output is correct |
58 |
Correct |
8 ms |
14420 KB |
Output is correct |
59 |
Correct |
9 ms |
14488 KB |
Output is correct |
60 |
Correct |
8 ms |
14420 KB |
Output is correct |
61 |
Correct |
8 ms |
14420 KB |
Output is correct |
62 |
Correct |
9 ms |
14412 KB |
Output is correct |
63 |
Correct |
9 ms |
14484 KB |
Output is correct |
64 |
Correct |
8 ms |
14420 KB |
Output is correct |
65 |
Correct |
8 ms |
14420 KB |
Output is correct |
66 |
Correct |
82 ms |
40384 KB |
Output is correct |
67 |
Correct |
83 ms |
41628 KB |
Output is correct |
68 |
Correct |
89 ms |
38004 KB |
Output is correct |
69 |
Correct |
87 ms |
39668 KB |
Output is correct |
70 |
Correct |
92 ms |
34920 KB |
Output is correct |
71 |
Correct |
104 ms |
36984 KB |
Output is correct |
72 |
Correct |
98 ms |
35068 KB |
Output is correct |
73 |
Correct |
98 ms |
35588 KB |
Output is correct |
74 |
Correct |
90 ms |
33700 KB |
Output is correct |
75 |
Correct |
89 ms |
33868 KB |
Output is correct |
76 |
Correct |
74 ms |
32360 KB |
Output is correct |
77 |
Correct |
88 ms |
32204 KB |
Output is correct |
78 |
Correct |
82 ms |
32308 KB |
Output is correct |
79 |
Correct |
73 ms |
32276 KB |
Output is correct |
80 |
Correct |
69 ms |
31740 KB |
Output is correct |
81 |
Correct |
62 ms |
31632 KB |
Output is correct |
82 |
Correct |
23 ms |
27988 KB |
Output is correct |
83 |
Correct |
25 ms |
27948 KB |
Output is correct |
84 |
Correct |
25 ms |
27984 KB |
Output is correct |
85 |
Correct |
23 ms |
28072 KB |
Output is correct |
86 |
Correct |
23 ms |
27992 KB |
Output is correct |
87 |
Correct |
24 ms |
27956 KB |
Output is correct |
88 |
Correct |
9 ms |
14676 KB |
Output is correct |
89 |
Correct |
8 ms |
14756 KB |
Output is correct |
90 |
Correct |
8 ms |
14588 KB |
Output is correct |
91 |
Correct |
10 ms |
14768 KB |
Output is correct |
92 |
Correct |
9 ms |
14732 KB |
Output is correct |
93 |
Correct |
10 ms |
14676 KB |
Output is correct |
94 |
Correct |
8 ms |
14676 KB |
Output is correct |
95 |
Correct |
9 ms |
14700 KB |
Output is correct |
96 |
Correct |
9 ms |
14676 KB |
Output is correct |
97 |
Correct |
9 ms |
14548 KB |
Output is correct |
98 |
Correct |
11 ms |
14548 KB |
Output is correct |
99 |
Correct |
9 ms |
14548 KB |
Output is correct |
100 |
Correct |
9 ms |
14548 KB |
Output is correct |
101 |
Correct |
10 ms |
14548 KB |
Output is correct |
102 |
Correct |
9 ms |
14656 KB |
Output is correct |
103 |
Correct |
9 ms |
14548 KB |
Output is correct |
104 |
Correct |
9 ms |
14676 KB |
Output is correct |
105 |
Correct |
10 ms |
14584 KB |
Output is correct |
106 |
Correct |
9 ms |
14676 KB |
Output is correct |
107 |
Correct |
9 ms |
14676 KB |
Output is correct |
108 |
Correct |
116 ms |
33856 KB |
Output is correct |
109 |
Correct |
102 ms |
33948 KB |
Output is correct |
110 |
Correct |
100 ms |
33928 KB |
Output is correct |
111 |
Correct |
111 ms |
33952 KB |
Output is correct |
112 |
Correct |
121 ms |
33896 KB |
Output is correct |
113 |
Correct |
130 ms |
41260 KB |
Output is correct |
114 |
Correct |
140 ms |
39116 KB |
Output is correct |
115 |
Correct |
141 ms |
37728 KB |
Output is correct |
116 |
Correct |
135 ms |
36340 KB |
Output is correct |
117 |
Correct |
116 ms |
33916 KB |
Output is correct |
118 |
Correct |
113 ms |
33892 KB |
Output is correct |
119 |
Correct |
114 ms |
34060 KB |
Output is correct |
120 |
Correct |
105 ms |
33868 KB |
Output is correct |
121 |
Correct |
91 ms |
33432 KB |
Output is correct |
122 |
Correct |
99 ms |
32824 KB |
Output is correct |
123 |
Correct |
64 ms |
31232 KB |
Output is correct |
124 |
Correct |
89 ms |
34368 KB |
Output is correct |
125 |
Correct |
73 ms |
34288 KB |
Output is correct |
126 |
Correct |
75 ms |
34552 KB |
Output is correct |
127 |
Correct |
70 ms |
34236 KB |
Output is correct |
128 |
Correct |
9 ms |
14560 KB |
Output is correct |
129 |
Correct |
11 ms |
14584 KB |
Output is correct |
130 |
Correct |
9 ms |
14548 KB |
Output is correct |
131 |
Correct |
9 ms |
14548 KB |
Output is correct |
132 |
Correct |
10 ms |
14548 KB |
Output is correct |
133 |
Correct |
9 ms |
14628 KB |
Output is correct |
134 |
Correct |
10 ms |
14548 KB |
Output is correct |
135 |
Correct |
9 ms |
14548 KB |
Output is correct |
136 |
Correct |
8 ms |
14548 KB |
Output is correct |
137 |
Correct |
9 ms |
14548 KB |
Output is correct |
138 |
Correct |
9 ms |
14548 KB |
Output is correct |
139 |
Correct |
9 ms |
14676 KB |
Output is correct |
140 |
Correct |
10 ms |
14660 KB |
Output is correct |
141 |
Correct |
10 ms |
14636 KB |
Output is correct |
142 |
Correct |
9 ms |
14696 KB |
Output is correct |
143 |
Correct |
9 ms |
14656 KB |
Output is correct |
144 |
Correct |
9 ms |
14548 KB |
Output is correct |
145 |
Correct |
10 ms |
14676 KB |
Output is correct |
146 |
Correct |
9 ms |
14548 KB |
Output is correct |
147 |
Correct |
9 ms |
14548 KB |
Output is correct |
148 |
Correct |
9 ms |
14660 KB |
Output is correct |
149 |
Correct |
8 ms |
14608 KB |
Output is correct |
150 |
Correct |
8 ms |
14656 KB |
Output is correct |
151 |
Correct |
9 ms |
14664 KB |
Output is correct |
152 |
Correct |
9 ms |
14548 KB |
Output is correct |
153 |
Correct |
8 ms |
14548 KB |
Output is correct |
154 |
Correct |
9 ms |
14492 KB |
Output is correct |
155 |
Correct |
100 ms |
33896 KB |
Output is correct |
156 |
Correct |
115 ms |
33680 KB |
Output is correct |
157 |
Correct |
102 ms |
33288 KB |
Output is correct |
158 |
Correct |
113 ms |
32144 KB |
Output is correct |
159 |
Correct |
113 ms |
30564 KB |
Output is correct |
160 |
Correct |
100 ms |
29780 KB |
Output is correct |
161 |
Correct |
99 ms |
29496 KB |
Output is correct |
162 |
Correct |
88 ms |
29040 KB |
Output is correct |
163 |
Correct |
87 ms |
28948 KB |
Output is correct |
164 |
Correct |
87 ms |
28748 KB |
Output is correct |
165 |
Correct |
81 ms |
28596 KB |
Output is correct |
166 |
Correct |
82 ms |
28720 KB |
Output is correct |
167 |
Correct |
80 ms |
28620 KB |
Output is correct |
168 |
Correct |
81 ms |
31376 KB |
Output is correct |
169 |
Correct |
128 ms |
40472 KB |
Output is correct |
170 |
Correct |
133 ms |
38640 KB |
Output is correct |
171 |
Correct |
140 ms |
39012 KB |
Output is correct |
172 |
Correct |
132 ms |
37420 KB |
Output is correct |
173 |
Correct |
107 ms |
33672 KB |
Output is correct |
174 |
Correct |
107 ms |
33616 KB |
Output is correct |
175 |
Correct |
111 ms |
33672 KB |
Output is correct |
176 |
Correct |
95 ms |
33024 KB |
Output is correct |
177 |
Correct |
85 ms |
32488 KB |
Output is correct |
178 |
Correct |
98 ms |
34724 KB |
Output is correct |
179 |
Correct |
105 ms |
34848 KB |
Output is correct |
180 |
Correct |
95 ms |
34140 KB |
Output is correct |
181 |
Correct |
95 ms |
34072 KB |
Output is correct |
182 |
Correct |
8 ms |
14548 KB |
Output is correct |
183 |
Correct |
8 ms |
14644 KB |
Output is correct |
184 |
Correct |
9 ms |
14660 KB |
Output is correct |
185 |
Correct |
8 ms |
14676 KB |
Output is correct |
186 |
Correct |
9 ms |
14676 KB |
Output is correct |
187 |
Correct |
9 ms |
14652 KB |
Output is correct |
188 |
Correct |
8 ms |
14648 KB |
Output is correct |
189 |
Correct |
10 ms |
14548 KB |
Output is correct |
190 |
Correct |
9 ms |
14548 KB |
Output is correct |
191 |
Correct |
10 ms |
14636 KB |
Output is correct |
192 |
Correct |
8 ms |
14420 KB |
Output is correct |
193 |
Correct |
9 ms |
14548 KB |
Output is correct |
194 |
Correct |
9 ms |
14548 KB |
Output is correct |
195 |
Correct |
9 ms |
14548 KB |
Output is correct |
196 |
Correct |
9 ms |
14548 KB |
Output is correct |
197 |
Correct |
8 ms |
14548 KB |
Output is correct |
198 |
Correct |
9 ms |
14676 KB |
Output is correct |
199 |
Correct |
9 ms |
14676 KB |
Output is correct |
200 |
Correct |
9 ms |
14676 KB |
Output is correct |
201 |
Correct |
9 ms |
14552 KB |
Output is correct |
202 |
Correct |
9 ms |
14512 KB |
Output is correct |
203 |
Correct |
9 ms |
14584 KB |
Output is correct |
204 |
Correct |
9 ms |
14548 KB |
Output is correct |
205 |
Correct |
10 ms |
14564 KB |
Output is correct |
206 |
Correct |
9 ms |
14600 KB |
Output is correct |
207 |
Correct |
10 ms |
14648 KB |
Output is correct |
208 |
Correct |
9 ms |
14544 KB |
Output is correct |
209 |
Correct |
24 ms |
27988 KB |
Output is correct |
210 |
Correct |
64 ms |
31692 KB |
Output is correct |
211 |
Correct |
91 ms |
35336 KB |
Output is correct |
212 |
Correct |
121 ms |
38980 KB |
Output is correct |
213 |
Correct |
149 ms |
42360 KB |
Output is correct |
214 |
Correct |
61 ms |
33332 KB |
Output is correct |
215 |
Correct |
60 ms |
33100 KB |
Output is correct |
216 |
Correct |
112 ms |
35084 KB |
Output is correct |
217 |
Correct |
112 ms |
33060 KB |
Output is correct |
218 |
Correct |
83 ms |
30564 KB |
Output is correct |
219 |
Correct |
82 ms |
29972 KB |
Output is correct |
220 |
Correct |
81 ms |
29776 KB |
Output is correct |
221 |
Correct |
72 ms |
29648 KB |
Output is correct |
222 |
Correct |
77 ms |
31120 KB |
Output is correct |
223 |
Correct |
128 ms |
36604 KB |
Output is correct |
224 |
Correct |
114 ms |
35564 KB |
Output is correct |
225 |
Correct |
103 ms |
32796 KB |
Output is correct |
226 |
Correct |
116 ms |
32736 KB |
Output is correct |
227 |
Correct |
114 ms |
32764 KB |
Output is correct |
228 |
Correct |
97 ms |
32332 KB |
Output is correct |
229 |
Correct |
80 ms |
31956 KB |
Output is correct |
230 |
Correct |
108 ms |
33216 KB |
Output is correct |
231 |
Correct |
123 ms |
33416 KB |
Output is correct |