답안 #743350

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
743350 2023-05-17T10:18:11 Z alvingogo 철인 이종 경기 (APIO18_duathlon) C++14
100 / 100
131 ms 48072 KB
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#define AquA cin.tie(0);ios_base::sync_with_stdio(0);
#define fs first
#define sc second
#define p_q priority_queue
#define int long long
using namespace std;

/*
1. tarjan find BCC(vertex)

2. block-cut tree
type, size, subtree size

3. dp
we iterate c
square -> s, t aren't in the same subtree -> add to all the circle connecting to the square
circle -> s, t aren't in the same subtree


done?
*/

vector<vector<int> > e,bcc; 
vector<int> low,dfn,cv;
int cnt=0,cc=0,cr=0;
stack<int> st;
void tj(int r,int f){
    int sl=0;
    cnt++;
    dfn[r]=low[r]=cnt;
    st.push(r);
    for(auto h:e[r]){
        if(h!=f){
            if(!dfn[h]){
                tj(h,r);
                sl++;
                low[r]=min(low[r],low[h]);
                if(low[h]>=dfn[r]){
                    if(f!=-1){
                        if(!cv[r]){
                            cr++;
                            cv[r]=cr;
                        }
                    }
                    bcc.push_back(vector<int>());
                    while(st.top()!=h){
                        bcc[cc].push_back(st.top());
                        st.pop();
                    }
                    bcc[cc].push_back(h);
                    st.pop();
                    bcc[cc].push_back(r);
                    cc++;
                }
            }
            else{
                low[r]=min(low[r],dfn[h]);
            }
        }
    }
    if(f==-1 && sl>=2){
        if(!cv[r]){
            cr++;
            cv[r]=cr;
        }
    }
    if(f==-1){
        st.pop();
    }
}

struct no{
    vector<int> ch;
    int t=0,sq=0;
    long long tp=0;
    int sz=1;
    int vis=0;
};
vector<no> v;
long long ans=0;
int dfs3(int r,int f){
    v[r].vis=1;
    if(v[r].t){
        v[r].sz=v[r].sq;
    }
    int k=v[r].sz;
    for(auto h:v[r].ch){
        if(h!=f){
            k+=dfs3(h,r);
        }
    }
    return k;
}
void dfs(int r,int f,int n){
    for(auto h:v[r].ch){
        if(h!=f){
            dfs(h,r,n);
            v[r].sz+=v[h].sz;
            if(v[r].t){
                v[r].tp+=1ll*v[h].sz*(v[h].sz-1);
            }
        }
    }
    if(v[r].t){
        v[r].tp+=1ll*(n-v[r].sz)*(n-v[r].sz-1);
        ans-=1ll*v[r].sq*v[r].tp;
        //cout << v[r].sq << " " << v[r].tp << "\n";
    }
}
void dfs2(int r,int f,int n){
    for(auto h:v[r].ch){
        if(h!=f){
            dfs2(h,r,n);
            if(!v[r].t){
                ans-=(v[h].tp-1ll*(n-v[h].sz)*(n-v[h].sz-1));
            }
        }
    }
    if(!v[r].t){
        ans-=(v[f].tp-1ll*(v[r].sz)*(v[r].sz-1));
    }
}
signed main(){
    AquA;
    int n;
    cin >> n;
    if(n<3){
        cout << 0 << "\n";
        return 0;
    }
    int m;
    cin >> m;
    e.resize(n);
    low.resize(n);
    dfn.resize(n);
    cv.resize(n);
    for(int i=0;i<m;i++){
        int a,b;
        cin >> a >> b;
        a--;
        b--;
        e[a].push_back(b);
        e[b].push_back(a);
    }
    for(int i=0;i<n;i++){
        if(!dfn[i]){
            tj(i,-1);
        }
    }
    int s=cc;
    for(int i=0;i<n;i++){
        if(cv[i]){
            s++;
        }
    }
    v.resize(s);
    for(int i=0;i<cc;i++){
        v[i].t=1;
        for(auto h:bcc[i]){
            if(cv[h]){
                v[i].ch.push_back(cv[h]+cc-1);
                v[cv[h]+cc-1].ch.push_back(i);
            }
            else{
                v[i].sq++;
            }
        }
    }
    for(int i=0;i<cc;i++){
        if(!v[i].vis){
            int k=dfs3(i,i);
            ans+=1ll*k*(k-1)*(k-2);
            dfs(i,i,k);
            dfs2(i,i,k);
        }
    }
    
    cout << ans << "\n";
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 316 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 316 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 320 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 ms 316 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 284 KB Output is correct
29 Correct 1 ms 324 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 324 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 316 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 316 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 320 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 ms 316 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 284 KB Output is correct
29 Correct 1 ms 324 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 324 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 236 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 324 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 316 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 316 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 320 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 1 ms 212 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 1 ms 324 KB Output is correct
58 Correct 1 ms 324 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 1 ms 324 KB Output is correct
63 Correct 1 ms 212 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 65 ms 20968 KB Output is correct
2 Correct 62 ms 21012 KB Output is correct
3 Correct 87 ms 28460 KB Output is correct
4 Correct 64 ms 23056 KB Output is correct
5 Correct 78 ms 21880 KB Output is correct
6 Correct 88 ms 30620 KB Output is correct
7 Correct 79 ms 26152 KB Output is correct
8 Correct 91 ms 28676 KB Output is correct
9 Correct 93 ms 24696 KB Output is correct
10 Correct 85 ms 23388 KB Output is correct
11 Correct 67 ms 17596 KB Output is correct
12 Correct 63 ms 17672 KB Output is correct
13 Correct 71 ms 16468 KB Output is correct
14 Correct 52 ms 16424 KB Output is correct
15 Correct 43 ms 13824 KB Output is correct
16 Correct 49 ms 13636 KB Output is correct
17 Correct 4 ms 4948 KB Output is correct
18 Correct 3 ms 5076 KB Output is correct
19 Correct 4 ms 4948 KB Output is correct
20 Correct 4 ms 4948 KB Output is correct
21 Correct 4 ms 4948 KB Output is correct
22 Correct 4 ms 4948 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 596 KB Output is correct
2 Correct 2 ms 596 KB Output is correct
3 Correct 1 ms 596 KB Output is correct
4 Correct 1 ms 724 KB Output is correct
5 Correct 1 ms 596 KB Output is correct
6 Correct 1 ms 596 KB Output is correct
7 Correct 1 ms 724 KB Output is correct
8 Correct 1 ms 596 KB Output is correct
9 Correct 1 ms 596 KB Output is correct
10 Correct 1 ms 596 KB Output is correct
11 Correct 1 ms 596 KB Output is correct
12 Correct 1 ms 596 KB Output is correct
13 Correct 1 ms 596 KB Output is correct
14 Correct 1 ms 468 KB Output is correct
15 Correct 2 ms 468 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 1 ms 468 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 109 ms 29052 KB Output is correct
2 Correct 113 ms 28876 KB Output is correct
3 Correct 106 ms 28948 KB Output is correct
4 Correct 120 ms 28924 KB Output is correct
5 Correct 102 ms 28856 KB Output is correct
6 Correct 115 ms 48072 KB Output is correct
7 Correct 118 ms 36540 KB Output is correct
8 Correct 109 ms 34836 KB Output is correct
9 Correct 110 ms 32996 KB Output is correct
10 Correct 94 ms 28932 KB Output is correct
11 Correct 101 ms 28908 KB Output is correct
12 Correct 125 ms 28896 KB Output is correct
13 Correct 99 ms 28896 KB Output is correct
14 Correct 82 ms 26684 KB Output is correct
15 Correct 73 ms 24332 KB Output is correct
16 Correct 40 ms 16312 KB Output is correct
17 Correct 57 ms 24504 KB Output is correct
18 Correct 60 ms 24512 KB Output is correct
19 Correct 63 ms 25004 KB Output is correct
20 Correct 58 ms 24556 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 596 KB Output is correct
2 Correct 1 ms 596 KB Output is correct
3 Correct 1 ms 468 KB Output is correct
4 Correct 1 ms 456 KB Output is correct
5 Correct 1 ms 468 KB Output is correct
6 Correct 1 ms 468 KB Output is correct
7 Correct 1 ms 468 KB Output is correct
8 Correct 1 ms 340 KB Output is correct
9 Correct 1 ms 340 KB Output is correct
10 Correct 1 ms 332 KB Output is correct
11 Correct 1 ms 456 KB Output is correct
12 Correct 2 ms 596 KB Output is correct
13 Correct 2 ms 596 KB Output is correct
14 Correct 1 ms 596 KB Output is correct
15 Correct 1 ms 596 KB Output is correct
16 Correct 1 ms 468 KB Output is correct
17 Correct 2 ms 468 KB Output is correct
18 Correct 1 ms 468 KB Output is correct
19 Correct 1 ms 468 KB Output is correct
20 Correct 1 ms 468 KB Output is correct
21 Correct 2 ms 596 KB Output is correct
22 Correct 1 ms 596 KB Output is correct
23 Correct 1 ms 468 KB Output is correct
24 Correct 1 ms 468 KB Output is correct
25 Correct 1 ms 344 KB Output is correct
26 Correct 1 ms 340 KB Output is correct
27 Correct 1 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 128 ms 28844 KB Output is correct
2 Correct 99 ms 29748 KB Output is correct
3 Correct 118 ms 27232 KB Output is correct
4 Correct 113 ms 24056 KB Output is correct
5 Correct 89 ms 18688 KB Output is correct
6 Correct 65 ms 16340 KB Output is correct
7 Correct 68 ms 15064 KB Output is correct
8 Correct 76 ms 13536 KB Output is correct
9 Correct 64 ms 12928 KB Output is correct
10 Correct 62 ms 12456 KB Output is correct
11 Correct 48 ms 11540 KB Output is correct
12 Correct 46 ms 10960 KB Output is correct
13 Correct 48 ms 10948 KB Output is correct
14 Correct 61 ms 13596 KB Output is correct
15 Correct 122 ms 35464 KB Output is correct
16 Correct 121 ms 33200 KB Output is correct
17 Correct 116 ms 31828 KB Output is correct
18 Correct 110 ms 29704 KB Output is correct
19 Correct 99 ms 24056 KB Output is correct
20 Correct 97 ms 24068 KB Output is correct
21 Correct 98 ms 24132 KB Output is correct
22 Correct 80 ms 21216 KB Output is correct
23 Correct 65 ms 17576 KB Output is correct
24 Correct 85 ms 26448 KB Output is correct
25 Correct 113 ms 26700 KB Output is correct
26 Correct 89 ms 24112 KB Output is correct
27 Correct 94 ms 24128 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 316 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 316 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 320 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 ms 316 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 284 KB Output is correct
29 Correct 1 ms 324 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 324 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 236 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 324 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 316 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 316 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 320 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 1 ms 212 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 1 ms 324 KB Output is correct
58 Correct 1 ms 324 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 1 ms 324 KB Output is correct
63 Correct 1 ms 212 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 1 ms 316 KB Output is correct
67 Correct 1 ms 452 KB Output is correct
68 Correct 1 ms 468 KB Output is correct
69 Correct 2 ms 468 KB Output is correct
70 Correct 1 ms 468 KB Output is correct
71 Correct 1 ms 468 KB Output is correct
72 Correct 1 ms 468 KB Output is correct
73 Correct 1 ms 468 KB Output is correct
74 Correct 1 ms 468 KB Output is correct
75 Correct 1 ms 468 KB Output is correct
76 Correct 1 ms 212 KB Output is correct
77 Correct 1 ms 452 KB Output is correct
78 Correct 1 ms 468 KB Output is correct
79 Correct 1 ms 460 KB Output is correct
80 Correct 1 ms 340 KB Output is correct
81 Correct 1 ms 328 KB Output is correct
82 Correct 1 ms 460 KB Output is correct
83 Correct 1 ms 468 KB Output is correct
84 Correct 1 ms 468 KB Output is correct
85 Correct 1 ms 468 KB Output is correct
86 Correct 2 ms 468 KB Output is correct
87 Correct 1 ms 468 KB Output is correct
88 Correct 1 ms 468 KB Output is correct
89 Correct 1 ms 468 KB Output is correct
90 Correct 1 ms 456 KB Output is correct
91 Correct 1 ms 468 KB Output is correct
92 Correct 1 ms 468 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 316 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 316 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 212 KB Output is correct
16 Correct 1 ms 212 KB Output is correct
17 Correct 1 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 320 KB Output is correct
20 Correct 1 ms 320 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 1 ms 212 KB Output is correct
23 Correct 1 ms 212 KB Output is correct
24 Correct 1 ms 316 KB Output is correct
25 Correct 1 ms 212 KB Output is correct
26 Correct 1 ms 212 KB Output is correct
27 Correct 1 ms 212 KB Output is correct
28 Correct 1 ms 284 KB Output is correct
29 Correct 1 ms 324 KB Output is correct
30 Correct 1 ms 212 KB Output is correct
31 Correct 1 ms 212 KB Output is correct
32 Correct 1 ms 212 KB Output is correct
33 Correct 1 ms 212 KB Output is correct
34 Correct 1 ms 212 KB Output is correct
35 Correct 1 ms 324 KB Output is correct
36 Correct 1 ms 212 KB Output is correct
37 Correct 1 ms 236 KB Output is correct
38 Correct 1 ms 212 KB Output is correct
39 Correct 1 ms 212 KB Output is correct
40 Correct 1 ms 212 KB Output is correct
41 Correct 1 ms 324 KB Output is correct
42 Correct 1 ms 212 KB Output is correct
43 Correct 1 ms 316 KB Output is correct
44 Correct 1 ms 212 KB Output is correct
45 Correct 1 ms 316 KB Output is correct
46 Correct 1 ms 212 KB Output is correct
47 Correct 1 ms 212 KB Output is correct
48 Correct 1 ms 320 KB Output is correct
49 Correct 1 ms 212 KB Output is correct
50 Correct 1 ms 212 KB Output is correct
51 Correct 1 ms 212 KB Output is correct
52 Correct 1 ms 212 KB Output is correct
53 Correct 1 ms 212 KB Output is correct
54 Correct 1 ms 212 KB Output is correct
55 Correct 1 ms 212 KB Output is correct
56 Correct 0 ms 212 KB Output is correct
57 Correct 1 ms 324 KB Output is correct
58 Correct 1 ms 324 KB Output is correct
59 Correct 1 ms 212 KB Output is correct
60 Correct 1 ms 212 KB Output is correct
61 Correct 1 ms 212 KB Output is correct
62 Correct 1 ms 324 KB Output is correct
63 Correct 1 ms 212 KB Output is correct
64 Correct 1 ms 212 KB Output is correct
65 Correct 1 ms 212 KB Output is correct
66 Correct 65 ms 20968 KB Output is correct
67 Correct 62 ms 21012 KB Output is correct
68 Correct 87 ms 28460 KB Output is correct
69 Correct 64 ms 23056 KB Output is correct
70 Correct 78 ms 21880 KB Output is correct
71 Correct 88 ms 30620 KB Output is correct
72 Correct 79 ms 26152 KB Output is correct
73 Correct 91 ms 28676 KB Output is correct
74 Correct 93 ms 24696 KB Output is correct
75 Correct 85 ms 23388 KB Output is correct
76 Correct 67 ms 17596 KB Output is correct
77 Correct 63 ms 17672 KB Output is correct
78 Correct 71 ms 16468 KB Output is correct
79 Correct 52 ms 16424 KB Output is correct
80 Correct 43 ms 13824 KB Output is correct
81 Correct 49 ms 13636 KB Output is correct
82 Correct 4 ms 4948 KB Output is correct
83 Correct 3 ms 5076 KB Output is correct
84 Correct 4 ms 4948 KB Output is correct
85 Correct 4 ms 4948 KB Output is correct
86 Correct 4 ms 4948 KB Output is correct
87 Correct 4 ms 4948 KB Output is correct
88 Correct 2 ms 596 KB Output is correct
89 Correct 2 ms 596 KB Output is correct
90 Correct 1 ms 596 KB Output is correct
91 Correct 1 ms 724 KB Output is correct
92 Correct 1 ms 596 KB Output is correct
93 Correct 1 ms 596 KB Output is correct
94 Correct 1 ms 724 KB Output is correct
95 Correct 1 ms 596 KB Output is correct
96 Correct 1 ms 596 KB Output is correct
97 Correct 1 ms 596 KB Output is correct
98 Correct 1 ms 596 KB Output is correct
99 Correct 1 ms 596 KB Output is correct
100 Correct 1 ms 596 KB Output is correct
101 Correct 1 ms 468 KB Output is correct
102 Correct 2 ms 468 KB Output is correct
103 Correct 1 ms 468 KB Output is correct
104 Correct 1 ms 468 KB Output is correct
105 Correct 1 ms 468 KB Output is correct
106 Correct 1 ms 468 KB Output is correct
107 Correct 1 ms 468 KB Output is correct
108 Correct 109 ms 29052 KB Output is correct
109 Correct 113 ms 28876 KB Output is correct
110 Correct 106 ms 28948 KB Output is correct
111 Correct 120 ms 28924 KB Output is correct
112 Correct 102 ms 28856 KB Output is correct
113 Correct 115 ms 48072 KB Output is correct
114 Correct 118 ms 36540 KB Output is correct
115 Correct 109 ms 34836 KB Output is correct
116 Correct 110 ms 32996 KB Output is correct
117 Correct 94 ms 28932 KB Output is correct
118 Correct 101 ms 28908 KB Output is correct
119 Correct 125 ms 28896 KB Output is correct
120 Correct 99 ms 28896 KB Output is correct
121 Correct 82 ms 26684 KB Output is correct
122 Correct 73 ms 24332 KB Output is correct
123 Correct 40 ms 16312 KB Output is correct
124 Correct 57 ms 24504 KB Output is correct
125 Correct 60 ms 24512 KB Output is correct
126 Correct 63 ms 25004 KB Output is correct
127 Correct 58 ms 24556 KB Output is correct
128 Correct 1 ms 596 KB Output is correct
129 Correct 1 ms 596 KB Output is correct
130 Correct 1 ms 468 KB Output is correct
131 Correct 1 ms 456 KB Output is correct
132 Correct 1 ms 468 KB Output is correct
133 Correct 1 ms 468 KB Output is correct
134 Correct 1 ms 468 KB Output is correct
135 Correct 1 ms 340 KB Output is correct
136 Correct 1 ms 340 KB Output is correct
137 Correct 1 ms 332 KB Output is correct
138 Correct 1 ms 456 KB Output is correct
139 Correct 2 ms 596 KB Output is correct
140 Correct 2 ms 596 KB Output is correct
141 Correct 1 ms 596 KB Output is correct
142 Correct 1 ms 596 KB Output is correct
143 Correct 1 ms 468 KB Output is correct
144 Correct 2 ms 468 KB Output is correct
145 Correct 1 ms 468 KB Output is correct
146 Correct 1 ms 468 KB Output is correct
147 Correct 1 ms 468 KB Output is correct
148 Correct 2 ms 596 KB Output is correct
149 Correct 1 ms 596 KB Output is correct
150 Correct 1 ms 468 KB Output is correct
151 Correct 1 ms 468 KB Output is correct
152 Correct 1 ms 344 KB Output is correct
153 Correct 1 ms 340 KB Output is correct
154 Correct 1 ms 340 KB Output is correct
155 Correct 128 ms 28844 KB Output is correct
156 Correct 99 ms 29748 KB Output is correct
157 Correct 118 ms 27232 KB Output is correct
158 Correct 113 ms 24056 KB Output is correct
159 Correct 89 ms 18688 KB Output is correct
160 Correct 65 ms 16340 KB Output is correct
161 Correct 68 ms 15064 KB Output is correct
162 Correct 76 ms 13536 KB Output is correct
163 Correct 64 ms 12928 KB Output is correct
164 Correct 62 ms 12456 KB Output is correct
165 Correct 48 ms 11540 KB Output is correct
166 Correct 46 ms 10960 KB Output is correct
167 Correct 48 ms 10948 KB Output is correct
168 Correct 61 ms 13596 KB Output is correct
169 Correct 122 ms 35464 KB Output is correct
170 Correct 121 ms 33200 KB Output is correct
171 Correct 116 ms 31828 KB Output is correct
172 Correct 110 ms 29704 KB Output is correct
173 Correct 99 ms 24056 KB Output is correct
174 Correct 97 ms 24068 KB Output is correct
175 Correct 98 ms 24132 KB Output is correct
176 Correct 80 ms 21216 KB Output is correct
177 Correct 65 ms 17576 KB Output is correct
178 Correct 85 ms 26448 KB Output is correct
179 Correct 113 ms 26700 KB Output is correct
180 Correct 89 ms 24112 KB Output is correct
181 Correct 94 ms 24128 KB Output is correct
182 Correct 1 ms 316 KB Output is correct
183 Correct 1 ms 452 KB Output is correct
184 Correct 1 ms 468 KB Output is correct
185 Correct 2 ms 468 KB Output is correct
186 Correct 1 ms 468 KB Output is correct
187 Correct 1 ms 468 KB Output is correct
188 Correct 1 ms 468 KB Output is correct
189 Correct 1 ms 468 KB Output is correct
190 Correct 1 ms 468 KB Output is correct
191 Correct 1 ms 468 KB Output is correct
192 Correct 1 ms 212 KB Output is correct
193 Correct 1 ms 452 KB Output is correct
194 Correct 1 ms 468 KB Output is correct
195 Correct 1 ms 460 KB Output is correct
196 Correct 1 ms 340 KB Output is correct
197 Correct 1 ms 328 KB Output is correct
198 Correct 1 ms 460 KB Output is correct
199 Correct 1 ms 468 KB Output is correct
200 Correct 1 ms 468 KB Output is correct
201 Correct 1 ms 468 KB Output is correct
202 Correct 2 ms 468 KB Output is correct
203 Correct 1 ms 468 KB Output is correct
204 Correct 1 ms 468 KB Output is correct
205 Correct 1 ms 468 KB Output is correct
206 Correct 1 ms 456 KB Output is correct
207 Correct 1 ms 468 KB Output is correct
208 Correct 1 ms 468 KB Output is correct
209 Correct 4 ms 4948 KB Output is correct
210 Correct 47 ms 17608 KB Output is correct
211 Correct 90 ms 21144 KB Output is correct
212 Correct 92 ms 21384 KB Output is correct
213 Correct 131 ms 22952 KB Output is correct
214 Correct 48 ms 17984 KB Output is correct
215 Correct 57 ms 16472 KB Output is correct
216 Correct 91 ms 24308 KB Output is correct
217 Correct 85 ms 19456 KB Output is correct
218 Correct 85 ms 13696 KB Output is correct
219 Correct 68 ms 12152 KB Output is correct
220 Correct 58 ms 11536 KB Output is correct
221 Correct 50 ms 10804 KB Output is correct
222 Correct 51 ms 12108 KB Output is correct
223 Correct 92 ms 22880 KB Output is correct
224 Correct 86 ms 21880 KB Output is correct
225 Correct 78 ms 18312 KB Output is correct
226 Correct 97 ms 18408 KB Output is correct
227 Correct 85 ms 18388 KB Output is correct
228 Correct 73 ms 16644 KB Output is correct
229 Correct 69 ms 14368 KB Output is correct
230 Correct 71 ms 17364 KB Output is correct
231 Correct 76 ms 17536 KB Output is correct