Submission #389054

# Submission time Handle Problem Language Result Execution time Memory
389054 2021-04-13T14:55:23 Z PedroBigMan Food Court (JOI21_foodcourt) C++14
68 / 100
1000 ms 103508 KB
/*
Author of all code: Pedro BIGMAN Dias
Last edit: 15/02/2021
*/
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <deque>
#include <list>
#include <iomanip>
#include <stdlib.h>
#include <time.h>
#include <cstring>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
#define REP(i,a,b) for(ll i=(ll) a; i<(ll) b; i++)
#define pb push_back
#define mp make_pair
#define pl pair<ll,ll>
#define ff first
#define ss second
#define whole(x) x.begin(),x.end()
#define DEBUG(i) cout<<"Pedro Is The Master "<<i<<endl
#define INF 500000000LL
#define EPS 0.00000001
#define pi 3.14159
ll mod=1000000007LL;

template<class A=ll> 
void Out(vector<A> a) {REP(i,0,a.size()) {cout<<a[i]<<" ";} cout<<endl;}

template<class A=ll>
void In(vector<A> &a, ll N) {A cur; REP(i,0,N) {cin>>cur; a.pb(cur);}} 

class ST
{
    public:
    ll N;
    
    class SV //seg value
    {
        public:
        ll a; 
        SV() {a=-1LL;}
        SV(ll x) {a=x;}
        
        SV operator & (SV X) {SV ANS(max(a,X.a)); return ANS;}
    };
      
    class LV //lazy value
    {
        public:
        pl a;
        LV() {a=mp(0LL,0LL);}
        LV(pl x) {a=x;}
        
        LV operator & (LV X) 
		{
			LV ANS(mp(max(a.ff,X.a.ff+a.ss),a.ss+X.a.ss)); 
			return ANS;
		}
    };
    
    SV upval(ll c) //how lazy values modify a seg value inside a node, c=current node
    {
        SV X(max(p[c].a+lazy[c].a.ss,lazy[c].a.ff));
        return X;
    }
    
    SV neuts; LV neutl;
    
    vector<SV> p;
    vector<LV> lazy;
    vector<pl> range;
    
    ST() {N=0LL;}
    ST(vector<ll> arr)
    {
        N = (ll) 1<<(ll) ceil(log2(arr.size()));
        REP(i,0,2*N) {range.pb(mp(0LL,0LL));}
        REP(i,0,N) {p.pb(neuts);}
        REP(i,0,arr.size()) {SV X(arr[i]); p.pb(X); range[i+N]=mp(i,i);}
        REP(i,arr.size(),N) {p.pb(neuts); range[i+N]=mp(i,i);}
        ll cur = N-1;
        while(cur>0)
        {
            p[cur]=p[2*cur]&p[2*cur+1];
            range[cur]=mp(range[2*cur].ff,range[2*cur+1].ss);
            cur--;
        }
        REP(i,0,2*N) {lazy.pb(neutl);}
    }
    
    void prop(ll c) //how lazy values propagate
    {
        p[c]=upval(c);
        lazy[2*c]=lazy[c]&lazy[2*c]; lazy[2*c+1]=lazy[c]&lazy[2*c+1];
        lazy[c]=neutl;
    }
    
    SV query(ll a,ll b, ll c=1LL) //range [a,b], current node. initially: query(a,b)
    {
        ll x=range[c].ff; ll y=range[c].ss;
        if(y<a || x>b) {return neuts;}
        if(x>=a && y<=b) {return upval(c);}
        prop(c);
        SV ans = query(a,b,2*c)&query(a,b,2*c+1);
        return ans;
    }
    
    void update(LV s, ll a, ll b, ll c=1LL) //update LV, range [a,b], current node, current range. initially: update(s,a,b)
    {
        ll x=range[c].ff; ll y=range[c].ss;
        if(y<a || x>b) {return ;}
        if(x>=a && y<=b) 
        {
            lazy[c]=s&lazy[c]; 
            return;
        }
		lazy[2*c]=lazy[c]&lazy[2*c]; lazy[2*c+1]=lazy[c]&lazy[2*c+1]; lazy[c]=neutl;
        update(s,a,b,2*c); update(s,a,b,2*c+1);
        p[c]=upval(2*c)&upval(2*c+1);
    }
};

class ST2
{
    public:
    ll N;
    
    class SV //seg value
    {
        public:
        ll a; 
        SV() {a=0LL;}
        SV(ll x) {a=x;}
        
        SV operator & (SV X) {SV ANS(a+X.a); return ANS;}
    };
    
    SV neuts; 
    
    vector<SV> p;
    vector<pl> range;
    
    ST2() {N=0LL;}
    ST2(vector<ll> arr)
    {
        N = (ll) 1<<(ll) ceil(log2(arr.size()));
        REP(i,0,2*N) {range.pb(mp(0LL,0LL));}
        REP(i,0,N) {p.pb(neuts);}
        REP(i,0,arr.size()) {SV X(arr[i]); p.pb(X); range[i+N]=mp(i,i);}
        REP(i,arr.size(),N) {p.pb(neuts); range[i+N]=mp(i,i);}
        ll cur = N-1;
        while(cur>0)
        {
            p[cur]=p[2*cur]&p[2*cur+1];
            range[cur]=mp(range[2*cur].ff,range[2*cur+1].ss);
            cur--;
		}
	}
    
    SV query(ll a,ll b, ll c=1LL) //range [a,b], current node. initially: query(a,b)
    {
        ll x=range[c].ff; ll y=range[c].ss;
        if(y<a || x>b) {return neuts;}
        if(x>=a && y<=b) {return p[c];}
        SV ans = query(a,b,2*c)&query(a,b,2*c+1);
        return ans;
    }
    
    void update(SV s, ll a, ll b, ll c=1LL) //update LV, range [a,b], current node, current range. initially: update(s,a,b)
    {
        ll x=range[c].ff; ll y=range[c].ss;
        if(y<a || x>b) {return ;}
        if(x>=a && y<=b) 
        {
            p[c]=s&p[c];
            return;
        }
        update(s,a,b,2*c); update(s,a,b,2*c+1);
        p[c]=p[2*c]&p[2*c+1];
    }
};

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    ll N,M,Q; cin>>N>>M>>Q;
	vector<vector<ll> >  que;
	ll type;
	vector<ll> xx; REP(i,0,N) {xx.pb(0);}
	ST CUR(xx); ST TOT(xx); //CURsize, TOTsize
	vector<vector<pl> > stall_query; //each stall query is {time,position}, position ignores removes
	vector<pl> xxx; REP(i,0,N) {stall_query.pb(xxx);}
	REP(q,0,Q)
	{
		cin>>type; vector<ll> toadd;
		if(type==1) 
		{
			In(toadd,4); toadd[0]--; toadd[1]--; 
			CUR.update((pl){0LL,toadd[3]},toadd[0],toadd[1]);
			TOT.update((pl){0LL,toadd[3]},toadd[0],toadd[1]);
		}
		else if(type==2)
		{
			In(toadd,3); toadd[0]--; toadd[1]--; 
			CUR.update((pl) {0LL,-toadd[2]},toadd[0],toadd[1]);
		}
		else 
		{
			In(toadd,2); toadd[0]--; 
			ll cursize = CUR.query(toadd[0],toadd[0]).a; 
			ll totalsize = TOT.query(toadd[0],toadd[0]).a;
			ll ind;
			if(cursize<toadd[1]) {ind=-1;}
			else {ind = totalsize-cursize+toadd[1]-1LL;}
			stall_query[toadd[0]].pb(mp(q,ind));
		}
		que.pb(toadd);
	}
	vector<vector<ll> > beg,end; vector<ll> xxxx; REP(i,0,N) {beg.pb(xxxx); end.pb(xxxx);}
	REP(q,0,Q)
	{
		if(que[q].size()==4) {beg[que[q][0]].pb(q); end[que[q][1]].pb(q);}
	}
	vector<pl> ans;
	xx.clear(); REP(i,0,Q) {xx.pb(0LL);}
	ST2 S(xx); ll ind;
	REP(i,0,N)
	{
		REP(j,0,beg[i].size()) 
		{
			ind=beg[i][j];
			S.update(que[ind][3],ind,ind);
		}
		REP(j,0,stall_query[i].size()) 
		{
			ind = stall_query[i][j].ss;
			ll t = stall_query[i][j].ff;
			if(ind==-1) {ans.pb({t,0LL}); continue;}
			ll lo=0LL,hi=Q-1LL;
			while(lo<hi)
			{
				ll mid = (lo+hi)/2LL;
				if(S.query(0LL,mid).a>=ind+1) {hi=mid;} else {lo=mid+1;}
			}
			ans.pb({t,que[lo][2]});
		}
		REP(j,0,end[i].size()) 
		{
			ind=end[i][j];
			S.update(-que[ind][3],ind,ind);
		}
	}
	sort(whole(ans));
	REP(i,0,ans.size()) {cout<<ans[i].ss<<endl;}
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 972 KB Output is correct
2 Correct 6 ms 1100 KB Output is correct
3 Correct 6 ms 972 KB Output is correct
4 Correct 6 ms 1100 KB Output is correct
5 Correct 3 ms 588 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 6 ms 1100 KB Output is correct
8 Correct 7 ms 1100 KB Output is correct
9 Correct 5 ms 1100 KB Output is correct
10 Correct 5 ms 1164 KB Output is correct
11 Correct 5 ms 1100 KB Output is correct
12 Correct 5 ms 1100 KB Output is correct
13 Correct 4 ms 972 KB Output is correct
14 Correct 5 ms 1052 KB Output is correct
15 Correct 4 ms 972 KB Output is correct
16 Correct 6 ms 1152 KB Output is correct
17 Correct 4 ms 972 KB Output is correct
18 Correct 5 ms 1100 KB Output is correct
19 Correct 5 ms 1100 KB Output is correct
20 Correct 5 ms 1228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 972 KB Output is correct
2 Correct 6 ms 1100 KB Output is correct
3 Correct 6 ms 972 KB Output is correct
4 Correct 6 ms 1100 KB Output is correct
5 Correct 3 ms 588 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 6 ms 1100 KB Output is correct
8 Correct 7 ms 1100 KB Output is correct
9 Correct 5 ms 1100 KB Output is correct
10 Correct 5 ms 1164 KB Output is correct
11 Correct 5 ms 1100 KB Output is correct
12 Correct 5 ms 1100 KB Output is correct
13 Correct 4 ms 972 KB Output is correct
14 Correct 5 ms 1052 KB Output is correct
15 Correct 4 ms 972 KB Output is correct
16 Correct 6 ms 1152 KB Output is correct
17 Correct 4 ms 972 KB Output is correct
18 Correct 5 ms 1100 KB Output is correct
19 Correct 5 ms 1100 KB Output is correct
20 Correct 5 ms 1228 KB Output is correct
21 Correct 5 ms 1100 KB Output is correct
22 Correct 6 ms 1100 KB Output is correct
23 Correct 7 ms 1032 KB Output is correct
24 Correct 6 ms 1280 KB Output is correct
25 Correct 3 ms 584 KB Output is correct
26 Correct 3 ms 588 KB Output is correct
27 Correct 7 ms 1100 KB Output is correct
28 Correct 6 ms 1100 KB Output is correct
29 Correct 5 ms 1104 KB Output is correct
30 Correct 6 ms 1100 KB Output is correct
31 Correct 5 ms 1100 KB Output is correct
32 Correct 6 ms 1164 KB Output is correct
33 Correct 4 ms 1100 KB Output is correct
34 Correct 5 ms 1100 KB Output is correct
35 Correct 5 ms 1080 KB Output is correct
36 Correct 5 ms 1100 KB Output is correct
37 Correct 4 ms 1100 KB Output is correct
38 Correct 5 ms 1228 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 231 ms 27320 KB Output is correct
2 Correct 281 ms 27764 KB Output is correct
3 Correct 239 ms 27220 KB Output is correct
4 Correct 240 ms 27200 KB Output is correct
5 Correct 268 ms 27752 KB Output is correct
6 Correct 298 ms 27724 KB Output is correct
7 Correct 91 ms 10408 KB Output is correct
8 Correct 101 ms 10548 KB Output is correct
9 Correct 232 ms 27260 KB Output is correct
10 Correct 231 ms 27212 KB Output is correct
11 Correct 221 ms 27212 KB Output is correct
12 Correct 236 ms 27304 KB Output is correct
13 Correct 225 ms 25908 KB Output is correct
14 Correct 266 ms 27784 KB Output is correct
15 Correct 243 ms 27316 KB Output is correct
16 Correct 275 ms 28612 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1083 ms 103508 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 972 KB Output is correct
2 Correct 6 ms 1100 KB Output is correct
3 Correct 6 ms 972 KB Output is correct
4 Correct 6 ms 1100 KB Output is correct
5 Correct 3 ms 588 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 6 ms 1100 KB Output is correct
8 Correct 7 ms 1100 KB Output is correct
9 Correct 5 ms 1100 KB Output is correct
10 Correct 5 ms 1164 KB Output is correct
11 Correct 5 ms 1100 KB Output is correct
12 Correct 5 ms 1100 KB Output is correct
13 Correct 4 ms 972 KB Output is correct
14 Correct 5 ms 1052 KB Output is correct
15 Correct 4 ms 972 KB Output is correct
16 Correct 6 ms 1152 KB Output is correct
17 Correct 4 ms 972 KB Output is correct
18 Correct 5 ms 1100 KB Output is correct
19 Correct 5 ms 1100 KB Output is correct
20 Correct 5 ms 1228 KB Output is correct
21 Correct 231 ms 27320 KB Output is correct
22 Correct 281 ms 27764 KB Output is correct
23 Correct 239 ms 27220 KB Output is correct
24 Correct 240 ms 27200 KB Output is correct
25 Correct 268 ms 27752 KB Output is correct
26 Correct 298 ms 27724 KB Output is correct
27 Correct 91 ms 10408 KB Output is correct
28 Correct 101 ms 10548 KB Output is correct
29 Correct 232 ms 27260 KB Output is correct
30 Correct 231 ms 27212 KB Output is correct
31 Correct 221 ms 27212 KB Output is correct
32 Correct 236 ms 27304 KB Output is correct
33 Correct 225 ms 25908 KB Output is correct
34 Correct 266 ms 27784 KB Output is correct
35 Correct 243 ms 27316 KB Output is correct
36 Correct 275 ms 28612 KB Output is correct
37 Correct 273 ms 25992 KB Output is correct
38 Correct 248 ms 25676 KB Output is correct
39 Correct 84 ms 9708 KB Output is correct
40 Correct 100 ms 10408 KB Output is correct
41 Correct 344 ms 27068 KB Output is correct
42 Correct 327 ms 27072 KB Output is correct
43 Correct 410 ms 27016 KB Output is correct
44 Correct 317 ms 26972 KB Output is correct
45 Correct 365 ms 26988 KB Output is correct
46 Correct 371 ms 27032 KB Output is correct
47 Correct 239 ms 26364 KB Output is correct
48 Correct 365 ms 26568 KB Output is correct
49 Correct 210 ms 23816 KB Output is correct
50 Correct 283 ms 25948 KB Output is correct
51 Correct 406 ms 27056 KB Output is correct
52 Correct 331 ms 27000 KB Output is correct
53 Correct 213 ms 26340 KB Output is correct
54 Correct 341 ms 28620 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 420 ms 27524 KB Output is correct
2 Correct 483 ms 27892 KB Output is correct
3 Correct 453 ms 28604 KB Output is correct
4 Correct 309 ms 25840 KB Output is correct
5 Correct 354 ms 27248 KB Output is correct
6 Correct 484 ms 28484 KB Output is correct
7 Correct 167 ms 11240 KB Output is correct
8 Correct 149 ms 10872 KB Output is correct
9 Correct 322 ms 27564 KB Output is correct
10 Correct 294 ms 24776 KB Output is correct
11 Correct 361 ms 27868 KB Output is correct
12 Correct 399 ms 27844 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 972 KB Output is correct
2 Correct 6 ms 1100 KB Output is correct
3 Correct 6 ms 972 KB Output is correct
4 Correct 6 ms 1100 KB Output is correct
5 Correct 3 ms 588 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 6 ms 1100 KB Output is correct
8 Correct 7 ms 1100 KB Output is correct
9 Correct 5 ms 1100 KB Output is correct
10 Correct 5 ms 1164 KB Output is correct
11 Correct 5 ms 1100 KB Output is correct
12 Correct 5 ms 1100 KB Output is correct
13 Correct 4 ms 972 KB Output is correct
14 Correct 5 ms 1052 KB Output is correct
15 Correct 4 ms 972 KB Output is correct
16 Correct 6 ms 1152 KB Output is correct
17 Correct 4 ms 972 KB Output is correct
18 Correct 5 ms 1100 KB Output is correct
19 Correct 5 ms 1100 KB Output is correct
20 Correct 5 ms 1228 KB Output is correct
21 Correct 5 ms 1100 KB Output is correct
22 Correct 6 ms 1100 KB Output is correct
23 Correct 7 ms 1032 KB Output is correct
24 Correct 6 ms 1280 KB Output is correct
25 Correct 3 ms 584 KB Output is correct
26 Correct 3 ms 588 KB Output is correct
27 Correct 7 ms 1100 KB Output is correct
28 Correct 6 ms 1100 KB Output is correct
29 Correct 5 ms 1104 KB Output is correct
30 Correct 6 ms 1100 KB Output is correct
31 Correct 5 ms 1100 KB Output is correct
32 Correct 6 ms 1164 KB Output is correct
33 Correct 4 ms 1100 KB Output is correct
34 Correct 5 ms 1100 KB Output is correct
35 Correct 5 ms 1080 KB Output is correct
36 Correct 5 ms 1100 KB Output is correct
37 Correct 4 ms 1100 KB Output is correct
38 Correct 5 ms 1228 KB Output is correct
39 Correct 231 ms 27320 KB Output is correct
40 Correct 281 ms 27764 KB Output is correct
41 Correct 239 ms 27220 KB Output is correct
42 Correct 240 ms 27200 KB Output is correct
43 Correct 268 ms 27752 KB Output is correct
44 Correct 298 ms 27724 KB Output is correct
45 Correct 91 ms 10408 KB Output is correct
46 Correct 101 ms 10548 KB Output is correct
47 Correct 232 ms 27260 KB Output is correct
48 Correct 231 ms 27212 KB Output is correct
49 Correct 221 ms 27212 KB Output is correct
50 Correct 236 ms 27304 KB Output is correct
51 Correct 225 ms 25908 KB Output is correct
52 Correct 266 ms 27784 KB Output is correct
53 Correct 243 ms 27316 KB Output is correct
54 Correct 275 ms 28612 KB Output is correct
55 Correct 273 ms 25992 KB Output is correct
56 Correct 248 ms 25676 KB Output is correct
57 Correct 84 ms 9708 KB Output is correct
58 Correct 100 ms 10408 KB Output is correct
59 Correct 344 ms 27068 KB Output is correct
60 Correct 327 ms 27072 KB Output is correct
61 Correct 410 ms 27016 KB Output is correct
62 Correct 317 ms 26972 KB Output is correct
63 Correct 365 ms 26988 KB Output is correct
64 Correct 371 ms 27032 KB Output is correct
65 Correct 239 ms 26364 KB Output is correct
66 Correct 365 ms 26568 KB Output is correct
67 Correct 210 ms 23816 KB Output is correct
68 Correct 283 ms 25948 KB Output is correct
69 Correct 406 ms 27056 KB Output is correct
70 Correct 331 ms 27000 KB Output is correct
71 Correct 213 ms 26340 KB Output is correct
72 Correct 341 ms 28620 KB Output is correct
73 Correct 420 ms 27524 KB Output is correct
74 Correct 483 ms 27892 KB Output is correct
75 Correct 453 ms 28604 KB Output is correct
76 Correct 309 ms 25840 KB Output is correct
77 Correct 354 ms 27248 KB Output is correct
78 Correct 484 ms 28484 KB Output is correct
79 Correct 167 ms 11240 KB Output is correct
80 Correct 149 ms 10872 KB Output is correct
81 Correct 322 ms 27564 KB Output is correct
82 Correct 294 ms 24776 KB Output is correct
83 Correct 361 ms 27868 KB Output is correct
84 Correct 399 ms 27844 KB Output is correct
85 Correct 316 ms 26084 KB Output is correct
86 Correct 311 ms 27756 KB Output is correct
87 Correct 334 ms 26860 KB Output is correct
88 Correct 334 ms 28060 KB Output is correct
89 Correct 191 ms 24364 KB Output is correct
90 Correct 349 ms 27708 KB Output is correct
91 Correct 233 ms 24984 KB Output is correct
92 Correct 214 ms 24668 KB Output is correct
93 Correct 308 ms 27572 KB Output is correct
94 Correct 331 ms 27576 KB Output is correct
95 Correct 292 ms 27188 KB Output is correct
96 Correct 322 ms 27580 KB Output is correct
97 Correct 298 ms 27480 KB Output is correct
98 Correct 250 ms 25420 KB Output is correct
99 Correct 213 ms 26880 KB Output is correct
100 Correct 273 ms 25372 KB Output is correct
101 Correct 266 ms 27024 KB Output is correct
102 Correct 236 ms 28868 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 972 KB Output is correct
2 Correct 6 ms 1100 KB Output is correct
3 Correct 6 ms 972 KB Output is correct
4 Correct 6 ms 1100 KB Output is correct
5 Correct 3 ms 588 KB Output is correct
6 Correct 3 ms 588 KB Output is correct
7 Correct 6 ms 1100 KB Output is correct
8 Correct 7 ms 1100 KB Output is correct
9 Correct 5 ms 1100 KB Output is correct
10 Correct 5 ms 1164 KB Output is correct
11 Correct 5 ms 1100 KB Output is correct
12 Correct 5 ms 1100 KB Output is correct
13 Correct 4 ms 972 KB Output is correct
14 Correct 5 ms 1052 KB Output is correct
15 Correct 4 ms 972 KB Output is correct
16 Correct 6 ms 1152 KB Output is correct
17 Correct 4 ms 972 KB Output is correct
18 Correct 5 ms 1100 KB Output is correct
19 Correct 5 ms 1100 KB Output is correct
20 Correct 5 ms 1228 KB Output is correct
21 Correct 5 ms 1100 KB Output is correct
22 Correct 6 ms 1100 KB Output is correct
23 Correct 7 ms 1032 KB Output is correct
24 Correct 6 ms 1280 KB Output is correct
25 Correct 3 ms 584 KB Output is correct
26 Correct 3 ms 588 KB Output is correct
27 Correct 7 ms 1100 KB Output is correct
28 Correct 6 ms 1100 KB Output is correct
29 Correct 5 ms 1104 KB Output is correct
30 Correct 6 ms 1100 KB Output is correct
31 Correct 5 ms 1100 KB Output is correct
32 Correct 6 ms 1164 KB Output is correct
33 Correct 4 ms 1100 KB Output is correct
34 Correct 5 ms 1100 KB Output is correct
35 Correct 5 ms 1080 KB Output is correct
36 Correct 5 ms 1100 KB Output is correct
37 Correct 4 ms 1100 KB Output is correct
38 Correct 5 ms 1228 KB Output is correct
39 Correct 231 ms 27320 KB Output is correct
40 Correct 281 ms 27764 KB Output is correct
41 Correct 239 ms 27220 KB Output is correct
42 Correct 240 ms 27200 KB Output is correct
43 Correct 268 ms 27752 KB Output is correct
44 Correct 298 ms 27724 KB Output is correct
45 Correct 91 ms 10408 KB Output is correct
46 Correct 101 ms 10548 KB Output is correct
47 Correct 232 ms 27260 KB Output is correct
48 Correct 231 ms 27212 KB Output is correct
49 Correct 221 ms 27212 KB Output is correct
50 Correct 236 ms 27304 KB Output is correct
51 Correct 225 ms 25908 KB Output is correct
52 Correct 266 ms 27784 KB Output is correct
53 Correct 243 ms 27316 KB Output is correct
54 Correct 275 ms 28612 KB Output is correct
55 Execution timed out 1083 ms 103508 KB Time limit exceeded
56 Halted 0 ms 0 KB -