#include <bits/stdc++.h>
using namespace std;
const int MAXL = 20;
const int MAXN = 300005;
using lint = long long;
using pi = pair<int, int>;
struct point{
int x, y, idx;
bool operator<(const point &p)const{
return pi(x, y) < pi(p.x, p.y);
}
}a[MAXN];
struct namu{
vector<int> gph[MAXN];
int depth[MAXL][MAXN];
int n, vtx[MAXN];
int cpar[MAXN], cdep[MAXN];
void add_edge(int x, int y){
gph[x].push_back(y);
gph[y].push_back(x);
}
int sz[MAXN], msz[MAXN], vis[MAXN];
vector<int> dfn;
void dfs(int x, int p){
sz[x] = 1;
dfn.push_back(x);
msz[x] = 0;
for(auto &i : gph[x]){
if(i != p && !vis[i]){
dfs(i, x);
sz[x] += sz[i];
msz[x] = max(msz[x], sz[i]);
}
}
}
int get_center(int x){
dfn.clear();
dfs(x, 0);
int n = dfn.size();
pi ret(1e9, 0);
for(auto &i : dfn){
int csz = max(msz[i], n - sz[i]);
ret = min(ret, pi(csz, i));
}
return ret.second;
}
void fill_depth(int x, int p, int d, int pos){
depth[pos][x] = d;
for(auto &i : gph[x]){
if(i != p && !vis[i]){
fill_depth(i, x, d + 1, pos);
}
}
}
void Do(){
for(int i=1; i<=n; i++){
sort(gph[i].begin(), gph[i].end());
gph[i].resize(unique(gph[i].begin(), gph[i].end()) - gph[i].begin());
}
queue<pi> que;
que.emplace(1, 0);
while(!que.empty()){
int x, p;
tie(x, p) = que.front();
que.pop();
x = get_center(x);
vis[x] = 1;
cpar[x] = p;
cdep[x] = (p ? (cdep[p] + 1) : 0);
fill_depth(x, 0, 0, cdep[x]);
for(auto &i : gph[x]){
if(!vis[i]){
que.emplace(i, x);
}
}
}
}
}namu[2];
struct quer{
int v1, v2, idx, t;
};
int aux[MAXN];
int n, q, ret[MAXN];
vector<quer> query[MAXN];
void Make1(int num){
sort(a, a + n);
for(int i=0; i<n; ){
int e = i;
while(e < n && a[e].x == a[i].x && a[e].y - a[i].y == e - i) e++;
namu[num].n++;
for(int j=i; j<e; j++){
namu[num].vtx[a[j].idx] = namu[num].n;
}
i = e;
}
}
void Make2(int num){
sort(a, a + n);
for(int i=1; i<n; i++){
if(a[i].x == a[i-1].x && a[i-1].y + 1 == a[i].y){
int l = namu[num].vtx[a[i-1].idx];
int r = namu[num].vtx[a[i].idx];
namu[num].add_edge(l, r);
}
}
}
int main(){
map<pi, int> mp;
scanf("%d",&n);
for(int i=0; i<n; i++){
scanf("%d %d",&a[i].x,&a[i].y);
mp[pi(a[i].x, a[i].y)] = i;
a[i].idx = i;
}
Make1(0);
for(int i=0; i<n; i++) swap(a[i].x, a[i].y);
Make1(1);
for(int i=0; i<n; i++) swap(a[i].x, a[i].y);
Make2(1);
for(int i=0; i<n; i++) swap(a[i].x, a[i].y);
Make2(0);
for(int i=0; i<n; i++) swap(a[i].x, a[i].y);
namu[0].Do();
namu[1].Do();
int q;
memset(ret, 0x3f, sizeof(ret));
scanf("%d",&q);
vector<int> prnt;
for(int i=0; i<q; i++){
int t, x, y; scanf("%d %d %d",&t,&x,&y);
int v = mp[pi(x, y)];
x = namu[0].vtx[v];
y = namu[1].vtx[v];
for(int j = x; j != 0; j = namu[0].cpar[j]){
query[j].push_back({x, y, i, t});
}
if(t == 2) prnt.push_back(i);
}
memset(aux, 0x3f, sizeof(aux));
for(int i=1; i<=n; i++){
for(auto &j : query[i]){
if(j.t == 1){
for(int k = j.v2; k != 0; k = namu[1].cpar[k]){
aux[k] = min(aux[k], namu[0].depth[namu[0].cdep[i]][j.v1] + namu[1].depth[namu[1].cdep[k]][j.v2]);
}
}
else{
for(int k = j.v2; k != 0; k = namu[1].cpar[k]){
ret[j.idx] = min(ret[j.idx], aux[k] + namu[0].depth[namu[0].cdep[i]][j.v1] + namu[1].depth[namu[1].cdep[k]][j.v2]);
}
}
}
for(auto &j : query[i]){
if(j.t == 1){
for(int k = j.v2; k != 0; k = namu[1].cpar[k]) aux[k] = 1e9;
}
}
}
for(auto &i : prnt){
if(ret[i] > 1e8) ret[i] = -1;
printf("%d\n", ret[i]);
}
}
Compilation message
C.cpp: In function 'int main()':
C.cpp:117:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
C.cpp:119:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&a[i].x,&a[i].y);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
C.cpp:135:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&q);
~~~~~^~~~~~~~~
C.cpp:138:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
int t, x, y; scanf("%d %d %d",&t,&x,&y);
~~~~~^~~~~~~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23936 KB |
Output is correct |
2 |
Correct |
22 ms |
23936 KB |
Output is correct |
3 |
Correct |
23 ms |
23936 KB |
Output is correct |
4 |
Correct |
31 ms |
25216 KB |
Output is correct |
5 |
Correct |
31 ms |
25208 KB |
Output is correct |
6 |
Correct |
31 ms |
25344 KB |
Output is correct |
7 |
Correct |
39 ms |
25896 KB |
Output is correct |
8 |
Correct |
38 ms |
25976 KB |
Output is correct |
9 |
Correct |
38 ms |
25984 KB |
Output is correct |
10 |
Correct |
34 ms |
25728 KB |
Output is correct |
11 |
Correct |
37 ms |
25820 KB |
Output is correct |
12 |
Correct |
38 ms |
25848 KB |
Output is correct |
13 |
Correct |
37 ms |
25868 KB |
Output is correct |
14 |
Correct |
36 ms |
25848 KB |
Output is correct |
15 |
Correct |
36 ms |
25848 KB |
Output is correct |
16 |
Correct |
35 ms |
25976 KB |
Output is correct |
17 |
Correct |
36 ms |
25848 KB |
Output is correct |
18 |
Correct |
37 ms |
25720 KB |
Output is correct |
19 |
Correct |
36 ms |
25720 KB |
Output is correct |
20 |
Correct |
39 ms |
25856 KB |
Output is correct |
21 |
Correct |
38 ms |
25856 KB |
Output is correct |
22 |
Correct |
39 ms |
26104 KB |
Output is correct |
23 |
Correct |
36 ms |
26232 KB |
Output is correct |
24 |
Correct |
38 ms |
26232 KB |
Output is correct |
25 |
Correct |
35 ms |
26488 KB |
Output is correct |
26 |
Correct |
32 ms |
25344 KB |
Output is correct |
27 |
Correct |
30 ms |
25464 KB |
Output is correct |
28 |
Correct |
36 ms |
26368 KB |
Output is correct |
29 |
Correct |
35 ms |
26232 KB |
Output is correct |
30 |
Correct |
35 ms |
26368 KB |
Output is correct |
31 |
Correct |
35 ms |
26368 KB |
Output is correct |
32 |
Correct |
37 ms |
26104 KB |
Output is correct |
33 |
Correct |
36 ms |
26232 KB |
Output is correct |
34 |
Correct |
36 ms |
26368 KB |
Output is correct |
35 |
Correct |
37 ms |
26360 KB |
Output is correct |
36 |
Correct |
36 ms |
26488 KB |
Output is correct |
37 |
Correct |
35 ms |
26232 KB |
Output is correct |
38 |
Correct |
36 ms |
26232 KB |
Output is correct |
39 |
Correct |
37 ms |
26328 KB |
Output is correct |
40 |
Correct |
36 ms |
26240 KB |
Output is correct |
41 |
Correct |
37 ms |
26240 KB |
Output is correct |
42 |
Correct |
39 ms |
26188 KB |
Output is correct |
43 |
Correct |
36 ms |
26360 KB |
Output is correct |
44 |
Correct |
38 ms |
26104 KB |
Output is correct |
45 |
Correct |
38 ms |
26108 KB |
Output is correct |
46 |
Correct |
33 ms |
25336 KB |
Output is correct |
47 |
Correct |
38 ms |
25672 KB |
Output is correct |
48 |
Correct |
35 ms |
25560 KB |
Output is correct |
49 |
Correct |
36 ms |
25568 KB |
Output is correct |
50 |
Correct |
101 ms |
25516 KB |
Output is correct |
51 |
Correct |
33 ms |
25472 KB |
Output is correct |
52 |
Correct |
35 ms |
25696 KB |
Output is correct |
53 |
Correct |
35 ms |
25896 KB |
Output is correct |
54 |
Correct |
37 ms |
25848 KB |
Output is correct |
55 |
Correct |
35 ms |
25720 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23936 KB |
Output is correct |
2 |
Correct |
22 ms |
23936 KB |
Output is correct |
3 |
Correct |
23 ms |
23936 KB |
Output is correct |
4 |
Correct |
31 ms |
25216 KB |
Output is correct |
5 |
Correct |
31 ms |
25208 KB |
Output is correct |
6 |
Correct |
31 ms |
25344 KB |
Output is correct |
7 |
Correct |
39 ms |
25896 KB |
Output is correct |
8 |
Correct |
38 ms |
25976 KB |
Output is correct |
9 |
Correct |
38 ms |
25984 KB |
Output is correct |
10 |
Correct |
34 ms |
25728 KB |
Output is correct |
11 |
Correct |
37 ms |
25820 KB |
Output is correct |
12 |
Correct |
38 ms |
25848 KB |
Output is correct |
13 |
Correct |
37 ms |
25868 KB |
Output is correct |
14 |
Correct |
36 ms |
25848 KB |
Output is correct |
15 |
Correct |
36 ms |
25848 KB |
Output is correct |
16 |
Correct |
35 ms |
25976 KB |
Output is correct |
17 |
Correct |
36 ms |
25848 KB |
Output is correct |
18 |
Correct |
37 ms |
25720 KB |
Output is correct |
19 |
Correct |
36 ms |
25720 KB |
Output is correct |
20 |
Correct |
39 ms |
25856 KB |
Output is correct |
21 |
Correct |
38 ms |
25856 KB |
Output is correct |
22 |
Correct |
39 ms |
26104 KB |
Output is correct |
23 |
Correct |
36 ms |
26232 KB |
Output is correct |
24 |
Correct |
38 ms |
26232 KB |
Output is correct |
25 |
Correct |
35 ms |
26488 KB |
Output is correct |
26 |
Correct |
32 ms |
25344 KB |
Output is correct |
27 |
Correct |
30 ms |
25464 KB |
Output is correct |
28 |
Correct |
36 ms |
26368 KB |
Output is correct |
29 |
Correct |
35 ms |
26232 KB |
Output is correct |
30 |
Correct |
35 ms |
26368 KB |
Output is correct |
31 |
Correct |
35 ms |
26368 KB |
Output is correct |
32 |
Correct |
37 ms |
26104 KB |
Output is correct |
33 |
Correct |
36 ms |
26232 KB |
Output is correct |
34 |
Correct |
36 ms |
26368 KB |
Output is correct |
35 |
Correct |
37 ms |
26360 KB |
Output is correct |
36 |
Correct |
36 ms |
26488 KB |
Output is correct |
37 |
Correct |
35 ms |
26232 KB |
Output is correct |
38 |
Correct |
36 ms |
26232 KB |
Output is correct |
39 |
Correct |
37 ms |
26328 KB |
Output is correct |
40 |
Correct |
36 ms |
26240 KB |
Output is correct |
41 |
Correct |
37 ms |
26240 KB |
Output is correct |
42 |
Correct |
39 ms |
26188 KB |
Output is correct |
43 |
Correct |
36 ms |
26360 KB |
Output is correct |
44 |
Correct |
38 ms |
26104 KB |
Output is correct |
45 |
Correct |
38 ms |
26108 KB |
Output is correct |
46 |
Correct |
33 ms |
25336 KB |
Output is correct |
47 |
Correct |
38 ms |
25672 KB |
Output is correct |
48 |
Correct |
35 ms |
25560 KB |
Output is correct |
49 |
Correct |
36 ms |
25568 KB |
Output is correct |
50 |
Correct |
101 ms |
25516 KB |
Output is correct |
51 |
Correct |
33 ms |
25472 KB |
Output is correct |
52 |
Correct |
35 ms |
25696 KB |
Output is correct |
53 |
Correct |
35 ms |
25896 KB |
Output is correct |
54 |
Correct |
37 ms |
25848 KB |
Output is correct |
55 |
Correct |
35 ms |
25720 KB |
Output is correct |
56 |
Correct |
135 ms |
36744 KB |
Output is correct |
57 |
Correct |
127 ms |
38632 KB |
Output is correct |
58 |
Correct |
125 ms |
38060 KB |
Output is correct |
59 |
Correct |
169 ms |
42412 KB |
Output is correct |
60 |
Correct |
178 ms |
42968 KB |
Output is correct |
61 |
Correct |
173 ms |
42652 KB |
Output is correct |
62 |
Correct |
160 ms |
41004 KB |
Output is correct |
63 |
Correct |
160 ms |
40156 KB |
Output is correct |
64 |
Correct |
167 ms |
40872 KB |
Output is correct |
65 |
Correct |
162 ms |
41196 KB |
Output is correct |
66 |
Correct |
169 ms |
42200 KB |
Output is correct |
67 |
Correct |
187 ms |
41400 KB |
Output is correct |
68 |
Correct |
171 ms |
42576 KB |
Output is correct |
69 |
Correct |
162 ms |
42240 KB |
Output is correct |
70 |
Correct |
191 ms |
40928 KB |
Output is correct |
71 |
Correct |
153 ms |
40292 KB |
Output is correct |
72 |
Correct |
169 ms |
41760 KB |
Output is correct |
73 |
Correct |
161 ms |
41436 KB |
Output is correct |
74 |
Correct |
175 ms |
47832 KB |
Output is correct |
75 |
Correct |
108 ms |
30856 KB |
Output is correct |
76 |
Correct |
91 ms |
28588 KB |
Output is correct |
77 |
Correct |
190 ms |
46768 KB |
Output is correct |
78 |
Correct |
190 ms |
46808 KB |
Output is correct |
79 |
Correct |
162 ms |
49112 KB |
Output is correct |
80 |
Correct |
173 ms |
44636 KB |
Output is correct |
81 |
Correct |
176 ms |
44868 KB |
Output is correct |
82 |
Correct |
185 ms |
45912 KB |
Output is correct |
83 |
Correct |
196 ms |
46176 KB |
Output is correct |
84 |
Correct |
183 ms |
48112 KB |
Output is correct |
85 |
Correct |
180 ms |
43724 KB |
Output is correct |
86 |
Correct |
167 ms |
43932 KB |
Output is correct |
87 |
Correct |
85 ms |
28788 KB |
Output is correct |
88 |
Correct |
157 ms |
41400 KB |
Output is correct |
89 |
Correct |
143 ms |
40916 KB |
Output is correct |
90 |
Correct |
145 ms |
40544 KB |
Output is correct |
91 |
Correct |
138 ms |
39776 KB |
Output is correct |
92 |
Correct |
131 ms |
38460 KB |
Output is correct |
93 |
Correct |
146 ms |
39512 KB |
Output is correct |
94 |
Correct |
169 ms |
44200 KB |
Output is correct |
95 |
Correct |
155 ms |
42588 KB |
Output is correct |
96 |
Correct |
159 ms |
42716 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
332 ms |
54904 KB |
Output is correct |
2 |
Correct |
507 ms |
85384 KB |
Output is correct |
3 |
Correct |
563 ms |
78164 KB |
Output is correct |
4 |
Correct |
594 ms |
78356 KB |
Output is correct |
5 |
Correct |
599 ms |
80824 KB |
Output is correct |
6 |
Correct |
620 ms |
80952 KB |
Output is correct |
7 |
Correct |
424 ms |
59016 KB |
Output is correct |
8 |
Correct |
360 ms |
50712 KB |
Output is correct |
9 |
Correct |
377 ms |
52460 KB |
Output is correct |
10 |
Correct |
485 ms |
59324 KB |
Output is correct |
11 |
Correct |
391 ms |
53116 KB |
Output is correct |
12 |
Correct |
377 ms |
52380 KB |
Output is correct |
13 |
Correct |
369 ms |
52268 KB |
Output is correct |
14 |
Correct |
377 ms |
52152 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
693 ms |
66724 KB |
Output is correct |
2 |
Correct |
656 ms |
67300 KB |
Output is correct |
3 |
Correct |
658 ms |
67300 KB |
Output is correct |
4 |
Correct |
701 ms |
66020 KB |
Output is correct |
5 |
Correct |
629 ms |
65924 KB |
Output is correct |
6 |
Correct |
675 ms |
66116 KB |
Output is correct |
7 |
Correct |
634 ms |
65764 KB |
Output is correct |
8 |
Correct |
671 ms |
65680 KB |
Output is correct |
9 |
Correct |
654 ms |
66520 KB |
Output is correct |
10 |
Correct |
692 ms |
76360 KB |
Output is correct |
11 |
Correct |
668 ms |
75476 KB |
Output is correct |
12 |
Correct |
659 ms |
78332 KB |
Output is correct |
13 |
Correct |
498 ms |
81376 KB |
Output is correct |
14 |
Correct |
378 ms |
49384 KB |
Output is correct |
15 |
Correct |
323 ms |
52684 KB |
Output is correct |
16 |
Correct |
597 ms |
79068 KB |
Output is correct |
17 |
Correct |
578 ms |
79312 KB |
Output is correct |
18 |
Correct |
586 ms |
80100 KB |
Output is correct |
19 |
Correct |
582 ms |
80092 KB |
Output is correct |
20 |
Correct |
635 ms |
76504 KB |
Output is correct |
21 |
Correct |
700 ms |
76640 KB |
Output is correct |
22 |
Correct |
636 ms |
78188 KB |
Output is correct |
23 |
Correct |
658 ms |
77380 KB |
Output is correct |
24 |
Correct |
512 ms |
84352 KB |
Output is correct |
25 |
Correct |
575 ms |
76380 KB |
Output is correct |
26 |
Correct |
599 ms |
76752 KB |
Output is correct |
27 |
Correct |
582 ms |
77228 KB |
Output is correct |
28 |
Correct |
582 ms |
77480 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23936 KB |
Output is correct |
2 |
Correct |
22 ms |
23936 KB |
Output is correct |
3 |
Correct |
23 ms |
23936 KB |
Output is correct |
4 |
Correct |
31 ms |
25216 KB |
Output is correct |
5 |
Correct |
31 ms |
25208 KB |
Output is correct |
6 |
Correct |
31 ms |
25344 KB |
Output is correct |
7 |
Correct |
39 ms |
25896 KB |
Output is correct |
8 |
Correct |
38 ms |
25976 KB |
Output is correct |
9 |
Correct |
38 ms |
25984 KB |
Output is correct |
10 |
Correct |
34 ms |
25728 KB |
Output is correct |
11 |
Correct |
37 ms |
25820 KB |
Output is correct |
12 |
Correct |
38 ms |
25848 KB |
Output is correct |
13 |
Correct |
37 ms |
25868 KB |
Output is correct |
14 |
Correct |
36 ms |
25848 KB |
Output is correct |
15 |
Correct |
36 ms |
25848 KB |
Output is correct |
16 |
Correct |
35 ms |
25976 KB |
Output is correct |
17 |
Correct |
36 ms |
25848 KB |
Output is correct |
18 |
Correct |
37 ms |
25720 KB |
Output is correct |
19 |
Correct |
36 ms |
25720 KB |
Output is correct |
20 |
Correct |
39 ms |
25856 KB |
Output is correct |
21 |
Correct |
38 ms |
25856 KB |
Output is correct |
22 |
Correct |
39 ms |
26104 KB |
Output is correct |
23 |
Correct |
36 ms |
26232 KB |
Output is correct |
24 |
Correct |
38 ms |
26232 KB |
Output is correct |
25 |
Correct |
35 ms |
26488 KB |
Output is correct |
26 |
Correct |
32 ms |
25344 KB |
Output is correct |
27 |
Correct |
30 ms |
25464 KB |
Output is correct |
28 |
Correct |
36 ms |
26368 KB |
Output is correct |
29 |
Correct |
35 ms |
26232 KB |
Output is correct |
30 |
Correct |
35 ms |
26368 KB |
Output is correct |
31 |
Correct |
35 ms |
26368 KB |
Output is correct |
32 |
Correct |
37 ms |
26104 KB |
Output is correct |
33 |
Correct |
36 ms |
26232 KB |
Output is correct |
34 |
Correct |
36 ms |
26368 KB |
Output is correct |
35 |
Correct |
37 ms |
26360 KB |
Output is correct |
36 |
Correct |
36 ms |
26488 KB |
Output is correct |
37 |
Correct |
35 ms |
26232 KB |
Output is correct |
38 |
Correct |
36 ms |
26232 KB |
Output is correct |
39 |
Correct |
37 ms |
26328 KB |
Output is correct |
40 |
Correct |
36 ms |
26240 KB |
Output is correct |
41 |
Correct |
37 ms |
26240 KB |
Output is correct |
42 |
Correct |
39 ms |
26188 KB |
Output is correct |
43 |
Correct |
36 ms |
26360 KB |
Output is correct |
44 |
Correct |
38 ms |
26104 KB |
Output is correct |
45 |
Correct |
38 ms |
26108 KB |
Output is correct |
46 |
Correct |
33 ms |
25336 KB |
Output is correct |
47 |
Correct |
38 ms |
25672 KB |
Output is correct |
48 |
Correct |
35 ms |
25560 KB |
Output is correct |
49 |
Correct |
36 ms |
25568 KB |
Output is correct |
50 |
Correct |
101 ms |
25516 KB |
Output is correct |
51 |
Correct |
33 ms |
25472 KB |
Output is correct |
52 |
Correct |
35 ms |
25696 KB |
Output is correct |
53 |
Correct |
35 ms |
25896 KB |
Output is correct |
54 |
Correct |
37 ms |
25848 KB |
Output is correct |
55 |
Correct |
35 ms |
25720 KB |
Output is correct |
56 |
Correct |
135 ms |
36744 KB |
Output is correct |
57 |
Correct |
127 ms |
38632 KB |
Output is correct |
58 |
Correct |
125 ms |
38060 KB |
Output is correct |
59 |
Correct |
169 ms |
42412 KB |
Output is correct |
60 |
Correct |
178 ms |
42968 KB |
Output is correct |
61 |
Correct |
173 ms |
42652 KB |
Output is correct |
62 |
Correct |
160 ms |
41004 KB |
Output is correct |
63 |
Correct |
160 ms |
40156 KB |
Output is correct |
64 |
Correct |
167 ms |
40872 KB |
Output is correct |
65 |
Correct |
162 ms |
41196 KB |
Output is correct |
66 |
Correct |
169 ms |
42200 KB |
Output is correct |
67 |
Correct |
187 ms |
41400 KB |
Output is correct |
68 |
Correct |
171 ms |
42576 KB |
Output is correct |
69 |
Correct |
162 ms |
42240 KB |
Output is correct |
70 |
Correct |
191 ms |
40928 KB |
Output is correct |
71 |
Correct |
153 ms |
40292 KB |
Output is correct |
72 |
Correct |
169 ms |
41760 KB |
Output is correct |
73 |
Correct |
161 ms |
41436 KB |
Output is correct |
74 |
Correct |
175 ms |
47832 KB |
Output is correct |
75 |
Correct |
108 ms |
30856 KB |
Output is correct |
76 |
Correct |
91 ms |
28588 KB |
Output is correct |
77 |
Correct |
190 ms |
46768 KB |
Output is correct |
78 |
Correct |
190 ms |
46808 KB |
Output is correct |
79 |
Correct |
162 ms |
49112 KB |
Output is correct |
80 |
Correct |
173 ms |
44636 KB |
Output is correct |
81 |
Correct |
176 ms |
44868 KB |
Output is correct |
82 |
Correct |
185 ms |
45912 KB |
Output is correct |
83 |
Correct |
196 ms |
46176 KB |
Output is correct |
84 |
Correct |
183 ms |
48112 KB |
Output is correct |
85 |
Correct |
180 ms |
43724 KB |
Output is correct |
86 |
Correct |
167 ms |
43932 KB |
Output is correct |
87 |
Correct |
85 ms |
28788 KB |
Output is correct |
88 |
Correct |
157 ms |
41400 KB |
Output is correct |
89 |
Correct |
143 ms |
40916 KB |
Output is correct |
90 |
Correct |
145 ms |
40544 KB |
Output is correct |
91 |
Correct |
138 ms |
39776 KB |
Output is correct |
92 |
Correct |
131 ms |
38460 KB |
Output is correct |
93 |
Correct |
146 ms |
39512 KB |
Output is correct |
94 |
Correct |
169 ms |
44200 KB |
Output is correct |
95 |
Correct |
155 ms |
42588 KB |
Output is correct |
96 |
Correct |
159 ms |
42716 KB |
Output is correct |
97 |
Correct |
332 ms |
54904 KB |
Output is correct |
98 |
Correct |
507 ms |
85384 KB |
Output is correct |
99 |
Correct |
563 ms |
78164 KB |
Output is correct |
100 |
Correct |
594 ms |
78356 KB |
Output is correct |
101 |
Correct |
599 ms |
80824 KB |
Output is correct |
102 |
Correct |
620 ms |
80952 KB |
Output is correct |
103 |
Correct |
424 ms |
59016 KB |
Output is correct |
104 |
Correct |
360 ms |
50712 KB |
Output is correct |
105 |
Correct |
377 ms |
52460 KB |
Output is correct |
106 |
Correct |
485 ms |
59324 KB |
Output is correct |
107 |
Correct |
391 ms |
53116 KB |
Output is correct |
108 |
Correct |
377 ms |
52380 KB |
Output is correct |
109 |
Correct |
369 ms |
52268 KB |
Output is correct |
110 |
Correct |
377 ms |
52152 KB |
Output is correct |
111 |
Correct |
693 ms |
66724 KB |
Output is correct |
112 |
Correct |
656 ms |
67300 KB |
Output is correct |
113 |
Correct |
658 ms |
67300 KB |
Output is correct |
114 |
Correct |
701 ms |
66020 KB |
Output is correct |
115 |
Correct |
629 ms |
65924 KB |
Output is correct |
116 |
Correct |
675 ms |
66116 KB |
Output is correct |
117 |
Correct |
634 ms |
65764 KB |
Output is correct |
118 |
Correct |
671 ms |
65680 KB |
Output is correct |
119 |
Correct |
654 ms |
66520 KB |
Output is correct |
120 |
Correct |
692 ms |
76360 KB |
Output is correct |
121 |
Correct |
668 ms |
75476 KB |
Output is correct |
122 |
Correct |
659 ms |
78332 KB |
Output is correct |
123 |
Correct |
498 ms |
81376 KB |
Output is correct |
124 |
Correct |
378 ms |
49384 KB |
Output is correct |
125 |
Correct |
323 ms |
52684 KB |
Output is correct |
126 |
Correct |
597 ms |
79068 KB |
Output is correct |
127 |
Correct |
578 ms |
79312 KB |
Output is correct |
128 |
Correct |
586 ms |
80100 KB |
Output is correct |
129 |
Correct |
582 ms |
80092 KB |
Output is correct |
130 |
Correct |
635 ms |
76504 KB |
Output is correct |
131 |
Correct |
700 ms |
76640 KB |
Output is correct |
132 |
Correct |
636 ms |
78188 KB |
Output is correct |
133 |
Correct |
658 ms |
77380 KB |
Output is correct |
134 |
Correct |
512 ms |
84352 KB |
Output is correct |
135 |
Correct |
575 ms |
76380 KB |
Output is correct |
136 |
Correct |
599 ms |
76752 KB |
Output is correct |
137 |
Correct |
582 ms |
77228 KB |
Output is correct |
138 |
Correct |
582 ms |
77480 KB |
Output is correct |
139 |
Correct |
291 ms |
48284 KB |
Output is correct |
140 |
Correct |
360 ms |
52064 KB |
Output is correct |
141 |
Correct |
352 ms |
50776 KB |
Output is correct |
142 |
Correct |
373 ms |
51932 KB |
Output is correct |
143 |
Correct |
600 ms |
65392 KB |
Output is correct |
144 |
Correct |
579 ms |
65256 KB |
Output is correct |
145 |
Correct |
600 ms |
63848 KB |
Output is correct |
146 |
Correct |
559 ms |
61360 KB |
Output is correct |
147 |
Correct |
569 ms |
66944 KB |
Output is correct |
148 |
Correct |
557 ms |
65860 KB |
Output is correct |
149 |
Correct |
597 ms |
76292 KB |
Output is correct |
150 |
Correct |
541 ms |
75236 KB |
Output is correct |
151 |
Correct |
451 ms |
79280 KB |
Output is correct |
152 |
Correct |
556 ms |
73968 KB |
Output is correct |
153 |
Correct |
536 ms |
72992 KB |
Output is correct |
154 |
Correct |
277 ms |
48900 KB |
Output is correct |
155 |
Correct |
540 ms |
62260 KB |
Output is correct |
156 |
Correct |
471 ms |
60244 KB |
Output is correct |
157 |
Correct |
485 ms |
59132 KB |
Output is correct |
158 |
Correct |
449 ms |
57064 KB |
Output is correct |
159 |
Correct |
413 ms |
56088 KB |
Output is correct |
160 |
Correct |
490 ms |
64444 KB |
Output is correct |
161 |
Correct |
536 ms |
70476 KB |
Output is correct |
162 |
Correct |
488 ms |
67124 KB |
Output is correct |
163 |
Correct |
487 ms |
66760 KB |
Output is correct |