# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
292730 |
2020-09-07T12:32:27 Z |
moven(#5823) |
ROI16_sending (ROI16_sending) |
C++17 |
|
3897 ms |
93152 KB |
#include <bits/stdc++.h>
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
using namespace std;
using lint = long long;
using pi = pair<int, int>;
const int MAXN = 200005;
int n, m;
vector<int> gph[MAXN];
pi a[MAXN];
int par[18][MAXN];
int din[MAXN], dout[MAXN], dep[MAXN], rev[MAXN], piv;
int anc(int x, int v){
for(int i=0; v; i++){
if(v & 1) x = par[i][x];
v >>= 1;
}
return x;
}
int lca(int x, int y){
if(dep[x] > dep[y]) swap(x, y);
y = anc(y, dep[y] - dep[x]);
for(int i=17; i>=0; i--){
if(par[i][x] != par[i][y]){
x = par[i][x];
y = par[i][y];
}
}
if(x != y) return par[0][x];
return x;
}
struct bar{
int dist, x, y;
bool operator<(const bar &t)const{
return dist < t.dist;
}
};
struct foo{
int vtx, idx;
bool operator<(const foo &b)const{
return pi(din[vtx], idx) < pi(din[b.vtx], b.idx);
}
};
struct kek{
int pp, qq, x, y, idx;
bool operator<(const kek &k)const{
return pi(pp, qq) < pi(k.pp, k.qq);
}
};
vector<int> cmp[MAXN];
set<foo> st[MAXN];
int idx[MAXN];
bool in(int x, int y){
return din[x] <= din[y] && dout[y] <= dout[x];
}
bar solve(vector<kek> a, int c){
bar ret = (bar){-1, -1, -1};
sort(all(a), [&](const kek &a, const kek &b){
return din[a.x] < din[b.x];
});
vector<int> v, stk;
for(int i=0; i<sz(a); i++) v.push_back(a[i].x);
for(int i=1; i<sz(a); i++) v.push_back(lca(a[i-1].x, a[i].x));
sort(all(v), [&](const int &a, const int &b){
return din[a] < din[b];
});
v.resize(unique(all(v)) - v.begin());
for(auto &i : v){
while(sz(stk) && !in(stk.back(), i)) stk.pop_back();
if(sz(stk)) cmp[stk.back()].push_back(i);
stk.push_back(i);
}
for(int i=0; i<sz(v); i++){
idx[v[i]] = v[i];
}
auto INSERT = [&](int p, foo f, int d){
auto it = st[p].lower_bound(f);
if(it != st[p].end()){
ret = max(ret, (bar){d + dep[lca(f.vtx, it->vtx)], f.idx, it->idx});
}
if(it != st[p].begin()){
it--;
ret = max(ret, (bar){d + dep[lca(f.vtx, it->vtx)], f.idx, it->idx});
}
st[p].insert(f);
};
for(auto &i : a){
INSERT(idx[i.x], (foo){i.y, i.idx}, dep[i.x]);
}
reverse(all(v));
for(auto &i : v){
for(auto &j : cmp[i]){
if(sz(st[idx[i]]) < sz(st[idx[j]])){
swap(idx[i], idx[j]);
}
for(auto &k : st[idx[j]]){
INSERT(idx[i], k, dep[i]);
}
}
}
for(auto &i : v){
cmp[i].clear();
st[i].clear();
}
ret.dist -= 2 * dep[c];
return ret;
}
void dfs(int x){
din[x] = piv++;
rev[din[x]] = x;
for(auto &i : gph[x]){
dep[i] = dep[x] + 1;
par[0][i] = x;
dfs(i);
}
dout[x] = piv;
}
pi up[MAXN][2];
void upload(int x, pi v){
if(up[x][0] > v){
up[x][1] = up[x][0];
up[x][0] = v;
}
else if(up[x][1] > v){
up[x][1] = v;
}
}
int main(){
scanf("%d %d",&n,&m);
for(int i=2; i<=n; i++){
int x; scanf("%d",&x);
gph[x].push_back(i);
}
dfs(1);
for(int i=1; i<18; i++){
for(int j=1; j<=n; j++){
par[i][j] = par[i-1][par[i-1][j]];
}
}
for(int i=1; i<=n; i++) up[i][0] = up[i][1] = pi(1e9, 0);
vector<kek> v;
for(int i=1; i<=m; i++){
int x, y; scanf("%d %d",&x,&y);
int l = lca(x, y);
if(l != x) upload(x, pi(dep[l], i));
if(l != y) upload(y, pi(dep[l], i));
if(l != x && l != y){
int cx = anc(x, dep[x] - dep[l] - 1);
int cy = anc(y, dep[y] - dep[l] - 1);
if(cx > cy) swap(cx, cy), swap(x, y);
v.push_back({cx, cy, x, y, i});
}
}
sort(all(v));
bar ans = {0, 1, 2};
for(int i=n; i; i--){
for(auto &j : gph[i]){
upload(i, up[j][0]);
upload(i, up[j][1]);
}
if(up[i][1].second){
int dist = dep[i] - up[i][1].first;
if(dist > 0) ans = max(ans, (bar){dist, up[i][0].second, up[i][1].second});
}
}
for(int i=0; i<sz(v); ){
int e = i;
while(e < sz(v) && pi(v[e].pp, v[e].qq) == pi(v[i].pp, v[i].qq)) e++;
vector<kek> w;
for(int j=i; j<e; j++) w.push_back(v[j]);
ans = max(ans, solve(w, par[0][v[i].pp]));
i = e;
}
printf("%d\n%d %d\n", ans.dist, ans.x, ans.y);
}
Compilation message
sending.cpp: In function 'int main()':
sending.cpp:143:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
143 | scanf("%d %d",&n,&m);
| ~~~~~^~~~~~~~~~~~~~~
sending.cpp:145:15: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
145 | int x; scanf("%d",&x);
| ~~~~~^~~~~~~~~
sending.cpp:157:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
157 | int x, y; scanf("%d %d",&x,&y);
| ~~~~~^~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
19200 KB |
Output is correct |
2 |
Correct |
13 ms |
19200 KB |
Output is correct |
3 |
Correct |
13 ms |
19200 KB |
Output is correct |
4 |
Correct |
13 ms |
19200 KB |
Output is correct |
5 |
Correct |
13 ms |
19200 KB |
Output is correct |
6 |
Correct |
13 ms |
19200 KB |
Output is correct |
7 |
Correct |
13 ms |
19200 KB |
Output is correct |
8 |
Correct |
16 ms |
19200 KB |
Output is correct |
9 |
Correct |
15 ms |
19200 KB |
Output is correct |
10 |
Correct |
13 ms |
19200 KB |
Output is correct |
11 |
Correct |
14 ms |
19200 KB |
Output is correct |
12 |
Correct |
13 ms |
19200 KB |
Output is correct |
13 |
Correct |
13 ms |
19200 KB |
Output is correct |
14 |
Correct |
13 ms |
19308 KB |
Output is correct |
15 |
Correct |
13 ms |
19200 KB |
Output is correct |
16 |
Correct |
14 ms |
19328 KB |
Output is correct |
17 |
Correct |
13 ms |
19328 KB |
Output is correct |
18 |
Correct |
13 ms |
19200 KB |
Output is correct |
19 |
Correct |
13 ms |
19200 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
19200 KB |
Output is correct |
2 |
Correct |
13 ms |
19200 KB |
Output is correct |
3 |
Correct |
13 ms |
19200 KB |
Output is correct |
4 |
Correct |
13 ms |
19200 KB |
Output is correct |
5 |
Correct |
13 ms |
19200 KB |
Output is correct |
6 |
Correct |
13 ms |
19200 KB |
Output is correct |
7 |
Correct |
13 ms |
19200 KB |
Output is correct |
8 |
Correct |
16 ms |
19200 KB |
Output is correct |
9 |
Correct |
15 ms |
19200 KB |
Output is correct |
10 |
Correct |
13 ms |
19200 KB |
Output is correct |
11 |
Correct |
14 ms |
19200 KB |
Output is correct |
12 |
Correct |
13 ms |
19200 KB |
Output is correct |
13 |
Correct |
13 ms |
19200 KB |
Output is correct |
14 |
Correct |
13 ms |
19308 KB |
Output is correct |
15 |
Correct |
13 ms |
19200 KB |
Output is correct |
16 |
Correct |
14 ms |
19328 KB |
Output is correct |
17 |
Correct |
13 ms |
19328 KB |
Output is correct |
18 |
Correct |
13 ms |
19200 KB |
Output is correct |
19 |
Correct |
13 ms |
19200 KB |
Output is correct |
20 |
Correct |
17 ms |
19840 KB |
Output is correct |
21 |
Correct |
18 ms |
19840 KB |
Output is correct |
22 |
Correct |
15 ms |
19968 KB |
Output is correct |
23 |
Correct |
16 ms |
19968 KB |
Output is correct |
24 |
Correct |
18 ms |
19960 KB |
Output is correct |
25 |
Correct |
15 ms |
19712 KB |
Output is correct |
26 |
Correct |
15 ms |
19968 KB |
Output is correct |
27 |
Correct |
16 ms |
19712 KB |
Output is correct |
28 |
Correct |
17 ms |
19968 KB |
Output is correct |
29 |
Correct |
15 ms |
20004 KB |
Output is correct |
30 |
Correct |
14 ms |
19968 KB |
Output is correct |
31 |
Correct |
15 ms |
19952 KB |
Output is correct |
32 |
Correct |
15 ms |
19968 KB |
Output is correct |
33 |
Correct |
16 ms |
20096 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
19200 KB |
Output is correct |
2 |
Correct |
13 ms |
19200 KB |
Output is correct |
3 |
Correct |
13 ms |
19200 KB |
Output is correct |
4 |
Correct |
13 ms |
19200 KB |
Output is correct |
5 |
Correct |
13 ms |
19200 KB |
Output is correct |
6 |
Correct |
13 ms |
19200 KB |
Output is correct |
7 |
Correct |
13 ms |
19200 KB |
Output is correct |
8 |
Correct |
16 ms |
19200 KB |
Output is correct |
9 |
Correct |
15 ms |
19200 KB |
Output is correct |
10 |
Correct |
13 ms |
19200 KB |
Output is correct |
11 |
Correct |
14 ms |
19200 KB |
Output is correct |
12 |
Correct |
13 ms |
19200 KB |
Output is correct |
13 |
Correct |
13 ms |
19200 KB |
Output is correct |
14 |
Correct |
13 ms |
19308 KB |
Output is correct |
15 |
Correct |
13 ms |
19200 KB |
Output is correct |
16 |
Correct |
14 ms |
19328 KB |
Output is correct |
17 |
Correct |
13 ms |
19328 KB |
Output is correct |
18 |
Correct |
13 ms |
19200 KB |
Output is correct |
19 |
Correct |
13 ms |
19200 KB |
Output is correct |
20 |
Correct |
17 ms |
19840 KB |
Output is correct |
21 |
Correct |
18 ms |
19840 KB |
Output is correct |
22 |
Correct |
15 ms |
19968 KB |
Output is correct |
23 |
Correct |
16 ms |
19968 KB |
Output is correct |
24 |
Correct |
18 ms |
19960 KB |
Output is correct |
25 |
Correct |
15 ms |
19712 KB |
Output is correct |
26 |
Correct |
15 ms |
19968 KB |
Output is correct |
27 |
Correct |
16 ms |
19712 KB |
Output is correct |
28 |
Correct |
17 ms |
19968 KB |
Output is correct |
29 |
Correct |
15 ms |
20004 KB |
Output is correct |
30 |
Correct |
14 ms |
19968 KB |
Output is correct |
31 |
Correct |
15 ms |
19952 KB |
Output is correct |
32 |
Correct |
15 ms |
19968 KB |
Output is correct |
33 |
Correct |
16 ms |
20096 KB |
Output is correct |
34 |
Correct |
71 ms |
31540 KB |
Output is correct |
35 |
Correct |
69 ms |
31736 KB |
Output is correct |
36 |
Correct |
52 ms |
37368 KB |
Output is correct |
37 |
Correct |
52 ms |
35324 KB |
Output is correct |
38 |
Correct |
47 ms |
33656 KB |
Output is correct |
39 |
Correct |
37 ms |
30320 KB |
Output is correct |
40 |
Correct |
53 ms |
37240 KB |
Output is correct |
41 |
Correct |
42 ms |
30456 KB |
Output is correct |
42 |
Correct |
52 ms |
31480 KB |
Output is correct |
43 |
Correct |
51 ms |
36472 KB |
Output is correct |
44 |
Correct |
52 ms |
36480 KB |
Output is correct |
45 |
Correct |
50 ms |
36472 KB |
Output is correct |
46 |
Correct |
63 ms |
36600 KB |
Output is correct |
47 |
Correct |
51 ms |
32248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
19200 KB |
Output is correct |
2 |
Correct |
13 ms |
19200 KB |
Output is correct |
3 |
Correct |
13 ms |
19200 KB |
Output is correct |
4 |
Correct |
13 ms |
19200 KB |
Output is correct |
5 |
Correct |
13 ms |
19200 KB |
Output is correct |
6 |
Correct |
13 ms |
19200 KB |
Output is correct |
7 |
Correct |
13 ms |
19200 KB |
Output is correct |
8 |
Correct |
16 ms |
19200 KB |
Output is correct |
9 |
Correct |
15 ms |
19200 KB |
Output is correct |
10 |
Correct |
13 ms |
19200 KB |
Output is correct |
11 |
Correct |
14 ms |
19200 KB |
Output is correct |
12 |
Correct |
13 ms |
19200 KB |
Output is correct |
13 |
Correct |
13 ms |
19200 KB |
Output is correct |
14 |
Correct |
13 ms |
19308 KB |
Output is correct |
15 |
Correct |
13 ms |
19200 KB |
Output is correct |
16 |
Correct |
14 ms |
19328 KB |
Output is correct |
17 |
Correct |
13 ms |
19328 KB |
Output is correct |
18 |
Correct |
13 ms |
19200 KB |
Output is correct |
19 |
Correct |
13 ms |
19200 KB |
Output is correct |
20 |
Correct |
17 ms |
19840 KB |
Output is correct |
21 |
Correct |
18 ms |
19840 KB |
Output is correct |
22 |
Correct |
15 ms |
19968 KB |
Output is correct |
23 |
Correct |
16 ms |
19968 KB |
Output is correct |
24 |
Correct |
18 ms |
19960 KB |
Output is correct |
25 |
Correct |
15 ms |
19712 KB |
Output is correct |
26 |
Correct |
15 ms |
19968 KB |
Output is correct |
27 |
Correct |
16 ms |
19712 KB |
Output is correct |
28 |
Correct |
17 ms |
19968 KB |
Output is correct |
29 |
Correct |
15 ms |
20004 KB |
Output is correct |
30 |
Correct |
14 ms |
19968 KB |
Output is correct |
31 |
Correct |
15 ms |
19952 KB |
Output is correct |
32 |
Correct |
15 ms |
19968 KB |
Output is correct |
33 |
Correct |
16 ms |
20096 KB |
Output is correct |
34 |
Correct |
71 ms |
31540 KB |
Output is correct |
35 |
Correct |
69 ms |
31736 KB |
Output is correct |
36 |
Correct |
52 ms |
37368 KB |
Output is correct |
37 |
Correct |
52 ms |
35324 KB |
Output is correct |
38 |
Correct |
47 ms |
33656 KB |
Output is correct |
39 |
Correct |
37 ms |
30320 KB |
Output is correct |
40 |
Correct |
53 ms |
37240 KB |
Output is correct |
41 |
Correct |
42 ms |
30456 KB |
Output is correct |
42 |
Correct |
52 ms |
31480 KB |
Output is correct |
43 |
Correct |
51 ms |
36472 KB |
Output is correct |
44 |
Correct |
52 ms |
36480 KB |
Output is correct |
45 |
Correct |
50 ms |
36472 KB |
Output is correct |
46 |
Correct |
63 ms |
36600 KB |
Output is correct |
47 |
Correct |
51 ms |
32248 KB |
Output is correct |
48 |
Correct |
111 ms |
31900 KB |
Output is correct |
49 |
Correct |
112 ms |
32088 KB |
Output is correct |
50 |
Correct |
59 ms |
37240 KB |
Output is correct |
51 |
Correct |
68 ms |
35704 KB |
Output is correct |
52 |
Correct |
61 ms |
33784 KB |
Output is correct |
53 |
Correct |
47 ms |
30428 KB |
Output is correct |
54 |
Correct |
60 ms |
37240 KB |
Output is correct |
55 |
Correct |
63 ms |
30784 KB |
Output is correct |
56 |
Correct |
82 ms |
32088 KB |
Output is correct |
57 |
Correct |
52 ms |
36472 KB |
Output is correct |
58 |
Correct |
53 ms |
36472 KB |
Output is correct |
59 |
Correct |
51 ms |
36484 KB |
Output is correct |
60 |
Correct |
62 ms |
36856 KB |
Output is correct |
61 |
Correct |
60 ms |
37176 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
234 ms |
34668 KB |
Output is correct |
2 |
Correct |
547 ms |
36460 KB |
Output is correct |
3 |
Correct |
603 ms |
37224 KB |
Output is correct |
4 |
Correct |
540 ms |
35436 KB |
Output is correct |
5 |
Correct |
210 ms |
34536 KB |
Output is correct |
6 |
Correct |
558 ms |
36328 KB |
Output is correct |
7 |
Correct |
584 ms |
37224 KB |
Output is correct |
8 |
Correct |
555 ms |
35432 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
115 ms |
30968 KB |
Output is correct |
2 |
Correct |
115 ms |
31224 KB |
Output is correct |
3 |
Correct |
147 ms |
37240 KB |
Output is correct |
4 |
Correct |
142 ms |
34916 KB |
Output is correct |
5 |
Correct |
150 ms |
33400 KB |
Output is correct |
6 |
Correct |
57 ms |
29936 KB |
Output is correct |
7 |
Correct |
147 ms |
37240 KB |
Output is correct |
8 |
Correct |
59 ms |
30072 KB |
Output is correct |
9 |
Correct |
82 ms |
31004 KB |
Output is correct |
10 |
Correct |
65 ms |
37244 KB |
Output is correct |
11 |
Correct |
58 ms |
37268 KB |
Output is correct |
12 |
Correct |
58 ms |
37240 KB |
Output is correct |
13 |
Correct |
153 ms |
37240 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
19200 KB |
Output is correct |
2 |
Correct |
13 ms |
19200 KB |
Output is correct |
3 |
Correct |
13 ms |
19200 KB |
Output is correct |
4 |
Correct |
13 ms |
19200 KB |
Output is correct |
5 |
Correct |
13 ms |
19200 KB |
Output is correct |
6 |
Correct |
13 ms |
19200 KB |
Output is correct |
7 |
Correct |
13 ms |
19200 KB |
Output is correct |
8 |
Correct |
16 ms |
19200 KB |
Output is correct |
9 |
Correct |
15 ms |
19200 KB |
Output is correct |
10 |
Correct |
13 ms |
19200 KB |
Output is correct |
11 |
Correct |
14 ms |
19200 KB |
Output is correct |
12 |
Correct |
13 ms |
19200 KB |
Output is correct |
13 |
Correct |
13 ms |
19200 KB |
Output is correct |
14 |
Correct |
13 ms |
19308 KB |
Output is correct |
15 |
Correct |
13 ms |
19200 KB |
Output is correct |
16 |
Correct |
14 ms |
19328 KB |
Output is correct |
17 |
Correct |
13 ms |
19328 KB |
Output is correct |
18 |
Correct |
13 ms |
19200 KB |
Output is correct |
19 |
Correct |
13 ms |
19200 KB |
Output is correct |
20 |
Correct |
17 ms |
19840 KB |
Output is correct |
21 |
Correct |
18 ms |
19840 KB |
Output is correct |
22 |
Correct |
15 ms |
19968 KB |
Output is correct |
23 |
Correct |
16 ms |
19968 KB |
Output is correct |
24 |
Correct |
18 ms |
19960 KB |
Output is correct |
25 |
Correct |
15 ms |
19712 KB |
Output is correct |
26 |
Correct |
15 ms |
19968 KB |
Output is correct |
27 |
Correct |
16 ms |
19712 KB |
Output is correct |
28 |
Correct |
17 ms |
19968 KB |
Output is correct |
29 |
Correct |
15 ms |
20004 KB |
Output is correct |
30 |
Correct |
14 ms |
19968 KB |
Output is correct |
31 |
Correct |
15 ms |
19952 KB |
Output is correct |
32 |
Correct |
15 ms |
19968 KB |
Output is correct |
33 |
Correct |
16 ms |
20096 KB |
Output is correct |
34 |
Correct |
71 ms |
31540 KB |
Output is correct |
35 |
Correct |
69 ms |
31736 KB |
Output is correct |
36 |
Correct |
52 ms |
37368 KB |
Output is correct |
37 |
Correct |
52 ms |
35324 KB |
Output is correct |
38 |
Correct |
47 ms |
33656 KB |
Output is correct |
39 |
Correct |
37 ms |
30320 KB |
Output is correct |
40 |
Correct |
53 ms |
37240 KB |
Output is correct |
41 |
Correct |
42 ms |
30456 KB |
Output is correct |
42 |
Correct |
52 ms |
31480 KB |
Output is correct |
43 |
Correct |
51 ms |
36472 KB |
Output is correct |
44 |
Correct |
52 ms |
36480 KB |
Output is correct |
45 |
Correct |
50 ms |
36472 KB |
Output is correct |
46 |
Correct |
63 ms |
36600 KB |
Output is correct |
47 |
Correct |
51 ms |
32248 KB |
Output is correct |
48 |
Correct |
111 ms |
31900 KB |
Output is correct |
49 |
Correct |
112 ms |
32088 KB |
Output is correct |
50 |
Correct |
59 ms |
37240 KB |
Output is correct |
51 |
Correct |
68 ms |
35704 KB |
Output is correct |
52 |
Correct |
61 ms |
33784 KB |
Output is correct |
53 |
Correct |
47 ms |
30428 KB |
Output is correct |
54 |
Correct |
60 ms |
37240 KB |
Output is correct |
55 |
Correct |
63 ms |
30784 KB |
Output is correct |
56 |
Correct |
82 ms |
32088 KB |
Output is correct |
57 |
Correct |
52 ms |
36472 KB |
Output is correct |
58 |
Correct |
53 ms |
36472 KB |
Output is correct |
59 |
Correct |
51 ms |
36484 KB |
Output is correct |
60 |
Correct |
62 ms |
36856 KB |
Output is correct |
61 |
Correct |
60 ms |
37176 KB |
Output is correct |
62 |
Correct |
234 ms |
34668 KB |
Output is correct |
63 |
Correct |
547 ms |
36460 KB |
Output is correct |
64 |
Correct |
603 ms |
37224 KB |
Output is correct |
65 |
Correct |
540 ms |
35436 KB |
Output is correct |
66 |
Correct |
210 ms |
34536 KB |
Output is correct |
67 |
Correct |
558 ms |
36328 KB |
Output is correct |
68 |
Correct |
584 ms |
37224 KB |
Output is correct |
69 |
Correct |
555 ms |
35432 KB |
Output is correct |
70 |
Correct |
115 ms |
30968 KB |
Output is correct |
71 |
Correct |
115 ms |
31224 KB |
Output is correct |
72 |
Correct |
147 ms |
37240 KB |
Output is correct |
73 |
Correct |
142 ms |
34916 KB |
Output is correct |
74 |
Correct |
150 ms |
33400 KB |
Output is correct |
75 |
Correct |
57 ms |
29936 KB |
Output is correct |
76 |
Correct |
147 ms |
37240 KB |
Output is correct |
77 |
Correct |
59 ms |
30072 KB |
Output is correct |
78 |
Correct |
82 ms |
31004 KB |
Output is correct |
79 |
Correct |
65 ms |
37244 KB |
Output is correct |
80 |
Correct |
58 ms |
37268 KB |
Output is correct |
81 |
Correct |
58 ms |
37240 KB |
Output is correct |
82 |
Correct |
153 ms |
37240 KB |
Output is correct |
83 |
Correct |
557 ms |
36276 KB |
Output is correct |
84 |
Correct |
718 ms |
36716 KB |
Output is correct |
85 |
Correct |
181 ms |
37240 KB |
Output is correct |
86 |
Correct |
256 ms |
40048 KB |
Output is correct |
87 |
Correct |
198 ms |
34288 KB |
Output is correct |
88 |
Correct |
163 ms |
31528 KB |
Output is correct |
89 |
Correct |
167 ms |
37240 KB |
Output is correct |
90 |
Correct |
271 ms |
34388 KB |
Output is correct |
91 |
Correct |
409 ms |
41732 KB |
Output is correct |
92 |
Correct |
204 ms |
46564 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
19200 KB |
Output is correct |
2 |
Correct |
13 ms |
19200 KB |
Output is correct |
3 |
Correct |
13 ms |
19200 KB |
Output is correct |
4 |
Correct |
13 ms |
19200 KB |
Output is correct |
5 |
Correct |
13 ms |
19200 KB |
Output is correct |
6 |
Correct |
13 ms |
19200 KB |
Output is correct |
7 |
Correct |
13 ms |
19200 KB |
Output is correct |
8 |
Correct |
16 ms |
19200 KB |
Output is correct |
9 |
Correct |
15 ms |
19200 KB |
Output is correct |
10 |
Correct |
13 ms |
19200 KB |
Output is correct |
11 |
Correct |
14 ms |
19200 KB |
Output is correct |
12 |
Correct |
13 ms |
19200 KB |
Output is correct |
13 |
Correct |
13 ms |
19200 KB |
Output is correct |
14 |
Correct |
13 ms |
19308 KB |
Output is correct |
15 |
Correct |
13 ms |
19200 KB |
Output is correct |
16 |
Correct |
14 ms |
19328 KB |
Output is correct |
17 |
Correct |
13 ms |
19328 KB |
Output is correct |
18 |
Correct |
13 ms |
19200 KB |
Output is correct |
19 |
Correct |
13 ms |
19200 KB |
Output is correct |
20 |
Correct |
17 ms |
19840 KB |
Output is correct |
21 |
Correct |
18 ms |
19840 KB |
Output is correct |
22 |
Correct |
15 ms |
19968 KB |
Output is correct |
23 |
Correct |
16 ms |
19968 KB |
Output is correct |
24 |
Correct |
18 ms |
19960 KB |
Output is correct |
25 |
Correct |
15 ms |
19712 KB |
Output is correct |
26 |
Correct |
15 ms |
19968 KB |
Output is correct |
27 |
Correct |
16 ms |
19712 KB |
Output is correct |
28 |
Correct |
17 ms |
19968 KB |
Output is correct |
29 |
Correct |
15 ms |
20004 KB |
Output is correct |
30 |
Correct |
14 ms |
19968 KB |
Output is correct |
31 |
Correct |
15 ms |
19952 KB |
Output is correct |
32 |
Correct |
15 ms |
19968 KB |
Output is correct |
33 |
Correct |
16 ms |
20096 KB |
Output is correct |
34 |
Correct |
71 ms |
31540 KB |
Output is correct |
35 |
Correct |
69 ms |
31736 KB |
Output is correct |
36 |
Correct |
52 ms |
37368 KB |
Output is correct |
37 |
Correct |
52 ms |
35324 KB |
Output is correct |
38 |
Correct |
47 ms |
33656 KB |
Output is correct |
39 |
Correct |
37 ms |
30320 KB |
Output is correct |
40 |
Correct |
53 ms |
37240 KB |
Output is correct |
41 |
Correct |
42 ms |
30456 KB |
Output is correct |
42 |
Correct |
52 ms |
31480 KB |
Output is correct |
43 |
Correct |
51 ms |
36472 KB |
Output is correct |
44 |
Correct |
52 ms |
36480 KB |
Output is correct |
45 |
Correct |
50 ms |
36472 KB |
Output is correct |
46 |
Correct |
63 ms |
36600 KB |
Output is correct |
47 |
Correct |
51 ms |
32248 KB |
Output is correct |
48 |
Correct |
111 ms |
31900 KB |
Output is correct |
49 |
Correct |
112 ms |
32088 KB |
Output is correct |
50 |
Correct |
59 ms |
37240 KB |
Output is correct |
51 |
Correct |
68 ms |
35704 KB |
Output is correct |
52 |
Correct |
61 ms |
33784 KB |
Output is correct |
53 |
Correct |
47 ms |
30428 KB |
Output is correct |
54 |
Correct |
60 ms |
37240 KB |
Output is correct |
55 |
Correct |
63 ms |
30784 KB |
Output is correct |
56 |
Correct |
82 ms |
32088 KB |
Output is correct |
57 |
Correct |
52 ms |
36472 KB |
Output is correct |
58 |
Correct |
53 ms |
36472 KB |
Output is correct |
59 |
Correct |
51 ms |
36484 KB |
Output is correct |
60 |
Correct |
62 ms |
36856 KB |
Output is correct |
61 |
Correct |
60 ms |
37176 KB |
Output is correct |
62 |
Correct |
234 ms |
34668 KB |
Output is correct |
63 |
Correct |
547 ms |
36460 KB |
Output is correct |
64 |
Correct |
603 ms |
37224 KB |
Output is correct |
65 |
Correct |
540 ms |
35436 KB |
Output is correct |
66 |
Correct |
210 ms |
34536 KB |
Output is correct |
67 |
Correct |
558 ms |
36328 KB |
Output is correct |
68 |
Correct |
584 ms |
37224 KB |
Output is correct |
69 |
Correct |
555 ms |
35432 KB |
Output is correct |
70 |
Correct |
115 ms |
30968 KB |
Output is correct |
71 |
Correct |
115 ms |
31224 KB |
Output is correct |
72 |
Correct |
147 ms |
37240 KB |
Output is correct |
73 |
Correct |
142 ms |
34916 KB |
Output is correct |
74 |
Correct |
150 ms |
33400 KB |
Output is correct |
75 |
Correct |
57 ms |
29936 KB |
Output is correct |
76 |
Correct |
147 ms |
37240 KB |
Output is correct |
77 |
Correct |
59 ms |
30072 KB |
Output is correct |
78 |
Correct |
82 ms |
31004 KB |
Output is correct |
79 |
Correct |
65 ms |
37244 KB |
Output is correct |
80 |
Correct |
58 ms |
37268 KB |
Output is correct |
81 |
Correct |
58 ms |
37240 KB |
Output is correct |
82 |
Correct |
153 ms |
37240 KB |
Output is correct |
83 |
Correct |
557 ms |
36276 KB |
Output is correct |
84 |
Correct |
718 ms |
36716 KB |
Output is correct |
85 |
Correct |
181 ms |
37240 KB |
Output is correct |
86 |
Correct |
256 ms |
40048 KB |
Output is correct |
87 |
Correct |
198 ms |
34288 KB |
Output is correct |
88 |
Correct |
163 ms |
31528 KB |
Output is correct |
89 |
Correct |
167 ms |
37240 KB |
Output is correct |
90 |
Correct |
271 ms |
34388 KB |
Output is correct |
91 |
Correct |
409 ms |
41732 KB |
Output is correct |
92 |
Correct |
204 ms |
46564 KB |
Output is correct |
93 |
Correct |
2957 ms |
64120 KB |
Output is correct |
94 |
Correct |
3897 ms |
65308 KB |
Output is correct |
95 |
Correct |
691 ms |
55288 KB |
Output is correct |
96 |
Correct |
1149 ms |
69488 KB |
Output is correct |
97 |
Correct |
838 ms |
50148 KB |
Output is correct |
98 |
Correct |
656 ms |
46052 KB |
Output is correct |
99 |
Correct |
673 ms |
55220 KB |
Output is correct |
100 |
Correct |
1415 ms |
65020 KB |
Output is correct |
101 |
Correct |
2069 ms |
87916 KB |
Output is correct |
102 |
Correct |
159 ms |
54264 KB |
Output is correct |
103 |
Correct |
135 ms |
54392 KB |
Output is correct |
104 |
Correct |
142 ms |
54640 KB |
Output is correct |
105 |
Correct |
725 ms |
55604 KB |
Output is correct |
106 |
Correct |
700 ms |
93152 KB |
Output is correct |