#include "traffic.h"
#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include <cmath>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<int, int> pl;
typedef pair<ld, ld> pd;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<vector<long long>> vvl;
typedef vector<ld> vd;
typedef vector<long long> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
#define FOR(i, a, b) for (ll i = a; i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define FORd(i, a, b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--)
#define trav(a, x) for (auto &a : x)
#define uid(a, b) uniform_int_distribution<int>(a, b)(rng)
#define len(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define F first
#define nl endl
#define S second
#define lb lower_bound
#define ub upper_bound
#define aint(x) x.begin(), x.end()
#define raint(x) x.rbegin(), x.rend()
#define ins insert
const int MOD = 1000000007;
vvl paths(1e6 + 10);
vvl children(1e6 + 10);
vpi level(1e6+10);
vi parent(1e6+10);
void dfs(int pos,int height,int visited){
level[pos] = {height,pos};
for(auto e:paths[pos]){
if(e == visited)continue;
parent[e] = pos;
dfs(e,height+1,pos);
}
}
int LocateCentre(int N, int pp[], int S[], int D[]) {
ll sum = 0;
ll ans = 9e18;
int anspos = -1;
FOR(i,0,N)sum += pp[i];
paths = vvl(N,vl());
children = vvl(N,vl());
level = vpi(N);
parent = vi(N,-1);
FOR(i,0,N-1){
paths[S[i]].pb(D[i]);
paths[D[i]].pb(S[i]);
}
dfs(0,0,-1);
sort(level.rbegin(),level.rend());
FOR(i,0,N){
ll a = level[i].S;
ll temp3 = -1;
ll temp = sum - pp[a], temp2 = pp[a];
for(auto j:children[a]){
temp3 = max(temp3,j);
temp -= j;
temp2 += j;
}
children[a].pb(temp);
temp3 = max(temp3,temp);
if(ans > temp3)anspos = a;
ans = min(ans,temp3);
if(a == 0)continue;
children[parent[a]].pb(temp2);
}
return anspos;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
63276 KB |
Output is correct |
2 |
Correct |
16 ms |
63068 KB |
Output is correct |
3 |
Correct |
13 ms |
63036 KB |
Output is correct |
4 |
Correct |
13 ms |
63208 KB |
Output is correct |
5 |
Correct |
13 ms |
63068 KB |
Output is correct |
6 |
Correct |
12 ms |
63284 KB |
Output is correct |
7 |
Correct |
13 ms |
63264 KB |
Output is correct |
8 |
Correct |
13 ms |
63068 KB |
Output is correct |
9 |
Correct |
14 ms |
63280 KB |
Output is correct |
10 |
Correct |
12 ms |
63068 KB |
Output is correct |
11 |
Correct |
14 ms |
63068 KB |
Output is correct |
12 |
Correct |
12 ms |
63068 KB |
Output is correct |
13 |
Correct |
13 ms |
63068 KB |
Output is correct |
14 |
Correct |
13 ms |
63268 KB |
Output is correct |
15 |
Correct |
14 ms |
63068 KB |
Output is correct |
16 |
Correct |
17 ms |
63132 KB |
Output is correct |
17 |
Correct |
13 ms |
63068 KB |
Output is correct |
18 |
Correct |
12 ms |
63068 KB |
Output is correct |
19 |
Correct |
12 ms |
63068 KB |
Output is correct |
20 |
Correct |
18 ms |
63068 KB |
Output is correct |
21 |
Correct |
13 ms |
63176 KB |
Output is correct |
22 |
Correct |
12 ms |
63068 KB |
Output is correct |
23 |
Correct |
13 ms |
63048 KB |
Output is correct |
24 |
Correct |
17 ms |
63064 KB |
Output is correct |
25 |
Correct |
13 ms |
63068 KB |
Output is correct |
26 |
Correct |
13 ms |
63068 KB |
Output is correct |
27 |
Correct |
12 ms |
63044 KB |
Output is correct |
28 |
Correct |
14 ms |
63068 KB |
Output is correct |
29 |
Correct |
18 ms |
63068 KB |
Output is correct |
30 |
Correct |
17 ms |
63068 KB |
Output is correct |
31 |
Correct |
13 ms |
63068 KB |
Output is correct |
32 |
Correct |
18 ms |
63300 KB |
Output is correct |
33 |
Correct |
14 ms |
63068 KB |
Output is correct |
34 |
Correct |
16 ms |
63068 KB |
Output is correct |
35 |
Correct |
14 ms |
63068 KB |
Output is correct |
36 |
Correct |
14 ms |
63300 KB |
Output is correct |
37 |
Correct |
14 ms |
63260 KB |
Output is correct |
38 |
Correct |
14 ms |
63068 KB |
Output is correct |
39 |
Correct |
13 ms |
63068 KB |
Output is correct |
40 |
Correct |
15 ms |
63068 KB |
Output is correct |
41 |
Correct |
14 ms |
63068 KB |
Output is correct |
42 |
Correct |
15 ms |
63068 KB |
Output is correct |
43 |
Correct |
13 ms |
61020 KB |
Output is correct |
44 |
Correct |
13 ms |
63144 KB |
Output is correct |
45 |
Correct |
12 ms |
63272 KB |
Output is correct |
46 |
Correct |
16 ms |
63068 KB |
Output is correct |
47 |
Correct |
14 ms |
63068 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
63276 KB |
Output is correct |
2 |
Correct |
16 ms |
63068 KB |
Output is correct |
3 |
Correct |
13 ms |
63036 KB |
Output is correct |
4 |
Correct |
13 ms |
63208 KB |
Output is correct |
5 |
Correct |
13 ms |
63068 KB |
Output is correct |
6 |
Correct |
12 ms |
63284 KB |
Output is correct |
7 |
Correct |
13 ms |
63264 KB |
Output is correct |
8 |
Correct |
13 ms |
63068 KB |
Output is correct |
9 |
Correct |
14 ms |
63280 KB |
Output is correct |
10 |
Correct |
12 ms |
63068 KB |
Output is correct |
11 |
Correct |
14 ms |
63068 KB |
Output is correct |
12 |
Correct |
12 ms |
63068 KB |
Output is correct |
13 |
Correct |
13 ms |
63068 KB |
Output is correct |
14 |
Correct |
13 ms |
63268 KB |
Output is correct |
15 |
Correct |
14 ms |
63068 KB |
Output is correct |
16 |
Correct |
17 ms |
63132 KB |
Output is correct |
17 |
Correct |
13 ms |
63068 KB |
Output is correct |
18 |
Correct |
12 ms |
63068 KB |
Output is correct |
19 |
Correct |
12 ms |
63068 KB |
Output is correct |
20 |
Correct |
18 ms |
63068 KB |
Output is correct |
21 |
Correct |
13 ms |
63176 KB |
Output is correct |
22 |
Correct |
12 ms |
63068 KB |
Output is correct |
23 |
Correct |
13 ms |
63048 KB |
Output is correct |
24 |
Correct |
17 ms |
63064 KB |
Output is correct |
25 |
Correct |
13 ms |
63068 KB |
Output is correct |
26 |
Correct |
13 ms |
63068 KB |
Output is correct |
27 |
Correct |
12 ms |
63044 KB |
Output is correct |
28 |
Correct |
14 ms |
63068 KB |
Output is correct |
29 |
Correct |
18 ms |
63068 KB |
Output is correct |
30 |
Correct |
17 ms |
63068 KB |
Output is correct |
31 |
Correct |
13 ms |
63068 KB |
Output is correct |
32 |
Correct |
18 ms |
63300 KB |
Output is correct |
33 |
Correct |
14 ms |
63068 KB |
Output is correct |
34 |
Correct |
16 ms |
63068 KB |
Output is correct |
35 |
Correct |
14 ms |
63068 KB |
Output is correct |
36 |
Correct |
14 ms |
63300 KB |
Output is correct |
37 |
Correct |
14 ms |
63260 KB |
Output is correct |
38 |
Correct |
14 ms |
63068 KB |
Output is correct |
39 |
Correct |
13 ms |
63068 KB |
Output is correct |
40 |
Correct |
15 ms |
63068 KB |
Output is correct |
41 |
Correct |
14 ms |
63068 KB |
Output is correct |
42 |
Correct |
15 ms |
63068 KB |
Output is correct |
43 |
Correct |
13 ms |
61020 KB |
Output is correct |
44 |
Correct |
13 ms |
63144 KB |
Output is correct |
45 |
Correct |
12 ms |
63272 KB |
Output is correct |
46 |
Correct |
16 ms |
63068 KB |
Output is correct |
47 |
Correct |
14 ms |
63068 KB |
Output is correct |
48 |
Correct |
16 ms |
63068 KB |
Output is correct |
49 |
Correct |
15 ms |
63068 KB |
Output is correct |
50 |
Correct |
14 ms |
63068 KB |
Output is correct |
51 |
Correct |
14 ms |
63052 KB |
Output is correct |
52 |
Correct |
13 ms |
63068 KB |
Output is correct |
53 |
Correct |
15 ms |
63068 KB |
Output is correct |
54 |
Correct |
14 ms |
63068 KB |
Output is correct |
55 |
Correct |
13 ms |
63068 KB |
Output is correct |
56 |
Correct |
12 ms |
63040 KB |
Output is correct |
57 |
Correct |
13 ms |
63068 KB |
Output is correct |
58 |
Correct |
13 ms |
63068 KB |
Output is correct |
59 |
Correct |
13 ms |
63068 KB |
Output is correct |
60 |
Correct |
13 ms |
63068 KB |
Output is correct |
61 |
Correct |
17 ms |
63068 KB |
Output is correct |
62 |
Correct |
14 ms |
63068 KB |
Output is correct |
63 |
Correct |
14 ms |
63068 KB |
Output is correct |
64 |
Correct |
18 ms |
63068 KB |
Output is correct |
65 |
Correct |
14 ms |
63184 KB |
Output is correct |
66 |
Correct |
14 ms |
63068 KB |
Output is correct |
67 |
Correct |
13 ms |
63240 KB |
Output is correct |
68 |
Correct |
37 ms |
67336 KB |
Output is correct |
69 |
Correct |
56 ms |
71492 KB |
Output is correct |
70 |
Correct |
14 ms |
63068 KB |
Output is correct |
71 |
Correct |
84 ms |
75524 KB |
Output is correct |
72 |
Correct |
89 ms |
77652 KB |
Output is correct |
73 |
Correct |
105 ms |
79676 KB |
Output is correct |
74 |
Correct |
126 ms |
81748 KB |
Output is correct |
75 |
Correct |
146 ms |
83864 KB |
Output is correct |
76 |
Correct |
191 ms |
86100 KB |
Output is correct |
77 |
Correct |
211 ms |
94548 KB |
Output is correct |
78 |
Correct |
233 ms |
103820 KB |
Output is correct |
79 |
Correct |
217 ms |
113240 KB |
Output is correct |
80 |
Correct |
236 ms |
122452 KB |
Output is correct |
81 |
Correct |
12 ms |
63068 KB |
Output is correct |
82 |
Correct |
279 ms |
131856 KB |
Output is correct |
83 |
Correct |
328 ms |
141152 KB |
Output is correct |
84 |
Correct |
360 ms |
150720 KB |
Output is correct |
85 |
Correct |
354 ms |
160340 KB |
Output is correct |
86 |
Correct |
390 ms |
169604 KB |
Output is correct |
87 |
Correct |
349 ms |
179328 KB |
Output is correct |
88 |
Correct |
378 ms |
188764 KB |
Output is correct |
89 |
Correct |
402 ms |
197992 KB |
Output is correct |
90 |
Correct |
16 ms |
61020 KB |
Output is correct |
91 |
Correct |
14 ms |
63048 KB |
Output is correct |
92 |
Correct |
14 ms |
63032 KB |
Output is correct |
93 |
Correct |
12 ms |
63108 KB |
Output is correct |
94 |
Correct |
13 ms |
63068 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
63276 KB |
Output is correct |
2 |
Correct |
16 ms |
63068 KB |
Output is correct |
3 |
Correct |
13 ms |
63036 KB |
Output is correct |
4 |
Correct |
13 ms |
63208 KB |
Output is correct |
5 |
Correct |
13 ms |
63068 KB |
Output is correct |
6 |
Correct |
12 ms |
63284 KB |
Output is correct |
7 |
Correct |
13 ms |
63264 KB |
Output is correct |
8 |
Correct |
13 ms |
63068 KB |
Output is correct |
9 |
Correct |
14 ms |
63280 KB |
Output is correct |
10 |
Correct |
12 ms |
63068 KB |
Output is correct |
11 |
Correct |
14 ms |
63068 KB |
Output is correct |
12 |
Correct |
12 ms |
63068 KB |
Output is correct |
13 |
Correct |
13 ms |
63068 KB |
Output is correct |
14 |
Correct |
13 ms |
63268 KB |
Output is correct |
15 |
Correct |
14 ms |
63068 KB |
Output is correct |
16 |
Correct |
17 ms |
63132 KB |
Output is correct |
17 |
Correct |
13 ms |
63068 KB |
Output is correct |
18 |
Correct |
12 ms |
63068 KB |
Output is correct |
19 |
Correct |
12 ms |
63068 KB |
Output is correct |
20 |
Correct |
18 ms |
63068 KB |
Output is correct |
21 |
Correct |
13 ms |
63176 KB |
Output is correct |
22 |
Correct |
12 ms |
63068 KB |
Output is correct |
23 |
Correct |
13 ms |
63048 KB |
Output is correct |
24 |
Correct |
17 ms |
63064 KB |
Output is correct |
25 |
Correct |
13 ms |
63068 KB |
Output is correct |
26 |
Correct |
13 ms |
63068 KB |
Output is correct |
27 |
Correct |
12 ms |
63044 KB |
Output is correct |
28 |
Correct |
14 ms |
63068 KB |
Output is correct |
29 |
Correct |
18 ms |
63068 KB |
Output is correct |
30 |
Correct |
17 ms |
63068 KB |
Output is correct |
31 |
Correct |
13 ms |
63068 KB |
Output is correct |
32 |
Correct |
18 ms |
63300 KB |
Output is correct |
33 |
Correct |
14 ms |
63068 KB |
Output is correct |
34 |
Correct |
16 ms |
63068 KB |
Output is correct |
35 |
Correct |
14 ms |
63068 KB |
Output is correct |
36 |
Correct |
14 ms |
63300 KB |
Output is correct |
37 |
Correct |
14 ms |
63260 KB |
Output is correct |
38 |
Correct |
14 ms |
63068 KB |
Output is correct |
39 |
Correct |
13 ms |
63068 KB |
Output is correct |
40 |
Correct |
15 ms |
63068 KB |
Output is correct |
41 |
Correct |
14 ms |
63068 KB |
Output is correct |
42 |
Correct |
15 ms |
63068 KB |
Output is correct |
43 |
Correct |
13 ms |
61020 KB |
Output is correct |
44 |
Correct |
13 ms |
63144 KB |
Output is correct |
45 |
Correct |
12 ms |
63272 KB |
Output is correct |
46 |
Correct |
16 ms |
63068 KB |
Output is correct |
47 |
Correct |
14 ms |
63068 KB |
Output is correct |
48 |
Correct |
16 ms |
63068 KB |
Output is correct |
49 |
Correct |
13 ms |
63068 KB |
Output is correct |
50 |
Correct |
14 ms |
63068 KB |
Output is correct |
51 |
Correct |
13 ms |
63068 KB |
Output is correct |
52 |
Correct |
14 ms |
63068 KB |
Output is correct |
53 |
Correct |
13 ms |
63048 KB |
Output is correct |
54 |
Correct |
13 ms |
63080 KB |
Output is correct |
55 |
Correct |
14 ms |
63068 KB |
Output is correct |
56 |
Correct |
18 ms |
63068 KB |
Output is correct |
57 |
Correct |
16 ms |
63272 KB |
Output is correct |
58 |
Correct |
13 ms |
63068 KB |
Output is correct |
59 |
Correct |
17 ms |
63068 KB |
Output is correct |
60 |
Correct |
14 ms |
63068 KB |
Output is correct |
61 |
Correct |
14 ms |
63068 KB |
Output is correct |
62 |
Correct |
12 ms |
63068 KB |
Output is correct |
63 |
Correct |
13 ms |
63064 KB |
Output is correct |
64 |
Correct |
13 ms |
63068 KB |
Output is correct |
65 |
Correct |
13 ms |
63324 KB |
Output is correct |
66 |
Correct |
14 ms |
63068 KB |
Output is correct |
67 |
Correct |
12 ms |
63068 KB |
Output is correct |
68 |
Correct |
13 ms |
63236 KB |
Output is correct |
69 |
Correct |
15 ms |
63268 KB |
Output is correct |
70 |
Correct |
13 ms |
63068 KB |
Output is correct |
71 |
Correct |
13 ms |
63032 KB |
Output is correct |
72 |
Correct |
13 ms |
63272 KB |
Output is correct |
73 |
Correct |
14 ms |
63068 KB |
Output is correct |
74 |
Correct |
13 ms |
63068 KB |
Output is correct |
75 |
Correct |
13 ms |
63068 KB |
Output is correct |
76 |
Correct |
13 ms |
63152 KB |
Output is correct |
77 |
Correct |
16 ms |
63196 KB |
Output is correct |
78 |
Correct |
12 ms |
63068 KB |
Output is correct |
79 |
Correct |
13 ms |
63068 KB |
Output is correct |
80 |
Correct |
12 ms |
63068 KB |
Output is correct |
81 |
Correct |
12 ms |
61052 KB |
Output is correct |
82 |
Correct |
13 ms |
63068 KB |
Output is correct |
83 |
Correct |
13 ms |
63068 KB |
Output is correct |
84 |
Correct |
13 ms |
63068 KB |
Output is correct |
85 |
Correct |
14 ms |
63324 KB |
Output is correct |
86 |
Correct |
13 ms |
63064 KB |
Output is correct |
87 |
Correct |
15 ms |
63068 KB |
Output is correct |
88 |
Correct |
13 ms |
63064 KB |
Output is correct |
89 |
Correct |
14 ms |
63068 KB |
Output is correct |
90 |
Correct |
13 ms |
63068 KB |
Output is correct |
91 |
Correct |
12 ms |
63068 KB |
Output is correct |
92 |
Correct |
12 ms |
63068 KB |
Output is correct |
93 |
Correct |
13 ms |
63068 KB |
Output is correct |
94 |
Correct |
13 ms |
63212 KB |
Output is correct |
95 |
Correct |
14 ms |
63068 KB |
Output is correct |
96 |
Correct |
13 ms |
63068 KB |
Output is correct |
97 |
Correct |
11 ms |
63068 KB |
Output is correct |
98 |
Correct |
12 ms |
63068 KB |
Output is correct |
99 |
Correct |
12 ms |
63068 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
13 ms |
63276 KB |
Output is correct |
2 |
Correct |
16 ms |
63068 KB |
Output is correct |
3 |
Correct |
13 ms |
63036 KB |
Output is correct |
4 |
Correct |
13 ms |
63208 KB |
Output is correct |
5 |
Correct |
13 ms |
63068 KB |
Output is correct |
6 |
Correct |
12 ms |
63284 KB |
Output is correct |
7 |
Correct |
13 ms |
63264 KB |
Output is correct |
8 |
Correct |
13 ms |
63068 KB |
Output is correct |
9 |
Correct |
14 ms |
63280 KB |
Output is correct |
10 |
Correct |
12 ms |
63068 KB |
Output is correct |
11 |
Correct |
14 ms |
63068 KB |
Output is correct |
12 |
Correct |
12 ms |
63068 KB |
Output is correct |
13 |
Correct |
13 ms |
63068 KB |
Output is correct |
14 |
Correct |
13 ms |
63268 KB |
Output is correct |
15 |
Correct |
14 ms |
63068 KB |
Output is correct |
16 |
Correct |
17 ms |
63132 KB |
Output is correct |
17 |
Correct |
13 ms |
63068 KB |
Output is correct |
18 |
Correct |
12 ms |
63068 KB |
Output is correct |
19 |
Correct |
12 ms |
63068 KB |
Output is correct |
20 |
Correct |
18 ms |
63068 KB |
Output is correct |
21 |
Correct |
13 ms |
63176 KB |
Output is correct |
22 |
Correct |
12 ms |
63068 KB |
Output is correct |
23 |
Correct |
13 ms |
63048 KB |
Output is correct |
24 |
Correct |
17 ms |
63064 KB |
Output is correct |
25 |
Correct |
13 ms |
63068 KB |
Output is correct |
26 |
Correct |
13 ms |
63068 KB |
Output is correct |
27 |
Correct |
12 ms |
63044 KB |
Output is correct |
28 |
Correct |
14 ms |
63068 KB |
Output is correct |
29 |
Correct |
18 ms |
63068 KB |
Output is correct |
30 |
Correct |
17 ms |
63068 KB |
Output is correct |
31 |
Correct |
13 ms |
63068 KB |
Output is correct |
32 |
Correct |
18 ms |
63300 KB |
Output is correct |
33 |
Correct |
14 ms |
63068 KB |
Output is correct |
34 |
Correct |
16 ms |
63068 KB |
Output is correct |
35 |
Correct |
14 ms |
63068 KB |
Output is correct |
36 |
Correct |
14 ms |
63300 KB |
Output is correct |
37 |
Correct |
14 ms |
63260 KB |
Output is correct |
38 |
Correct |
14 ms |
63068 KB |
Output is correct |
39 |
Correct |
13 ms |
63068 KB |
Output is correct |
40 |
Correct |
15 ms |
63068 KB |
Output is correct |
41 |
Correct |
14 ms |
63068 KB |
Output is correct |
42 |
Correct |
15 ms |
63068 KB |
Output is correct |
43 |
Correct |
13 ms |
61020 KB |
Output is correct |
44 |
Correct |
13 ms |
63144 KB |
Output is correct |
45 |
Correct |
12 ms |
63272 KB |
Output is correct |
46 |
Correct |
16 ms |
63068 KB |
Output is correct |
47 |
Correct |
14 ms |
63068 KB |
Output is correct |
48 |
Correct |
16 ms |
63068 KB |
Output is correct |
49 |
Correct |
15 ms |
63068 KB |
Output is correct |
50 |
Correct |
14 ms |
63068 KB |
Output is correct |
51 |
Correct |
14 ms |
63052 KB |
Output is correct |
52 |
Correct |
13 ms |
63068 KB |
Output is correct |
53 |
Correct |
15 ms |
63068 KB |
Output is correct |
54 |
Correct |
14 ms |
63068 KB |
Output is correct |
55 |
Correct |
13 ms |
63068 KB |
Output is correct |
56 |
Correct |
12 ms |
63040 KB |
Output is correct |
57 |
Correct |
13 ms |
63068 KB |
Output is correct |
58 |
Correct |
13 ms |
63068 KB |
Output is correct |
59 |
Correct |
13 ms |
63068 KB |
Output is correct |
60 |
Correct |
13 ms |
63068 KB |
Output is correct |
61 |
Correct |
17 ms |
63068 KB |
Output is correct |
62 |
Correct |
14 ms |
63068 KB |
Output is correct |
63 |
Correct |
14 ms |
63068 KB |
Output is correct |
64 |
Correct |
18 ms |
63068 KB |
Output is correct |
65 |
Correct |
14 ms |
63184 KB |
Output is correct |
66 |
Correct |
14 ms |
63068 KB |
Output is correct |
67 |
Correct |
13 ms |
63240 KB |
Output is correct |
68 |
Correct |
37 ms |
67336 KB |
Output is correct |
69 |
Correct |
56 ms |
71492 KB |
Output is correct |
70 |
Correct |
14 ms |
63068 KB |
Output is correct |
71 |
Correct |
84 ms |
75524 KB |
Output is correct |
72 |
Correct |
89 ms |
77652 KB |
Output is correct |
73 |
Correct |
105 ms |
79676 KB |
Output is correct |
74 |
Correct |
126 ms |
81748 KB |
Output is correct |
75 |
Correct |
146 ms |
83864 KB |
Output is correct |
76 |
Correct |
191 ms |
86100 KB |
Output is correct |
77 |
Correct |
211 ms |
94548 KB |
Output is correct |
78 |
Correct |
233 ms |
103820 KB |
Output is correct |
79 |
Correct |
217 ms |
113240 KB |
Output is correct |
80 |
Correct |
236 ms |
122452 KB |
Output is correct |
81 |
Correct |
12 ms |
63068 KB |
Output is correct |
82 |
Correct |
279 ms |
131856 KB |
Output is correct |
83 |
Correct |
328 ms |
141152 KB |
Output is correct |
84 |
Correct |
360 ms |
150720 KB |
Output is correct |
85 |
Correct |
354 ms |
160340 KB |
Output is correct |
86 |
Correct |
390 ms |
169604 KB |
Output is correct |
87 |
Correct |
349 ms |
179328 KB |
Output is correct |
88 |
Correct |
378 ms |
188764 KB |
Output is correct |
89 |
Correct |
402 ms |
197992 KB |
Output is correct |
90 |
Correct |
16 ms |
61020 KB |
Output is correct |
91 |
Correct |
14 ms |
63048 KB |
Output is correct |
92 |
Correct |
14 ms |
63032 KB |
Output is correct |
93 |
Correct |
12 ms |
63108 KB |
Output is correct |
94 |
Correct |
13 ms |
63068 KB |
Output is correct |
95 |
Correct |
16 ms |
63068 KB |
Output is correct |
96 |
Correct |
13 ms |
63068 KB |
Output is correct |
97 |
Correct |
14 ms |
63068 KB |
Output is correct |
98 |
Correct |
13 ms |
63068 KB |
Output is correct |
99 |
Correct |
14 ms |
63068 KB |
Output is correct |
100 |
Correct |
13 ms |
63048 KB |
Output is correct |
101 |
Correct |
13 ms |
63080 KB |
Output is correct |
102 |
Correct |
14 ms |
63068 KB |
Output is correct |
103 |
Correct |
18 ms |
63068 KB |
Output is correct |
104 |
Correct |
16 ms |
63272 KB |
Output is correct |
105 |
Correct |
13 ms |
63068 KB |
Output is correct |
106 |
Correct |
17 ms |
63068 KB |
Output is correct |
107 |
Correct |
14 ms |
63068 KB |
Output is correct |
108 |
Correct |
14 ms |
63068 KB |
Output is correct |
109 |
Correct |
12 ms |
63068 KB |
Output is correct |
110 |
Correct |
13 ms |
63064 KB |
Output is correct |
111 |
Correct |
13 ms |
63068 KB |
Output is correct |
112 |
Correct |
13 ms |
63324 KB |
Output is correct |
113 |
Correct |
14 ms |
63068 KB |
Output is correct |
114 |
Correct |
12 ms |
63068 KB |
Output is correct |
115 |
Correct |
13 ms |
63236 KB |
Output is correct |
116 |
Correct |
15 ms |
63268 KB |
Output is correct |
117 |
Correct |
13 ms |
63068 KB |
Output is correct |
118 |
Correct |
13 ms |
63032 KB |
Output is correct |
119 |
Correct |
13 ms |
63272 KB |
Output is correct |
120 |
Correct |
14 ms |
63068 KB |
Output is correct |
121 |
Correct |
13 ms |
63068 KB |
Output is correct |
122 |
Correct |
13 ms |
63068 KB |
Output is correct |
123 |
Correct |
13 ms |
63152 KB |
Output is correct |
124 |
Correct |
16 ms |
63196 KB |
Output is correct |
125 |
Correct |
12 ms |
63068 KB |
Output is correct |
126 |
Correct |
13 ms |
63068 KB |
Output is correct |
127 |
Correct |
12 ms |
63068 KB |
Output is correct |
128 |
Correct |
12 ms |
61052 KB |
Output is correct |
129 |
Correct |
13 ms |
63068 KB |
Output is correct |
130 |
Correct |
13 ms |
63068 KB |
Output is correct |
131 |
Correct |
13 ms |
63068 KB |
Output is correct |
132 |
Correct |
14 ms |
63324 KB |
Output is correct |
133 |
Correct |
13 ms |
63064 KB |
Output is correct |
134 |
Correct |
15 ms |
63068 KB |
Output is correct |
135 |
Correct |
13 ms |
63064 KB |
Output is correct |
136 |
Correct |
14 ms |
63068 KB |
Output is correct |
137 |
Correct |
13 ms |
63068 KB |
Output is correct |
138 |
Correct |
12 ms |
63068 KB |
Output is correct |
139 |
Correct |
12 ms |
63068 KB |
Output is correct |
140 |
Correct |
13 ms |
63068 KB |
Output is correct |
141 |
Correct |
13 ms |
63212 KB |
Output is correct |
142 |
Correct |
14 ms |
63068 KB |
Output is correct |
143 |
Correct |
13 ms |
63068 KB |
Output is correct |
144 |
Correct |
11 ms |
63068 KB |
Output is correct |
145 |
Correct |
12 ms |
63068 KB |
Output is correct |
146 |
Correct |
12 ms |
63068 KB |
Output is correct |
147 |
Correct |
12 ms |
63064 KB |
Output is correct |
148 |
Correct |
13 ms |
63068 KB |
Output is correct |
149 |
Correct |
17 ms |
63060 KB |
Output is correct |
150 |
Correct |
14 ms |
63068 KB |
Output is correct |
151 |
Correct |
13 ms |
63272 KB |
Output is correct |
152 |
Correct |
11 ms |
63076 KB |
Output is correct |
153 |
Correct |
13 ms |
63068 KB |
Output is correct |
154 |
Correct |
12 ms |
63068 KB |
Output is correct |
155 |
Correct |
13 ms |
63068 KB |
Output is correct |
156 |
Correct |
13 ms |
63068 KB |
Output is correct |
157 |
Correct |
13 ms |
63068 KB |
Output is correct |
158 |
Correct |
16 ms |
63068 KB |
Output is correct |
159 |
Correct |
13 ms |
63068 KB |
Output is correct |
160 |
Correct |
13 ms |
63068 KB |
Output is correct |
161 |
Correct |
12 ms |
63152 KB |
Output is correct |
162 |
Correct |
12 ms |
63068 KB |
Output is correct |
163 |
Correct |
12 ms |
63068 KB |
Output is correct |
164 |
Correct |
16 ms |
63068 KB |
Output is correct |
165 |
Correct |
12 ms |
63068 KB |
Output is correct |
166 |
Correct |
13 ms |
63056 KB |
Output is correct |
167 |
Correct |
12 ms |
63068 KB |
Output is correct |
168 |
Correct |
12 ms |
63076 KB |
Output is correct |
169 |
Correct |
13 ms |
63068 KB |
Output is correct |
170 |
Correct |
13 ms |
63068 KB |
Output is correct |
171 |
Correct |
45 ms |
67308 KB |
Output is correct |
172 |
Correct |
76 ms |
71508 KB |
Output is correct |
173 |
Correct |
112 ms |
75668 KB |
Output is correct |
174 |
Correct |
155 ms |
77652 KB |
Output is correct |
175 |
Correct |
175 ms |
79700 KB |
Output is correct |
176 |
Correct |
242 ms |
81728 KB |
Output is correct |
177 |
Correct |
260 ms |
83984 KB |
Output is correct |
178 |
Correct |
311 ms |
86100 KB |
Output is correct |
179 |
Correct |
337 ms |
88148 KB |
Output is correct |
180 |
Correct |
13 ms |
61020 KB |
Output is correct |
181 |
Correct |
425 ms |
90240 KB |
Output is correct |
182 |
Correct |
493 ms |
92616 KB |
Output is correct |
183 |
Correct |
513 ms |
100184 KB |
Output is correct |
184 |
Correct |
589 ms |
107604 KB |
Output is correct |
185 |
Correct |
624 ms |
115016 KB |
Output is correct |
186 |
Correct |
692 ms |
122776 KB |
Output is correct |
187 |
Correct |
752 ms |
130220 KB |
Output is correct |
188 |
Correct |
863 ms |
137992 KB |
Output is correct |
189 |
Correct |
906 ms |
145676 KB |
Output is correct |
190 |
Correct |
920 ms |
153136 KB |
Output is correct |
191 |
Correct |
13 ms |
63068 KB |
Output is correct |
192 |
Correct |
1097 ms |
160812 KB |
Output is correct |
193 |
Correct |
208 ms |
102536 KB |
Output is correct |
194 |
Correct |
378 ms |
195852 KB |
Output is correct |
195 |
Correct |
13 ms |
63068 KB |
Output is correct |
196 |
Correct |
14 ms |
63056 KB |
Output is correct |
197 |
Correct |
18 ms |
63068 KB |
Output is correct |
198 |
Correct |
13 ms |
63180 KB |
Output is correct |