답안 #389825

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
389825 2021-04-14T15:04:04 Z ogibogi2004 푸드 코트 (JOI21_foodcourt) C++14
68 / 100
706 ms 89584 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 24 ms 28004 KB Output is correct
2 Correct 23 ms 28108 KB Output is correct
3 Correct 30 ms 28144 KB Output is correct
4 Correct 24 ms 28048 KB Output is correct
5 Correct 22 ms 28044 KB Output is correct
6 Correct 22 ms 27988 KB Output is correct
7 Correct 23 ms 28108 KB Output is correct
8 Correct 22 ms 28108 KB Output is correct
9 Correct 23 ms 28052 KB Output is correct
10 Correct 23 ms 28144 KB Output is correct
11 Correct 24 ms 28124 KB Output is correct
12 Correct 24 ms 28132 KB Output is correct
13 Correct 22 ms 28108 KB Output is correct
14 Correct 21 ms 28108 KB Output is correct
15 Correct 23 ms 28240 KB Output is correct
16 Correct 23 ms 28108 KB Output is correct
17 Correct 22 ms 28012 KB Output is correct
18 Correct 23 ms 28008 KB Output is correct
19 Correct 24 ms 28004 KB Output is correct
20 Correct 24 ms 27980 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 28004 KB Output is correct
2 Correct 23 ms 28108 KB Output is correct
3 Correct 30 ms 28144 KB Output is correct
4 Correct 24 ms 28048 KB Output is correct
5 Correct 22 ms 28044 KB Output is correct
6 Correct 22 ms 27988 KB Output is correct
7 Correct 23 ms 28108 KB Output is correct
8 Correct 22 ms 28108 KB Output is correct
9 Correct 23 ms 28052 KB Output is correct
10 Correct 23 ms 28144 KB Output is correct
11 Correct 24 ms 28124 KB Output is correct
12 Correct 24 ms 28132 KB Output is correct
13 Correct 22 ms 28108 KB Output is correct
14 Correct 21 ms 28108 KB Output is correct
15 Correct 23 ms 28240 KB Output is correct
16 Correct 23 ms 28108 KB Output is correct
17 Correct 22 ms 28012 KB Output is correct
18 Correct 23 ms 28008 KB Output is correct
19 Correct 24 ms 28004 KB Output is correct
20 Correct 24 ms 27980 KB Output is correct
21 Correct 26 ms 28152 KB Output is correct
22 Correct 23 ms 28100 KB Output is correct
23 Correct 23 ms 28136 KB Output is correct
24 Correct 24 ms 28148 KB Output is correct
25 Correct 22 ms 27976 KB Output is correct
26 Correct 22 ms 27980 KB Output is correct
27 Correct 23 ms 28104 KB Output is correct
28 Correct 23 ms 28104 KB Output is correct
29 Correct 24 ms 28012 KB Output is correct
30 Correct 24 ms 28060 KB Output is correct
31 Correct 24 ms 28088 KB Output is correct
32 Correct 23 ms 28108 KB Output is correct
33 Correct 23 ms 28136 KB Output is correct
34 Correct 22 ms 28108 KB Output is correct
35 Correct 23 ms 28144 KB Output is correct
36 Correct 23 ms 28180 KB Output is correct
37 Correct 24 ms 27980 KB Output is correct
38 Correct 27 ms 27928 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 130 ms 33572 KB Output is correct
2 Correct 144 ms 33556 KB Output is correct
3 Correct 142 ms 33584 KB Output is correct
4 Correct 149 ms 33616 KB Output is correct
5 Correct 143 ms 33584 KB Output is correct
6 Correct 145 ms 33504 KB Output is correct
7 Correct 96 ms 35256 KB Output is correct
8 Correct 112 ms 35808 KB Output is correct
9 Correct 140 ms 34100 KB Output is correct
10 Correct 140 ms 33444 KB Output is correct
11 Correct 134 ms 33584 KB Output is correct
12 Correct 143 ms 33572 KB Output is correct
13 Correct 159 ms 37020 KB Output is correct
14 Correct 152 ms 37688 KB Output is correct
15 Correct 158 ms 34116 KB Output is correct
16 Correct 158 ms 34020 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 706 ms 89584 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 28004 KB Output is correct
2 Correct 23 ms 28108 KB Output is correct
3 Correct 30 ms 28144 KB Output is correct
4 Correct 24 ms 28048 KB Output is correct
5 Correct 22 ms 28044 KB Output is correct
6 Correct 22 ms 27988 KB Output is correct
7 Correct 23 ms 28108 KB Output is correct
8 Correct 22 ms 28108 KB Output is correct
9 Correct 23 ms 28052 KB Output is correct
10 Correct 23 ms 28144 KB Output is correct
11 Correct 24 ms 28124 KB Output is correct
12 Correct 24 ms 28132 KB Output is correct
13 Correct 22 ms 28108 KB Output is correct
14 Correct 21 ms 28108 KB Output is correct
15 Correct 23 ms 28240 KB Output is correct
16 Correct 23 ms 28108 KB Output is correct
17 Correct 22 ms 28012 KB Output is correct
18 Correct 23 ms 28008 KB Output is correct
19 Correct 24 ms 28004 KB Output is correct
20 Correct 24 ms 27980 KB Output is correct
21 Correct 130 ms 33572 KB Output is correct
22 Correct 144 ms 33556 KB Output is correct
23 Correct 142 ms 33584 KB Output is correct
24 Correct 149 ms 33616 KB Output is correct
25 Correct 143 ms 33584 KB Output is correct
26 Correct 145 ms 33504 KB Output is correct
27 Correct 96 ms 35256 KB Output is correct
28 Correct 112 ms 35808 KB Output is correct
29 Correct 140 ms 34100 KB Output is correct
30 Correct 140 ms 33444 KB Output is correct
31 Correct 134 ms 33584 KB Output is correct
32 Correct 143 ms 33572 KB Output is correct
33 Correct 159 ms 37020 KB Output is correct
34 Correct 152 ms 37688 KB Output is correct
35 Correct 158 ms 34116 KB Output is correct
36 Correct 158 ms 34020 KB Output is correct
37 Correct 157 ms 42824 KB Output is correct
38 Correct 161 ms 39616 KB Output is correct
39 Correct 96 ms 36800 KB Output is correct
40 Correct 110 ms 38380 KB Output is correct
41 Correct 179 ms 41868 KB Output is correct
42 Correct 176 ms 42308 KB Output is correct
43 Correct 225 ms 42080 KB Output is correct
44 Correct 172 ms 42144 KB Output is correct
45 Correct 172 ms 42144 KB Output is correct
46 Correct 182 ms 42176 KB Output is correct
47 Correct 138 ms 44248 KB Output is correct
48 Correct 166 ms 44176 KB Output is correct
49 Correct 124 ms 37436 KB Output is correct
50 Correct 148 ms 38736 KB Output is correct
51 Correct 176 ms 41028 KB Output is correct
52 Correct 172 ms 40888 KB Output is correct
53 Correct 130 ms 33452 KB Output is correct
54 Correct 160 ms 34036 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 199 ms 48076 KB Output is correct
2 Correct 194 ms 50120 KB Output is correct
3 Correct 198 ms 50032 KB Output is correct
4 Correct 152 ms 44228 KB Output is correct
5 Correct 188 ms 47792 KB Output is correct
6 Correct 196 ms 50332 KB Output is correct
7 Correct 143 ms 44500 KB Output is correct
8 Correct 134 ms 43564 KB Output is correct
9 Correct 153 ms 50260 KB Output is correct
10 Correct 140 ms 43976 KB Output is correct
11 Correct 194 ms 50424 KB Output is correct
12 Correct 190 ms 50504 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 28004 KB Output is correct
2 Correct 23 ms 28108 KB Output is correct
3 Correct 30 ms 28144 KB Output is correct
4 Correct 24 ms 28048 KB Output is correct
5 Correct 22 ms 28044 KB Output is correct
6 Correct 22 ms 27988 KB Output is correct
7 Correct 23 ms 28108 KB Output is correct
8 Correct 22 ms 28108 KB Output is correct
9 Correct 23 ms 28052 KB Output is correct
10 Correct 23 ms 28144 KB Output is correct
11 Correct 24 ms 28124 KB Output is correct
12 Correct 24 ms 28132 KB Output is correct
13 Correct 22 ms 28108 KB Output is correct
14 Correct 21 ms 28108 KB Output is correct
15 Correct 23 ms 28240 KB Output is correct
16 Correct 23 ms 28108 KB Output is correct
17 Correct 22 ms 28012 KB Output is correct
18 Correct 23 ms 28008 KB Output is correct
19 Correct 24 ms 28004 KB Output is correct
20 Correct 24 ms 27980 KB Output is correct
21 Correct 26 ms 28152 KB Output is correct
22 Correct 23 ms 28100 KB Output is correct
23 Correct 23 ms 28136 KB Output is correct
24 Correct 24 ms 28148 KB Output is correct
25 Correct 22 ms 27976 KB Output is correct
26 Correct 22 ms 27980 KB Output is correct
27 Correct 23 ms 28104 KB Output is correct
28 Correct 23 ms 28104 KB Output is correct
29 Correct 24 ms 28012 KB Output is correct
30 Correct 24 ms 28060 KB Output is correct
31 Correct 24 ms 28088 KB Output is correct
32 Correct 23 ms 28108 KB Output is correct
33 Correct 23 ms 28136 KB Output is correct
34 Correct 22 ms 28108 KB Output is correct
35 Correct 23 ms 28144 KB Output is correct
36 Correct 23 ms 28180 KB Output is correct
37 Correct 24 ms 27980 KB Output is correct
38 Correct 27 ms 27928 KB Output is correct
39 Correct 130 ms 33572 KB Output is correct
40 Correct 144 ms 33556 KB Output is correct
41 Correct 142 ms 33584 KB Output is correct
42 Correct 149 ms 33616 KB Output is correct
43 Correct 143 ms 33584 KB Output is correct
44 Correct 145 ms 33504 KB Output is correct
45 Correct 96 ms 35256 KB Output is correct
46 Correct 112 ms 35808 KB Output is correct
47 Correct 140 ms 34100 KB Output is correct
48 Correct 140 ms 33444 KB Output is correct
49 Correct 134 ms 33584 KB Output is correct
50 Correct 143 ms 33572 KB Output is correct
51 Correct 159 ms 37020 KB Output is correct
52 Correct 152 ms 37688 KB Output is correct
53 Correct 158 ms 34116 KB Output is correct
54 Correct 158 ms 34020 KB Output is correct
55 Correct 157 ms 42824 KB Output is correct
56 Correct 161 ms 39616 KB Output is correct
57 Correct 96 ms 36800 KB Output is correct
58 Correct 110 ms 38380 KB Output is correct
59 Correct 179 ms 41868 KB Output is correct
60 Correct 176 ms 42308 KB Output is correct
61 Correct 225 ms 42080 KB Output is correct
62 Correct 172 ms 42144 KB Output is correct
63 Correct 172 ms 42144 KB Output is correct
64 Correct 182 ms 42176 KB Output is correct
65 Correct 138 ms 44248 KB Output is correct
66 Correct 166 ms 44176 KB Output is correct
67 Correct 124 ms 37436 KB Output is correct
68 Correct 148 ms 38736 KB Output is correct
69 Correct 176 ms 41028 KB Output is correct
70 Correct 172 ms 40888 KB Output is correct
71 Correct 130 ms 33452 KB Output is correct
72 Correct 160 ms 34036 KB Output is correct
73 Correct 199 ms 48076 KB Output is correct
74 Correct 194 ms 50120 KB Output is correct
75 Correct 198 ms 50032 KB Output is correct
76 Correct 152 ms 44228 KB Output is correct
77 Correct 188 ms 47792 KB Output is correct
78 Correct 196 ms 50332 KB Output is correct
79 Correct 143 ms 44500 KB Output is correct
80 Correct 134 ms 43564 KB Output is correct
81 Correct 153 ms 50260 KB Output is correct
82 Correct 140 ms 43976 KB Output is correct
83 Correct 194 ms 50424 KB Output is correct
84 Correct 190 ms 50504 KB Output is correct
85 Correct 164 ms 43256 KB Output is correct
86 Correct 182 ms 44288 KB Output is correct
87 Correct 208 ms 40636 KB Output is correct
88 Correct 187 ms 42188 KB Output is correct
89 Correct 123 ms 38196 KB Output is correct
90 Correct 184 ms 42060 KB Output is correct
91 Correct 145 ms 40248 KB Output is correct
92 Correct 140 ms 39956 KB Output is correct
93 Correct 178 ms 42284 KB Output is correct
94 Correct 182 ms 42164 KB Output is correct
95 Correct 209 ms 42016 KB Output is correct
96 Correct 176 ms 42072 KB Output is correct
97 Correct 196 ms 42092 KB Output is correct
98 Correct 153 ms 40764 KB Output is correct
99 Correct 124 ms 44344 KB Output is correct
100 Correct 149 ms 42344 KB Output is correct
101 Correct 182 ms 44292 KB Output is correct
102 Correct 175 ms 39060 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 24 ms 28004 KB Output is correct
2 Correct 23 ms 28108 KB Output is correct
3 Correct 30 ms 28144 KB Output is correct
4 Correct 24 ms 28048 KB Output is correct
5 Correct 22 ms 28044 KB Output is correct
6 Correct 22 ms 27988 KB Output is correct
7 Correct 23 ms 28108 KB Output is correct
8 Correct 22 ms 28108 KB Output is correct
9 Correct 23 ms 28052 KB Output is correct
10 Correct 23 ms 28144 KB Output is correct
11 Correct 24 ms 28124 KB Output is correct
12 Correct 24 ms 28132 KB Output is correct
13 Correct 22 ms 28108 KB Output is correct
14 Correct 21 ms 28108 KB Output is correct
15 Correct 23 ms 28240 KB Output is correct
16 Correct 23 ms 28108 KB Output is correct
17 Correct 22 ms 28012 KB Output is correct
18 Correct 23 ms 28008 KB Output is correct
19 Correct 24 ms 28004 KB Output is correct
20 Correct 24 ms 27980 KB Output is correct
21 Correct 26 ms 28152 KB Output is correct
22 Correct 23 ms 28100 KB Output is correct
23 Correct 23 ms 28136 KB Output is correct
24 Correct 24 ms 28148 KB Output is correct
25 Correct 22 ms 27976 KB Output is correct
26 Correct 22 ms 27980 KB Output is correct
27 Correct 23 ms 28104 KB Output is correct
28 Correct 23 ms 28104 KB Output is correct
29 Correct 24 ms 28012 KB Output is correct
30 Correct 24 ms 28060 KB Output is correct
31 Correct 24 ms 28088 KB Output is correct
32 Correct 23 ms 28108 KB Output is correct
33 Correct 23 ms 28136 KB Output is correct
34 Correct 22 ms 28108 KB Output is correct
35 Correct 23 ms 28144 KB Output is correct
36 Correct 23 ms 28180 KB Output is correct
37 Correct 24 ms 27980 KB Output is correct
38 Correct 27 ms 27928 KB Output is correct
39 Correct 130 ms 33572 KB Output is correct
40 Correct 144 ms 33556 KB Output is correct
41 Correct 142 ms 33584 KB Output is correct
42 Correct 149 ms 33616 KB Output is correct
43 Correct 143 ms 33584 KB Output is correct
44 Correct 145 ms 33504 KB Output is correct
45 Correct 96 ms 35256 KB Output is correct
46 Correct 112 ms 35808 KB Output is correct
47 Correct 140 ms 34100 KB Output is correct
48 Correct 140 ms 33444 KB Output is correct
49 Correct 134 ms 33584 KB Output is correct
50 Correct 143 ms 33572 KB Output is correct
51 Correct 159 ms 37020 KB Output is correct
52 Correct 152 ms 37688 KB Output is correct
53 Correct 158 ms 34116 KB Output is correct
54 Correct 158 ms 34020 KB Output is correct
55 Incorrect 706 ms 89584 KB Output isn't correct
56 Halted 0 ms 0 KB -