답안 #1010411

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1010411 2024-06-29T05:25:25 Z bachhoangxuan 송신탑 (IOI22_towers) C++17
100 / 100
1793 ms 46508 KB
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5+5;
const int inf = 1e9;
#define pii pair<int,int>
#define piii pair<int,pii>
#define mpp make_pair
#define fi first
#define se second

int N,mn[maxn];
vector<int> H;

namespace ST{
    struct node{
        int mn=inf,mx=-inf;
        int lv=0,rv=0;
        node(){}
        friend node operator+(node a,node b){
            node res;
            res.mn=min(a.mn,b.mn);
            res.mx=max(a.mx,b.mx);
            res.lv=max({a.lv,b.lv,a.mx-b.mn});
            res.rv=max({a.rv,b.rv,b.mx-a.mn});
            return res;
        }
    }tree[4*maxn];
    void build(int l,int r,int id){
        if(l==r){
            tree[id].mn=tree[id].mx=H[l];
            return;
        }
        int mid=(l+r)>>1;
        build(l,mid,id<<1);build(mid+1,r,id<<1|1);
        tree[id]=tree[id<<1]+tree[id<<1|1];
    }
    node query(int l,int r,int id,int tl,int tr){
        if(tr<l || r<tl) return node();
        if(tl<=l && r<=tr) return tree[id];
        int mid=(l+r)>>1;
        return query(l,mid,id<<1,tl,tr)+query(mid+1,r,id<<1|1,tl,tr);
    }
}
namespace ST2{
    vector<piii> tree[4*maxn];
    void build(int l,int r,int id){
        for(int i=l;i<=r;i++) tree[id].push_back({mn[i],{i,i}});
        sort(tree[id].begin(),tree[id].end());
        for(int i=(int)tree[id].size()-2;i>=0;i--){
            tree[id][i].se.fi=min(tree[id][i].se.fi,tree[id][i+1].se.fi);
            tree[id][i].se.se=max(tree[id][i].se.se,tree[id][i+1].se.se);
        }
        if(l==r) return;
        int mid=(l+r)>>1;
        build(l,mid,id<<1);build(mid+1,r,id<<1|1);
    }
    piii query(int l,int r,int id,int tl,int tr,int d){
        if(tr<l || r<tl) return {0,{inf,-inf}};
        if(tl<=l && r<=tr){
            int sz=(int)tree[id].size();
            int pos=lower_bound(tree[id].begin(),tree[id].end(),mpp(d,mpp(0,0)))-tree[id].begin();
            if(pos==sz) return {0,{inf,-inf}};
            else return {sz-pos,tree[id][pos].se};
        }
        int mid=(l+r)>>1;
        piii a=query(l,mid,id<<1,tl,tr,d),b=query(mid+1,r,id<<1|1,tl,tr,d);
        return {a.fi+b.fi,{min(a.se.fi,b.se.fi),max(a.se.se,b.se.se)}};
    }
}

void init(int _N, std::vector<int> _H){
    N=_N;H=_H;
    for(int i=0;i<N;i++) mn[i]=inf;
    ST::build(0,N-1,1);
    vector<int> v;
    for(int i=0;i<N;i++){
        while(!v.empty() && H[v.back()]>H[i]) v.pop_back();
        mn[i]=min(mn[i],ST::query(0,N-1,1,(v.empty()?0:v.back()+1),i).mx);
        v.push_back(i);
    }
    v.clear();
    for(int i=N-1;i>=0;i--){
        while(!v.empty() && H[v.back()]>H[i]) v.pop_back();
        mn[i]=min(mn[i],ST::query(0,N-1,1,i,(v.empty()?N-1:v.back()-1)).mx);
        v.push_back(i);
    }
    for(int i=0;i<N;i++){
        mn[i]-=H[i];
        //cout << i << ' ' << mn[i] << '\n';
    }
    ST2::build(0,N-1,1);
}

int max_towers(int L, int R, int D){
    int lt=N,rt=-1;
    int l=L,r=R;
    while(l<=r){
        int mid=(l+r)>>1;
        if(ST::query(0,N-1,1,L,mid).rv>=D) lt=mid,r=mid-1;
        else l=mid+1;
    }
    l=L;r=R;
    while(l<=r){
        int mid=(l+r)>>1;
        if(ST::query(0,N-1,1,mid,R).lv>=D) rt=mid,l=mid+1;
        else r=mid-1;
    }
    //cout << lt << ' ' << rt << '\n';
    auto [cnt,p]=ST2::query(0,N-1,1,L,R,D);
    if(p.fi==inf){
        if(lt<=rt) return 2;
        else return 1;
    }
    if(lt<=p.fi && ST::query(0,N-1,1,lt,p.fi).mx>=H[p.fi]+D) cnt++;
    if(p.se<=rt && ST::query(0,N-1,1,p.se,rt).mx>=H[p.se]+D) cnt++;
    return cnt;
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 770 ms 31552 KB Output is correct
2 Correct 1693 ms 46400 KB Output is correct
3 Correct 1658 ms 46400 KB Output is correct
4 Correct 1648 ms 46400 KB Output is correct
5 Correct 1793 ms 46400 KB Output is correct
6 Correct 1604 ms 46400 KB Output is correct
7 Correct 1575 ms 46400 KB Output is correct
8 Correct 7 ms 15960 KB Output is correct
9 Correct 8 ms 16472 KB Output is correct
10 Correct 8 ms 16472 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 15960 KB Output is correct
2 Correct 8 ms 16216 KB Output is correct
3 Correct 7 ms 16216 KB Output is correct
4 Correct 7 ms 16472 KB Output is correct
5 Correct 8 ms 16472 KB Output is correct
6 Correct 8 ms 16312 KB Output is correct
7 Correct 7 ms 16216 KB Output is correct
8 Correct 8 ms 16472 KB Output is correct
9 Correct 10 ms 16472 KB Output is correct
10 Correct 8 ms 16472 KB Output is correct
11 Correct 8 ms 16224 KB Output is correct
12 Correct 7 ms 15960 KB Output is correct
13 Correct 8 ms 16472 KB Output is correct
14 Correct 8 ms 16472 KB Output is correct
15 Correct 8 ms 16472 KB Output is correct
16 Correct 8 ms 16216 KB Output is correct
17 Correct 8 ms 16472 KB Output is correct
18 Correct 7 ms 16472 KB Output is correct
19 Correct 7 ms 16472 KB Output is correct
20 Correct 8 ms 16472 KB Output is correct
21 Correct 9 ms 16216 KB Output is correct
22 Correct 8 ms 16472 KB Output is correct
23 Correct 7 ms 16472 KB Output is correct
24 Correct 7 ms 16472 KB Output is correct
25 Correct 7 ms 16216 KB Output is correct
26 Correct 8 ms 16216 KB Output is correct
27 Correct 7 ms 16472 KB Output is correct
28 Correct 9 ms 16216 KB Output is correct
29 Correct 9 ms 16240 KB Output is correct
30 Correct 8 ms 16216 KB Output is correct
31 Correct 8 ms 16372 KB Output is correct
32 Correct 8 ms 16472 KB Output is correct
33 Correct 7 ms 16472 KB Output is correct
34 Correct 8 ms 16472 KB Output is correct
35 Correct 8 ms 16472 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 15960 KB Output is correct
2 Correct 8 ms 16216 KB Output is correct
3 Correct 7 ms 16216 KB Output is correct
4 Correct 7 ms 16472 KB Output is correct
5 Correct 8 ms 16472 KB Output is correct
6 Correct 8 ms 16312 KB Output is correct
7 Correct 7 ms 16216 KB Output is correct
8 Correct 8 ms 16472 KB Output is correct
9 Correct 10 ms 16472 KB Output is correct
10 Correct 8 ms 16472 KB Output is correct
11 Correct 8 ms 16224 KB Output is correct
12 Correct 7 ms 15960 KB Output is correct
13 Correct 8 ms 16472 KB Output is correct
14 Correct 8 ms 16472 KB Output is correct
15 Correct 8 ms 16472 KB Output is correct
16 Correct 8 ms 16216 KB Output is correct
17 Correct 8 ms 16472 KB Output is correct
18 Correct 7 ms 16472 KB Output is correct
19 Correct 7 ms 16472 KB Output is correct
20 Correct 8 ms 16472 KB Output is correct
21 Correct 9 ms 16216 KB Output is correct
22 Correct 8 ms 16472 KB Output is correct
23 Correct 7 ms 16472 KB Output is correct
24 Correct 7 ms 16472 KB Output is correct
25 Correct 7 ms 16216 KB Output is correct
26 Correct 8 ms 16216 KB Output is correct
27 Correct 7 ms 16472 KB Output is correct
28 Correct 9 ms 16216 KB Output is correct
29 Correct 9 ms 16240 KB Output is correct
30 Correct 8 ms 16216 KB Output is correct
31 Correct 8 ms 16372 KB Output is correct
32 Correct 8 ms 16472 KB Output is correct
33 Correct 7 ms 16472 KB Output is correct
34 Correct 8 ms 16472 KB Output is correct
35 Correct 8 ms 16472 KB Output is correct
36 Correct 82 ms 32088 KB Output is correct
37 Correct 133 ms 45932 KB Output is correct
38 Correct 117 ms 46048 KB Output is correct
39 Correct 122 ms 45940 KB Output is correct
40 Correct 127 ms 45948 KB Output is correct
41 Correct 119 ms 45932 KB Output is correct
42 Correct 122 ms 46020 KB Output is correct
43 Correct 103 ms 46416 KB Output is correct
44 Correct 102 ms 46400 KB Output is correct
45 Correct 112 ms 46144 KB Output is correct
46 Correct 109 ms 46296 KB Output is correct
47 Correct 133 ms 46032 KB Output is correct
48 Correct 135 ms 46016 KB Output is correct
49 Correct 129 ms 46020 KB Output is correct
50 Correct 94 ms 46376 KB Output is correct
51 Correct 131 ms 46400 KB Output is correct
52 Correct 135 ms 46124 KB Output is correct
53 Correct 135 ms 46024 KB Output is correct
54 Correct 127 ms 46020 KB Output is correct
55 Correct 101 ms 46400 KB Output is correct
56 Correct 110 ms 46288 KB Output is correct
57 Correct 114 ms 45508 KB Output is correct
58 Correct 151 ms 45928 KB Output is correct
59 Correct 128 ms 46020 KB Output is correct
60 Correct 134 ms 45928 KB Output is correct
61 Correct 130 ms 46020 KB Output is correct
62 Correct 135 ms 46340 KB Output is correct
63 Correct 129 ms 46024 KB Output is correct
64 Correct 107 ms 46400 KB Output is correct
65 Correct 111 ms 46436 KB Output is correct
66 Correct 118 ms 46212 KB Output is correct
67 Correct 114 ms 46400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1288 ms 45796 KB Output is correct
2 Correct 1681 ms 46044 KB Output is correct
3 Correct 1750 ms 46020 KB Output is correct
4 Correct 1631 ms 45932 KB Output is correct
5 Correct 1697 ms 46020 KB Output is correct
6 Correct 1724 ms 45920 KB Output is correct
7 Correct 1665 ms 45924 KB Output is correct
8 Correct 1553 ms 46304 KB Output is correct
9 Correct 1530 ms 46424 KB Output is correct
10 Correct 1654 ms 46144 KB Output is correct
11 Correct 1602 ms 46144 KB Output is correct
12 Correct 1481 ms 46400 KB Output is correct
13 Correct 1598 ms 46412 KB Output is correct
14 Correct 7 ms 15960 KB Output is correct
15 Correct 7 ms 16228 KB Output is correct
16 Correct 11 ms 16396 KB Output is correct
17 Correct 121 ms 46016 KB Output is correct
18 Correct 137 ms 45972 KB Output is correct
19 Correct 124 ms 46004 KB Output is correct
20 Correct 86 ms 46312 KB Output is correct
21 Correct 108 ms 46452 KB Output is correct
22 Correct 130 ms 45900 KB Output is correct
23 Correct 122 ms 46020 KB Output is correct
24 Correct 128 ms 46020 KB Output is correct
25 Correct 94 ms 46396 KB Output is correct
26 Correct 144 ms 46144 KB Output is correct
27 Correct 8 ms 16472 KB Output is correct
28 Correct 9 ms 16216 KB Output is correct
29 Correct 8 ms 16452 KB Output is correct
30 Correct 6 ms 16472 KB Output is correct
31 Correct 8 ms 16472 KB Output is correct
32 Correct 8 ms 16216 KB Output is correct
33 Correct 7 ms 16348 KB Output is correct
34 Correct 8 ms 16216 KB Output is correct
35 Correct 8 ms 16472 KB Output is correct
36 Correct 9 ms 16472 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 294 ms 22604 KB Output is correct
2 Correct 1087 ms 45948 KB Output is correct
3 Correct 1144 ms 46004 KB Output is correct
4 Correct 1147 ms 46020 KB Output is correct
5 Correct 1109 ms 45940 KB Output is correct
6 Correct 1076 ms 45956 KB Output is correct
7 Correct 1081 ms 46020 KB Output is correct
8 Correct 1091 ms 46508 KB Output is correct
9 Correct 1108 ms 46400 KB Output is correct
10 Correct 1103 ms 46404 KB Output is correct
11 Correct 1091 ms 46400 KB Output is correct
12 Correct 142 ms 46020 KB Output is correct
13 Correct 128 ms 46020 KB Output is correct
14 Correct 134 ms 46120 KB Output is correct
15 Correct 105 ms 46400 KB Output is correct
16 Correct 122 ms 46264 KB Output is correct
17 Correct 158 ms 45508 KB Output is correct
18 Correct 134 ms 46020 KB Output is correct
19 Correct 134 ms 46020 KB Output is correct
20 Correct 131 ms 45916 KB Output is correct
21 Correct 138 ms 46024 KB Output is correct
22 Correct 138 ms 46020 KB Output is correct
23 Correct 133 ms 46020 KB Output is correct
24 Correct 113 ms 46456 KB Output is correct
25 Correct 101 ms 46400 KB Output is correct
26 Correct 117 ms 46144 KB Output is correct
27 Correct 112 ms 46400 KB Output is correct
28 Correct 10 ms 16216 KB Output is correct
29 Correct 9 ms 16216 KB Output is correct
30 Correct 8 ms 16404 KB Output is correct
31 Correct 7 ms 16472 KB Output is correct
32 Correct 12 ms 16396 KB Output is correct
33 Correct 7 ms 16216 KB Output is correct
34 Correct 9 ms 16216 KB Output is correct
35 Correct 9 ms 16472 KB Output is correct
36 Correct 8 ms 16216 KB Output is correct
37 Correct 9 ms 16216 KB Output is correct
38 Correct 11 ms 16216 KB Output is correct
39 Correct 10 ms 16216 KB Output is correct
40 Correct 8 ms 16472 KB Output is correct
41 Correct 7 ms 16472 KB Output is correct
42 Correct 7 ms 16472 KB Output is correct
43 Correct 8 ms 16384 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 15960 KB Output is correct
2 Correct 8 ms 16216 KB Output is correct
3 Correct 7 ms 16216 KB Output is correct
4 Correct 7 ms 16472 KB Output is correct
5 Correct 8 ms 16472 KB Output is correct
6 Correct 8 ms 16312 KB Output is correct
7 Correct 7 ms 16216 KB Output is correct
8 Correct 8 ms 16472 KB Output is correct
9 Correct 10 ms 16472 KB Output is correct
10 Correct 8 ms 16472 KB Output is correct
11 Correct 8 ms 16224 KB Output is correct
12 Correct 7 ms 15960 KB Output is correct
13 Correct 8 ms 16472 KB Output is correct
14 Correct 8 ms 16472 KB Output is correct
15 Correct 8 ms 16472 KB Output is correct
16 Correct 8 ms 16216 KB Output is correct
17 Correct 8 ms 16472 KB Output is correct
18 Correct 7 ms 16472 KB Output is correct
19 Correct 7 ms 16472 KB Output is correct
20 Correct 8 ms 16472 KB Output is correct
21 Correct 9 ms 16216 KB Output is correct
22 Correct 8 ms 16472 KB Output is correct
23 Correct 7 ms 16472 KB Output is correct
24 Correct 7 ms 16472 KB Output is correct
25 Correct 7 ms 16216 KB Output is correct
26 Correct 8 ms 16216 KB Output is correct
27 Correct 7 ms 16472 KB Output is correct
28 Correct 9 ms 16216 KB Output is correct
29 Correct 9 ms 16240 KB Output is correct
30 Correct 8 ms 16216 KB Output is correct
31 Correct 8 ms 16372 KB Output is correct
32 Correct 8 ms 16472 KB Output is correct
33 Correct 7 ms 16472 KB Output is correct
34 Correct 8 ms 16472 KB Output is correct
35 Correct 8 ms 16472 KB Output is correct
36 Correct 82 ms 32088 KB Output is correct
37 Correct 133 ms 45932 KB Output is correct
38 Correct 117 ms 46048 KB Output is correct
39 Correct 122 ms 45940 KB Output is correct
40 Correct 127 ms 45948 KB Output is correct
41 Correct 119 ms 45932 KB Output is correct
42 Correct 122 ms 46020 KB Output is correct
43 Correct 103 ms 46416 KB Output is correct
44 Correct 102 ms 46400 KB Output is correct
45 Correct 112 ms 46144 KB Output is correct
46 Correct 109 ms 46296 KB Output is correct
47 Correct 133 ms 46032 KB Output is correct
48 Correct 135 ms 46016 KB Output is correct
49 Correct 129 ms 46020 KB Output is correct
50 Correct 94 ms 46376 KB Output is correct
51 Correct 131 ms 46400 KB Output is correct
52 Correct 135 ms 46124 KB Output is correct
53 Correct 135 ms 46024 KB Output is correct
54 Correct 127 ms 46020 KB Output is correct
55 Correct 101 ms 46400 KB Output is correct
56 Correct 110 ms 46288 KB Output is correct
57 Correct 114 ms 45508 KB Output is correct
58 Correct 151 ms 45928 KB Output is correct
59 Correct 128 ms 46020 KB Output is correct
60 Correct 134 ms 45928 KB Output is correct
61 Correct 130 ms 46020 KB Output is correct
62 Correct 135 ms 46340 KB Output is correct
63 Correct 129 ms 46024 KB Output is correct
64 Correct 107 ms 46400 KB Output is correct
65 Correct 111 ms 46436 KB Output is correct
66 Correct 118 ms 46212 KB Output is correct
67 Correct 114 ms 46400 KB Output is correct
68 Correct 1288 ms 45796 KB Output is correct
69 Correct 1681 ms 46044 KB Output is correct
70 Correct 1750 ms 46020 KB Output is correct
71 Correct 1631 ms 45932 KB Output is correct
72 Correct 1697 ms 46020 KB Output is correct
73 Correct 1724 ms 45920 KB Output is correct
74 Correct 1665 ms 45924 KB Output is correct
75 Correct 1553 ms 46304 KB Output is correct
76 Correct 1530 ms 46424 KB Output is correct
77 Correct 1654 ms 46144 KB Output is correct
78 Correct 1602 ms 46144 KB Output is correct
79 Correct 1481 ms 46400 KB Output is correct
80 Correct 1598 ms 46412 KB Output is correct
81 Correct 7 ms 15960 KB Output is correct
82 Correct 7 ms 16228 KB Output is correct
83 Correct 11 ms 16396 KB Output is correct
84 Correct 121 ms 46016 KB Output is correct
85 Correct 137 ms 45972 KB Output is correct
86 Correct 124 ms 46004 KB Output is correct
87 Correct 86 ms 46312 KB Output is correct
88 Correct 108 ms 46452 KB Output is correct
89 Correct 130 ms 45900 KB Output is correct
90 Correct 122 ms 46020 KB Output is correct
91 Correct 128 ms 46020 KB Output is correct
92 Correct 94 ms 46396 KB Output is correct
93 Correct 144 ms 46144 KB Output is correct
94 Correct 8 ms 16472 KB Output is correct
95 Correct 9 ms 16216 KB Output is correct
96 Correct 8 ms 16452 KB Output is correct
97 Correct 6 ms 16472 KB Output is correct
98 Correct 8 ms 16472 KB Output is correct
99 Correct 8 ms 16216 KB Output is correct
100 Correct 7 ms 16348 KB Output is correct
101 Correct 8 ms 16216 KB Output is correct
102 Correct 8 ms 16472 KB Output is correct
103 Correct 9 ms 16472 KB Output is correct
104 Correct 1478 ms 44224 KB Output is correct
105 Correct 1673 ms 46020 KB Output is correct
106 Correct 1700 ms 46020 KB Output is correct
107 Correct 1754 ms 46100 KB Output is correct
108 Correct 1600 ms 46020 KB Output is correct
109 Correct 1604 ms 45932 KB Output is correct
110 Correct 1632 ms 46020 KB Output is correct
111 Correct 1698 ms 46268 KB Output is correct
112 Correct 1570 ms 46504 KB Output is correct
113 Correct 1602 ms 46144 KB Output is correct
114 Correct 1554 ms 46400 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 770 ms 31552 KB Output is correct
2 Correct 1693 ms 46400 KB Output is correct
3 Correct 1658 ms 46400 KB Output is correct
4 Correct 1648 ms 46400 KB Output is correct
5 Correct 1793 ms 46400 KB Output is correct
6 Correct 1604 ms 46400 KB Output is correct
7 Correct 1575 ms 46400 KB Output is correct
8 Correct 7 ms 15960 KB Output is correct
9 Correct 8 ms 16472 KB Output is correct
10 Correct 8 ms 16472 KB Output is correct
11 Correct 6 ms 15960 KB Output is correct
12 Correct 8 ms 16216 KB Output is correct
13 Correct 7 ms 16216 KB Output is correct
14 Correct 7 ms 16472 KB Output is correct
15 Correct 8 ms 16472 KB Output is correct
16 Correct 8 ms 16312 KB Output is correct
17 Correct 7 ms 16216 KB Output is correct
18 Correct 8 ms 16472 KB Output is correct
19 Correct 10 ms 16472 KB Output is correct
20 Correct 8 ms 16472 KB Output is correct
21 Correct 8 ms 16224 KB Output is correct
22 Correct 7 ms 15960 KB Output is correct
23 Correct 8 ms 16472 KB Output is correct
24 Correct 8 ms 16472 KB Output is correct
25 Correct 8 ms 16472 KB Output is correct
26 Correct 8 ms 16216 KB Output is correct
27 Correct 8 ms 16472 KB Output is correct
28 Correct 7 ms 16472 KB Output is correct
29 Correct 7 ms 16472 KB Output is correct
30 Correct 8 ms 16472 KB Output is correct
31 Correct 9 ms 16216 KB Output is correct
32 Correct 8 ms 16472 KB Output is correct
33 Correct 7 ms 16472 KB Output is correct
34 Correct 7 ms 16472 KB Output is correct
35 Correct 7 ms 16216 KB Output is correct
36 Correct 8 ms 16216 KB Output is correct
37 Correct 7 ms 16472 KB Output is correct
38 Correct 9 ms 16216 KB Output is correct
39 Correct 9 ms 16240 KB Output is correct
40 Correct 8 ms 16216 KB Output is correct
41 Correct 8 ms 16372 KB Output is correct
42 Correct 8 ms 16472 KB Output is correct
43 Correct 7 ms 16472 KB Output is correct
44 Correct 8 ms 16472 KB Output is correct
45 Correct 8 ms 16472 KB Output is correct
46 Correct 82 ms 32088 KB Output is correct
47 Correct 133 ms 45932 KB Output is correct
48 Correct 117 ms 46048 KB Output is correct
49 Correct 122 ms 45940 KB Output is correct
50 Correct 127 ms 45948 KB Output is correct
51 Correct 119 ms 45932 KB Output is correct
52 Correct 122 ms 46020 KB Output is correct
53 Correct 103 ms 46416 KB Output is correct
54 Correct 102 ms 46400 KB Output is correct
55 Correct 112 ms 46144 KB Output is correct
56 Correct 109 ms 46296 KB Output is correct
57 Correct 133 ms 46032 KB Output is correct
58 Correct 135 ms 46016 KB Output is correct
59 Correct 129 ms 46020 KB Output is correct
60 Correct 94 ms 46376 KB Output is correct
61 Correct 131 ms 46400 KB Output is correct
62 Correct 135 ms 46124 KB Output is correct
63 Correct 135 ms 46024 KB Output is correct
64 Correct 127 ms 46020 KB Output is correct
65 Correct 101 ms 46400 KB Output is correct
66 Correct 110 ms 46288 KB Output is correct
67 Correct 114 ms 45508 KB Output is correct
68 Correct 151 ms 45928 KB Output is correct
69 Correct 128 ms 46020 KB Output is correct
70 Correct 134 ms 45928 KB Output is correct
71 Correct 130 ms 46020 KB Output is correct
72 Correct 135 ms 46340 KB Output is correct
73 Correct 129 ms 46024 KB Output is correct
74 Correct 107 ms 46400 KB Output is correct
75 Correct 111 ms 46436 KB Output is correct
76 Correct 118 ms 46212 KB Output is correct
77 Correct 114 ms 46400 KB Output is correct
78 Correct 1288 ms 45796 KB Output is correct
79 Correct 1681 ms 46044 KB Output is correct
80 Correct 1750 ms 46020 KB Output is correct
81 Correct 1631 ms 45932 KB Output is correct
82 Correct 1697 ms 46020 KB Output is correct
83 Correct 1724 ms 45920 KB Output is correct
84 Correct 1665 ms 45924 KB Output is correct
85 Correct 1553 ms 46304 KB Output is correct
86 Correct 1530 ms 46424 KB Output is correct
87 Correct 1654 ms 46144 KB Output is correct
88 Correct 1602 ms 46144 KB Output is correct
89 Correct 1481 ms 46400 KB Output is correct
90 Correct 1598 ms 46412 KB Output is correct
91 Correct 7 ms 15960 KB Output is correct
92 Correct 7 ms 16228 KB Output is correct
93 Correct 11 ms 16396 KB Output is correct
94 Correct 121 ms 46016 KB Output is correct
95 Correct 137 ms 45972 KB Output is correct
96 Correct 124 ms 46004 KB Output is correct
97 Correct 86 ms 46312 KB Output is correct
98 Correct 108 ms 46452 KB Output is correct
99 Correct 130 ms 45900 KB Output is correct
100 Correct 122 ms 46020 KB Output is correct
101 Correct 128 ms 46020 KB Output is correct
102 Correct 94 ms 46396 KB Output is correct
103 Correct 144 ms 46144 KB Output is correct
104 Correct 8 ms 16472 KB Output is correct
105 Correct 9 ms 16216 KB Output is correct
106 Correct 8 ms 16452 KB Output is correct
107 Correct 6 ms 16472 KB Output is correct
108 Correct 8 ms 16472 KB Output is correct
109 Correct 8 ms 16216 KB Output is correct
110 Correct 7 ms 16348 KB Output is correct
111 Correct 8 ms 16216 KB Output is correct
112 Correct 8 ms 16472 KB Output is correct
113 Correct 9 ms 16472 KB Output is correct
114 Correct 294 ms 22604 KB Output is correct
115 Correct 1087 ms 45948 KB Output is correct
116 Correct 1144 ms 46004 KB Output is correct
117 Correct 1147 ms 46020 KB Output is correct
118 Correct 1109 ms 45940 KB Output is correct
119 Correct 1076 ms 45956 KB Output is correct
120 Correct 1081 ms 46020 KB Output is correct
121 Correct 1091 ms 46508 KB Output is correct
122 Correct 1108 ms 46400 KB Output is correct
123 Correct 1103 ms 46404 KB Output is correct
124 Correct 1091 ms 46400 KB Output is correct
125 Correct 142 ms 46020 KB Output is correct
126 Correct 128 ms 46020 KB Output is correct
127 Correct 134 ms 46120 KB Output is correct
128 Correct 105 ms 46400 KB Output is correct
129 Correct 122 ms 46264 KB Output is correct
130 Correct 158 ms 45508 KB Output is correct
131 Correct 134 ms 46020 KB Output is correct
132 Correct 134 ms 46020 KB Output is correct
133 Correct 131 ms 45916 KB Output is correct
134 Correct 138 ms 46024 KB Output is correct
135 Correct 138 ms 46020 KB Output is correct
136 Correct 133 ms 46020 KB Output is correct
137 Correct 113 ms 46456 KB Output is correct
138 Correct 101 ms 46400 KB Output is correct
139 Correct 117 ms 46144 KB Output is correct
140 Correct 112 ms 46400 KB Output is correct
141 Correct 10 ms 16216 KB Output is correct
142 Correct 9 ms 16216 KB Output is correct
143 Correct 8 ms 16404 KB Output is correct
144 Correct 7 ms 16472 KB Output is correct
145 Correct 12 ms 16396 KB Output is correct
146 Correct 7 ms 16216 KB Output is correct
147 Correct 9 ms 16216 KB Output is correct
148 Correct 9 ms 16472 KB Output is correct
149 Correct 8 ms 16216 KB Output is correct
150 Correct 9 ms 16216 KB Output is correct
151 Correct 11 ms 16216 KB Output is correct
152 Correct 10 ms 16216 KB Output is correct
153 Correct 8 ms 16472 KB Output is correct
154 Correct 7 ms 16472 KB Output is correct
155 Correct 7 ms 16472 KB Output is correct
156 Correct 8 ms 16384 KB Output is correct
157 Correct 1478 ms 44224 KB Output is correct
158 Correct 1673 ms 46020 KB Output is correct
159 Correct 1700 ms 46020 KB Output is correct
160 Correct 1754 ms 46100 KB Output is correct
161 Correct 1600 ms 46020 KB Output is correct
162 Correct 1604 ms 45932 KB Output is correct
163 Correct 1632 ms 46020 KB Output is correct
164 Correct 1698 ms 46268 KB Output is correct
165 Correct 1570 ms 46504 KB Output is correct
166 Correct 1602 ms 46144 KB Output is correct
167 Correct 1554 ms 46400 KB Output is correct
168 Correct 8 ms 15960 KB Output is correct
169 Correct 920 ms 27264 KB Output is correct
170 Correct 1561 ms 46020 KB Output is correct
171 Correct 1590 ms 46020 KB Output is correct
172 Correct 1580 ms 46036 KB Output is correct
173 Correct 1620 ms 46004 KB Output is correct
174 Correct 1655 ms 46012 KB Output is correct
175 Correct 1578 ms 46080 KB Output is correct
176 Correct 1530 ms 46404 KB Output is correct
177 Correct 1493 ms 46404 KB Output is correct
178 Correct 1519 ms 46416 KB Output is correct
179 Correct 1613 ms 46288 KB Output is correct