답안 #389826

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
389826 2021-04-14T15:05:14 Z ogibogi2004 푸드 코트 (JOI21_foodcourt) C++14
68 / 100
756 ms 89644 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long
const ll MAXN=500060;
struct node
{
	ll lazymax;
	ll lazyadd;
	ll maxhere;
};
node tree[4*MAXN];
void build(ll l,ll r,ll idx)
{
	tree[idx].maxhere=0;
	tree[idx].lazymax=0;
	tree[idx].lazyadd=0;
	if(l==r)return;
	ll mid=(l+r)/2;
	build(l,mid,idx*2);
	build(mid+1,r,idx*2+1);
}
node merge(node n1,node n2)
{
	node ret;
	ret.maxhere=max(0ll,max(max(n1.maxhere,n1.lazymax)+n1.lazyadd,max(n2.lazymax,n2.maxhere)+n2.lazyadd));
	ret.lazyadd=0;
	ret.lazymax=0;
	return ret;
}
void push_lazy(ll l,ll r,ll idx)
{
	//cout<<"&& "<<l<<" "<<r<<" "<<tree[idx].maxhere<<" "<<tree[idx].lazymax<<" "<<tree[idx].lazyadd<<endl;
	
	tree[idx].maxhere=max(tree[idx].maxhere,tree[idx].lazymax);
	tree[idx].maxhere+=tree[idx].lazyadd;
	tree[idx].maxhere=max(tree[idx].maxhere,0ll);
	//cout<<"& "<<tree[idx].maxhere<<endl;
	if(l!=r)
	{
		ll b1=tree[idx*2].lazymax;
		ll c1=tree[idx*2].lazyadd;
		ll b2=tree[idx].lazymax;
		ll c2=tree[idx].lazyadd;
		//if(l==4&&r==6)cout<<b1<<" "<<c1<<" "<<b2<<" "<<c2<<endl;
		tree[idx*2].lazymax=max(b1,b2-c1);
		tree[idx*2].lazyadd=c1+c2;
	}
	if(l!=r)
	{
		ll b1=tree[idx*2+1].lazymax;
		ll c1=tree[idx*2+1].lazyadd;
		ll b2=tree[idx].lazymax;
		ll c2=tree[idx].lazyadd;
		tree[idx*2+1].lazymax=max(b1,b2-c1);
		tree[idx*2+1].lazyadd=c1+c2;
	}
	tree[idx].lazymax=0;
	tree[idx].lazyadd=0;
}
void update(ll l,ll r,ll idx,ll ql,ll qr,ll val)
{
	push_lazy(l,r,idx);
	if(l>qr)return;
	if(r<ql)return;
	if(l>=ql&&r<=qr)
	{
		
		tree[idx].lazyadd+=val;
		push_lazy(l,r,idx);
		return;
	}
	ll mid=(l+r)/2;
	update(l,mid,idx*2,ql,qr,val);
	update(mid+1,r,idx*2+1,ql,qr,val);
	tree[idx]=merge(tree[idx*2],tree[idx*2+1]);
}
ll ask(ll l,ll r,ll idx,ll qi)
{
	/*if(l==4&&r==6)
		{
			cout<<tree[idx].lazymax<<" "<<tree[idx].lazyadd<<endl;
		}*/
	push_lazy(l,r,idx);
	if(l>qi||r<qi)return 0;
	if(l==r)return tree[idx].maxhere;
	ll mid=(l+r)/2;
	return max(ask(l,mid,idx*2,qi),ask(mid+1,r,idx*2+1,qi));
}
ll n,m,q;
void prll(ll l,ll r,ll idx)
{
	cout<<l<<" "<<r<<" "<<tree[idx].maxhere<<" "<<tree[idx].lazymax<<" "<<tree[idx].lazyadd<<endl;
	if(l==r)return;
	ll mid=(l+r)/2;
	prll(l,mid,idx*2);
	prll(mid+1,r,idx*2+1);
}
void updateMax(ll l,ll r,ll idx,ll ql,ll qr)
{
	push_lazy(l,r,idx);
	if(l>qr||r<ql)return;
	if(l>=ql&&r<=qr)
	{
		push_lazy(l,r,idx);
		return;
	}
	ll mid=(l+r)/2;
	updateMax(l,mid,idx*2,ql,qr);
	updateMax(mid+1,r,idx*2+1,ql,qr);
	tree[idx]=merge(tree[idx*2],tree[idx*2+1]);
}
struct BIT
{
	ll fen[MAXN];
	void init()
	{
		memset(fen,0,sizeof(fen));
	}
	void update(ll idx,ll val)
	{
		idx++;
		for(;idx<MAXN;idx+=idx&(-idx))
		{
			fen[idx]+=val;
		}
	}
	ll ask(ll idx)
	{
		idx++;
		ll ret=0;
		for(;idx>0;idx-=idx&(-idx))
		{
			ret+=fen[idx];
		}
		return ret;
	}
}ogi;
ll ans[MAXN];
vector<pair<ll,ll> >bs[MAXN];
struct upd
{
	ll type,l,r,c,k;
};
vector<upd>v;
struct query
{
	ll ind,b,pos;
};
vector<query>z;
ll low[MAXN],high[MAXN],ans1[MAXN];
vector<pair<query,ll> >toCheck[MAXN];
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.tie(NULL);
	cin>>n>>m>>q;
	build(1,n,1);
	for(ll i=0;i<q;++i)
	{
		ll type;
		cin>>type;
		if(type==1)
		{
			ll l,r,c,k;
			cin>>l>>r>>c>>k;
			update(1,n,1,l,r,k);
			ogi.update(l,+k);
			ogi.update(r+1,-k);
			v.push_back({type,l,r,c,k});
		}
		else if(type==2)
		{
			ll l,r,k;
			cin>>l>>r>>k;
			update(1,n,1,l,r,-k);
			v.push_back({type,l,r,0,k});
			//updateMax(1,n,1,l,r);
		}
		else
		{
			ll a,b;
			cin>>a>>b;
			ll t=ask(1,n,1,a);
			if(t>=b)
			{
				bs[a].push_back({ogi.ask(a)-(t-b),i});
			}
			v.push_back({type,0,0,0,0});
			//cout<<t<<endl;
		}
		//cout<<"------\n";
		//prll(1,n,1);
		//cout<<"-----\n";
	}
	/*cin>>n>>q;
	build(1,n,1);
	for(ll i=0;i<q;i++)
	{
		ll l,r,val;
		cin>>l>>r>>val;
		update(1,n,1,l,r,val);
		ll j;
		cin>>j;
		cout<<ask(1,n,1,j)<<endl;
		for(j=1;j<=n;j++)
		{
			cout<<ask(1,n,1,j)<<" ";
		}
		cout<<endl;
		prll(1,n,1);
	}*/
	for(ll i=1;i<=n;i++)
	{
		for(ll j=0;j<bs[i].size();j++)
		{
			z.push_back({i,bs[i][j].first,bs[i][j].second});
		}
	}
	for(ll i=0;i<z.size();i++)
	{
		low[i]=0;
		high[i]=q-1;
		//cout<<z[i].ind<<" "<<z[i].b<<" "<<z[i].pos<<endl;
	}
	ogi.init();
	for(ll step=0;step<17;++step)
	{
		for(ll i=0;i<z.size();++i)
		{
			if(low[i]<=high[i])
			{
				ll mid=(low[i]+high[i])/2;
				toCheck[mid].push_back({z[i],i});
			}
		}
		for(ll j=0;j<v.size();++j)
		{
			if(v[j].type==1)
			{
				ogi.update(v[j].l,+v[j].k);
				ogi.update(v[j].r+1,-v[j].k);
			}
			for(auto xd:toCheck[j])
			{
				if(ogi.ask(xd.first.ind)>=xd.first.b)
				{
					ans1[xd.second]=j;
					high[xd.second]=j-1;
				}
				else low[xd.second]=j+1;
			}
			toCheck[j].clear();
		}
		ogi.init();
	}
	for(ll i=0;i<z.size();++i)
	{
		//cout<<ans1[i]<<" "<<z[i].pos<<endl;
		ans[z[i].pos+1]=v[ans1[i]].c;
	}
	for(ll i=1;i<=q;++i)
	{
		if(v[i-1].type==3)
		{
			cout<<ans[i]<<'\n';
		}
	}
return 0;
}
/*
3 5 7
1 2 3 5 2
1 1 2 2 4
3 2 3
2 1 3 3
3 1 2
1 2 3 4 2
3 3 2
*/

Compilation message

foodcourt.cpp: In function 'int main()':
foodcourt.cpp:215:15: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  215 |   for(ll j=0;j<bs[i].size();j++)
      |              ~^~~~~~~~~~~~~
foodcourt.cpp:220:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<query>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  220 |  for(ll i=0;i<z.size();i++)
      |             ~^~~~~~~~~
foodcourt.cpp:229:15: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<query>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  229 |   for(ll i=0;i<z.size();++i)
      |              ~^~~~~~~~~
foodcourt.cpp:237:15: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<upd>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  237 |   for(ll j=0;j<v.size();++j)
      |              ~^~~~~~~~~
foodcourt.cpp:257:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<query>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  257 |  for(ll i=0;i<z.size();++i)
      |             ~^~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 28088 KB Output is correct
2 Correct 23 ms 28180 KB Output is correct
3 Correct 22 ms 27952 KB Output is correct
4 Correct 24 ms 28032 KB Output is correct
5 Correct 22 ms 27980 KB Output is correct
6 Correct 21 ms 27980 KB Output is correct
7 Correct 23 ms 28148 KB Output is correct
8 Correct 23 ms 28108 KB Output is correct
9 Correct 23 ms 28024 KB Output is correct
10 Correct 25 ms 28096 KB Output is correct
11 Correct 23 ms 28100 KB Output is correct
12 Correct 23 ms 28108 KB Output is correct
13 Correct 24 ms 28024 KB Output is correct
14 Correct 22 ms 28108 KB Output is correct
15 Correct 21 ms 28104 KB Output is correct
16 Correct 23 ms 28076 KB Output is correct
17 Correct 23 ms 27960 KB Output is correct
18 Correct 23 ms 28112 KB Output is correct
19 Correct 25 ms 27912 KB Output is correct
20 Correct 24 ms 28012 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 28088 KB Output is correct
2 Correct 23 ms 28180 KB Output is correct
3 Correct 22 ms 27952 KB Output is correct
4 Correct 24 ms 28032 KB Output is correct
5 Correct 22 ms 27980 KB Output is correct
6 Correct 21 ms 27980 KB Output is correct
7 Correct 23 ms 28148 KB Output is correct
8 Correct 23 ms 28108 KB Output is correct
9 Correct 23 ms 28024 KB Output is correct
10 Correct 25 ms 28096 KB Output is correct
11 Correct 23 ms 28100 KB Output is correct
12 Correct 23 ms 28108 KB Output is correct
13 Correct 24 ms 28024 KB Output is correct
14 Correct 22 ms 28108 KB Output is correct
15 Correct 21 ms 28104 KB Output is correct
16 Correct 23 ms 28076 KB Output is correct
17 Correct 23 ms 27960 KB Output is correct
18 Correct 23 ms 28112 KB Output is correct
19 Correct 25 ms 27912 KB Output is correct
20 Correct 24 ms 28012 KB Output is correct
21 Correct 23 ms 28064 KB Output is correct
22 Correct 23 ms 28152 KB Output is correct
23 Correct 24 ms 28136 KB Output is correct
24 Correct 27 ms 28108 KB Output is correct
25 Correct 22 ms 27996 KB Output is correct
26 Correct 22 ms 27980 KB Output is correct
27 Correct 24 ms 28092 KB Output is correct
28 Correct 24 ms 28076 KB Output is correct
29 Correct 24 ms 28108 KB Output is correct
30 Correct 24 ms 28108 KB Output is correct
31 Correct 23 ms 28008 KB Output is correct
32 Correct 26 ms 28108 KB Output is correct
33 Correct 25 ms 28136 KB Output is correct
34 Correct 22 ms 28108 KB Output is correct
35 Correct 23 ms 28124 KB Output is correct
36 Correct 23 ms 28116 KB Output is correct
37 Correct 22 ms 27980 KB Output is correct
38 Correct 24 ms 27912 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 133 ms 33628 KB Output is correct
2 Correct 174 ms 33456 KB Output is correct
3 Correct 135 ms 33584 KB Output is correct
4 Correct 131 ms 33600 KB Output is correct
5 Correct 145 ms 33496 KB Output is correct
6 Correct 164 ms 33500 KB Output is correct
7 Correct 97 ms 35256 KB Output is correct
8 Correct 102 ms 35724 KB Output is correct
9 Correct 141 ms 34024 KB Output is correct
10 Correct 136 ms 33504 KB Output is correct
11 Correct 136 ms 33608 KB Output is correct
12 Correct 135 ms 33452 KB Output is correct
13 Correct 139 ms 37060 KB Output is correct
14 Correct 160 ms 37764 KB Output is correct
15 Correct 174 ms 34100 KB Output is correct
16 Correct 161 ms 34040 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 756 ms 89644 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 28088 KB Output is correct
2 Correct 23 ms 28180 KB Output is correct
3 Correct 22 ms 27952 KB Output is correct
4 Correct 24 ms 28032 KB Output is correct
5 Correct 22 ms 27980 KB Output is correct
6 Correct 21 ms 27980 KB Output is correct
7 Correct 23 ms 28148 KB Output is correct
8 Correct 23 ms 28108 KB Output is correct
9 Correct 23 ms 28024 KB Output is correct
10 Correct 25 ms 28096 KB Output is correct
11 Correct 23 ms 28100 KB Output is correct
12 Correct 23 ms 28108 KB Output is correct
13 Correct 24 ms 28024 KB Output is correct
14 Correct 22 ms 28108 KB Output is correct
15 Correct 21 ms 28104 KB Output is correct
16 Correct 23 ms 28076 KB Output is correct
17 Correct 23 ms 27960 KB Output is correct
18 Correct 23 ms 28112 KB Output is correct
19 Correct 25 ms 27912 KB Output is correct
20 Correct 24 ms 28012 KB Output is correct
21 Correct 133 ms 33628 KB Output is correct
22 Correct 174 ms 33456 KB Output is correct
23 Correct 135 ms 33584 KB Output is correct
24 Correct 131 ms 33600 KB Output is correct
25 Correct 145 ms 33496 KB Output is correct
26 Correct 164 ms 33500 KB Output is correct
27 Correct 97 ms 35256 KB Output is correct
28 Correct 102 ms 35724 KB Output is correct
29 Correct 141 ms 34024 KB Output is correct
30 Correct 136 ms 33504 KB Output is correct
31 Correct 136 ms 33608 KB Output is correct
32 Correct 135 ms 33452 KB Output is correct
33 Correct 139 ms 37060 KB Output is correct
34 Correct 160 ms 37764 KB Output is correct
35 Correct 174 ms 34100 KB Output is correct
36 Correct 161 ms 34040 KB Output is correct
37 Correct 152 ms 42832 KB Output is correct
38 Correct 187 ms 39556 KB Output is correct
39 Correct 97 ms 36800 KB Output is correct
40 Correct 138 ms 38376 KB Output is correct
41 Correct 169 ms 41828 KB Output is correct
42 Correct 175 ms 42044 KB Output is correct
43 Correct 171 ms 42140 KB Output is correct
44 Correct 171 ms 41916 KB Output is correct
45 Correct 176 ms 42196 KB Output is correct
46 Correct 174 ms 42172 KB Output is correct
47 Correct 118 ms 44184 KB Output is correct
48 Correct 163 ms 44216 KB Output is correct
49 Correct 124 ms 37436 KB Output is correct
50 Correct 148 ms 38716 KB Output is correct
51 Correct 176 ms 40888 KB Output is correct
52 Correct 182 ms 41036 KB Output is correct
53 Correct 137 ms 33464 KB Output is correct
54 Correct 160 ms 34040 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 184 ms 48100 KB Output is correct
2 Correct 198 ms 50128 KB Output is correct
3 Correct 201 ms 50120 KB Output is correct
4 Correct 146 ms 44144 KB Output is correct
5 Correct 182 ms 47884 KB Output is correct
6 Correct 199 ms 50416 KB Output is correct
7 Correct 134 ms 44536 KB Output is correct
8 Correct 134 ms 43488 KB Output is correct
9 Correct 159 ms 50248 KB Output is correct
10 Correct 141 ms 44008 KB Output is correct
11 Correct 190 ms 50376 KB Output is correct
12 Correct 209 ms 50500 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 28088 KB Output is correct
2 Correct 23 ms 28180 KB Output is correct
3 Correct 22 ms 27952 KB Output is correct
4 Correct 24 ms 28032 KB Output is correct
5 Correct 22 ms 27980 KB Output is correct
6 Correct 21 ms 27980 KB Output is correct
7 Correct 23 ms 28148 KB Output is correct
8 Correct 23 ms 28108 KB Output is correct
9 Correct 23 ms 28024 KB Output is correct
10 Correct 25 ms 28096 KB Output is correct
11 Correct 23 ms 28100 KB Output is correct
12 Correct 23 ms 28108 KB Output is correct
13 Correct 24 ms 28024 KB Output is correct
14 Correct 22 ms 28108 KB Output is correct
15 Correct 21 ms 28104 KB Output is correct
16 Correct 23 ms 28076 KB Output is correct
17 Correct 23 ms 27960 KB Output is correct
18 Correct 23 ms 28112 KB Output is correct
19 Correct 25 ms 27912 KB Output is correct
20 Correct 24 ms 28012 KB Output is correct
21 Correct 23 ms 28064 KB Output is correct
22 Correct 23 ms 28152 KB Output is correct
23 Correct 24 ms 28136 KB Output is correct
24 Correct 27 ms 28108 KB Output is correct
25 Correct 22 ms 27996 KB Output is correct
26 Correct 22 ms 27980 KB Output is correct
27 Correct 24 ms 28092 KB Output is correct
28 Correct 24 ms 28076 KB Output is correct
29 Correct 24 ms 28108 KB Output is correct
30 Correct 24 ms 28108 KB Output is correct
31 Correct 23 ms 28008 KB Output is correct
32 Correct 26 ms 28108 KB Output is correct
33 Correct 25 ms 28136 KB Output is correct
34 Correct 22 ms 28108 KB Output is correct
35 Correct 23 ms 28124 KB Output is correct
36 Correct 23 ms 28116 KB Output is correct
37 Correct 22 ms 27980 KB Output is correct
38 Correct 24 ms 27912 KB Output is correct
39 Correct 133 ms 33628 KB Output is correct
40 Correct 174 ms 33456 KB Output is correct
41 Correct 135 ms 33584 KB Output is correct
42 Correct 131 ms 33600 KB Output is correct
43 Correct 145 ms 33496 KB Output is correct
44 Correct 164 ms 33500 KB Output is correct
45 Correct 97 ms 35256 KB Output is correct
46 Correct 102 ms 35724 KB Output is correct
47 Correct 141 ms 34024 KB Output is correct
48 Correct 136 ms 33504 KB Output is correct
49 Correct 136 ms 33608 KB Output is correct
50 Correct 135 ms 33452 KB Output is correct
51 Correct 139 ms 37060 KB Output is correct
52 Correct 160 ms 37764 KB Output is correct
53 Correct 174 ms 34100 KB Output is correct
54 Correct 161 ms 34040 KB Output is correct
55 Correct 152 ms 42832 KB Output is correct
56 Correct 187 ms 39556 KB Output is correct
57 Correct 97 ms 36800 KB Output is correct
58 Correct 138 ms 38376 KB Output is correct
59 Correct 169 ms 41828 KB Output is correct
60 Correct 175 ms 42044 KB Output is correct
61 Correct 171 ms 42140 KB Output is correct
62 Correct 171 ms 41916 KB Output is correct
63 Correct 176 ms 42196 KB Output is correct
64 Correct 174 ms 42172 KB Output is correct
65 Correct 118 ms 44184 KB Output is correct
66 Correct 163 ms 44216 KB Output is correct
67 Correct 124 ms 37436 KB Output is correct
68 Correct 148 ms 38716 KB Output is correct
69 Correct 176 ms 40888 KB Output is correct
70 Correct 182 ms 41036 KB Output is correct
71 Correct 137 ms 33464 KB Output is correct
72 Correct 160 ms 34040 KB Output is correct
73 Correct 184 ms 48100 KB Output is correct
74 Correct 198 ms 50128 KB Output is correct
75 Correct 201 ms 50120 KB Output is correct
76 Correct 146 ms 44144 KB Output is correct
77 Correct 182 ms 47884 KB Output is correct
78 Correct 199 ms 50416 KB Output is correct
79 Correct 134 ms 44536 KB Output is correct
80 Correct 134 ms 43488 KB Output is correct
81 Correct 159 ms 50248 KB Output is correct
82 Correct 141 ms 44008 KB Output is correct
83 Correct 190 ms 50376 KB Output is correct
84 Correct 209 ms 50500 KB Output is correct
85 Correct 167 ms 43176 KB Output is correct
86 Correct 176 ms 44300 KB Output is correct
87 Correct 184 ms 40508 KB Output is correct
88 Correct 193 ms 42164 KB Output is correct
89 Correct 121 ms 38204 KB Output is correct
90 Correct 181 ms 42048 KB Output is correct
91 Correct 158 ms 40312 KB Output is correct
92 Correct 168 ms 40000 KB Output is correct
93 Correct 181 ms 42344 KB Output is correct
94 Correct 188 ms 42184 KB Output is correct
95 Correct 208 ms 42004 KB Output is correct
96 Correct 178 ms 42132 KB Output is correct
97 Correct 174 ms 42036 KB Output is correct
98 Correct 158 ms 40764 KB Output is correct
99 Correct 126 ms 44292 KB Output is correct
100 Correct 147 ms 42444 KB Output is correct
101 Correct 171 ms 44256 KB Output is correct
102 Correct 167 ms 39044 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 22 ms 28088 KB Output is correct
2 Correct 23 ms 28180 KB Output is correct
3 Correct 22 ms 27952 KB Output is correct
4 Correct 24 ms 28032 KB Output is correct
5 Correct 22 ms 27980 KB Output is correct
6 Correct 21 ms 27980 KB Output is correct
7 Correct 23 ms 28148 KB Output is correct
8 Correct 23 ms 28108 KB Output is correct
9 Correct 23 ms 28024 KB Output is correct
10 Correct 25 ms 28096 KB Output is correct
11 Correct 23 ms 28100 KB Output is correct
12 Correct 23 ms 28108 KB Output is correct
13 Correct 24 ms 28024 KB Output is correct
14 Correct 22 ms 28108 KB Output is correct
15 Correct 21 ms 28104 KB Output is correct
16 Correct 23 ms 28076 KB Output is correct
17 Correct 23 ms 27960 KB Output is correct
18 Correct 23 ms 28112 KB Output is correct
19 Correct 25 ms 27912 KB Output is correct
20 Correct 24 ms 28012 KB Output is correct
21 Correct 23 ms 28064 KB Output is correct
22 Correct 23 ms 28152 KB Output is correct
23 Correct 24 ms 28136 KB Output is correct
24 Correct 27 ms 28108 KB Output is correct
25 Correct 22 ms 27996 KB Output is correct
26 Correct 22 ms 27980 KB Output is correct
27 Correct 24 ms 28092 KB Output is correct
28 Correct 24 ms 28076 KB Output is correct
29 Correct 24 ms 28108 KB Output is correct
30 Correct 24 ms 28108 KB Output is correct
31 Correct 23 ms 28008 KB Output is correct
32 Correct 26 ms 28108 KB Output is correct
33 Correct 25 ms 28136 KB Output is correct
34 Correct 22 ms 28108 KB Output is correct
35 Correct 23 ms 28124 KB Output is correct
36 Correct 23 ms 28116 KB Output is correct
37 Correct 22 ms 27980 KB Output is correct
38 Correct 24 ms 27912 KB Output is correct
39 Correct 133 ms 33628 KB Output is correct
40 Correct 174 ms 33456 KB Output is correct
41 Correct 135 ms 33584 KB Output is correct
42 Correct 131 ms 33600 KB Output is correct
43 Correct 145 ms 33496 KB Output is correct
44 Correct 164 ms 33500 KB Output is correct
45 Correct 97 ms 35256 KB Output is correct
46 Correct 102 ms 35724 KB Output is correct
47 Correct 141 ms 34024 KB Output is correct
48 Correct 136 ms 33504 KB Output is correct
49 Correct 136 ms 33608 KB Output is correct
50 Correct 135 ms 33452 KB Output is correct
51 Correct 139 ms 37060 KB Output is correct
52 Correct 160 ms 37764 KB Output is correct
53 Correct 174 ms 34100 KB Output is correct
54 Correct 161 ms 34040 KB Output is correct
55 Incorrect 756 ms 89644 KB Output isn't correct
56 Halted 0 ms 0 KB -