답안 #835084

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
835084 2023-08-23T07:55:27 Z ttamx 송신탑 (IOI22_towers) C++17
100 / 100
1216 ms 118284 KB
#include "towers.h"
#include<bits/stdc++.h>

using namespace std;

typedef pair<int,int> p2;

const int N=1e5+5;
const int K=1<<18;
const int LG=17;
const int inf=2e9;

int n;
int h[N],spmx[LG][N],spmn[LG][N],spid[LG][N];
vector<pair<int,int>> vec;

struct persist{
	struct info{
		int mn,mx,val;
		info():mn(inf),mx(-inf),val(0){}
		info(int x):mn(x),mx(x),val(1){}
		friend info operator+(info a,info b){
			info c;
			c.mn=min(a.mn,b.mn);
			c.mx=max(a.mx,b.mx);
			c.val=a.val+b.val;
			return c;
		}
	};
	struct node;
	typedef node* pnode;
	struct node{
		info val;
		pnode l,r;
		node():val(),l(nullptr),r(nullptr){}
	};
	pnode rt[N];
	void build(int l,int r,pnode &t){
		t=new node();
		if(l==r)return;
		int m=(l+r)/2;
		build(l,m,t->l);
		build(m+1,r,t->r);
	}
	void build(int t){
		build(1,n,rt[t]);
	}
	void update(int l,int r,pnode &t,pnode k,int x){
		t=new node(*k);
		t->val=t->val+info(x);
		if(l==r)return;
		int m=(l+r)/2;
		if(x<=m)update(l,m,t->l,k->l,x);
		else update(m+1,r,t->r,k->r,x);
	}
	void update(int k,int t,int x){
		update(1,n,rt[t],rt[k],x);
	}
	info query(int l,int r,pnode t,int x,int y){
		if(y<l||r<x)return info();
		if(x<=l&&r<=y)return t->val;
		int m=(l+r)/2;
		return query(l,m,t->l,x,y)+query(m+1,r,t->r,x,y);
	}
	info query(int t,int x,int y){
		return query(1,n,rt[t],x,y);
	}
}pst;

struct segtree{
	struct node{
		int mn,mx,vl,vr;
		node(int x=0):mn(x),mx(x),vl(0),vr(0){}
		friend node operator+(node a,node b){
			node c;
			c.mn=min(a.mn,b.mn);
			c.mx=max(a.mx,b.mx);
			c.vl=max({a.vl,b.vl,b.mx-a.mn});
			c.vr=max({a.vr,b.vr,a.mx-b.mn});
			return c;
		}
	}t[K];
	void build(int l,int r,int i){
		if(l==r)return void(t[i]=node(h[l]));
		int m=(l+r)/2;
		build(l,m,i*2);
		build(m+1,r,i*2+1);
		t[i]=t[i*2]+t[i*2+1];
	}
	void build(){
		build(1,n,1);
	}
	node query(int l,int r,int i,int x,int y){
		if(x<=l&&r<=y)return t[i];
		int m=(l+r)/2;
		if(y<=m)return query(l,m,i*2,x,y);
		if(m<x)return query(m+1,r,i*2+1,x,y);
		return query(l,m,i*2,x,y)+query(m+1,r,i*2+1,x,y);
	}
	node query(int x,int y){
		return query(1,n,1,x,y);
	}
}s;

int rmxq(int l,int r){
	int k=31-__builtin_clz(r-l+1);
	return max(spmx[k][l],spmx[k][r-(1<<k)+1]);
}

int rmnq(int l,int r){
	int k=31-__builtin_clz(r-l+1);
	return min(spmn[k][l],spmn[k][r-(1<<k)+1]);
}

int rmidq(int l,int r){
	int k=31-__builtin_clz(r-l+1);
	return spmn[k][l]<spmn[k][r-(1<<k)+1]?spid[k][l]:spid[k][r-(1<<k)+1];
}

void init(int N,vector<int> H){
	n=N;
	for(int i=1;i<=n;i++)h[i]=H[i-1];
	h[0]=h[n+1]=inf;
	for(int i=0;i<=n+1;i++){
		spmx[0][i]=spmn[0][i]=h[i];
		spid[0][i]=i;
	}
	for(int i=1;i<LG;i++){
		for(int j=0;j+(1<<i)-1<=n+1;j++){
			spmx[i][j]=max(spmx[i-1][j],spmx[i-1][j+(1<<(i-1))]);
			spmn[i][j]=min(spmn[i-1][j],spmn[i-1][j+(1<<(i-1))]);
			spid[i][j]=spmn[i-1][j]<spmn[i-1][j+(1<<(i-1))]?spid[i-1][j]:spid[i-1][j+(1<<(i-1))];
		}
	}
	auto lb=[&](int id){
		int l=0,r=id-1;
		while(l<r){
			int m=(l+r+1)/2;
			if(rmnq(m,id)<h[id])l=m;
			else r=m-1;
		}
		return l;
	};
	auto ub=[&](int id){
		int l=id+1,r=n+1;
		while(l<r){
			int m=(l+r)/2;
			if(rmnq(id,m)<h[id])r=m;
			else l=m+1;
		}
		return l;
	};
	for(int i=1;i<=n;i++){
		int l=lb(i),r=ub(i);
		int d=min(rmxq(l,i),rmxq(i,r))-h[i];
		vec.emplace_back(d,i);
	}
	vec.emplace_back(-inf,-1);
	sort(vec.begin(),vec.end());
	pst.build(n+1);
	for(int i=n;i>=1;i--){
		pst.update(i+1,i,vec[i].second);
	}
	s.build();
}

int max_towers(int L,int R,int D){
	L++,R++;
	auto lb=[&](int id){
		int l=L-1,r=id-1;
		while(l<r){
			int m=(l+r+1)/2;
			if(rmxq(m,id)>=h[id]+D)l=m;
			else r=m-1;
		}
		return l;
	};
	auto ub=[&](int id){
		int l=id+1,r=R+1;
		while(l<r){
			int m=(l+r)/2;
			if(rmxq(id,m)>=h[id]+D)r=m;
			else l=m+1;
		}
		return l;
	};
	int ver=lower_bound(vec.begin(),vec.end(),p2(D,0))-vec.begin();
	auto res=pst.query(ver,L,R);
	int l=res.mn,r=res.mx,ans=res.val;
	if(ans==0){
		l=r=rmidq(L,R);
		ans=1;
	}
	l=lb(l),r=ub(r);
	if(L<l&&s.query(L,l).vl>=D)ans++;
	if(r<R&&s.query(r,R).vr>=D)ans++;
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 501 ms 69596 KB Output is correct
2 Correct 962 ms 118152 KB Output is correct
3 Correct 871 ms 118200 KB Output is correct
4 Correct 948 ms 118112 KB Output is correct
5 Correct 921 ms 118096 KB Output is correct
6 Correct 989 ms 118092 KB Output is correct
7 Correct 920 ms 118072 KB Output is correct
8 Correct 2 ms 4432 KB Output is correct
9 Correct 4 ms 6080 KB Output is correct
10 Correct 4 ms 6096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4816 KB Output is correct
2 Correct 4 ms 6096 KB Output is correct
3 Correct 4 ms 6096 KB Output is correct
4 Correct 4 ms 6128 KB Output is correct
5 Correct 4 ms 6156 KB Output is correct
6 Correct 4 ms 6096 KB Output is correct
7 Correct 4 ms 6096 KB Output is correct
8 Correct 4 ms 6096 KB Output is correct
9 Correct 5 ms 6096 KB Output is correct
10 Correct 3 ms 6096 KB Output is correct
11 Correct 6 ms 6096 KB Output is correct
12 Correct 2 ms 4432 KB Output is correct
13 Correct 4 ms 6096 KB Output is correct
14 Correct 4 ms 6096 KB Output is correct
15 Correct 5 ms 6096 KB Output is correct
16 Correct 4 ms 6096 KB Output is correct
17 Correct 4 ms 6096 KB Output is correct
18 Correct 4 ms 6096 KB Output is correct
19 Correct 5 ms 6096 KB Output is correct
20 Correct 4 ms 6096 KB Output is correct
21 Correct 4 ms 6096 KB Output is correct
22 Correct 4 ms 6096 KB Output is correct
23 Correct 4 ms 6096 KB Output is correct
24 Correct 4 ms 6096 KB Output is correct
25 Correct 3 ms 5200 KB Output is correct
26 Correct 4 ms 6096 KB Output is correct
27 Correct 5 ms 6096 KB Output is correct
28 Correct 4 ms 6220 KB Output is correct
29 Correct 5 ms 6096 KB Output is correct
30 Correct 4 ms 6096 KB Output is correct
31 Correct 4 ms 6096 KB Output is correct
32 Correct 4 ms 6096 KB Output is correct
33 Correct 4 ms 6096 KB Output is correct
34 Correct 5 ms 6096 KB Output is correct
35 Correct 4 ms 6172 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4816 KB Output is correct
2 Correct 4 ms 6096 KB Output is correct
3 Correct 4 ms 6096 KB Output is correct
4 Correct 4 ms 6128 KB Output is correct
5 Correct 4 ms 6156 KB Output is correct
6 Correct 4 ms 6096 KB Output is correct
7 Correct 4 ms 6096 KB Output is correct
8 Correct 4 ms 6096 KB Output is correct
9 Correct 5 ms 6096 KB Output is correct
10 Correct 3 ms 6096 KB Output is correct
11 Correct 6 ms 6096 KB Output is correct
12 Correct 2 ms 4432 KB Output is correct
13 Correct 4 ms 6096 KB Output is correct
14 Correct 4 ms 6096 KB Output is correct
15 Correct 5 ms 6096 KB Output is correct
16 Correct 4 ms 6096 KB Output is correct
17 Correct 4 ms 6096 KB Output is correct
18 Correct 4 ms 6096 KB Output is correct
19 Correct 5 ms 6096 KB Output is correct
20 Correct 4 ms 6096 KB Output is correct
21 Correct 4 ms 6096 KB Output is correct
22 Correct 4 ms 6096 KB Output is correct
23 Correct 4 ms 6096 KB Output is correct
24 Correct 4 ms 6096 KB Output is correct
25 Correct 3 ms 5200 KB Output is correct
26 Correct 4 ms 6096 KB Output is correct
27 Correct 5 ms 6096 KB Output is correct
28 Correct 4 ms 6220 KB Output is correct
29 Correct 5 ms 6096 KB Output is correct
30 Correct 4 ms 6096 KB Output is correct
31 Correct 4 ms 6096 KB Output is correct
32 Correct 4 ms 6096 KB Output is correct
33 Correct 4 ms 6096 KB Output is correct
34 Correct 5 ms 6096 KB Output is correct
35 Correct 4 ms 6172 KB Output is correct
36 Correct 87 ms 75956 KB Output is correct
37 Correct 134 ms 118120 KB Output is correct
38 Correct 129 ms 118116 KB Output is correct
39 Correct 135 ms 118072 KB Output is correct
40 Correct 134 ms 118088 KB Output is correct
41 Correct 135 ms 118188 KB Output is correct
42 Correct 132 ms 118080 KB Output is correct
43 Correct 110 ms 118080 KB Output is correct
44 Correct 115 ms 118140 KB Output is correct
45 Correct 120 ms 118076 KB Output is correct
46 Correct 119 ms 118076 KB Output is correct
47 Correct 130 ms 118256 KB Output is correct
48 Correct 135 ms 118076 KB Output is correct
49 Correct 132 ms 118120 KB Output is correct
50 Correct 113 ms 118072 KB Output is correct
51 Correct 121 ms 118076 KB Output is correct
52 Correct 136 ms 118032 KB Output is correct
53 Correct 134 ms 118076 KB Output is correct
54 Correct 139 ms 118024 KB Output is correct
55 Correct 143 ms 118076 KB Output is correct
56 Correct 116 ms 118144 KB Output is correct
57 Correct 124 ms 114104 KB Output is correct
58 Correct 138 ms 118072 KB Output is correct
59 Correct 128 ms 118060 KB Output is correct
60 Correct 130 ms 118076 KB Output is correct
61 Correct 135 ms 118088 KB Output is correct
62 Correct 140 ms 118076 KB Output is correct
63 Correct 132 ms 118068 KB Output is correct
64 Correct 111 ms 118128 KB Output is correct
65 Correct 117 ms 118084 KB Output is correct
66 Correct 115 ms 118096 KB Output is correct
67 Correct 123 ms 118024 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 721 ms 117380 KB Output is correct
2 Correct 786 ms 118080 KB Output is correct
3 Correct 978 ms 118184 KB Output is correct
4 Correct 918 ms 118128 KB Output is correct
5 Correct 1018 ms 118096 KB Output is correct
6 Correct 869 ms 118032 KB Output is correct
7 Correct 963 ms 118284 KB Output is correct
8 Correct 1022 ms 118036 KB Output is correct
9 Correct 975 ms 118072 KB Output is correct
10 Correct 989 ms 118120 KB Output is correct
11 Correct 953 ms 118092 KB Output is correct
12 Correct 1075 ms 118044 KB Output is correct
13 Correct 1045 ms 118192 KB Output is correct
14 Correct 3 ms 4456 KB Output is correct
15 Correct 4 ms 6096 KB Output is correct
16 Correct 4 ms 6096 KB Output is correct
17 Correct 127 ms 118132 KB Output is correct
18 Correct 146 ms 118024 KB Output is correct
19 Correct 137 ms 118096 KB Output is correct
20 Correct 111 ms 118036 KB Output is correct
21 Correct 114 ms 118200 KB Output is correct
22 Correct 127 ms 118076 KB Output is correct
23 Correct 134 ms 118068 KB Output is correct
24 Correct 136 ms 118076 KB Output is correct
25 Correct 115 ms 118016 KB Output is correct
26 Correct 124 ms 118076 KB Output is correct
27 Correct 4 ms 6096 KB Output is correct
28 Correct 4 ms 6096 KB Output is correct
29 Correct 4 ms 6096 KB Output is correct
30 Correct 4 ms 6096 KB Output is correct
31 Correct 3 ms 6096 KB Output is correct
32 Correct 4 ms 6096 KB Output is correct
33 Correct 4 ms 6096 KB Output is correct
34 Correct 4 ms 6096 KB Output is correct
35 Correct 4 ms 6076 KB Output is correct
36 Correct 4 ms 6096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 226 ms 28880 KB Output is correct
2 Correct 822 ms 118076 KB Output is correct
3 Correct 802 ms 118076 KB Output is correct
4 Correct 908 ms 118056 KB Output is correct
5 Correct 856 ms 118076 KB Output is correct
6 Correct 785 ms 118116 KB Output is correct
7 Correct 921 ms 118072 KB Output is correct
8 Correct 917 ms 118092 KB Output is correct
9 Correct 859 ms 118040 KB Output is correct
10 Correct 689 ms 118116 KB Output is correct
11 Correct 812 ms 118088 KB Output is correct
12 Correct 156 ms 118072 KB Output is correct
13 Correct 161 ms 118032 KB Output is correct
14 Correct 139 ms 118024 KB Output is correct
15 Correct 116 ms 118036 KB Output is correct
16 Correct 120 ms 118028 KB Output is correct
17 Correct 129 ms 114100 KB Output is correct
18 Correct 153 ms 118020 KB Output is correct
19 Correct 138 ms 118068 KB Output is correct
20 Correct 132 ms 118080 KB Output is correct
21 Correct 141 ms 118104 KB Output is correct
22 Correct 133 ms 118140 KB Output is correct
23 Correct 142 ms 118120 KB Output is correct
24 Correct 108 ms 118064 KB Output is correct
25 Correct 131 ms 118076 KB Output is correct
26 Correct 114 ms 118080 KB Output is correct
27 Correct 117 ms 118032 KB Output is correct
28 Correct 4 ms 6096 KB Output is correct
29 Correct 4 ms 6096 KB Output is correct
30 Correct 4 ms 6096 KB Output is correct
31 Correct 5 ms 6096 KB Output is correct
32 Correct 4 ms 6096 KB Output is correct
33 Correct 3 ms 5200 KB Output is correct
34 Correct 4 ms 6096 KB Output is correct
35 Correct 5 ms 6096 KB Output is correct
36 Correct 4 ms 6096 KB Output is correct
37 Correct 4 ms 6096 KB Output is correct
38 Correct 3 ms 6096 KB Output is correct
39 Correct 4 ms 6096 KB Output is correct
40 Correct 4 ms 6096 KB Output is correct
41 Correct 4 ms 6096 KB Output is correct
42 Correct 4 ms 6096 KB Output is correct
43 Correct 4 ms 6096 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4816 KB Output is correct
2 Correct 4 ms 6096 KB Output is correct
3 Correct 4 ms 6096 KB Output is correct
4 Correct 4 ms 6128 KB Output is correct
5 Correct 4 ms 6156 KB Output is correct
6 Correct 4 ms 6096 KB Output is correct
7 Correct 4 ms 6096 KB Output is correct
8 Correct 4 ms 6096 KB Output is correct
9 Correct 5 ms 6096 KB Output is correct
10 Correct 3 ms 6096 KB Output is correct
11 Correct 6 ms 6096 KB Output is correct
12 Correct 2 ms 4432 KB Output is correct
13 Correct 4 ms 6096 KB Output is correct
14 Correct 4 ms 6096 KB Output is correct
15 Correct 5 ms 6096 KB Output is correct
16 Correct 4 ms 6096 KB Output is correct
17 Correct 4 ms 6096 KB Output is correct
18 Correct 4 ms 6096 KB Output is correct
19 Correct 5 ms 6096 KB Output is correct
20 Correct 4 ms 6096 KB Output is correct
21 Correct 4 ms 6096 KB Output is correct
22 Correct 4 ms 6096 KB Output is correct
23 Correct 4 ms 6096 KB Output is correct
24 Correct 4 ms 6096 KB Output is correct
25 Correct 3 ms 5200 KB Output is correct
26 Correct 4 ms 6096 KB Output is correct
27 Correct 5 ms 6096 KB Output is correct
28 Correct 4 ms 6220 KB Output is correct
29 Correct 5 ms 6096 KB Output is correct
30 Correct 4 ms 6096 KB Output is correct
31 Correct 4 ms 6096 KB Output is correct
32 Correct 4 ms 6096 KB Output is correct
33 Correct 4 ms 6096 KB Output is correct
34 Correct 5 ms 6096 KB Output is correct
35 Correct 4 ms 6172 KB Output is correct
36 Correct 87 ms 75956 KB Output is correct
37 Correct 134 ms 118120 KB Output is correct
38 Correct 129 ms 118116 KB Output is correct
39 Correct 135 ms 118072 KB Output is correct
40 Correct 134 ms 118088 KB Output is correct
41 Correct 135 ms 118188 KB Output is correct
42 Correct 132 ms 118080 KB Output is correct
43 Correct 110 ms 118080 KB Output is correct
44 Correct 115 ms 118140 KB Output is correct
45 Correct 120 ms 118076 KB Output is correct
46 Correct 119 ms 118076 KB Output is correct
47 Correct 130 ms 118256 KB Output is correct
48 Correct 135 ms 118076 KB Output is correct
49 Correct 132 ms 118120 KB Output is correct
50 Correct 113 ms 118072 KB Output is correct
51 Correct 121 ms 118076 KB Output is correct
52 Correct 136 ms 118032 KB Output is correct
53 Correct 134 ms 118076 KB Output is correct
54 Correct 139 ms 118024 KB Output is correct
55 Correct 143 ms 118076 KB Output is correct
56 Correct 116 ms 118144 KB Output is correct
57 Correct 124 ms 114104 KB Output is correct
58 Correct 138 ms 118072 KB Output is correct
59 Correct 128 ms 118060 KB Output is correct
60 Correct 130 ms 118076 KB Output is correct
61 Correct 135 ms 118088 KB Output is correct
62 Correct 140 ms 118076 KB Output is correct
63 Correct 132 ms 118068 KB Output is correct
64 Correct 111 ms 118128 KB Output is correct
65 Correct 117 ms 118084 KB Output is correct
66 Correct 115 ms 118096 KB Output is correct
67 Correct 123 ms 118024 KB Output is correct
68 Correct 721 ms 117380 KB Output is correct
69 Correct 786 ms 118080 KB Output is correct
70 Correct 978 ms 118184 KB Output is correct
71 Correct 918 ms 118128 KB Output is correct
72 Correct 1018 ms 118096 KB Output is correct
73 Correct 869 ms 118032 KB Output is correct
74 Correct 963 ms 118284 KB Output is correct
75 Correct 1022 ms 118036 KB Output is correct
76 Correct 975 ms 118072 KB Output is correct
77 Correct 989 ms 118120 KB Output is correct
78 Correct 953 ms 118092 KB Output is correct
79 Correct 1075 ms 118044 KB Output is correct
80 Correct 1045 ms 118192 KB Output is correct
81 Correct 3 ms 4456 KB Output is correct
82 Correct 4 ms 6096 KB Output is correct
83 Correct 4 ms 6096 KB Output is correct
84 Correct 127 ms 118132 KB Output is correct
85 Correct 146 ms 118024 KB Output is correct
86 Correct 137 ms 118096 KB Output is correct
87 Correct 111 ms 118036 KB Output is correct
88 Correct 114 ms 118200 KB Output is correct
89 Correct 127 ms 118076 KB Output is correct
90 Correct 134 ms 118068 KB Output is correct
91 Correct 136 ms 118076 KB Output is correct
92 Correct 115 ms 118016 KB Output is correct
93 Correct 124 ms 118076 KB Output is correct
94 Correct 4 ms 6096 KB Output is correct
95 Correct 4 ms 6096 KB Output is correct
96 Correct 4 ms 6096 KB Output is correct
97 Correct 4 ms 6096 KB Output is correct
98 Correct 3 ms 6096 KB Output is correct
99 Correct 4 ms 6096 KB Output is correct
100 Correct 4 ms 6096 KB Output is correct
101 Correct 4 ms 6096 KB Output is correct
102 Correct 4 ms 6076 KB Output is correct
103 Correct 4 ms 6096 KB Output is correct
104 Correct 702 ms 104508 KB Output is correct
105 Correct 904 ms 118116 KB Output is correct
106 Correct 938 ms 118124 KB Output is correct
107 Correct 779 ms 118116 KB Output is correct
108 Correct 1031 ms 118112 KB Output is correct
109 Correct 888 ms 118072 KB Output is correct
110 Correct 904 ms 118100 KB Output is correct
111 Correct 918 ms 118040 KB Output is correct
112 Correct 906 ms 118096 KB Output is correct
113 Correct 896 ms 118136 KB Output is correct
114 Correct 946 ms 118004 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 501 ms 69596 KB Output is correct
2 Correct 962 ms 118152 KB Output is correct
3 Correct 871 ms 118200 KB Output is correct
4 Correct 948 ms 118112 KB Output is correct
5 Correct 921 ms 118096 KB Output is correct
6 Correct 989 ms 118092 KB Output is correct
7 Correct 920 ms 118072 KB Output is correct
8 Correct 2 ms 4432 KB Output is correct
9 Correct 4 ms 6080 KB Output is correct
10 Correct 4 ms 6096 KB Output is correct
11 Correct 3 ms 4816 KB Output is correct
12 Correct 4 ms 6096 KB Output is correct
13 Correct 4 ms 6096 KB Output is correct
14 Correct 4 ms 6128 KB Output is correct
15 Correct 4 ms 6156 KB Output is correct
16 Correct 4 ms 6096 KB Output is correct
17 Correct 4 ms 6096 KB Output is correct
18 Correct 4 ms 6096 KB Output is correct
19 Correct 5 ms 6096 KB Output is correct
20 Correct 3 ms 6096 KB Output is correct
21 Correct 6 ms 6096 KB Output is correct
22 Correct 2 ms 4432 KB Output is correct
23 Correct 4 ms 6096 KB Output is correct
24 Correct 4 ms 6096 KB Output is correct
25 Correct 5 ms 6096 KB Output is correct
26 Correct 4 ms 6096 KB Output is correct
27 Correct 4 ms 6096 KB Output is correct
28 Correct 4 ms 6096 KB Output is correct
29 Correct 5 ms 6096 KB Output is correct
30 Correct 4 ms 6096 KB Output is correct
31 Correct 4 ms 6096 KB Output is correct
32 Correct 4 ms 6096 KB Output is correct
33 Correct 4 ms 6096 KB Output is correct
34 Correct 4 ms 6096 KB Output is correct
35 Correct 3 ms 5200 KB Output is correct
36 Correct 4 ms 6096 KB Output is correct
37 Correct 5 ms 6096 KB Output is correct
38 Correct 4 ms 6220 KB Output is correct
39 Correct 5 ms 6096 KB Output is correct
40 Correct 4 ms 6096 KB Output is correct
41 Correct 4 ms 6096 KB Output is correct
42 Correct 4 ms 6096 KB Output is correct
43 Correct 4 ms 6096 KB Output is correct
44 Correct 5 ms 6096 KB Output is correct
45 Correct 4 ms 6172 KB Output is correct
46 Correct 87 ms 75956 KB Output is correct
47 Correct 134 ms 118120 KB Output is correct
48 Correct 129 ms 118116 KB Output is correct
49 Correct 135 ms 118072 KB Output is correct
50 Correct 134 ms 118088 KB Output is correct
51 Correct 135 ms 118188 KB Output is correct
52 Correct 132 ms 118080 KB Output is correct
53 Correct 110 ms 118080 KB Output is correct
54 Correct 115 ms 118140 KB Output is correct
55 Correct 120 ms 118076 KB Output is correct
56 Correct 119 ms 118076 KB Output is correct
57 Correct 130 ms 118256 KB Output is correct
58 Correct 135 ms 118076 KB Output is correct
59 Correct 132 ms 118120 KB Output is correct
60 Correct 113 ms 118072 KB Output is correct
61 Correct 121 ms 118076 KB Output is correct
62 Correct 136 ms 118032 KB Output is correct
63 Correct 134 ms 118076 KB Output is correct
64 Correct 139 ms 118024 KB Output is correct
65 Correct 143 ms 118076 KB Output is correct
66 Correct 116 ms 118144 KB Output is correct
67 Correct 124 ms 114104 KB Output is correct
68 Correct 138 ms 118072 KB Output is correct
69 Correct 128 ms 118060 KB Output is correct
70 Correct 130 ms 118076 KB Output is correct
71 Correct 135 ms 118088 KB Output is correct
72 Correct 140 ms 118076 KB Output is correct
73 Correct 132 ms 118068 KB Output is correct
74 Correct 111 ms 118128 KB Output is correct
75 Correct 117 ms 118084 KB Output is correct
76 Correct 115 ms 118096 KB Output is correct
77 Correct 123 ms 118024 KB Output is correct
78 Correct 721 ms 117380 KB Output is correct
79 Correct 786 ms 118080 KB Output is correct
80 Correct 978 ms 118184 KB Output is correct
81 Correct 918 ms 118128 KB Output is correct
82 Correct 1018 ms 118096 KB Output is correct
83 Correct 869 ms 118032 KB Output is correct
84 Correct 963 ms 118284 KB Output is correct
85 Correct 1022 ms 118036 KB Output is correct
86 Correct 975 ms 118072 KB Output is correct
87 Correct 989 ms 118120 KB Output is correct
88 Correct 953 ms 118092 KB Output is correct
89 Correct 1075 ms 118044 KB Output is correct
90 Correct 1045 ms 118192 KB Output is correct
91 Correct 3 ms 4456 KB Output is correct
92 Correct 4 ms 6096 KB Output is correct
93 Correct 4 ms 6096 KB Output is correct
94 Correct 127 ms 118132 KB Output is correct
95 Correct 146 ms 118024 KB Output is correct
96 Correct 137 ms 118096 KB Output is correct
97 Correct 111 ms 118036 KB Output is correct
98 Correct 114 ms 118200 KB Output is correct
99 Correct 127 ms 118076 KB Output is correct
100 Correct 134 ms 118068 KB Output is correct
101 Correct 136 ms 118076 KB Output is correct
102 Correct 115 ms 118016 KB Output is correct
103 Correct 124 ms 118076 KB Output is correct
104 Correct 4 ms 6096 KB Output is correct
105 Correct 4 ms 6096 KB Output is correct
106 Correct 4 ms 6096 KB Output is correct
107 Correct 4 ms 6096 KB Output is correct
108 Correct 3 ms 6096 KB Output is correct
109 Correct 4 ms 6096 KB Output is correct
110 Correct 4 ms 6096 KB Output is correct
111 Correct 4 ms 6096 KB Output is correct
112 Correct 4 ms 6076 KB Output is correct
113 Correct 4 ms 6096 KB Output is correct
114 Correct 226 ms 28880 KB Output is correct
115 Correct 822 ms 118076 KB Output is correct
116 Correct 802 ms 118076 KB Output is correct
117 Correct 908 ms 118056 KB Output is correct
118 Correct 856 ms 118076 KB Output is correct
119 Correct 785 ms 118116 KB Output is correct
120 Correct 921 ms 118072 KB Output is correct
121 Correct 917 ms 118092 KB Output is correct
122 Correct 859 ms 118040 KB Output is correct
123 Correct 689 ms 118116 KB Output is correct
124 Correct 812 ms 118088 KB Output is correct
125 Correct 156 ms 118072 KB Output is correct
126 Correct 161 ms 118032 KB Output is correct
127 Correct 139 ms 118024 KB Output is correct
128 Correct 116 ms 118036 KB Output is correct
129 Correct 120 ms 118028 KB Output is correct
130 Correct 129 ms 114100 KB Output is correct
131 Correct 153 ms 118020 KB Output is correct
132 Correct 138 ms 118068 KB Output is correct
133 Correct 132 ms 118080 KB Output is correct
134 Correct 141 ms 118104 KB Output is correct
135 Correct 133 ms 118140 KB Output is correct
136 Correct 142 ms 118120 KB Output is correct
137 Correct 108 ms 118064 KB Output is correct
138 Correct 131 ms 118076 KB Output is correct
139 Correct 114 ms 118080 KB Output is correct
140 Correct 117 ms 118032 KB Output is correct
141 Correct 4 ms 6096 KB Output is correct
142 Correct 4 ms 6096 KB Output is correct
143 Correct 4 ms 6096 KB Output is correct
144 Correct 5 ms 6096 KB Output is correct
145 Correct 4 ms 6096 KB Output is correct
146 Correct 3 ms 5200 KB Output is correct
147 Correct 4 ms 6096 KB Output is correct
148 Correct 5 ms 6096 KB Output is correct
149 Correct 4 ms 6096 KB Output is correct
150 Correct 4 ms 6096 KB Output is correct
151 Correct 3 ms 6096 KB Output is correct
152 Correct 4 ms 6096 KB Output is correct
153 Correct 4 ms 6096 KB Output is correct
154 Correct 4 ms 6096 KB Output is correct
155 Correct 4 ms 6096 KB Output is correct
156 Correct 4 ms 6096 KB Output is correct
157 Correct 702 ms 104508 KB Output is correct
158 Correct 904 ms 118116 KB Output is correct
159 Correct 938 ms 118124 KB Output is correct
160 Correct 779 ms 118116 KB Output is correct
161 Correct 1031 ms 118112 KB Output is correct
162 Correct 888 ms 118072 KB Output is correct
163 Correct 904 ms 118100 KB Output is correct
164 Correct 918 ms 118040 KB Output is correct
165 Correct 906 ms 118096 KB Output is correct
166 Correct 896 ms 118136 KB Output is correct
167 Correct 946 ms 118004 KB Output is correct
168 Correct 2 ms 4432 KB Output is correct
169 Correct 647 ms 40792 KB Output is correct
170 Correct 1153 ms 118108 KB Output is correct
171 Correct 1154 ms 118128 KB Output is correct
172 Correct 1110 ms 118096 KB Output is correct
173 Correct 1216 ms 118132 KB Output is correct
174 Correct 1180 ms 118080 KB Output is correct
175 Correct 1025 ms 118104 KB Output is correct
176 Correct 824 ms 118048 KB Output is correct
177 Correct 888 ms 118068 KB Output is correct
178 Correct 857 ms 118064 KB Output is correct
179 Correct 840 ms 118020 KB Output is correct