Submission #252417

# Submission time Handle Problem Language Result Execution time Memory
252417 2020-07-25T13:48:25 Z shayan_p Duathlon (APIO18_duathlon) C++14
100 / 100
163 ms 34424 KB
// And you curse yourself for things you never done

#include<bits/stdc++.h>

#define F first
#define S second
#define PB push_back
#define sz(s) int((s).size())
#define bit(n,k) (((n)>>(k))&1)

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;

const int maxn = 3e5 + 10, mod = 1e9 + 7, inf = 1e9 + 10;

vector<int> v[maxn], g[maxn], vec;
int up[maxn], h[maxn], val[maxn], n;
bool mark[maxn];
int C;

void add_edge(int a, int b){
    g[a].PB(b);
    g[b].PB(a);
}
void prep(int u){
    n++;
    mark[u] = 1;
    up[u] = h[u];
    for(int y : v[u]){
	if(!mark[y]){
	    int SZ = sz(vec);
	    
	    h[y] = h[u] + 1;
	    prep(y);
	    up[u] = min(up[u], up[y]);
	    
	    if(up[y] == h[u]){
		while(sz(vec) > SZ){
		    add_edge(vec.back(), C);
		    vec.pop_back();
		}
		add_edge(u, C);
		val[C] = sz(g[C]) - 1;
		C++;
	    }
	}
	else{
	    up[u] = min(up[u], h[y]);	    
	}	    
    }    
    vec.PB(u);
}

ll ans;
int SZ[maxn];

void dfs(int u, int par = -1){
    SZ[u] = val[u] == 0;
    ll num = 0;
    for(int y : g[u])
	if(y != par)
	    dfs(y, u), SZ[u]+= SZ[y], num+= 1ll * SZ[y] * (SZ[y]-1);
    num+= 1ll * (n-SZ[u]) * (n-SZ[u]-1);
    ans+= 1ll * val[u] * (1ll * n * (n-1) - num);
}

int main(){
    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie();

    int N, m;
    cin >> N >> m;
    for(int i = 0; i < m; i++){
	int a, b;
	cin >> a >> b;
	--a, --b;
	v[a].PB(b);
	v[b].PB(a);
    }
    C = N;
    for(int i = 0; i < N; i++){
	if(!mark[i]){
	    vec.clear();
	    n = 0;
	    prep(i);
	    ans-= 1ll * n * (n-1);
	    dfs(i);
	}
    }
    return cout << ans << endl, 0;
}
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14464 KB Output is correct
2 Correct 7 ms 14464 KB Output is correct
3 Correct 8 ms 14464 KB Output is correct
4 Correct 8 ms 14464 KB Output is correct
5 Correct 11 ms 14464 KB Output is correct
6 Correct 11 ms 14464 KB Output is correct
7 Correct 9 ms 14456 KB Output is correct
8 Correct 11 ms 14464 KB Output is correct
9 Correct 8 ms 14464 KB Output is correct
10 Correct 8 ms 14464 KB Output is correct
11 Correct 8 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 9 ms 14464 KB Output is correct
14 Correct 8 ms 14464 KB Output is correct
15 Correct 9 ms 14464 KB Output is correct
16 Correct 8 ms 14464 KB Output is correct
17 Correct 9 ms 14464 KB Output is correct
18 Correct 8 ms 14464 KB Output is correct
19 Correct 8 ms 14464 KB Output is correct
20 Correct 8 ms 14464 KB Output is correct
21 Correct 8 ms 14464 KB Output is correct
22 Correct 8 ms 14464 KB Output is correct
23 Correct 8 ms 14464 KB Output is correct
24 Correct 7 ms 14464 KB Output is correct
25 Correct 8 ms 14464 KB Output is correct
26 Correct 11 ms 14464 KB Output is correct
27 Correct 11 ms 14464 KB Output is correct
28 Correct 10 ms 14444 KB Output is correct
29 Correct 7 ms 14464 KB Output is correct
30 Correct 8 ms 14464 KB Output is correct
31 Correct 8 ms 14464 KB Output is correct
32 Correct 9 ms 14464 KB Output is correct
33 Correct 8 ms 14464 KB Output is correct
34 Correct 7 ms 14464 KB Output is correct
35 Correct 8 ms 14464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14464 KB Output is correct
2 Correct 7 ms 14464 KB Output is correct
3 Correct 8 ms 14464 KB Output is correct
4 Correct 8 ms 14464 KB Output is correct
5 Correct 11 ms 14464 KB Output is correct
6 Correct 11 ms 14464 KB Output is correct
7 Correct 9 ms 14456 KB Output is correct
8 Correct 11 ms 14464 KB Output is correct
9 Correct 8 ms 14464 KB Output is correct
10 Correct 8 ms 14464 KB Output is correct
11 Correct 8 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 9 ms 14464 KB Output is correct
14 Correct 8 ms 14464 KB Output is correct
15 Correct 9 ms 14464 KB Output is correct
16 Correct 8 ms 14464 KB Output is correct
17 Correct 9 ms 14464 KB Output is correct
18 Correct 8 ms 14464 KB Output is correct
19 Correct 8 ms 14464 KB Output is correct
20 Correct 8 ms 14464 KB Output is correct
21 Correct 8 ms 14464 KB Output is correct
22 Correct 8 ms 14464 KB Output is correct
23 Correct 8 ms 14464 KB Output is correct
24 Correct 7 ms 14464 KB Output is correct
25 Correct 8 ms 14464 KB Output is correct
26 Correct 11 ms 14464 KB Output is correct
27 Correct 11 ms 14464 KB Output is correct
28 Correct 10 ms 14444 KB Output is correct
29 Correct 7 ms 14464 KB Output is correct
30 Correct 8 ms 14464 KB Output is correct
31 Correct 8 ms 14464 KB Output is correct
32 Correct 9 ms 14464 KB Output is correct
33 Correct 8 ms 14464 KB Output is correct
34 Correct 7 ms 14464 KB Output is correct
35 Correct 8 ms 14464 KB Output is correct
36 Correct 7 ms 14464 KB Output is correct
37 Correct 12 ms 14464 KB Output is correct
38 Correct 11 ms 14464 KB Output is correct
39 Correct 8 ms 14464 KB Output is correct
40 Correct 8 ms 14464 KB Output is correct
41 Correct 8 ms 14464 KB Output is correct
42 Correct 8 ms 14464 KB Output is correct
43 Correct 11 ms 14464 KB Output is correct
44 Correct 11 ms 14464 KB Output is correct
45 Correct 8 ms 14464 KB Output is correct
46 Correct 11 ms 14464 KB Output is correct
47 Correct 11 ms 14464 KB Output is correct
48 Correct 8 ms 14464 KB Output is correct
49 Correct 8 ms 14464 KB Output is correct
50 Correct 8 ms 14464 KB Output is correct
51 Correct 9 ms 14464 KB Output is correct
52 Correct 8 ms 14464 KB Output is correct
53 Correct 8 ms 14464 KB Output is correct
54 Correct 8 ms 14464 KB Output is correct
55 Correct 8 ms 14464 KB Output is correct
56 Correct 8 ms 14464 KB Output is correct
57 Correct 9 ms 14464 KB Output is correct
58 Correct 8 ms 14464 KB Output is correct
59 Correct 8 ms 14464 KB Output is correct
60 Correct 8 ms 14464 KB Output is correct
61 Correct 8 ms 14464 KB Output is correct
62 Correct 8 ms 14464 KB Output is correct
63 Correct 7 ms 14464 KB Output is correct
64 Correct 8 ms 14464 KB Output is correct
65 Correct 8 ms 14464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 82 ms 32116 KB Output is correct
2 Correct 83 ms 32112 KB Output is correct
3 Correct 92 ms 30780 KB Output is correct
4 Correct 99 ms 30728 KB Output is correct
5 Correct 89 ms 27892 KB Output is correct
6 Correct 98 ms 29684 KB Output is correct
7 Correct 105 ms 27640 KB Output is correct
8 Correct 105 ms 28152 KB Output is correct
9 Correct 114 ms 26080 KB Output is correct
10 Correct 109 ms 26360 KB Output is correct
11 Correct 84 ms 23928 KB Output is correct
12 Correct 79 ms 23672 KB Output is correct
13 Correct 72 ms 23544 KB Output is correct
14 Correct 93 ms 23356 KB Output is correct
15 Correct 61 ms 22396 KB Output is correct
16 Correct 57 ms 22136 KB Output is correct
17 Correct 10 ms 15616 KB Output is correct
18 Correct 10 ms 15616 KB Output is correct
19 Correct 10 ms 15616 KB Output is correct
20 Correct 10 ms 15616 KB Output is correct
21 Correct 10 ms 15616 KB Output is correct
22 Correct 10 ms 15616 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14592 KB Output is correct
2 Correct 9 ms 14576 KB Output is correct
3 Correct 10 ms 14592 KB Output is correct
4 Correct 9 ms 14720 KB Output is correct
5 Correct 10 ms 14592 KB Output is correct
6 Correct 9 ms 14592 KB Output is correct
7 Correct 14 ms 14592 KB Output is correct
8 Correct 11 ms 14592 KB Output is correct
9 Correct 9 ms 14592 KB Output is correct
10 Correct 10 ms 14592 KB Output is correct
11 Correct 10 ms 14592 KB Output is correct
12 Correct 8 ms 14464 KB Output is correct
13 Correct 10 ms 14592 KB Output is correct
14 Correct 8 ms 14592 KB Output is correct
15 Correct 10 ms 14592 KB Output is correct
16 Correct 8 ms 14464 KB Output is correct
17 Correct 10 ms 14592 KB Output is correct
18 Correct 10 ms 14592 KB Output is correct
19 Correct 9 ms 14592 KB Output is correct
20 Correct 9 ms 14592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 101 ms 26104 KB Output is correct
2 Correct 109 ms 26104 KB Output is correct
3 Correct 111 ms 26104 KB Output is correct
4 Correct 120 ms 26104 KB Output is correct
5 Correct 102 ms 26104 KB Output is correct
6 Correct 110 ms 34424 KB Output is correct
7 Correct 118 ms 31612 KB Output is correct
8 Correct 127 ms 30200 KB Output is correct
9 Correct 151 ms 28792 KB Output is correct
10 Correct 127 ms 26104 KB Output is correct
11 Correct 107 ms 26104 KB Output is correct
12 Correct 103 ms 26104 KB Output is correct
13 Correct 107 ms 26104 KB Output is correct
14 Correct 128 ms 25592 KB Output is correct
15 Correct 96 ms 24952 KB Output is correct
16 Correct 56 ms 22392 KB Output is correct
17 Correct 81 ms 26848 KB Output is correct
18 Correct 99 ms 26736 KB Output is correct
19 Correct 97 ms 26732 KB Output is correct
20 Correct 76 ms 26744 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 14592 KB Output is correct
2 Correct 8 ms 14592 KB Output is correct
3 Correct 10 ms 14592 KB Output is correct
4 Correct 9 ms 14592 KB Output is correct
5 Correct 10 ms 14592 KB Output is correct
6 Correct 9 ms 14592 KB Output is correct
7 Correct 8 ms 14592 KB Output is correct
8 Correct 11 ms 14592 KB Output is correct
9 Correct 8 ms 14592 KB Output is correct
10 Correct 9 ms 14592 KB Output is correct
11 Correct 8 ms 14592 KB Output is correct
12 Correct 9 ms 14592 KB Output is correct
13 Correct 10 ms 14592 KB Output is correct
14 Correct 11 ms 14592 KB Output is correct
15 Correct 9 ms 14592 KB Output is correct
16 Correct 9 ms 14592 KB Output is correct
17 Correct 9 ms 14592 KB Output is correct
18 Correct 8 ms 14592 KB Output is correct
19 Correct 9 ms 14592 KB Output is correct
20 Correct 9 ms 14592 KB Output is correct
21 Correct 8 ms 14592 KB Output is correct
22 Correct 8 ms 14592 KB Output is correct
23 Correct 8 ms 14592 KB Output is correct
24 Correct 9 ms 14592 KB Output is correct
25 Correct 8 ms 14464 KB Output is correct
26 Correct 12 ms 14464 KB Output is correct
27 Correct 8 ms 14464 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 102 ms 26104 KB Output is correct
2 Correct 126 ms 25976 KB Output is correct
3 Correct 163 ms 25452 KB Output is correct
4 Correct 107 ms 24440 KB Output is correct
5 Correct 103 ms 23624 KB Output is correct
6 Correct 94 ms 23288 KB Output is correct
7 Correct 123 ms 23160 KB Output is correct
8 Correct 98 ms 22972 KB Output is correct
9 Correct 93 ms 22904 KB Output is correct
10 Correct 114 ms 22776 KB Output is correct
11 Correct 101 ms 22776 KB Output is correct
12 Correct 106 ms 22848 KB Output is correct
13 Correct 104 ms 22908 KB Output is correct
14 Correct 102 ms 25080 KB Output is correct
15 Correct 118 ms 31224 KB Output is correct
16 Correct 160 ms 29304 KB Output is correct
17 Correct 143 ms 29816 KB Output is correct
18 Correct 149 ms 28024 KB Output is correct
19 Correct 128 ms 24440 KB Output is correct
20 Correct 113 ms 24568 KB Output is correct
21 Correct 109 ms 24544 KB Output is correct
22 Correct 96 ms 24056 KB Output is correct
23 Correct 85 ms 23544 KB Output is correct
24 Correct 101 ms 25720 KB Output is correct
25 Correct 103 ms 25720 KB Output is correct
26 Correct 101 ms 25076 KB Output is correct
27 Correct 107 ms 25080 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14464 KB Output is correct
2 Correct 7 ms 14464 KB Output is correct
3 Correct 8 ms 14464 KB Output is correct
4 Correct 8 ms 14464 KB Output is correct
5 Correct 11 ms 14464 KB Output is correct
6 Correct 11 ms 14464 KB Output is correct
7 Correct 9 ms 14456 KB Output is correct
8 Correct 11 ms 14464 KB Output is correct
9 Correct 8 ms 14464 KB Output is correct
10 Correct 8 ms 14464 KB Output is correct
11 Correct 8 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 9 ms 14464 KB Output is correct
14 Correct 8 ms 14464 KB Output is correct
15 Correct 9 ms 14464 KB Output is correct
16 Correct 8 ms 14464 KB Output is correct
17 Correct 9 ms 14464 KB Output is correct
18 Correct 8 ms 14464 KB Output is correct
19 Correct 8 ms 14464 KB Output is correct
20 Correct 8 ms 14464 KB Output is correct
21 Correct 8 ms 14464 KB Output is correct
22 Correct 8 ms 14464 KB Output is correct
23 Correct 8 ms 14464 KB Output is correct
24 Correct 7 ms 14464 KB Output is correct
25 Correct 8 ms 14464 KB Output is correct
26 Correct 11 ms 14464 KB Output is correct
27 Correct 11 ms 14464 KB Output is correct
28 Correct 10 ms 14444 KB Output is correct
29 Correct 7 ms 14464 KB Output is correct
30 Correct 8 ms 14464 KB Output is correct
31 Correct 8 ms 14464 KB Output is correct
32 Correct 9 ms 14464 KB Output is correct
33 Correct 8 ms 14464 KB Output is correct
34 Correct 7 ms 14464 KB Output is correct
35 Correct 8 ms 14464 KB Output is correct
36 Correct 7 ms 14464 KB Output is correct
37 Correct 12 ms 14464 KB Output is correct
38 Correct 11 ms 14464 KB Output is correct
39 Correct 8 ms 14464 KB Output is correct
40 Correct 8 ms 14464 KB Output is correct
41 Correct 8 ms 14464 KB Output is correct
42 Correct 8 ms 14464 KB Output is correct
43 Correct 11 ms 14464 KB Output is correct
44 Correct 11 ms 14464 KB Output is correct
45 Correct 8 ms 14464 KB Output is correct
46 Correct 11 ms 14464 KB Output is correct
47 Correct 11 ms 14464 KB Output is correct
48 Correct 8 ms 14464 KB Output is correct
49 Correct 8 ms 14464 KB Output is correct
50 Correct 8 ms 14464 KB Output is correct
51 Correct 9 ms 14464 KB Output is correct
52 Correct 8 ms 14464 KB Output is correct
53 Correct 8 ms 14464 KB Output is correct
54 Correct 8 ms 14464 KB Output is correct
55 Correct 8 ms 14464 KB Output is correct
56 Correct 8 ms 14464 KB Output is correct
57 Correct 9 ms 14464 KB Output is correct
58 Correct 8 ms 14464 KB Output is correct
59 Correct 8 ms 14464 KB Output is correct
60 Correct 8 ms 14464 KB Output is correct
61 Correct 8 ms 14464 KB Output is correct
62 Correct 8 ms 14464 KB Output is correct
63 Correct 7 ms 14464 KB Output is correct
64 Correct 8 ms 14464 KB Output is correct
65 Correct 8 ms 14464 KB Output is correct
66 Correct 8 ms 14464 KB Output is correct
67 Correct 8 ms 14464 KB Output is correct
68 Correct 9 ms 14592 KB Output is correct
69 Correct 10 ms 14720 KB Output is correct
70 Correct 11 ms 14592 KB Output is correct
71 Correct 8 ms 14592 KB Output is correct
72 Correct 10 ms 14592 KB Output is correct
73 Correct 9 ms 14592 KB Output is correct
74 Correct 8 ms 14592 KB Output is correct
75 Correct 10 ms 14592 KB Output is correct
76 Correct 8 ms 14464 KB Output is correct
77 Correct 9 ms 14592 KB Output is correct
78 Correct 13 ms 14592 KB Output is correct
79 Correct 8 ms 14592 KB Output is correct
80 Correct 8 ms 14592 KB Output is correct
81 Correct 9 ms 14532 KB Output is correct
82 Correct 8 ms 14592 KB Output is correct
83 Correct 8 ms 14592 KB Output is correct
84 Correct 8 ms 14592 KB Output is correct
85 Correct 9 ms 14592 KB Output is correct
86 Correct 8 ms 14592 KB Output is correct
87 Correct 9 ms 14592 KB Output is correct
88 Correct 8 ms 14592 KB Output is correct
89 Correct 9 ms 14592 KB Output is correct
90 Correct 9 ms 14592 KB Output is correct
91 Correct 9 ms 14592 KB Output is correct
92 Correct 9 ms 14592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 14464 KB Output is correct
2 Correct 7 ms 14464 KB Output is correct
3 Correct 8 ms 14464 KB Output is correct
4 Correct 8 ms 14464 KB Output is correct
5 Correct 11 ms 14464 KB Output is correct
6 Correct 11 ms 14464 KB Output is correct
7 Correct 9 ms 14456 KB Output is correct
8 Correct 11 ms 14464 KB Output is correct
9 Correct 8 ms 14464 KB Output is correct
10 Correct 8 ms 14464 KB Output is correct
11 Correct 8 ms 14464 KB Output is correct
12 Correct 12 ms 14464 KB Output is correct
13 Correct 9 ms 14464 KB Output is correct
14 Correct 8 ms 14464 KB Output is correct
15 Correct 9 ms 14464 KB Output is correct
16 Correct 8 ms 14464 KB Output is correct
17 Correct 9 ms 14464 KB Output is correct
18 Correct 8 ms 14464 KB Output is correct
19 Correct 8 ms 14464 KB Output is correct
20 Correct 8 ms 14464 KB Output is correct
21 Correct 8 ms 14464 KB Output is correct
22 Correct 8 ms 14464 KB Output is correct
23 Correct 8 ms 14464 KB Output is correct
24 Correct 7 ms 14464 KB Output is correct
25 Correct 8 ms 14464 KB Output is correct
26 Correct 11 ms 14464 KB Output is correct
27 Correct 11 ms 14464 KB Output is correct
28 Correct 10 ms 14444 KB Output is correct
29 Correct 7 ms 14464 KB Output is correct
30 Correct 8 ms 14464 KB Output is correct
31 Correct 8 ms 14464 KB Output is correct
32 Correct 9 ms 14464 KB Output is correct
33 Correct 8 ms 14464 KB Output is correct
34 Correct 7 ms 14464 KB Output is correct
35 Correct 8 ms 14464 KB Output is correct
36 Correct 7 ms 14464 KB Output is correct
37 Correct 12 ms 14464 KB Output is correct
38 Correct 11 ms 14464 KB Output is correct
39 Correct 8 ms 14464 KB Output is correct
40 Correct 8 ms 14464 KB Output is correct
41 Correct 8 ms 14464 KB Output is correct
42 Correct 8 ms 14464 KB Output is correct
43 Correct 11 ms 14464 KB Output is correct
44 Correct 11 ms 14464 KB Output is correct
45 Correct 8 ms 14464 KB Output is correct
46 Correct 11 ms 14464 KB Output is correct
47 Correct 11 ms 14464 KB Output is correct
48 Correct 8 ms 14464 KB Output is correct
49 Correct 8 ms 14464 KB Output is correct
50 Correct 8 ms 14464 KB Output is correct
51 Correct 9 ms 14464 KB Output is correct
52 Correct 8 ms 14464 KB Output is correct
53 Correct 8 ms 14464 KB Output is correct
54 Correct 8 ms 14464 KB Output is correct
55 Correct 8 ms 14464 KB Output is correct
56 Correct 8 ms 14464 KB Output is correct
57 Correct 9 ms 14464 KB Output is correct
58 Correct 8 ms 14464 KB Output is correct
59 Correct 8 ms 14464 KB Output is correct
60 Correct 8 ms 14464 KB Output is correct
61 Correct 8 ms 14464 KB Output is correct
62 Correct 8 ms 14464 KB Output is correct
63 Correct 7 ms 14464 KB Output is correct
64 Correct 8 ms 14464 KB Output is correct
65 Correct 8 ms 14464 KB Output is correct
66 Correct 82 ms 32116 KB Output is correct
67 Correct 83 ms 32112 KB Output is correct
68 Correct 92 ms 30780 KB Output is correct
69 Correct 99 ms 30728 KB Output is correct
70 Correct 89 ms 27892 KB Output is correct
71 Correct 98 ms 29684 KB Output is correct
72 Correct 105 ms 27640 KB Output is correct
73 Correct 105 ms 28152 KB Output is correct
74 Correct 114 ms 26080 KB Output is correct
75 Correct 109 ms 26360 KB Output is correct
76 Correct 84 ms 23928 KB Output is correct
77 Correct 79 ms 23672 KB Output is correct
78 Correct 72 ms 23544 KB Output is correct
79 Correct 93 ms 23356 KB Output is correct
80 Correct 61 ms 22396 KB Output is correct
81 Correct 57 ms 22136 KB Output is correct
82 Correct 10 ms 15616 KB Output is correct
83 Correct 10 ms 15616 KB Output is correct
84 Correct 10 ms 15616 KB Output is correct
85 Correct 10 ms 15616 KB Output is correct
86 Correct 10 ms 15616 KB Output is correct
87 Correct 10 ms 15616 KB Output is correct
88 Correct 8 ms 14592 KB Output is correct
89 Correct 9 ms 14576 KB Output is correct
90 Correct 10 ms 14592 KB Output is correct
91 Correct 9 ms 14720 KB Output is correct
92 Correct 10 ms 14592 KB Output is correct
93 Correct 9 ms 14592 KB Output is correct
94 Correct 14 ms 14592 KB Output is correct
95 Correct 11 ms 14592 KB Output is correct
96 Correct 9 ms 14592 KB Output is correct
97 Correct 10 ms 14592 KB Output is correct
98 Correct 10 ms 14592 KB Output is correct
99 Correct 8 ms 14464 KB Output is correct
100 Correct 10 ms 14592 KB Output is correct
101 Correct 8 ms 14592 KB Output is correct
102 Correct 10 ms 14592 KB Output is correct
103 Correct 8 ms 14464 KB Output is correct
104 Correct 10 ms 14592 KB Output is correct
105 Correct 10 ms 14592 KB Output is correct
106 Correct 9 ms 14592 KB Output is correct
107 Correct 9 ms 14592 KB Output is correct
108 Correct 101 ms 26104 KB Output is correct
109 Correct 109 ms 26104 KB Output is correct
110 Correct 111 ms 26104 KB Output is correct
111 Correct 120 ms 26104 KB Output is correct
112 Correct 102 ms 26104 KB Output is correct
113 Correct 110 ms 34424 KB Output is correct
114 Correct 118 ms 31612 KB Output is correct
115 Correct 127 ms 30200 KB Output is correct
116 Correct 151 ms 28792 KB Output is correct
117 Correct 127 ms 26104 KB Output is correct
118 Correct 107 ms 26104 KB Output is correct
119 Correct 103 ms 26104 KB Output is correct
120 Correct 107 ms 26104 KB Output is correct
121 Correct 128 ms 25592 KB Output is correct
122 Correct 96 ms 24952 KB Output is correct
123 Correct 56 ms 22392 KB Output is correct
124 Correct 81 ms 26848 KB Output is correct
125 Correct 99 ms 26736 KB Output is correct
126 Correct 97 ms 26732 KB Output is correct
127 Correct 76 ms 26744 KB Output is correct
128 Correct 10 ms 14592 KB Output is correct
129 Correct 8 ms 14592 KB Output is correct
130 Correct 10 ms 14592 KB Output is correct
131 Correct 9 ms 14592 KB Output is correct
132 Correct 10 ms 14592 KB Output is correct
133 Correct 9 ms 14592 KB Output is correct
134 Correct 8 ms 14592 KB Output is correct
135 Correct 11 ms 14592 KB Output is correct
136 Correct 8 ms 14592 KB Output is correct
137 Correct 9 ms 14592 KB Output is correct
138 Correct 8 ms 14592 KB Output is correct
139 Correct 9 ms 14592 KB Output is correct
140 Correct 10 ms 14592 KB Output is correct
141 Correct 11 ms 14592 KB Output is correct
142 Correct 9 ms 14592 KB Output is correct
143 Correct 9 ms 14592 KB Output is correct
144 Correct 9 ms 14592 KB Output is correct
145 Correct 8 ms 14592 KB Output is correct
146 Correct 9 ms 14592 KB Output is correct
147 Correct 9 ms 14592 KB Output is correct
148 Correct 8 ms 14592 KB Output is correct
149 Correct 8 ms 14592 KB Output is correct
150 Correct 8 ms 14592 KB Output is correct
151 Correct 9 ms 14592 KB Output is correct
152 Correct 8 ms 14464 KB Output is correct
153 Correct 12 ms 14464 KB Output is correct
154 Correct 8 ms 14464 KB Output is correct
155 Correct 102 ms 26104 KB Output is correct
156 Correct 126 ms 25976 KB Output is correct
157 Correct 163 ms 25452 KB Output is correct
158 Correct 107 ms 24440 KB Output is correct
159 Correct 103 ms 23624 KB Output is correct
160 Correct 94 ms 23288 KB Output is correct
161 Correct 123 ms 23160 KB Output is correct
162 Correct 98 ms 22972 KB Output is correct
163 Correct 93 ms 22904 KB Output is correct
164 Correct 114 ms 22776 KB Output is correct
165 Correct 101 ms 22776 KB Output is correct
166 Correct 106 ms 22848 KB Output is correct
167 Correct 104 ms 22908 KB Output is correct
168 Correct 102 ms 25080 KB Output is correct
169 Correct 118 ms 31224 KB Output is correct
170 Correct 160 ms 29304 KB Output is correct
171 Correct 143 ms 29816 KB Output is correct
172 Correct 149 ms 28024 KB Output is correct
173 Correct 128 ms 24440 KB Output is correct
174 Correct 113 ms 24568 KB Output is correct
175 Correct 109 ms 24544 KB Output is correct
176 Correct 96 ms 24056 KB Output is correct
177 Correct 85 ms 23544 KB Output is correct
178 Correct 101 ms 25720 KB Output is correct
179 Correct 103 ms 25720 KB Output is correct
180 Correct 101 ms 25076 KB Output is correct
181 Correct 107 ms 25080 KB Output is correct
182 Correct 8 ms 14464 KB Output is correct
183 Correct 8 ms 14464 KB Output is correct
184 Correct 9 ms 14592 KB Output is correct
185 Correct 10 ms 14720 KB Output is correct
186 Correct 11 ms 14592 KB Output is correct
187 Correct 8 ms 14592 KB Output is correct
188 Correct 10 ms 14592 KB Output is correct
189 Correct 9 ms 14592 KB Output is correct
190 Correct 8 ms 14592 KB Output is correct
191 Correct 10 ms 14592 KB Output is correct
192 Correct 8 ms 14464 KB Output is correct
193 Correct 9 ms 14592 KB Output is correct
194 Correct 13 ms 14592 KB Output is correct
195 Correct 8 ms 14592 KB Output is correct
196 Correct 8 ms 14592 KB Output is correct
197 Correct 9 ms 14532 KB Output is correct
198 Correct 8 ms 14592 KB Output is correct
199 Correct 8 ms 14592 KB Output is correct
200 Correct 8 ms 14592 KB Output is correct
201 Correct 9 ms 14592 KB Output is correct
202 Correct 8 ms 14592 KB Output is correct
203 Correct 9 ms 14592 KB Output is correct
204 Correct 8 ms 14592 KB Output is correct
205 Correct 9 ms 14592 KB Output is correct
206 Correct 9 ms 14592 KB Output is correct
207 Correct 9 ms 14592 KB Output is correct
208 Correct 9 ms 14592 KB Output is correct
209 Correct 9 ms 15360 KB Output is correct
210 Correct 54 ms 22268 KB Output is correct
211 Correct 100 ms 26740 KB Output is correct
212 Correct 133 ms 29680 KB Output is correct
213 Correct 163 ms 31728 KB Output is correct
214 Correct 68 ms 24824 KB Output is correct
215 Correct 75 ms 24696 KB Output is correct
216 Correct 130 ms 26744 KB Output is correct
217 Correct 134 ms 25592 KB Output is correct
218 Correct 133 ms 24312 KB Output is correct
219 Correct 144 ms 24056 KB Output is correct
220 Correct 113 ms 24060 KB Output is correct
221 Correct 107 ms 24056 KB Output is correct
222 Correct 102 ms 25208 KB Output is correct
223 Correct 114 ms 28024 KB Output is correct
224 Correct 136 ms 27256 KB Output is correct
225 Correct 116 ms 25336 KB Output is correct
226 Correct 106 ms 25336 KB Output is correct
227 Correct 105 ms 25336 KB Output is correct
228 Correct 98 ms 24824 KB Output is correct
229 Correct 87 ms 24568 KB Output is correct
230 Correct 102 ms 25848 KB Output is correct
231 Correct 105 ms 25848 KB Output is correct