답안 #897796

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
897796 2024-01-03T17:07:58 Z abcvuitunggio 송신탑 (IOI22_towers) C++17
100 / 100
1067 ms 45072 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()){
        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);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 325 ms 26316 KB Output is correct
2 Correct 684 ms 44616 KB Output is correct
3 Correct 660 ms 44656 KB Output is correct
4 Correct 687 ms 44608 KB Output is correct
5 Correct 711 ms 44668 KB Output is correct
6 Correct 683 ms 44604 KB Output is correct
7 Correct 719 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 1 ms 2904 KB Output is correct
# 결과 실행 시간 메모리 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 1 ms 2904 KB Output is correct
12 Correct 1 ms 2392 KB Output is correct
13 Correct 2 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 2 ms 2900 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 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 2 ms 2904 KB Output is correct
29 Correct 1 ms 2904 KB Output is correct
30 Correct 1 ms 2900 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 3056 KB Output is correct
34 Correct 1 ms 3156 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
# 결과 실행 시간 메모리 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 1 ms 2904 KB Output is correct
12 Correct 1 ms 2392 KB Output is correct
13 Correct 2 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 2 ms 2900 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 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 2 ms 2904 KB Output is correct
29 Correct 1 ms 2904 KB Output is correct
30 Correct 1 ms 2900 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 3056 KB Output is correct
34 Correct 1 ms 3156 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
36 Correct 46 ms 28480 KB Output is correct
37 Correct 60 ms 44468 KB Output is correct
38 Correct 74 ms 44564 KB Output is correct
39 Correct 84 ms 44360 KB Output is correct
40 Correct 67 ms 44476 KB Output is correct
41 Correct 66 ms 44476 KB Output is correct
42 Correct 75 ms 44480 KB Output is correct
43 Correct 48 ms 45024 KB Output is correct
44 Correct 53 ms 44364 KB Output is correct
45 Correct 48 ms 44632 KB Output is correct
46 Correct 46 ms 44488 KB Output is correct
47 Correct 60 ms 44344 KB Output is correct
48 Correct 69 ms 44512 KB Output is correct
49 Correct 64 ms 44488 KB Output is correct
50 Correct 47 ms 44492 KB Output is correct
51 Correct 46 ms 44684 KB Output is correct
52 Correct 60 ms 44376 KB Output is correct
53 Correct 72 ms 44740 KB Output is correct
54 Correct 66 ms 44584 KB Output is correct
55 Correct 46 ms 44488 KB Output is correct
56 Correct 49 ms 44640 KB Output is correct
57 Correct 58 ms 43188 KB Output is correct
58 Correct 69 ms 44472 KB Output is correct
59 Correct 63 ms 44484 KB Output is correct
60 Correct 66 ms 44476 KB Output is correct
61 Correct 71 ms 44480 KB Output is correct
62 Correct 64 ms 44492 KB Output is correct
63 Correct 65 ms 44396 KB Output is correct
64 Correct 47 ms 44772 KB Output is correct
65 Correct 46 ms 44488 KB Output is correct
66 Correct 52 ms 44536 KB Output is correct
67 Correct 47 ms 44508 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 646 ms 44212 KB Output is correct
2 Correct 846 ms 44468 KB Output is correct
3 Correct 746 ms 44676 KB Output is correct
4 Correct 786 ms 44344 KB Output is correct
5 Correct 815 ms 44480 KB Output is correct
6 Correct 788 ms 44488 KB Output is correct
7 Correct 801 ms 44488 KB Output is correct
8 Correct 721 ms 45072 KB Output is correct
9 Correct 750 ms 44644 KB Output is correct
10 Correct 674 ms 44784 KB Output is correct
11 Correct 709 ms 44484 KB Output is correct
12 Correct 717 ms 44616 KB Output is correct
13 Correct 694 ms 44484 KB Output is correct
14 Correct 1 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 59 ms 44484 KB Output is correct
18 Correct 66 ms 44492 KB Output is correct
19 Correct 70 ms 44472 KB Output is correct
20 Correct 46 ms 44488 KB Output is correct
21 Correct 48 ms 44616 KB Output is correct
22 Correct 60 ms 44368 KB Output is correct
23 Correct 65 ms 44464 KB Output is correct
24 Correct 76 ms 44484 KB Output is correct
25 Correct 47 ms 44468 KB Output is correct
26 Correct 48 ms 44724 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 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 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 1 ms 2904 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 190 ms 12832 KB Output is correct
2 Correct 686 ms 44480 KB Output is correct
3 Correct 676 ms 44344 KB Output is correct
4 Correct 680 ms 44688 KB Output is correct
5 Correct 681 ms 44484 KB Output is correct
6 Correct 681 ms 44508 KB Output is correct
7 Correct 698 ms 44764 KB Output is correct
8 Correct 640 ms 44628 KB Output is correct
9 Correct 656 ms 44484 KB Output is correct
10 Correct 641 ms 44532 KB Output is correct
11 Correct 661 ms 44484 KB Output is correct
12 Correct 64 ms 44476 KB Output is correct
13 Correct 76 ms 44488 KB Output is correct
14 Correct 68 ms 44452 KB Output is correct
15 Correct 47 ms 44488 KB Output is correct
16 Correct 46 ms 44524 KB Output is correct
17 Correct 57 ms 43204 KB Output is correct
18 Correct 77 ms 44536 KB Output is correct
19 Correct 69 ms 44752 KB Output is correct
20 Correct 65 ms 44480 KB Output is correct
21 Correct 69 ms 44456 KB Output is correct
22 Correct 73 ms 44580 KB Output is correct
23 Correct 67 ms 44456 KB Output is correct
24 Correct 49 ms 44764 KB Output is correct
25 Correct 47 ms 44592 KB Output is correct
26 Correct 51 ms 44492 KB Output is correct
27 Correct 46 ms 44740 KB Output is correct
28 Correct 1 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 2648 KB Output is correct
34 Correct 1 ms 2904 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
36 Correct 1 ms 2904 KB Output is correct
37 Correct 1 ms 3156 KB Output is correct
38 Correct 1 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 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
# 결과 실행 시간 메모리 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 1 ms 2904 KB Output is correct
12 Correct 1 ms 2392 KB Output is correct
13 Correct 2 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 2 ms 2900 KB Output is correct
21 Correct 2 ms 2904 KB Output is correct
22 Correct 2 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 2 ms 2904 KB Output is correct
29 Correct 1 ms 2904 KB Output is correct
30 Correct 1 ms 2900 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 3056 KB Output is correct
34 Correct 1 ms 3156 KB Output is correct
35 Correct 1 ms 2904 KB Output is correct
36 Correct 46 ms 28480 KB Output is correct
37 Correct 60 ms 44468 KB Output is correct
38 Correct 74 ms 44564 KB Output is correct
39 Correct 84 ms 44360 KB Output is correct
40 Correct 67 ms 44476 KB Output is correct
41 Correct 66 ms 44476 KB Output is correct
42 Correct 75 ms 44480 KB Output is correct
43 Correct 48 ms 45024 KB Output is correct
44 Correct 53 ms 44364 KB Output is correct
45 Correct 48 ms 44632 KB Output is correct
46 Correct 46 ms 44488 KB Output is correct
47 Correct 60 ms 44344 KB Output is correct
48 Correct 69 ms 44512 KB Output is correct
49 Correct 64 ms 44488 KB Output is correct
50 Correct 47 ms 44492 KB Output is correct
51 Correct 46 ms 44684 KB Output is correct
52 Correct 60 ms 44376 KB Output is correct
53 Correct 72 ms 44740 KB Output is correct
54 Correct 66 ms 44584 KB Output is correct
55 Correct 46 ms 44488 KB Output is correct
56 Correct 49 ms 44640 KB Output is correct
57 Correct 58 ms 43188 KB Output is correct
58 Correct 69 ms 44472 KB Output is correct
59 Correct 63 ms 44484 KB Output is correct
60 Correct 66 ms 44476 KB Output is correct
61 Correct 71 ms 44480 KB Output is correct
62 Correct 64 ms 44492 KB Output is correct
63 Correct 65 ms 44396 KB Output is correct
64 Correct 47 ms 44772 KB Output is correct
65 Correct 46 ms 44488 KB Output is correct
66 Correct 52 ms 44536 KB Output is correct
67 Correct 47 ms 44508 KB Output is correct
68 Correct 646 ms 44212 KB Output is correct
69 Correct 846 ms 44468 KB Output is correct
70 Correct 746 ms 44676 KB Output is correct
71 Correct 786 ms 44344 KB Output is correct
72 Correct 815 ms 44480 KB Output is correct
73 Correct 788 ms 44488 KB Output is correct
74 Correct 801 ms 44488 KB Output is correct
75 Correct 721 ms 45072 KB Output is correct
76 Correct 750 ms 44644 KB Output is correct
77 Correct 674 ms 44784 KB Output is correct
78 Correct 709 ms 44484 KB Output is correct
79 Correct 717 ms 44616 KB Output is correct
80 Correct 694 ms 44484 KB Output is correct
81 Correct 1 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 59 ms 44484 KB Output is correct
85 Correct 66 ms 44492 KB Output is correct
86 Correct 70 ms 44472 KB Output is correct
87 Correct 46 ms 44488 KB Output is correct
88 Correct 48 ms 44616 KB Output is correct
89 Correct 60 ms 44368 KB Output is correct
90 Correct 65 ms 44464 KB Output is correct
91 Correct 76 ms 44484 KB Output is correct
92 Correct 47 ms 44468 KB Output is correct
93 Correct 48 ms 44724 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 3156 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 1 ms 2904 KB Output is correct
103 Correct 1 ms 2904 KB Output is correct
104 Correct 676 ms 39952 KB Output is correct
105 Correct 788 ms 44476 KB Output is correct
106 Correct 769 ms 44564 KB Output is correct
107 Correct 759 ms 44456 KB Output is correct
108 Correct 800 ms 44488 KB Output is correct
109 Correct 758 ms 44488 KB Output is correct
110 Correct 828 ms 44484 KB Output is correct
111 Correct 670 ms 44880 KB Output is correct
112 Correct 640 ms 44472 KB Output is correct
113 Correct 694 ms 44488 KB Output is correct
114 Correct 741 ms 44428 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 325 ms 26316 KB Output is correct
2 Correct 684 ms 44616 KB Output is correct
3 Correct 660 ms 44656 KB Output is correct
4 Correct 687 ms 44608 KB Output is correct
5 Correct 711 ms 44668 KB Output is correct
6 Correct 683 ms 44604 KB Output is correct
7 Correct 719 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 1 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 1 ms 2904 KB Output is correct
22 Correct 1 ms 2392 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 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 2 ms 2900 KB Output is correct
31 Correct 2 ms 2904 KB Output is correct
32 Correct 2 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 2 ms 2904 KB Output is correct
39 Correct 1 ms 2904 KB Output is correct
40 Correct 1 ms 2900 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 3056 KB Output is correct
44 Correct 1 ms 3156 KB Output is correct
45 Correct 1 ms 2904 KB Output is correct
46 Correct 46 ms 28480 KB Output is correct
47 Correct 60 ms 44468 KB Output is correct
48 Correct 74 ms 44564 KB Output is correct
49 Correct 84 ms 44360 KB Output is correct
50 Correct 67 ms 44476 KB Output is correct
51 Correct 66 ms 44476 KB Output is correct
52 Correct 75 ms 44480 KB Output is correct
53 Correct 48 ms 45024 KB Output is correct
54 Correct 53 ms 44364 KB Output is correct
55 Correct 48 ms 44632 KB Output is correct
56 Correct 46 ms 44488 KB Output is correct
57 Correct 60 ms 44344 KB Output is correct
58 Correct 69 ms 44512 KB Output is correct
59 Correct 64 ms 44488 KB Output is correct
60 Correct 47 ms 44492 KB Output is correct
61 Correct 46 ms 44684 KB Output is correct
62 Correct 60 ms 44376 KB Output is correct
63 Correct 72 ms 44740 KB Output is correct
64 Correct 66 ms 44584 KB Output is correct
65 Correct 46 ms 44488 KB Output is correct
66 Correct 49 ms 44640 KB Output is correct
67 Correct 58 ms 43188 KB Output is correct
68 Correct 69 ms 44472 KB Output is correct
69 Correct 63 ms 44484 KB Output is correct
70 Correct 66 ms 44476 KB Output is correct
71 Correct 71 ms 44480 KB Output is correct
72 Correct 64 ms 44492 KB Output is correct
73 Correct 65 ms 44396 KB Output is correct
74 Correct 47 ms 44772 KB Output is correct
75 Correct 46 ms 44488 KB Output is correct
76 Correct 52 ms 44536 KB Output is correct
77 Correct 47 ms 44508 KB Output is correct
78 Correct 646 ms 44212 KB Output is correct
79 Correct 846 ms 44468 KB Output is correct
80 Correct 746 ms 44676 KB Output is correct
81 Correct 786 ms 44344 KB Output is correct
82 Correct 815 ms 44480 KB Output is correct
83 Correct 788 ms 44488 KB Output is correct
84 Correct 801 ms 44488 KB Output is correct
85 Correct 721 ms 45072 KB Output is correct
86 Correct 750 ms 44644 KB Output is correct
87 Correct 674 ms 44784 KB Output is correct
88 Correct 709 ms 44484 KB Output is correct
89 Correct 717 ms 44616 KB Output is correct
90 Correct 694 ms 44484 KB Output is correct
91 Correct 1 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 59 ms 44484 KB Output is correct
95 Correct 66 ms 44492 KB Output is correct
96 Correct 70 ms 44472 KB Output is correct
97 Correct 46 ms 44488 KB Output is correct
98 Correct 48 ms 44616 KB Output is correct
99 Correct 60 ms 44368 KB Output is correct
100 Correct 65 ms 44464 KB Output is correct
101 Correct 76 ms 44484 KB Output is correct
102 Correct 47 ms 44468 KB Output is correct
103 Correct 48 ms 44724 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 3156 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 1 ms 2904 KB Output is correct
113 Correct 1 ms 2904 KB Output is correct
114 Correct 190 ms 12832 KB Output is correct
115 Correct 686 ms 44480 KB Output is correct
116 Correct 676 ms 44344 KB Output is correct
117 Correct 680 ms 44688 KB Output is correct
118 Correct 681 ms 44484 KB Output is correct
119 Correct 681 ms 44508 KB Output is correct
120 Correct 698 ms 44764 KB Output is correct
121 Correct 640 ms 44628 KB Output is correct
122 Correct 656 ms 44484 KB Output is correct
123 Correct 641 ms 44532 KB Output is correct
124 Correct 661 ms 44484 KB Output is correct
125 Correct 64 ms 44476 KB Output is correct
126 Correct 76 ms 44488 KB Output is correct
127 Correct 68 ms 44452 KB Output is correct
128 Correct 47 ms 44488 KB Output is correct
129 Correct 46 ms 44524 KB Output is correct
130 Correct 57 ms 43204 KB Output is correct
131 Correct 77 ms 44536 KB Output is correct
132 Correct 69 ms 44752 KB Output is correct
133 Correct 65 ms 44480 KB Output is correct
134 Correct 69 ms 44456 KB Output is correct
135 Correct 73 ms 44580 KB Output is correct
136 Correct 67 ms 44456 KB Output is correct
137 Correct 49 ms 44764 KB Output is correct
138 Correct 47 ms 44592 KB Output is correct
139 Correct 51 ms 44492 KB Output is correct
140 Correct 46 ms 44740 KB Output is correct
141 Correct 1 ms 2904 KB Output is correct
142 Correct 2 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 1 ms 2904 KB Output is correct
149 Correct 1 ms 2904 KB Output is correct
150 Correct 1 ms 3156 KB Output is correct
151 Correct 1 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 2 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 676 ms 39952 KB Output is correct
158 Correct 788 ms 44476 KB Output is correct
159 Correct 769 ms 44564 KB Output is correct
160 Correct 759 ms 44456 KB Output is correct
161 Correct 800 ms 44488 KB Output is correct
162 Correct 758 ms 44488 KB Output is correct
163 Correct 828 ms 44484 KB Output is correct
164 Correct 670 ms 44880 KB Output is correct
165 Correct 640 ms 44472 KB Output is correct
166 Correct 694 ms 44488 KB Output is correct
167 Correct 741 ms 44428 KB Output is correct
168 Correct 0 ms 2392 KB Output is correct
169 Correct 549 ms 16596 KB Output is correct
170 Correct 929 ms 44396 KB Output is correct
171 Correct 991 ms 44392 KB Output is correct
172 Correct 1020 ms 44472 KB Output is correct
173 Correct 1022 ms 44512 KB Output is correct
174 Correct 1008 ms 44524 KB Output is correct
175 Correct 1067 ms 44508 KB Output is correct
176 Correct 755 ms 44660 KB Output is correct
177 Correct 794 ms 44408 KB Output is correct
178 Correct 665 ms 44776 KB Output is correct
179 Correct 681 ms 44432 KB Output is correct