Submission #897677

# Submission time Handle Problem Language Result Execution time Memory
897677 2024-01-03T14:35:20 Z abcvuitunggio Radio Towers (IOI22_towers) C++17
100 / 100
954 ms 45116 KB
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
const int INF=2e9;
int n,h[100001],a[100001],b[100001],id,r[100001],order[100001];
vector <int> ve;
struct PT{
    int sum=0,mn=INF,mx=-INF,l=0,r=0;
}t[2100001];
PT operator +(PT a, PT b){
    return {a.sum+b.sum,min(a.mn,b.mn),max(a.mx,b.mx)};
}
int update(int node, int l, int r, int i){
    id++;
    if (l==r){
        t[id]={1,l,l};
        return id;
    }
    int cur=id;
    t[cur]=t[node];
    int mid=(l+r)>>1;
    if (mid<i)
        t[cur].r=update(t[node].r,mid+1,r,i);
    else
        t[cur].l=update(t[node].l,l,mid,i);
    int x=t[cur].l,y=t[cur].r;
    t[cur]=t[t[cur].l]+t[t[cur].r];
    t[cur].l=x;
    t[cur].r=y;
    return cur;
}
PT get(int node, int l, int r, int u, int v){
    if ((l>=u&&r<=v)||!node)
        return t[node];
    int mid=(l+r)>>1;
    if (mid+1>v)
        return get(t[node].l,l,mid,u,v);
    if (mid<u)
        return get(t[node].r,mid+1,r,u,v);
    return get(t[node].l,l,mid,u,v)+get(t[node].r,mid+1,r,u,v);
}
struct T{
    int diff,diff2,mx,mn;
}st[400001];
T operator +(T a, T b){
    return {max(max(a.diff,b.diff),h[b.mx]-h[a.mn]),max(max(a.diff2,b.diff2),h[a.mx]-h[b.mn]),(h[a.mx]>h[b.mx]?a.mx:b.mx),(h[a.mn]<h[b.mn]?a.mn:b.mn)};
}
void build(int node, int l, int r){
    if (l==r){
        st[node]={0,0,l,l};
        return;
    }
    int mid=(l+r)>>1;
    build(node<<1,l,mid);
    build(node<<1|1,mid+1,r);
    st[node]=st[node<<1]+st[node<<1|1];
}
int get(int node, int l, int r, int u, int v, int val){
    if (l>v||r<u||u>v||h[st[node].mx]<val)
        return -1;
    if (l==r)
        return l;
    int mid=(l+r)>>1,x=get(node<<1|1,mid+1,r,u,v,val);
    return (x!=-1?x:get(node<<1,l,mid,u,v,val));
}
int get2(int node, int l, int r, int u, int v, int val){
    if (l>v||r<u||u>v||h[st[node].mx]<val)
        return n;
    if (l==r)
        return l;
    int mid=(l+r)>>1,x=get2(node<<1,l,mid,u,v,val);
    return (x!=n?x:get2(node<<1|1,mid+1,r,u,v,val));
}
T get3(int node, int l, int r, int u, int v){
    if (l>=u&&r<=v)
        return st[node];
    int mid=(l+r)>>1;
    if (mid+1>v)
        return get3(node<<1,l,mid,u,v);
    if (mid<u)
        return get3(node<<1|1,mid+1,r,u,v);
    return get3(node<<1,l,mid,u,v)+get3(node<<1|1,mid+1,r,u,v);
}
void init(int N, vector <int> H){
    n=N;
    stack <int> st;
    for (int i=0;i<n;i++){
        h[i]=H[i];
        a[i]=b[i]=h[i];
        r[i]=n-1;
        while (!st.empty()&&h[st.top()]>h[i]){
            a[i]=max(a[i],a[st.top()]);
            int x=b[st.top()];
            st.pop();
            if (!st.empty())
                b[st.top()]=max(b[st.top()],x);
        }
        st.push(i);
    }
    while (!st.empty()&&h[st.top()]){
        int x=b[st.top()];
        st.pop();
        if (!st.empty())
            b[st.top()]=max(b[st.top()],x);
    }
    build(1,0,n-1);
    for (int i=0;i<n;i++)
        ve.push_back(min(a[i],b[i])-h[i]);
    sort(ve.begin(),ve.end());
    ve.resize(unique(ve.begin(),ve.end())-ve.begin());
    iota(order,order+n,0);
    sort(order,order+n,[](int i, int j){return min(a[i],b[i])-h[i]>min(a[j],b[j])-h[j];});
    for (int j=0;j<n;j++){
        int i=order[j];
        order[j]=lower_bound(ve.begin(),ve.end(),min(a[i],b[i])-h[i])-ve.begin();
        r[order[j]]=update((j?r[order[j-1]]:0),0,n-1,i);
    }
}
int max_towers(int L, int R, int D){
    int res=0,i,j;
    if (D<=ve.back()){
        PT tmp=get(r[lower_bound(ve.begin(),ve.end(),D)-ve.begin()],0,n-1,L,R);
        res=tmp.sum;
        i=tmp.mn;
        j=tmp.mx;
    }
    if (!res){
        i=j=get3(1,0,n-1,L,R).mn;
        res=1;
    }
    int l=get(1,0,n-1,0,i,h[i]+D),r=get2(1,0,n-1,j,n-1,h[j]+D);
    return res+(l>=L&&get3(1,0,n-1,L,l).diff>=D)+(r<=R&&get3(1,0,n-1,r,R).diff2>=D);
}
# Verdict Execution time Memory Grader output
1 Correct 307 ms 26416 KB Output is correct
2 Correct 647 ms 44604 KB Output is correct
3 Correct 644 ms 44860 KB Output is correct
4 Correct 656 ms 44880 KB Output is correct
5 Correct 638 ms 44476 KB Output is correct
6 Correct 663 ms 44780 KB Output is correct
7 Correct 670 ms 44488 KB Output is correct
8 Correct 1 ms 2392 KB Output is correct
9 Correct 1 ms 2904 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2904 KB Output is correct
3 Correct 1 ms 2904 KB Output is correct
4 Correct 1 ms 2904 KB Output is correct
5 Correct 1 ms 2904 KB Output is correct
6 Correct 1 ms 2904 KB Output is correct
7 Correct 1 ms 2904 KB Output is correct
8 Correct 1 ms 2904 KB Output is correct
9 Correct 1 ms 2904 KB Output is correct
10 Correct 1 ms 2904 KB Output is correct
11 Correct 2 ms 2904 KB Output is correct
12 Correct 0 ms 2392 KB Output is correct
13 Correct 1 ms 2904 KB Output is correct
14 Correct 1 ms 2904 KB Output is correct
15 Correct 1 ms 2904 KB Output is correct
16 Correct 1 ms 2904 KB Output is correct
17 Correct 1 ms 2904 KB Output is correct
18 Correct 1 ms 2904 KB Output is correct
19 Correct 1 ms 2904 KB Output is correct
20 Correct 1 ms 2904 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 ms 2904 KB Output is correct
23 Correct 2 ms 2904 KB Output is correct
24 Correct 1 ms 2904 KB Output is correct
25 Correct 1 ms 2648 KB Output is correct
26 Correct 1 ms 2904 KB Output is correct
27 Correct 2 ms 2904 KB Output is correct
28 Correct 1 ms 2904 KB Output is correct
29 Correct 2 ms 3156 KB Output is correct
30 Correct 1 ms 2904 KB Output is correct
31 Correct 1 ms 2904 KB Output is correct
32 Correct 1 ms 2904 KB Output is correct
33 Correct 2 ms 2904 KB Output is correct
34 Correct 1 ms 2904 KB Output is correct
35 Correct 1 ms 2976 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2904 KB Output is correct
3 Correct 1 ms 2904 KB Output is correct
4 Correct 1 ms 2904 KB Output is correct
5 Correct 1 ms 2904 KB Output is correct
6 Correct 1 ms 2904 KB Output is correct
7 Correct 1 ms 2904 KB Output is correct
8 Correct 1 ms 2904 KB Output is correct
9 Correct 1 ms 2904 KB Output is correct
10 Correct 1 ms 2904 KB Output is correct
11 Correct 2 ms 2904 KB Output is correct
12 Correct 0 ms 2392 KB Output is correct
13 Correct 1 ms 2904 KB Output is correct
14 Correct 1 ms 2904 KB Output is correct
15 Correct 1 ms 2904 KB Output is correct
16 Correct 1 ms 2904 KB Output is correct
17 Correct 1 ms 2904 KB Output is correct
18 Correct 1 ms 2904 KB Output is correct
19 Correct 1 ms 2904 KB Output is correct
20 Correct 1 ms 2904 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 ms 2904 KB Output is correct
23 Correct 2 ms 2904 KB Output is correct
24 Correct 1 ms 2904 KB Output is correct
25 Correct 1 ms 2648 KB Output is correct
26 Correct 1 ms 2904 KB Output is correct
27 Correct 2 ms 2904 KB Output is correct
28 Correct 1 ms 2904 KB Output is correct
29 Correct 2 ms 3156 KB Output is correct
30 Correct 1 ms 2904 KB Output is correct
31 Correct 1 ms 2904 KB Output is correct
32 Correct 1 ms 2904 KB Output is correct
33 Correct 2 ms 2904 KB Output is correct
34 Correct 1 ms 2904 KB Output is correct
35 Correct 1 ms 2976 KB Output is correct
36 Correct 37 ms 28240 KB Output is correct
37 Correct 65 ms 44472 KB Output is correct
38 Correct 61 ms 44488 KB Output is correct
39 Correct 68 ms 44416 KB Output is correct
40 Correct 66 ms 44484 KB Output is correct
41 Correct 68 ms 44412 KB Output is correct
42 Correct 66 ms 44364 KB Output is correct
43 Correct 51 ms 44608 KB Output is correct
44 Correct 48 ms 44368 KB Output is correct
45 Correct 53 ms 44744 KB Output is correct
46 Correct 47 ms 44468 KB Output is correct
47 Correct 65 ms 44476 KB Output is correct
48 Correct 68 ms 44520 KB Output is correct
49 Correct 72 ms 44476 KB Output is correct
50 Correct 47 ms 44444 KB Output is correct
51 Correct 48 ms 44708 KB Output is correct
52 Correct 67 ms 44416 KB Output is correct
53 Correct 67 ms 44448 KB Output is correct
54 Correct 67 ms 44476 KB Output is correct
55 Correct 47 ms 44488 KB Output is correct
56 Correct 48 ms 44644 KB Output is correct
57 Correct 59 ms 43224 KB Output is correct
58 Correct 64 ms 44476 KB Output is correct
59 Correct 62 ms 44528 KB Output is correct
60 Correct 67 ms 44492 KB Output is correct
61 Correct 68 ms 44572 KB Output is correct
62 Correct 66 ms 44348 KB Output is correct
63 Correct 67 ms 44380 KB Output is correct
64 Correct 55 ms 44872 KB Output is correct
65 Correct 50 ms 44484 KB Output is correct
66 Correct 53 ms 44484 KB Output is correct
67 Correct 51 ms 44476 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 624 ms 44224 KB Output is correct
2 Correct 761 ms 44476 KB Output is correct
3 Correct 708 ms 44520 KB Output is correct
4 Correct 747 ms 44552 KB Output is correct
5 Correct 781 ms 44400 KB Output is correct
6 Correct 716 ms 44436 KB Output is correct
7 Correct 750 ms 44488 KB Output is correct
8 Correct 691 ms 44620 KB Output is correct
9 Correct 651 ms 44640 KB Output is correct
10 Correct 644 ms 44516 KB Output is correct
11 Correct 667 ms 44492 KB Output is correct
12 Correct 657 ms 44764 KB Output is correct
13 Correct 637 ms 44488 KB Output is correct
14 Correct 1 ms 2392 KB Output is correct
15 Correct 1 ms 2904 KB Output is correct
16 Correct 2 ms 2904 KB Output is correct
17 Correct 63 ms 44440 KB Output is correct
18 Correct 70 ms 44520 KB Output is correct
19 Correct 68 ms 44740 KB Output is correct
20 Correct 50 ms 44476 KB Output is correct
21 Correct 51 ms 44708 KB Output is correct
22 Correct 66 ms 44396 KB Output is correct
23 Correct 67 ms 44488 KB Output is correct
24 Correct 68 ms 44472 KB Output is correct
25 Correct 48 ms 44488 KB Output is correct
26 Correct 52 ms 44508 KB Output is correct
27 Correct 1 ms 2904 KB Output is correct
28 Correct 1 ms 2904 KB Output is correct
29 Correct 1 ms 2904 KB Output is correct
30 Correct 1 ms 2904 KB Output is correct
31 Correct 1 ms 2904 KB Output is correct
32 Correct 1 ms 2904 KB Output is correct
33 Correct 1 ms 2904 KB Output is correct
34 Correct 2 ms 2904 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
36 Correct 1 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 181 ms 12632 KB Output is correct
2 Correct 615 ms 44488 KB Output is correct
3 Correct 626 ms 44488 KB Output is correct
4 Correct 625 ms 44468 KB Output is correct
5 Correct 650 ms 44472 KB Output is correct
6 Correct 612 ms 44544 KB Output is correct
7 Correct 648 ms 44488 KB Output is correct
8 Correct 589 ms 44644 KB Output is correct
9 Correct 616 ms 44484 KB Output is correct
10 Correct 550 ms 44680 KB Output is correct
11 Correct 546 ms 44404 KB Output is correct
12 Correct 75 ms 44524 KB Output is correct
13 Correct 83 ms 44476 KB Output is correct
14 Correct 75 ms 44476 KB Output is correct
15 Correct 53 ms 44536 KB Output is correct
16 Correct 57 ms 44728 KB Output is correct
17 Correct 69 ms 43016 KB Output is correct
18 Correct 72 ms 44472 KB Output is correct
19 Correct 79 ms 44400 KB Output is correct
20 Correct 78 ms 44328 KB Output is correct
21 Correct 79 ms 44424 KB Output is correct
22 Correct 79 ms 44424 KB Output is correct
23 Correct 77 ms 44512 KB Output is correct
24 Correct 54 ms 44764 KB Output is correct
25 Correct 54 ms 44472 KB Output is correct
26 Correct 53 ms 44644 KB Output is correct
27 Correct 53 ms 44340 KB Output is correct
28 Correct 1 ms 2904 KB Output is correct
29 Correct 1 ms 2904 KB Output is correct
30 Correct 2 ms 3176 KB Output is correct
31 Correct 1 ms 2904 KB Output is correct
32 Correct 1 ms 2904 KB Output is correct
33 Correct 1 ms 2648 KB Output is correct
34 Correct 2 ms 2904 KB Output is correct
35 Correct 2 ms 2904 KB Output is correct
36 Correct 2 ms 2904 KB Output is correct
37 Correct 1 ms 2904 KB Output is correct
38 Correct 1 ms 2904 KB Output is correct
39 Correct 2 ms 2904 KB Output is correct
40 Correct 1 ms 2904 KB Output is correct
41 Correct 1 ms 2904 KB Output is correct
42 Correct 1 ms 2904 KB Output is correct
43 Correct 1 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2392 KB Output is correct
2 Correct 1 ms 2904 KB Output is correct
3 Correct 1 ms 2904 KB Output is correct
4 Correct 1 ms 2904 KB Output is correct
5 Correct 1 ms 2904 KB Output is correct
6 Correct 1 ms 2904 KB Output is correct
7 Correct 1 ms 2904 KB Output is correct
8 Correct 1 ms 2904 KB Output is correct
9 Correct 1 ms 2904 KB Output is correct
10 Correct 1 ms 2904 KB Output is correct
11 Correct 2 ms 2904 KB Output is correct
12 Correct 0 ms 2392 KB Output is correct
13 Correct 1 ms 2904 KB Output is correct
14 Correct 1 ms 2904 KB Output is correct
15 Correct 1 ms 2904 KB Output is correct
16 Correct 1 ms 2904 KB Output is correct
17 Correct 1 ms 2904 KB Output is correct
18 Correct 1 ms 2904 KB Output is correct
19 Correct 1 ms 2904 KB Output is correct
20 Correct 1 ms 2904 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 ms 2904 KB Output is correct
23 Correct 2 ms 2904 KB Output is correct
24 Correct 1 ms 2904 KB Output is correct
25 Correct 1 ms 2648 KB Output is correct
26 Correct 1 ms 2904 KB Output is correct
27 Correct 2 ms 2904 KB Output is correct
28 Correct 1 ms 2904 KB Output is correct
29 Correct 2 ms 3156 KB Output is correct
30 Correct 1 ms 2904 KB Output is correct
31 Correct 1 ms 2904 KB Output is correct
32 Correct 1 ms 2904 KB Output is correct
33 Correct 2 ms 2904 KB Output is correct
34 Correct 1 ms 2904 KB Output is correct
35 Correct 1 ms 2976 KB Output is correct
36 Correct 37 ms 28240 KB Output is correct
37 Correct 65 ms 44472 KB Output is correct
38 Correct 61 ms 44488 KB Output is correct
39 Correct 68 ms 44416 KB Output is correct
40 Correct 66 ms 44484 KB Output is correct
41 Correct 68 ms 44412 KB Output is correct
42 Correct 66 ms 44364 KB Output is correct
43 Correct 51 ms 44608 KB Output is correct
44 Correct 48 ms 44368 KB Output is correct
45 Correct 53 ms 44744 KB Output is correct
46 Correct 47 ms 44468 KB Output is correct
47 Correct 65 ms 44476 KB Output is correct
48 Correct 68 ms 44520 KB Output is correct
49 Correct 72 ms 44476 KB Output is correct
50 Correct 47 ms 44444 KB Output is correct
51 Correct 48 ms 44708 KB Output is correct
52 Correct 67 ms 44416 KB Output is correct
53 Correct 67 ms 44448 KB Output is correct
54 Correct 67 ms 44476 KB Output is correct
55 Correct 47 ms 44488 KB Output is correct
56 Correct 48 ms 44644 KB Output is correct
57 Correct 59 ms 43224 KB Output is correct
58 Correct 64 ms 44476 KB Output is correct
59 Correct 62 ms 44528 KB Output is correct
60 Correct 67 ms 44492 KB Output is correct
61 Correct 68 ms 44572 KB Output is correct
62 Correct 66 ms 44348 KB Output is correct
63 Correct 67 ms 44380 KB Output is correct
64 Correct 55 ms 44872 KB Output is correct
65 Correct 50 ms 44484 KB Output is correct
66 Correct 53 ms 44484 KB Output is correct
67 Correct 51 ms 44476 KB Output is correct
68 Correct 624 ms 44224 KB Output is correct
69 Correct 761 ms 44476 KB Output is correct
70 Correct 708 ms 44520 KB Output is correct
71 Correct 747 ms 44552 KB Output is correct
72 Correct 781 ms 44400 KB Output is correct
73 Correct 716 ms 44436 KB Output is correct
74 Correct 750 ms 44488 KB Output is correct
75 Correct 691 ms 44620 KB Output is correct
76 Correct 651 ms 44640 KB Output is correct
77 Correct 644 ms 44516 KB Output is correct
78 Correct 667 ms 44492 KB Output is correct
79 Correct 657 ms 44764 KB Output is correct
80 Correct 637 ms 44488 KB Output is correct
81 Correct 1 ms 2392 KB Output is correct
82 Correct 1 ms 2904 KB Output is correct
83 Correct 2 ms 2904 KB Output is correct
84 Correct 63 ms 44440 KB Output is correct
85 Correct 70 ms 44520 KB Output is correct
86 Correct 68 ms 44740 KB Output is correct
87 Correct 50 ms 44476 KB Output is correct
88 Correct 51 ms 44708 KB Output is correct
89 Correct 66 ms 44396 KB Output is correct
90 Correct 67 ms 44488 KB Output is correct
91 Correct 68 ms 44472 KB Output is correct
92 Correct 48 ms 44488 KB Output is correct
93 Correct 52 ms 44508 KB Output is correct
94 Correct 1 ms 2904 KB Output is correct
95 Correct 1 ms 2904 KB Output is correct
96 Correct 1 ms 2904 KB Output is correct
97 Correct 1 ms 2904 KB Output is correct
98 Correct 1 ms 2904 KB Output is correct
99 Correct 1 ms 2904 KB Output is correct
100 Correct 1 ms 2904 KB Output is correct
101 Correct 2 ms 2904 KB Output is correct
102 Correct 1 ms 2904 KB Output is correct
103 Correct 1 ms 2904 KB Output is correct
104 Correct 605 ms 39880 KB Output is correct
105 Correct 716 ms 44472 KB Output is correct
106 Correct 711 ms 44472 KB Output is correct
107 Correct 708 ms 44552 KB Output is correct
108 Correct 691 ms 44488 KB Output is correct
109 Correct 737 ms 44520 KB Output is correct
110 Correct 743 ms 44560 KB Output is correct
111 Correct 635 ms 45116 KB Output is correct
112 Correct 646 ms 44420 KB Output is correct
113 Correct 619 ms 44476 KB Output is correct
114 Correct 655 ms 44452 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 307 ms 26416 KB Output is correct
2 Correct 647 ms 44604 KB Output is correct
3 Correct 644 ms 44860 KB Output is correct
4 Correct 656 ms 44880 KB Output is correct
5 Correct 638 ms 44476 KB Output is correct
6 Correct 663 ms 44780 KB Output is correct
7 Correct 670 ms 44488 KB Output is correct
8 Correct 1 ms 2392 KB Output is correct
9 Correct 1 ms 2904 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
11 Correct 1 ms 2392 KB Output is correct
12 Correct 1 ms 2904 KB Output is correct
13 Correct 1 ms 2904 KB Output is correct
14 Correct 1 ms 2904 KB Output is correct
15 Correct 1 ms 2904 KB Output is correct
16 Correct 1 ms 2904 KB Output is correct
17 Correct 1 ms 2904 KB Output is correct
18 Correct 1 ms 2904 KB Output is correct
19 Correct 1 ms 2904 KB Output is correct
20 Correct 1 ms 2904 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 0 ms 2392 KB Output is correct
23 Correct 1 ms 2904 KB Output is correct
24 Correct 1 ms 2904 KB Output is correct
25 Correct 1 ms 2904 KB Output is correct
26 Correct 1 ms 2904 KB Output is correct
27 Correct 1 ms 2904 KB Output is correct
28 Correct 1 ms 2904 KB Output is correct
29 Correct 1 ms 2904 KB Output is correct
30 Correct 1 ms 2904 KB Output is correct
31 Correct 2 ms 2904 KB Output is correct
32 Correct 2 ms 2904 KB Output is correct
33 Correct 2 ms 2904 KB Output is correct
34 Correct 1 ms 2904 KB Output is correct
35 Correct 1 ms 2648 KB Output is correct
36 Correct 1 ms 2904 KB Output is correct
37 Correct 2 ms 2904 KB Output is correct
38 Correct 1 ms 2904 KB Output is correct
39 Correct 2 ms 3156 KB Output is correct
40 Correct 1 ms 2904 KB Output is correct
41 Correct 1 ms 2904 KB Output is correct
42 Correct 1 ms 2904 KB Output is correct
43 Correct 2 ms 2904 KB Output is correct
44 Correct 1 ms 2904 KB Output is correct
45 Correct 1 ms 2976 KB Output is correct
46 Correct 37 ms 28240 KB Output is correct
47 Correct 65 ms 44472 KB Output is correct
48 Correct 61 ms 44488 KB Output is correct
49 Correct 68 ms 44416 KB Output is correct
50 Correct 66 ms 44484 KB Output is correct
51 Correct 68 ms 44412 KB Output is correct
52 Correct 66 ms 44364 KB Output is correct
53 Correct 51 ms 44608 KB Output is correct
54 Correct 48 ms 44368 KB Output is correct
55 Correct 53 ms 44744 KB Output is correct
56 Correct 47 ms 44468 KB Output is correct
57 Correct 65 ms 44476 KB Output is correct
58 Correct 68 ms 44520 KB Output is correct
59 Correct 72 ms 44476 KB Output is correct
60 Correct 47 ms 44444 KB Output is correct
61 Correct 48 ms 44708 KB Output is correct
62 Correct 67 ms 44416 KB Output is correct
63 Correct 67 ms 44448 KB Output is correct
64 Correct 67 ms 44476 KB Output is correct
65 Correct 47 ms 44488 KB Output is correct
66 Correct 48 ms 44644 KB Output is correct
67 Correct 59 ms 43224 KB Output is correct
68 Correct 64 ms 44476 KB Output is correct
69 Correct 62 ms 44528 KB Output is correct
70 Correct 67 ms 44492 KB Output is correct
71 Correct 68 ms 44572 KB Output is correct
72 Correct 66 ms 44348 KB Output is correct
73 Correct 67 ms 44380 KB Output is correct
74 Correct 55 ms 44872 KB Output is correct
75 Correct 50 ms 44484 KB Output is correct
76 Correct 53 ms 44484 KB Output is correct
77 Correct 51 ms 44476 KB Output is correct
78 Correct 624 ms 44224 KB Output is correct
79 Correct 761 ms 44476 KB Output is correct
80 Correct 708 ms 44520 KB Output is correct
81 Correct 747 ms 44552 KB Output is correct
82 Correct 781 ms 44400 KB Output is correct
83 Correct 716 ms 44436 KB Output is correct
84 Correct 750 ms 44488 KB Output is correct
85 Correct 691 ms 44620 KB Output is correct
86 Correct 651 ms 44640 KB Output is correct
87 Correct 644 ms 44516 KB Output is correct
88 Correct 667 ms 44492 KB Output is correct
89 Correct 657 ms 44764 KB Output is correct
90 Correct 637 ms 44488 KB Output is correct
91 Correct 1 ms 2392 KB Output is correct
92 Correct 1 ms 2904 KB Output is correct
93 Correct 2 ms 2904 KB Output is correct
94 Correct 63 ms 44440 KB Output is correct
95 Correct 70 ms 44520 KB Output is correct
96 Correct 68 ms 44740 KB Output is correct
97 Correct 50 ms 44476 KB Output is correct
98 Correct 51 ms 44708 KB Output is correct
99 Correct 66 ms 44396 KB Output is correct
100 Correct 67 ms 44488 KB Output is correct
101 Correct 68 ms 44472 KB Output is correct
102 Correct 48 ms 44488 KB Output is correct
103 Correct 52 ms 44508 KB Output is correct
104 Correct 1 ms 2904 KB Output is correct
105 Correct 1 ms 2904 KB Output is correct
106 Correct 1 ms 2904 KB Output is correct
107 Correct 1 ms 2904 KB Output is correct
108 Correct 1 ms 2904 KB Output is correct
109 Correct 1 ms 2904 KB Output is correct
110 Correct 1 ms 2904 KB Output is correct
111 Correct 2 ms 2904 KB Output is correct
112 Correct 1 ms 2904 KB Output is correct
113 Correct 1 ms 2904 KB Output is correct
114 Correct 181 ms 12632 KB Output is correct
115 Correct 615 ms 44488 KB Output is correct
116 Correct 626 ms 44488 KB Output is correct
117 Correct 625 ms 44468 KB Output is correct
118 Correct 650 ms 44472 KB Output is correct
119 Correct 612 ms 44544 KB Output is correct
120 Correct 648 ms 44488 KB Output is correct
121 Correct 589 ms 44644 KB Output is correct
122 Correct 616 ms 44484 KB Output is correct
123 Correct 550 ms 44680 KB Output is correct
124 Correct 546 ms 44404 KB Output is correct
125 Correct 75 ms 44524 KB Output is correct
126 Correct 83 ms 44476 KB Output is correct
127 Correct 75 ms 44476 KB Output is correct
128 Correct 53 ms 44536 KB Output is correct
129 Correct 57 ms 44728 KB Output is correct
130 Correct 69 ms 43016 KB Output is correct
131 Correct 72 ms 44472 KB Output is correct
132 Correct 79 ms 44400 KB Output is correct
133 Correct 78 ms 44328 KB Output is correct
134 Correct 79 ms 44424 KB Output is correct
135 Correct 79 ms 44424 KB Output is correct
136 Correct 77 ms 44512 KB Output is correct
137 Correct 54 ms 44764 KB Output is correct
138 Correct 54 ms 44472 KB Output is correct
139 Correct 53 ms 44644 KB Output is correct
140 Correct 53 ms 44340 KB Output is correct
141 Correct 1 ms 2904 KB Output is correct
142 Correct 1 ms 2904 KB Output is correct
143 Correct 2 ms 3176 KB Output is correct
144 Correct 1 ms 2904 KB Output is correct
145 Correct 1 ms 2904 KB Output is correct
146 Correct 1 ms 2648 KB Output is correct
147 Correct 2 ms 2904 KB Output is correct
148 Correct 2 ms 2904 KB Output is correct
149 Correct 2 ms 2904 KB Output is correct
150 Correct 1 ms 2904 KB Output is correct
151 Correct 1 ms 2904 KB Output is correct
152 Correct 2 ms 2904 KB Output is correct
153 Correct 1 ms 2904 KB Output is correct
154 Correct 1 ms 2904 KB Output is correct
155 Correct 1 ms 2904 KB Output is correct
156 Correct 1 ms 2904 KB Output is correct
157 Correct 605 ms 39880 KB Output is correct
158 Correct 716 ms 44472 KB Output is correct
159 Correct 711 ms 44472 KB Output is correct
160 Correct 708 ms 44552 KB Output is correct
161 Correct 691 ms 44488 KB Output is correct
162 Correct 737 ms 44520 KB Output is correct
163 Correct 743 ms 44560 KB Output is correct
164 Correct 635 ms 45116 KB Output is correct
165 Correct 646 ms 44420 KB Output is correct
166 Correct 619 ms 44476 KB Output is correct
167 Correct 655 ms 44452 KB Output is correct
168 Correct 0 ms 2392 KB Output is correct
169 Correct 444 ms 16588 KB Output is correct
170 Correct 799 ms 44500 KB Output is correct
171 Correct 817 ms 44480 KB Output is correct
172 Correct 880 ms 44452 KB Output is correct
173 Correct 846 ms 44476 KB Output is correct
174 Correct 874 ms 44516 KB Output is correct
175 Correct 954 ms 44476 KB Output is correct
176 Correct 677 ms 44768 KB Output is correct
177 Correct 659 ms 44468 KB Output is correct
178 Correct 664 ms 44620 KB Output is correct
179 Correct 662 ms 44620 KB Output is correct