Submission #897797

# Submission time Handle Problem Language Result Execution time Memory
897797 2024-01-03T17:09:46 Z abcvuitunggio Radio Towers (IOI22_towers) C++17
100 / 100
996 ms 45008 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||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||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()){
        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 347 ms 26584 KB Output is correct
2 Correct 715 ms 44596 KB Output is correct
3 Correct 677 ms 44624 KB Output is correct
4 Correct 721 ms 44616 KB Output is correct
5 Correct 776 ms 44348 KB Output is correct
6 Correct 814 ms 44604 KB Output is correct
7 Correct 812 ms 44476 KB Output is correct
8 Correct 1 ms 2392 KB Output is correct
9 Correct 1 ms 2904 KB Output is correct
10 Correct 1 ms 3156 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2540 KB Output is correct
2 Correct 2 ms 3052 KB Output is correct
3 Correct 1 ms 2904 KB Output is correct
4 Correct 1 ms 2904 KB Output is correct
5 Correct 2 ms 2904 KB Output is correct
6 Correct 2 ms 2904 KB Output is correct
7 Correct 2 ms 2904 KB Output is correct
8 Correct 1 ms 2904 KB Output is correct
9 Correct 1 ms 3056 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
11 Correct 1 ms 2904 KB Output is correct
12 Correct 1 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 3156 KB Output is correct
17 Correct 2 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 2 ms 2904 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 1 ms 2904 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 2648 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 2 ms 2904 KB Output is correct
31 Correct 2 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 1 ms 2904 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2540 KB Output is correct
2 Correct 2 ms 3052 KB Output is correct
3 Correct 1 ms 2904 KB Output is correct
4 Correct 1 ms 2904 KB Output is correct
5 Correct 2 ms 2904 KB Output is correct
6 Correct 2 ms 2904 KB Output is correct
7 Correct 2 ms 2904 KB Output is correct
8 Correct 1 ms 2904 KB Output is correct
9 Correct 1 ms 3056 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
11 Correct 1 ms 2904 KB Output is correct
12 Correct 1 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 3156 KB Output is correct
17 Correct 2 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 2 ms 2904 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 1 ms 2904 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 2648 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 2 ms 2904 KB Output is correct
31 Correct 2 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 1 ms 2904 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
36 Correct 44 ms 28568 KB Output is correct
37 Correct 64 ms 44540 KB Output is correct
38 Correct 66 ms 44476 KB Output is correct
39 Correct 66 ms 44540 KB Output is correct
40 Correct 69 ms 44484 KB Output is correct
41 Correct 66 ms 44472 KB Output is correct
42 Correct 71 ms 44524 KB Output is correct
43 Correct 56 ms 44688 KB Output is correct
44 Correct 47 ms 44488 KB Output is correct
45 Correct 50 ms 44488 KB Output is correct
46 Correct 47 ms 44500 KB Output is correct
47 Correct 69 ms 44484 KB Output is correct
48 Correct 68 ms 44516 KB Output is correct
49 Correct 67 ms 44524 KB Output is correct
50 Correct 47 ms 44520 KB Output is correct
51 Correct 53 ms 44608 KB Output is correct
52 Correct 63 ms 44484 KB Output is correct
53 Correct 71 ms 44476 KB Output is correct
54 Correct 69 ms 44488 KB Output is correct
55 Correct 49 ms 44488 KB Output is correct
56 Correct 51 ms 44824 KB Output is correct
57 Correct 59 ms 43124 KB Output is correct
58 Correct 62 ms 44524 KB Output is correct
59 Correct 63 ms 44456 KB Output is correct
60 Correct 67 ms 44452 KB Output is correct
61 Correct 69 ms 44412 KB Output is correct
62 Correct 76 ms 44476 KB Output is correct
63 Correct 67 ms 44488 KB Output is correct
64 Correct 47 ms 44616 KB Output is correct
65 Correct 48 ms 44484 KB Output is correct
66 Correct 47 ms 44576 KB Output is correct
67 Correct 48 ms 44492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 646 ms 44320 KB Output is correct
2 Correct 799 ms 44524 KB Output is correct
3 Correct 772 ms 44448 KB Output is correct
4 Correct 778 ms 44488 KB Output is correct
5 Correct 791 ms 44472 KB Output is correct
6 Correct 771 ms 44340 KB Output is correct
7 Correct 796 ms 44392 KB Output is correct
8 Correct 690 ms 44604 KB Output is correct
9 Correct 682 ms 44476 KB Output is correct
10 Correct 644 ms 44504 KB Output is correct
11 Correct 687 ms 44488 KB Output is correct
12 Correct 735 ms 44988 KB Output is correct
13 Correct 710 ms 44476 KB Output is correct
14 Correct 0 ms 2392 KB Output is correct
15 Correct 1 ms 2904 KB Output is correct
16 Correct 1 ms 2904 KB Output is correct
17 Correct 67 ms 44580 KB Output is correct
18 Correct 70 ms 44472 KB Output is correct
19 Correct 70 ms 44520 KB Output is correct
20 Correct 57 ms 44476 KB Output is correct
21 Correct 50 ms 44620 KB Output is correct
22 Correct 62 ms 44532 KB Output is correct
23 Correct 68 ms 44368 KB Output is correct
24 Correct 70 ms 44492 KB Output is correct
25 Correct 51 ms 44468 KB Output is correct
26 Correct 50 ms 44544 KB Output is correct
27 Correct 1 ms 2904 KB Output is correct
28 Correct 2 ms 2904 KB Output is correct
29 Correct 2 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 1 ms 2904 KB Output is correct
35 Correct 2 ms 2904 KB Output is correct
36 Correct 2 ms 2904 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 192 ms 12632 KB Output is correct
2 Correct 724 ms 44488 KB Output is correct
3 Correct 674 ms 44532 KB Output is correct
4 Correct 680 ms 44472 KB Output is correct
5 Correct 691 ms 44448 KB Output is correct
6 Correct 705 ms 44468 KB Output is correct
7 Correct 724 ms 44392 KB Output is correct
8 Correct 679 ms 44616 KB Output is correct
9 Correct 636 ms 44404 KB Output is correct
10 Correct 679 ms 44744 KB Output is correct
11 Correct 676 ms 44448 KB Output is correct
12 Correct 69 ms 44476 KB Output is correct
13 Correct 67 ms 44728 KB Output is correct
14 Correct 68 ms 44528 KB Output is correct
15 Correct 49 ms 44484 KB Output is correct
16 Correct 48 ms 44868 KB Output is correct
17 Correct 69 ms 43324 KB Output is correct
18 Correct 68 ms 44928 KB Output is correct
19 Correct 62 ms 44576 KB Output is correct
20 Correct 68 ms 44520 KB Output is correct
21 Correct 71 ms 44520 KB Output is correct
22 Correct 68 ms 44488 KB Output is correct
23 Correct 66 ms 44364 KB Output is correct
24 Correct 48 ms 44856 KB Output is correct
25 Correct 61 ms 44364 KB Output is correct
26 Correct 47 ms 44520 KB Output is correct
27 Correct 52 ms 44484 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 2648 KB Output is correct
34 Correct 1 ms 2904 KB Output is correct
35 Correct 2 ms 2904 KB Output is correct
36 Correct 1 ms 2904 KB Output is correct
37 Correct 2 ms 2904 KB Output is correct
38 Correct 3 ms 2904 KB Output is correct
39 Correct 1 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 2540 KB Output is correct
2 Correct 2 ms 3052 KB Output is correct
3 Correct 1 ms 2904 KB Output is correct
4 Correct 1 ms 2904 KB Output is correct
5 Correct 2 ms 2904 KB Output is correct
6 Correct 2 ms 2904 KB Output is correct
7 Correct 2 ms 2904 KB Output is correct
8 Correct 1 ms 2904 KB Output is correct
9 Correct 1 ms 3056 KB Output is correct
10 Correct 2 ms 2904 KB Output is correct
11 Correct 1 ms 2904 KB Output is correct
12 Correct 1 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 3156 KB Output is correct
17 Correct 2 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 2 ms 2904 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 1 ms 2904 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 2648 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 2 ms 2904 KB Output is correct
31 Correct 2 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 1 ms 2904 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
36 Correct 44 ms 28568 KB Output is correct
37 Correct 64 ms 44540 KB Output is correct
38 Correct 66 ms 44476 KB Output is correct
39 Correct 66 ms 44540 KB Output is correct
40 Correct 69 ms 44484 KB Output is correct
41 Correct 66 ms 44472 KB Output is correct
42 Correct 71 ms 44524 KB Output is correct
43 Correct 56 ms 44688 KB Output is correct
44 Correct 47 ms 44488 KB Output is correct
45 Correct 50 ms 44488 KB Output is correct
46 Correct 47 ms 44500 KB Output is correct
47 Correct 69 ms 44484 KB Output is correct
48 Correct 68 ms 44516 KB Output is correct
49 Correct 67 ms 44524 KB Output is correct
50 Correct 47 ms 44520 KB Output is correct
51 Correct 53 ms 44608 KB Output is correct
52 Correct 63 ms 44484 KB Output is correct
53 Correct 71 ms 44476 KB Output is correct
54 Correct 69 ms 44488 KB Output is correct
55 Correct 49 ms 44488 KB Output is correct
56 Correct 51 ms 44824 KB Output is correct
57 Correct 59 ms 43124 KB Output is correct
58 Correct 62 ms 44524 KB Output is correct
59 Correct 63 ms 44456 KB Output is correct
60 Correct 67 ms 44452 KB Output is correct
61 Correct 69 ms 44412 KB Output is correct
62 Correct 76 ms 44476 KB Output is correct
63 Correct 67 ms 44488 KB Output is correct
64 Correct 47 ms 44616 KB Output is correct
65 Correct 48 ms 44484 KB Output is correct
66 Correct 47 ms 44576 KB Output is correct
67 Correct 48 ms 44492 KB Output is correct
68 Correct 646 ms 44320 KB Output is correct
69 Correct 799 ms 44524 KB Output is correct
70 Correct 772 ms 44448 KB Output is correct
71 Correct 778 ms 44488 KB Output is correct
72 Correct 791 ms 44472 KB Output is correct
73 Correct 771 ms 44340 KB Output is correct
74 Correct 796 ms 44392 KB Output is correct
75 Correct 690 ms 44604 KB Output is correct
76 Correct 682 ms 44476 KB Output is correct
77 Correct 644 ms 44504 KB Output is correct
78 Correct 687 ms 44488 KB Output is correct
79 Correct 735 ms 44988 KB Output is correct
80 Correct 710 ms 44476 KB Output is correct
81 Correct 0 ms 2392 KB Output is correct
82 Correct 1 ms 2904 KB Output is correct
83 Correct 1 ms 2904 KB Output is correct
84 Correct 67 ms 44580 KB Output is correct
85 Correct 70 ms 44472 KB Output is correct
86 Correct 70 ms 44520 KB Output is correct
87 Correct 57 ms 44476 KB Output is correct
88 Correct 50 ms 44620 KB Output is correct
89 Correct 62 ms 44532 KB Output is correct
90 Correct 68 ms 44368 KB Output is correct
91 Correct 70 ms 44492 KB Output is correct
92 Correct 51 ms 44468 KB Output is correct
93 Correct 50 ms 44544 KB Output is correct
94 Correct 1 ms 2904 KB Output is correct
95 Correct 2 ms 2904 KB Output is correct
96 Correct 2 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 1 ms 2904 KB Output is correct
102 Correct 2 ms 2904 KB Output is correct
103 Correct 2 ms 2904 KB Output is correct
104 Correct 638 ms 39832 KB Output is correct
105 Correct 796 ms 44436 KB Output is correct
106 Correct 817 ms 44440 KB Output is correct
107 Correct 789 ms 44368 KB Output is correct
108 Correct 785 ms 44476 KB Output is correct
109 Correct 800 ms 44388 KB Output is correct
110 Correct 866 ms 44440 KB Output is correct
111 Correct 685 ms 44672 KB Output is correct
112 Correct 664 ms 44480 KB Output is correct
113 Correct 708 ms 44488 KB Output is correct
114 Correct 721 ms 44488 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 347 ms 26584 KB Output is correct
2 Correct 715 ms 44596 KB Output is correct
3 Correct 677 ms 44624 KB Output is correct
4 Correct 721 ms 44616 KB Output is correct
5 Correct 776 ms 44348 KB Output is correct
6 Correct 814 ms 44604 KB Output is correct
7 Correct 812 ms 44476 KB Output is correct
8 Correct 1 ms 2392 KB Output is correct
9 Correct 1 ms 2904 KB Output is correct
10 Correct 1 ms 3156 KB Output is correct
11 Correct 1 ms 2540 KB Output is correct
12 Correct 2 ms 3052 KB Output is correct
13 Correct 1 ms 2904 KB Output is correct
14 Correct 1 ms 2904 KB Output is correct
15 Correct 2 ms 2904 KB Output is correct
16 Correct 2 ms 2904 KB Output is correct
17 Correct 2 ms 2904 KB Output is correct
18 Correct 1 ms 2904 KB Output is correct
19 Correct 1 ms 3056 KB Output is correct
20 Correct 2 ms 2904 KB Output is correct
21 Correct 1 ms 2904 KB Output is correct
22 Correct 1 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 3156 KB Output is correct
27 Correct 2 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 2 ms 2904 KB Output is correct
31 Correct 2 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 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 1 ms 2904 KB Output is correct
38 Correct 1 ms 2904 KB Output is correct
39 Correct 1 ms 2904 KB Output is correct
40 Correct 2 ms 2904 KB Output is correct
41 Correct 2 ms 2904 KB Output is correct
42 Correct 1 ms 2904 KB Output is correct
43 Correct 1 ms 2904 KB Output is correct
44 Correct 1 ms 2904 KB Output is correct
45 Correct 1 ms 2904 KB Output is correct
46 Correct 44 ms 28568 KB Output is correct
47 Correct 64 ms 44540 KB Output is correct
48 Correct 66 ms 44476 KB Output is correct
49 Correct 66 ms 44540 KB Output is correct
50 Correct 69 ms 44484 KB Output is correct
51 Correct 66 ms 44472 KB Output is correct
52 Correct 71 ms 44524 KB Output is correct
53 Correct 56 ms 44688 KB Output is correct
54 Correct 47 ms 44488 KB Output is correct
55 Correct 50 ms 44488 KB Output is correct
56 Correct 47 ms 44500 KB Output is correct
57 Correct 69 ms 44484 KB Output is correct
58 Correct 68 ms 44516 KB Output is correct
59 Correct 67 ms 44524 KB Output is correct
60 Correct 47 ms 44520 KB Output is correct
61 Correct 53 ms 44608 KB Output is correct
62 Correct 63 ms 44484 KB Output is correct
63 Correct 71 ms 44476 KB Output is correct
64 Correct 69 ms 44488 KB Output is correct
65 Correct 49 ms 44488 KB Output is correct
66 Correct 51 ms 44824 KB Output is correct
67 Correct 59 ms 43124 KB Output is correct
68 Correct 62 ms 44524 KB Output is correct
69 Correct 63 ms 44456 KB Output is correct
70 Correct 67 ms 44452 KB Output is correct
71 Correct 69 ms 44412 KB Output is correct
72 Correct 76 ms 44476 KB Output is correct
73 Correct 67 ms 44488 KB Output is correct
74 Correct 47 ms 44616 KB Output is correct
75 Correct 48 ms 44484 KB Output is correct
76 Correct 47 ms 44576 KB Output is correct
77 Correct 48 ms 44492 KB Output is correct
78 Correct 646 ms 44320 KB Output is correct
79 Correct 799 ms 44524 KB Output is correct
80 Correct 772 ms 44448 KB Output is correct
81 Correct 778 ms 44488 KB Output is correct
82 Correct 791 ms 44472 KB Output is correct
83 Correct 771 ms 44340 KB Output is correct
84 Correct 796 ms 44392 KB Output is correct
85 Correct 690 ms 44604 KB Output is correct
86 Correct 682 ms 44476 KB Output is correct
87 Correct 644 ms 44504 KB Output is correct
88 Correct 687 ms 44488 KB Output is correct
89 Correct 735 ms 44988 KB Output is correct
90 Correct 710 ms 44476 KB Output is correct
91 Correct 0 ms 2392 KB Output is correct
92 Correct 1 ms 2904 KB Output is correct
93 Correct 1 ms 2904 KB Output is correct
94 Correct 67 ms 44580 KB Output is correct
95 Correct 70 ms 44472 KB Output is correct
96 Correct 70 ms 44520 KB Output is correct
97 Correct 57 ms 44476 KB Output is correct
98 Correct 50 ms 44620 KB Output is correct
99 Correct 62 ms 44532 KB Output is correct
100 Correct 68 ms 44368 KB Output is correct
101 Correct 70 ms 44492 KB Output is correct
102 Correct 51 ms 44468 KB Output is correct
103 Correct 50 ms 44544 KB Output is correct
104 Correct 1 ms 2904 KB Output is correct
105 Correct 2 ms 2904 KB Output is correct
106 Correct 2 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 1 ms 2904 KB Output is correct
112 Correct 2 ms 2904 KB Output is correct
113 Correct 2 ms 2904 KB Output is correct
114 Correct 192 ms 12632 KB Output is correct
115 Correct 724 ms 44488 KB Output is correct
116 Correct 674 ms 44532 KB Output is correct
117 Correct 680 ms 44472 KB Output is correct
118 Correct 691 ms 44448 KB Output is correct
119 Correct 705 ms 44468 KB Output is correct
120 Correct 724 ms 44392 KB Output is correct
121 Correct 679 ms 44616 KB Output is correct
122 Correct 636 ms 44404 KB Output is correct
123 Correct 679 ms 44744 KB Output is correct
124 Correct 676 ms 44448 KB Output is correct
125 Correct 69 ms 44476 KB Output is correct
126 Correct 67 ms 44728 KB Output is correct
127 Correct 68 ms 44528 KB Output is correct
128 Correct 49 ms 44484 KB Output is correct
129 Correct 48 ms 44868 KB Output is correct
130 Correct 69 ms 43324 KB Output is correct
131 Correct 68 ms 44928 KB Output is correct
132 Correct 62 ms 44576 KB Output is correct
133 Correct 68 ms 44520 KB Output is correct
134 Correct 71 ms 44520 KB Output is correct
135 Correct 68 ms 44488 KB Output is correct
136 Correct 66 ms 44364 KB Output is correct
137 Correct 48 ms 44856 KB Output is correct
138 Correct 61 ms 44364 KB Output is correct
139 Correct 47 ms 44520 KB Output is correct
140 Correct 52 ms 44484 KB Output is correct
141 Correct 1 ms 2904 KB Output is correct
142 Correct 1 ms 2904 KB Output is correct
143 Correct 1 ms 2904 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 1 ms 2904 KB Output is correct
148 Correct 2 ms 2904 KB Output is correct
149 Correct 1 ms 2904 KB Output is correct
150 Correct 2 ms 2904 KB Output is correct
151 Correct 3 ms 2904 KB Output is correct
152 Correct 1 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 638 ms 39832 KB Output is correct
158 Correct 796 ms 44436 KB Output is correct
159 Correct 817 ms 44440 KB Output is correct
160 Correct 789 ms 44368 KB Output is correct
161 Correct 785 ms 44476 KB Output is correct
162 Correct 800 ms 44388 KB Output is correct
163 Correct 866 ms 44440 KB Output is correct
164 Correct 685 ms 44672 KB Output is correct
165 Correct 664 ms 44480 KB Output is correct
166 Correct 708 ms 44488 KB Output is correct
167 Correct 721 ms 44488 KB Output is correct
168 Correct 0 ms 2392 KB Output is correct
169 Correct 518 ms 16596 KB Output is correct
170 Correct 866 ms 44476 KB Output is correct
171 Correct 898 ms 44488 KB Output is correct
172 Correct 996 ms 44492 KB Output is correct
173 Correct 946 ms 44488 KB Output is correct
174 Correct 930 ms 44480 KB Output is correct
175 Correct 934 ms 44544 KB Output is correct
176 Correct 733 ms 44672 KB Output is correct
177 Correct 693 ms 44604 KB Output is correct
178 Correct 667 ms 45008 KB Output is correct
179 Correct 702 ms 44428 KB Output is correct