답안 #387456

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
387456 2021-04-08T12:33:13 Z nathanlee726 푸드 코트 (JOI21_foodcourt) C++14
100 / 100
539 ms 51444 KB
//#include<i_am_noob_orz>
#include<bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define int ll
#define ull unsigned long long
#define pii pair<int,int>
#define X first
#define Y second
#define mod ((ll)1e9+7)
#define pb push_back
#define mp make_pair
#define abs(x) ((x)>0?(x):(-(x)))
#define F(n) Fi(i,n)
#define Fi(i,n) Fl(i,0,n)
#define Fl(i,l,n) for(int i=l;i<n;i++)
#define memres(a) memset(a,0,sizeof(a))
#define all(a) a.begin(),a.end()
#define sz(a) ((int)a.size())
#define ceiling(a,b) (((a)+(b)-1)/(b))
#define endl '\n'
#define bit_count(x) __builtin_popcountll((x))
#define ykh mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define jimmy_is_kind false
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> rbtree;
 
//#define LOCAL
#ifdef LOCAL
#define bug(...) cerr<<"#"<<__LINE__<<' '<<#__VA_ARGS__<<"- ", _do(__VA_ARGS__)
template<typename T> void _do(T && x) {cerr<<x<<endl;}
template<typename T, typename ...S> void _do(T && x, S&&...y) {cerr<<x<<", "; _do(y...);}
#define IOS()
#else
#define IOS() ios_base::sync_with_stdio(0), cin.tie(0)
#define endl '\n'
#define bug(...)
#endif
 
int add(int a,int b){return(a+b>=mod?a+b-mod:a+b);}
int sub(int a,int b){return(a<b?a+mod-b:a-b);}
int po(int a,int b){
	if(b==0)return 1;
	if(b==1)return(a%mod);
	int tem=po(a,b/2);
	if(b&1)return(((tem*tem)%mod)*a)%mod;
	else return(tem*tem)%mod; 
}
int GCD(int a,int b){
	int x=0;
	int ra,rb;
	while(a&&b){
		if(((a&1)==0)&&((b&1)==0)){
			a>>=1,b>>=1,x++;
		}
		else if((a^b)&1){
			if(a&1)b>>=1;
			else a>>=1;
		}
		else{
			ra=abs(a-b),rb=min(a,b);
			a=ra,b=rb;
		}
	}
	return max(a,b)<<x;
}
int gcd(int a,int b){if(b==0)return a;return gcd(b,a%b);}
int n,m,q,balbit[250010],a[250010];
vector<pair<pii,int> > v1,v2;
vector<pii> o;
void ADD(int x,int v){
	for(;x<=250001;x+=(x&(-x)))balbit[x]+=v;
}
int QRY(int x){
	int re=0;
	for(;x>0;x-=(x&(-x)))re+=balbit[x];
	return re;
}
struct seg_tree1{
	struct NODE{
		int v;
		pii tg;
		NODE():tg({0,0}),v(0){}
	}seg[1000010];
	pii merge(pii p1,pii p2){
		if(p1.Y<p2.X){
			return {p1.X+p2.X-p1.Y,p2.Y};
		}
		else return {p1.X,p1.Y-p2.X+p2.Y};
	}
	void push(int p){
		seg[p*2].tg=merge(seg[p*2].tg,seg[p].tg);
		seg[p*2].v=max(seg[p].tg.Y,seg[p].tg.Y-seg[p].tg.X+seg[p*2].v);
		seg[p*2+1].tg=merge(seg[p*2+1].tg,seg[p].tg);
		seg[p*2+1].v=max(seg[p].tg.Y,seg[p].tg.Y-seg[p].tg.X+seg[p*2+1].v);
		seg[p].tg={0,0};
	}
	void modify(int p,int l,int r,int ql,int qr,pii vl){
		if(l>qr||r<ql)return;
		if(l>=ql&&r<=qr){
			seg[p].v=max(vl.Y,seg[p].v-vl.X+vl.Y);
			seg[p].tg=merge(seg[p].tg,vl);
			return;
		}
		int mi=(l+r)/2;
		push(p);
		modify(p*2,l,mi,ql,qr,vl);
		modify(p*2+1,mi+1,r,ql,qr,vl);
	}
	int qry(int p,int l,int r,int x){
		if(l==r){
			return seg[p].v;
		}
		push(p);
		int mi=(l+r)/2;
		if(mi>=x)return qry(p*2,l,mi,x);
		else return qry(p*2+1,mi+1,r,x);
	}
}sgt;
struct seg_tree2{
	int seg[1000010];
	void add(int p,int l,int r,int x,int vl){
		if(l==r){
			seg[p]+=vl;
			return;
		}
		int mi=(l+r)/2;
		if(mi>=x)add(p*2,l,mi,x,vl);
		else add(p*2+1,mi+1,r,x,vl);
		seg[p]=seg[p*2]+seg[p*2+1];
	}
	int qry(int vl){
		int l=0,r=q-1,p=1,re;
		bug(vl);
		while(1){
			if(l==r){
				if(vl>seg[p])re=-1;
				else re=l;
				break;
			}
			int mi=(l+r)/2;
			bug(seg[p*2],vl);
			if(seg[p*2]>=vl)r=mi,p=p*2;
			else vl-=seg[p*2],l=mi+1,p=p*2+1;
		}
		return re;
	}
}sgt2;
signed main(){
	IOS();
	cin>>n>>m>>q;
	F(q){
		int ty;
		cin>>ty;
		if(ty==1){
			int l,r,c,k;
			cin>>l>>r>>c>>k;
			--l,--r;
			a[i]=c;
			v1.pb({{l,k},i});
			v1.pb({{r+1,-k},i});
			sgt.modify(1,0,n-1,l,r,{0,k});
			ADD(l+1,k);
			ADD(r+2,-k);
		} 
		else if(ty==2){
			int l,r,k;
			cin>>l>>r>>k;
			--l,--r;
			sgt.modify(1,0,n-1,l,r,{k,0});
		}
		else{
			int x,y;
			cin>>x>>y;
			--x;
			int tem=sgt.qry(1,0,n-1,x),temm=QRY(x+1);
			bug(temm,tem,y); 
			if(tem<y)v2.pb({{-1,-1},i});
			else v2.pb({{x,temm-tem+y},i});
		}
	}
	sort(all(v1));
	sort(all(v2));
	int p=0;
	for(auto pi:v2){
		if(pi.X.X==-1){
			o.pb({pi.Y,-1});
			continue;
		}
		while(p<sz(v1)&&v1[p].X.X<=pi.X.X){
			sgt2.add(1,0,q-1,v1[p].Y,v1[p].X.Y);
			p++;
		}
		int re=sgt2.qry(pi.X.Y);
		if(re>pi.Y)re=-1;
		bug(re);
		o.pb({pi.Y,re});
	}
	sort(all(o));
	for(pii x:o)cout<<(x.Y==-1?0:a[x.Y])<<endl;
	return 0;
}

Compilation message

foodcourt.cpp: In constructor 'seg_tree1::NODE::NODE()':
foodcourt.cpp:84:7: warning: 'seg_tree1::NODE::tg' will be initialized after [-Wreorder]
   84 |   pii tg;
      |       ^~
foodcourt.cpp:83:7: warning:   'long long int seg_tree1::NODE::v' [-Wreorder]
   83 |   int v;
      |       ^
foodcourt.cpp:85:3: warning:   when initialized here [-Wreorder]
   85 |   NODE():tg({0,0}),v(0){}
      |   ^~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 24044 KB Output is correct
2 Correct 17 ms 24044 KB Output is correct
3 Correct 16 ms 24044 KB Output is correct
4 Correct 17 ms 24044 KB Output is correct
5 Correct 21 ms 24044 KB Output is correct
6 Correct 15 ms 24044 KB Output is correct
7 Correct 17 ms 24044 KB Output is correct
8 Correct 16 ms 24044 KB Output is correct
9 Correct 15 ms 24044 KB Output is correct
10 Correct 17 ms 24044 KB Output is correct
11 Correct 18 ms 24044 KB Output is correct
12 Correct 17 ms 24044 KB Output is correct
13 Correct 16 ms 24044 KB Output is correct
14 Correct 17 ms 24044 KB Output is correct
15 Correct 16 ms 24044 KB Output is correct
16 Correct 18 ms 24044 KB Output is correct
17 Correct 16 ms 24044 KB Output is correct
18 Correct 17 ms 24044 KB Output is correct
19 Correct 18 ms 24172 KB Output is correct
20 Correct 17 ms 24172 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 24044 KB Output is correct
2 Correct 17 ms 24044 KB Output is correct
3 Correct 16 ms 24044 KB Output is correct
4 Correct 17 ms 24044 KB Output is correct
5 Correct 21 ms 24044 KB Output is correct
6 Correct 15 ms 24044 KB Output is correct
7 Correct 17 ms 24044 KB Output is correct
8 Correct 16 ms 24044 KB Output is correct
9 Correct 15 ms 24044 KB Output is correct
10 Correct 17 ms 24044 KB Output is correct
11 Correct 18 ms 24044 KB Output is correct
12 Correct 17 ms 24044 KB Output is correct
13 Correct 16 ms 24044 KB Output is correct
14 Correct 17 ms 24044 KB Output is correct
15 Correct 16 ms 24044 KB Output is correct
16 Correct 18 ms 24044 KB Output is correct
17 Correct 16 ms 24044 KB Output is correct
18 Correct 17 ms 24044 KB Output is correct
19 Correct 18 ms 24172 KB Output is correct
20 Correct 17 ms 24172 KB Output is correct
21 Correct 17 ms 24044 KB Output is correct
22 Correct 17 ms 24044 KB Output is correct
23 Correct 16 ms 24044 KB Output is correct
24 Correct 18 ms 24044 KB Output is correct
25 Correct 18 ms 24044 KB Output is correct
26 Correct 16 ms 24044 KB Output is correct
27 Correct 17 ms 24044 KB Output is correct
28 Correct 19 ms 24112 KB Output is correct
29 Correct 17 ms 24044 KB Output is correct
30 Correct 18 ms 24036 KB Output is correct
31 Correct 17 ms 24044 KB Output is correct
32 Correct 19 ms 24044 KB Output is correct
33 Correct 17 ms 24044 KB Output is correct
34 Correct 16 ms 24044 KB Output is correct
35 Correct 17 ms 24044 KB Output is correct
36 Correct 17 ms 24044 KB Output is correct
37 Correct 16 ms 24044 KB Output is correct
38 Correct 17 ms 24172 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 108 ms 29524 KB Output is correct
2 Correct 97 ms 29680 KB Output is correct
3 Correct 95 ms 29528 KB Output is correct
4 Correct 93 ms 29464 KB Output is correct
5 Correct 99 ms 29704 KB Output is correct
6 Correct 98 ms 29668 KB Output is correct
7 Correct 48 ms 28448 KB Output is correct
8 Correct 50 ms 28452 KB Output is correct
9 Correct 102 ms 29204 KB Output is correct
10 Correct 94 ms 29328 KB Output is correct
11 Correct 95 ms 29200 KB Output is correct
12 Correct 98 ms 29344 KB Output is correct
13 Correct 95 ms 29728 KB Output is correct
14 Correct 95 ms 30364 KB Output is correct
15 Correct 104 ms 30344 KB Output is correct
16 Correct 109 ms 30580 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 452 ms 46084 KB Output is correct
2 Correct 349 ms 41688 KB Output is correct
3 Correct 496 ms 47372 KB Output is correct
4 Correct 393 ms 43392 KB Output is correct
5 Correct 380 ms 43156 KB Output is correct
6 Correct 539 ms 48016 KB Output is correct
7 Correct 179 ms 44560 KB Output is correct
8 Correct 188 ms 43896 KB Output is correct
9 Correct 513 ms 50704 KB Output is correct
10 Correct 496 ms 50776 KB Output is correct
11 Correct 463 ms 43536 KB Output is correct
12 Correct 479 ms 46464 KB Output is correct
13 Correct 468 ms 43776 KB Output is correct
14 Correct 492 ms 46752 KB Output is correct
15 Correct 502 ms 46488 KB Output is correct
16 Correct 501 ms 46352 KB Output is correct
17 Correct 505 ms 46512 KB Output is correct
18 Correct 482 ms 45076 KB Output is correct
19 Correct 497 ms 46608 KB Output is correct
20 Correct 503 ms 45200 KB Output is correct
21 Correct 493 ms 46352 KB Output is correct
22 Correct 495 ms 46480 KB Output is correct
23 Correct 502 ms 46484 KB Output is correct
24 Correct 515 ms 46352 KB Output is correct
25 Correct 412 ms 44884 KB Output is correct
26 Correct 436 ms 45148 KB Output is correct
27 Correct 400 ms 48864 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 24044 KB Output is correct
2 Correct 17 ms 24044 KB Output is correct
3 Correct 16 ms 24044 KB Output is correct
4 Correct 17 ms 24044 KB Output is correct
5 Correct 21 ms 24044 KB Output is correct
6 Correct 15 ms 24044 KB Output is correct
7 Correct 17 ms 24044 KB Output is correct
8 Correct 16 ms 24044 KB Output is correct
9 Correct 15 ms 24044 KB Output is correct
10 Correct 17 ms 24044 KB Output is correct
11 Correct 18 ms 24044 KB Output is correct
12 Correct 17 ms 24044 KB Output is correct
13 Correct 16 ms 24044 KB Output is correct
14 Correct 17 ms 24044 KB Output is correct
15 Correct 16 ms 24044 KB Output is correct
16 Correct 18 ms 24044 KB Output is correct
17 Correct 16 ms 24044 KB Output is correct
18 Correct 17 ms 24044 KB Output is correct
19 Correct 18 ms 24172 KB Output is correct
20 Correct 17 ms 24172 KB Output is correct
21 Correct 108 ms 29524 KB Output is correct
22 Correct 97 ms 29680 KB Output is correct
23 Correct 95 ms 29528 KB Output is correct
24 Correct 93 ms 29464 KB Output is correct
25 Correct 99 ms 29704 KB Output is correct
26 Correct 98 ms 29668 KB Output is correct
27 Correct 48 ms 28448 KB Output is correct
28 Correct 50 ms 28452 KB Output is correct
29 Correct 102 ms 29204 KB Output is correct
30 Correct 94 ms 29328 KB Output is correct
31 Correct 95 ms 29200 KB Output is correct
32 Correct 98 ms 29344 KB Output is correct
33 Correct 95 ms 29728 KB Output is correct
34 Correct 95 ms 30364 KB Output is correct
35 Correct 104 ms 30344 KB Output is correct
36 Correct 109 ms 30580 KB Output is correct
37 Correct 96 ms 29008 KB Output is correct
38 Correct 92 ms 28816 KB Output is correct
39 Correct 42 ms 27808 KB Output is correct
40 Correct 49 ms 28064 KB Output is correct
41 Correct 105 ms 28560 KB Output is correct
42 Correct 106 ms 29456 KB Output is correct
43 Correct 107 ms 29240 KB Output is correct
44 Correct 104 ms 28832 KB Output is correct
45 Correct 106 ms 29344 KB Output is correct
46 Correct 108 ms 29216 KB Output is correct
47 Correct 63 ms 28804 KB Output is correct
48 Correct 96 ms 28828 KB Output is correct
49 Correct 78 ms 28064 KB Output is correct
50 Correct 95 ms 28704 KB Output is correct
51 Correct 107 ms 29216 KB Output is correct
52 Correct 107 ms 29216 KB Output is correct
53 Correct 87 ms 29300 KB Output is correct
54 Correct 109 ms 30708 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 101 ms 30492 KB Output is correct
2 Correct 110 ms 30908 KB Output is correct
3 Correct 112 ms 31136 KB Output is correct
4 Correct 83 ms 29536 KB Output is correct
5 Correct 98 ms 30304 KB Output is correct
6 Correct 116 ms 31072 KB Output is correct
7 Correct 61 ms 29596 KB Output is correct
8 Correct 60 ms 29340 KB Output is correct
9 Correct 84 ms 30488 KB Output is correct
10 Correct 79 ms 29216 KB Output is correct
11 Correct 106 ms 30488 KB Output is correct
12 Correct 106 ms 30752 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 24044 KB Output is correct
2 Correct 17 ms 24044 KB Output is correct
3 Correct 16 ms 24044 KB Output is correct
4 Correct 17 ms 24044 KB Output is correct
5 Correct 21 ms 24044 KB Output is correct
6 Correct 15 ms 24044 KB Output is correct
7 Correct 17 ms 24044 KB Output is correct
8 Correct 16 ms 24044 KB Output is correct
9 Correct 15 ms 24044 KB Output is correct
10 Correct 17 ms 24044 KB Output is correct
11 Correct 18 ms 24044 KB Output is correct
12 Correct 17 ms 24044 KB Output is correct
13 Correct 16 ms 24044 KB Output is correct
14 Correct 17 ms 24044 KB Output is correct
15 Correct 16 ms 24044 KB Output is correct
16 Correct 18 ms 24044 KB Output is correct
17 Correct 16 ms 24044 KB Output is correct
18 Correct 17 ms 24044 KB Output is correct
19 Correct 18 ms 24172 KB Output is correct
20 Correct 17 ms 24172 KB Output is correct
21 Correct 17 ms 24044 KB Output is correct
22 Correct 17 ms 24044 KB Output is correct
23 Correct 16 ms 24044 KB Output is correct
24 Correct 18 ms 24044 KB Output is correct
25 Correct 18 ms 24044 KB Output is correct
26 Correct 16 ms 24044 KB Output is correct
27 Correct 17 ms 24044 KB Output is correct
28 Correct 19 ms 24112 KB Output is correct
29 Correct 17 ms 24044 KB Output is correct
30 Correct 18 ms 24036 KB Output is correct
31 Correct 17 ms 24044 KB Output is correct
32 Correct 19 ms 24044 KB Output is correct
33 Correct 17 ms 24044 KB Output is correct
34 Correct 16 ms 24044 KB Output is correct
35 Correct 17 ms 24044 KB Output is correct
36 Correct 17 ms 24044 KB Output is correct
37 Correct 16 ms 24044 KB Output is correct
38 Correct 17 ms 24172 KB Output is correct
39 Correct 108 ms 29524 KB Output is correct
40 Correct 97 ms 29680 KB Output is correct
41 Correct 95 ms 29528 KB Output is correct
42 Correct 93 ms 29464 KB Output is correct
43 Correct 99 ms 29704 KB Output is correct
44 Correct 98 ms 29668 KB Output is correct
45 Correct 48 ms 28448 KB Output is correct
46 Correct 50 ms 28452 KB Output is correct
47 Correct 102 ms 29204 KB Output is correct
48 Correct 94 ms 29328 KB Output is correct
49 Correct 95 ms 29200 KB Output is correct
50 Correct 98 ms 29344 KB Output is correct
51 Correct 95 ms 29728 KB Output is correct
52 Correct 95 ms 30364 KB Output is correct
53 Correct 104 ms 30344 KB Output is correct
54 Correct 109 ms 30580 KB Output is correct
55 Correct 96 ms 29008 KB Output is correct
56 Correct 92 ms 28816 KB Output is correct
57 Correct 42 ms 27808 KB Output is correct
58 Correct 49 ms 28064 KB Output is correct
59 Correct 105 ms 28560 KB Output is correct
60 Correct 106 ms 29456 KB Output is correct
61 Correct 107 ms 29240 KB Output is correct
62 Correct 104 ms 28832 KB Output is correct
63 Correct 106 ms 29344 KB Output is correct
64 Correct 108 ms 29216 KB Output is correct
65 Correct 63 ms 28804 KB Output is correct
66 Correct 96 ms 28828 KB Output is correct
67 Correct 78 ms 28064 KB Output is correct
68 Correct 95 ms 28704 KB Output is correct
69 Correct 107 ms 29216 KB Output is correct
70 Correct 107 ms 29216 KB Output is correct
71 Correct 87 ms 29300 KB Output is correct
72 Correct 109 ms 30708 KB Output is correct
73 Correct 101 ms 30492 KB Output is correct
74 Correct 110 ms 30908 KB Output is correct
75 Correct 112 ms 31136 KB Output is correct
76 Correct 83 ms 29536 KB Output is correct
77 Correct 98 ms 30304 KB Output is correct
78 Correct 116 ms 31072 KB Output is correct
79 Correct 61 ms 29596 KB Output is correct
80 Correct 60 ms 29340 KB Output is correct
81 Correct 84 ms 30488 KB Output is correct
82 Correct 79 ms 29216 KB Output is correct
83 Correct 106 ms 30488 KB Output is correct
84 Correct 106 ms 30752 KB Output is correct
85 Correct 103 ms 29528 KB Output is correct
86 Correct 113 ms 29984 KB Output is correct
87 Correct 105 ms 29584 KB Output is correct
88 Correct 117 ms 30224 KB Output is correct
89 Correct 74 ms 27668 KB Output is correct
90 Correct 109 ms 29712 KB Output is correct
91 Correct 98 ms 28968 KB Output is correct
92 Correct 92 ms 28708 KB Output is correct
93 Correct 119 ms 29700 KB Output is correct
94 Correct 111 ms 29728 KB Output is correct
95 Correct 110 ms 29600 KB Output is correct
96 Correct 121 ms 29728 KB Output is correct
97 Correct 113 ms 29728 KB Output is correct
98 Correct 99 ms 29140 KB Output is correct
99 Correct 69 ms 29600 KB Output is correct
100 Correct 88 ms 29116 KB Output is correct
101 Correct 104 ms 29400 KB Output is correct
102 Correct 102 ms 30428 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 16 ms 24044 KB Output is correct
2 Correct 17 ms 24044 KB Output is correct
3 Correct 16 ms 24044 KB Output is correct
4 Correct 17 ms 24044 KB Output is correct
5 Correct 21 ms 24044 KB Output is correct
6 Correct 15 ms 24044 KB Output is correct
7 Correct 17 ms 24044 KB Output is correct
8 Correct 16 ms 24044 KB Output is correct
9 Correct 15 ms 24044 KB Output is correct
10 Correct 17 ms 24044 KB Output is correct
11 Correct 18 ms 24044 KB Output is correct
12 Correct 17 ms 24044 KB Output is correct
13 Correct 16 ms 24044 KB Output is correct
14 Correct 17 ms 24044 KB Output is correct
15 Correct 16 ms 24044 KB Output is correct
16 Correct 18 ms 24044 KB Output is correct
17 Correct 16 ms 24044 KB Output is correct
18 Correct 17 ms 24044 KB Output is correct
19 Correct 18 ms 24172 KB Output is correct
20 Correct 17 ms 24172 KB Output is correct
21 Correct 17 ms 24044 KB Output is correct
22 Correct 17 ms 24044 KB Output is correct
23 Correct 16 ms 24044 KB Output is correct
24 Correct 18 ms 24044 KB Output is correct
25 Correct 18 ms 24044 KB Output is correct
26 Correct 16 ms 24044 KB Output is correct
27 Correct 17 ms 24044 KB Output is correct
28 Correct 19 ms 24112 KB Output is correct
29 Correct 17 ms 24044 KB Output is correct
30 Correct 18 ms 24036 KB Output is correct
31 Correct 17 ms 24044 KB Output is correct
32 Correct 19 ms 24044 KB Output is correct
33 Correct 17 ms 24044 KB Output is correct
34 Correct 16 ms 24044 KB Output is correct
35 Correct 17 ms 24044 KB Output is correct
36 Correct 17 ms 24044 KB Output is correct
37 Correct 16 ms 24044 KB Output is correct
38 Correct 17 ms 24172 KB Output is correct
39 Correct 108 ms 29524 KB Output is correct
40 Correct 97 ms 29680 KB Output is correct
41 Correct 95 ms 29528 KB Output is correct
42 Correct 93 ms 29464 KB Output is correct
43 Correct 99 ms 29704 KB Output is correct
44 Correct 98 ms 29668 KB Output is correct
45 Correct 48 ms 28448 KB Output is correct
46 Correct 50 ms 28452 KB Output is correct
47 Correct 102 ms 29204 KB Output is correct
48 Correct 94 ms 29328 KB Output is correct
49 Correct 95 ms 29200 KB Output is correct
50 Correct 98 ms 29344 KB Output is correct
51 Correct 95 ms 29728 KB Output is correct
52 Correct 95 ms 30364 KB Output is correct
53 Correct 104 ms 30344 KB Output is correct
54 Correct 109 ms 30580 KB Output is correct
55 Correct 452 ms 46084 KB Output is correct
56 Correct 349 ms 41688 KB Output is correct
57 Correct 496 ms 47372 KB Output is correct
58 Correct 393 ms 43392 KB Output is correct
59 Correct 380 ms 43156 KB Output is correct
60 Correct 539 ms 48016 KB Output is correct
61 Correct 179 ms 44560 KB Output is correct
62 Correct 188 ms 43896 KB Output is correct
63 Correct 513 ms 50704 KB Output is correct
64 Correct 496 ms 50776 KB Output is correct
65 Correct 463 ms 43536 KB Output is correct
66 Correct 479 ms 46464 KB Output is correct
67 Correct 468 ms 43776 KB Output is correct
68 Correct 492 ms 46752 KB Output is correct
69 Correct 502 ms 46488 KB Output is correct
70 Correct 501 ms 46352 KB Output is correct
71 Correct 505 ms 46512 KB Output is correct
72 Correct 482 ms 45076 KB Output is correct
73 Correct 497 ms 46608 KB Output is correct
74 Correct 503 ms 45200 KB Output is correct
75 Correct 493 ms 46352 KB Output is correct
76 Correct 495 ms 46480 KB Output is correct
77 Correct 502 ms 46484 KB Output is correct
78 Correct 515 ms 46352 KB Output is correct
79 Correct 412 ms 44884 KB Output is correct
80 Correct 436 ms 45148 KB Output is correct
81 Correct 400 ms 48864 KB Output is correct
82 Correct 96 ms 29008 KB Output is correct
83 Correct 92 ms 28816 KB Output is correct
84 Correct 42 ms 27808 KB Output is correct
85 Correct 49 ms 28064 KB Output is correct
86 Correct 105 ms 28560 KB Output is correct
87 Correct 106 ms 29456 KB Output is correct
88 Correct 107 ms 29240 KB Output is correct
89 Correct 104 ms 28832 KB Output is correct
90 Correct 106 ms 29344 KB Output is correct
91 Correct 108 ms 29216 KB Output is correct
92 Correct 63 ms 28804 KB Output is correct
93 Correct 96 ms 28828 KB Output is correct
94 Correct 78 ms 28064 KB Output is correct
95 Correct 95 ms 28704 KB Output is correct
96 Correct 107 ms 29216 KB Output is correct
97 Correct 107 ms 29216 KB Output is correct
98 Correct 87 ms 29300 KB Output is correct
99 Correct 109 ms 30708 KB Output is correct
100 Correct 101 ms 30492 KB Output is correct
101 Correct 110 ms 30908 KB Output is correct
102 Correct 112 ms 31136 KB Output is correct
103 Correct 83 ms 29536 KB Output is correct
104 Correct 98 ms 30304 KB Output is correct
105 Correct 116 ms 31072 KB Output is correct
106 Correct 61 ms 29596 KB Output is correct
107 Correct 60 ms 29340 KB Output is correct
108 Correct 84 ms 30488 KB Output is correct
109 Correct 79 ms 29216 KB Output is correct
110 Correct 106 ms 30488 KB Output is correct
111 Correct 106 ms 30752 KB Output is correct
112 Correct 103 ms 29528 KB Output is correct
113 Correct 113 ms 29984 KB Output is correct
114 Correct 105 ms 29584 KB Output is correct
115 Correct 117 ms 30224 KB Output is correct
116 Correct 74 ms 27668 KB Output is correct
117 Correct 109 ms 29712 KB Output is correct
118 Correct 98 ms 28968 KB Output is correct
119 Correct 92 ms 28708 KB Output is correct
120 Correct 119 ms 29700 KB Output is correct
121 Correct 111 ms 29728 KB Output is correct
122 Correct 110 ms 29600 KB Output is correct
123 Correct 121 ms 29728 KB Output is correct
124 Correct 113 ms 29728 KB Output is correct
125 Correct 99 ms 29140 KB Output is correct
126 Correct 69 ms 29600 KB Output is correct
127 Correct 88 ms 29116 KB Output is correct
128 Correct 104 ms 29400 KB Output is correct
129 Correct 102 ms 30428 KB Output is correct
130 Correct 505 ms 47528 KB Output is correct
131 Correct 346 ms 42552 KB Output is correct
132 Correct 497 ms 47424 KB Output is correct
133 Correct 500 ms 47376 KB Output is correct
134 Correct 440 ms 46080 KB Output is correct
135 Correct 518 ms 47504 KB Output is correct
136 Correct 510 ms 51344 KB Output is correct
137 Correct 511 ms 51444 KB Output is correct
138 Correct 474 ms 43264 KB Output is correct
139 Correct 491 ms 46464 KB Output is correct
140 Correct 483 ms 43904 KB Output is correct
141 Correct 499 ms 46468 KB Output is correct
142 Correct 511 ms 46236 KB Output is correct
143 Correct 507 ms 46224 KB Output is correct
144 Correct 496 ms 44944 KB Output is correct
145 Correct 504 ms 46356 KB Output is correct
146 Correct 492 ms 45312 KB Output is correct
147 Correct 515 ms 46464 KB Output is correct
148 Correct 508 ms 46224 KB Output is correct
149 Correct 509 ms 46224 KB Output is correct
150 Correct 258 ms 45448 KB Output is correct
151 Correct 404 ms 45700 KB Output is correct
152 Correct 421 ms 46756 KB Output is correct
153 Correct 401 ms 48848 KB Output is correct