#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ii pair<ll,ll>
#define fi first
#define se second
#define endl '\n'
#define puf push_front
#define pof pop_front
#define pub push_back
#define pob pop_back
#define lb lower_bound
#define ub upper_bound
#define rep(x,s,e) for (auto x=s-(s>e);x!=e-(s>e);s<e?x++:x--)
#define all(x) (x).begin(),(x).end()
#define sz(x) (int) (x).size()
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const ll INF=1e18;
struct node{
int s,e,m;
ll val=0,lazy=0;
node *l,*r;
node (int _s,int _e){
s=_s,e=_e,m=s+e>>1;
if (s!=e){
l=new node(s,m);
r=new node(m+1,e);
}
}
void propo(){
if (lazy){
val+=lazy;
if (s!=e){
l->lazy+=lazy;
r->lazy+=lazy;
}
lazy=0;
}
}
void update(int i,int j,ll k){
if (s==i && e==j) lazy+=k;
else{
if (j<=m) l->update(i,j,k);
else if (m<i) r->update(i,j,k);
else l->update(i,m,k),r->update(m+1,j,k);
l->propo(),r->propo();
val=min(l->val,r->val);
}
}
ll query(int i,int j){
propo();
if (s==i && e==j) return val;
else if (j<=m) return l->query(i,j);
else if (m<i) return r->query(i,j);
else return min(l->query(i,m),r->query(m+1,j));
}
} *root=new node(0,250005);
ll fen[250005];
void add(ll i,ll j){
while (i<250005){
fen[i]+=j;
i+=i&-i;
}
}
ll query(int i){
ll res=0;
while (i){
res+=fen[i];
i-=i&-i;
}
return res;
}
ll search(ll i){
int curr=0;
for (int u=1<<17;u;u>>=1){
if (curr+u<250005 && fen[curr+u]<=i){
curr+=u;
i-=fen[curr];
}
}
return curr;
}
struct upd{
ll pos;
ll t;
ll num;
int typ;
};
int n,m,q;
vector<upd> u;
vector<ii> qu[250005]; //(length,time)
int id[250005];
ll ans[250005];
int main(){
cin.tie(0);
cout.tie(0);
cin.sync_with_stdio(false);
memset(ans,-1,sizeof(ans));
cin>>n>>m>>q;
ll a,b,c,d;
rep(x,1,q+1){
cin>>a;
if (a==1){
cin>>a>>b>>c>>d;
u.pub(upd({a,x,d,1}));
u.pub(upd({b+1,x,-d,1}));
id[x]=c;
}
else if (a==2){
cin>>a>>b>>c;
u.pub(upd({a,x,-c,0}));
u.pub(upd({b+1,x,c,0}));
}
else{
cin>>a>>b;
qu[a].pub(ii(b,x));
}
}
sort(all(u),[](upd i,upd j){
return i.pos>j.pos;
});
rep(x,1,n+1){
while (!u.empty() && u.back().pos==x){
//cout<<"update: "<<u.back().t<<" "<<u.back().num<<endl;
root->update(u.back().t,250005,u.back().num);
if (u.back().typ) add(u.back().t,u.back().num);
u.pob();
}
for (auto &it:qu[x]){
ll num=root->query(it.se,it.se)-root->query(0,it.se);
//cout<<it.se<<" "<<num<<endl;
if (num<it.fi) ans[it.se]=0;
else{
ll tot=query(it.se);
//cout<<tot<<" "<<num<<" "<<it.fi<<endl;
it.fi+=tot-num;
int temp=search(it.fi-1);
//cout<<temp<<endl;
ans[it.se]=id[temp+1];
}
}
}
rep(x,1,q+1) if (ans[x]!=-1) cout<<ans[x]<<endl;
}
Compilation message
foodcourt.cpp: In constructor 'node::node(int, int)':
foodcourt.cpp:31:16: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
31 | s=_s,e=_e,m=s+e>>1;
| ~^~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
39616 KB |
Output is correct |
2 |
Correct |
40 ms |
39748 KB |
Output is correct |
3 |
Correct |
35 ms |
39620 KB |
Output is correct |
4 |
Correct |
45 ms |
39748 KB |
Output is correct |
5 |
Correct |
34 ms |
39620 KB |
Output is correct |
6 |
Correct |
35 ms |
39720 KB |
Output is correct |
7 |
Correct |
35 ms |
39780 KB |
Output is correct |
8 |
Correct |
36 ms |
39724 KB |
Output is correct |
9 |
Correct |
44 ms |
39752 KB |
Output is correct |
10 |
Correct |
37 ms |
39748 KB |
Output is correct |
11 |
Correct |
36 ms |
39680 KB |
Output is correct |
12 |
Correct |
35 ms |
39724 KB |
Output is correct |
13 |
Correct |
34 ms |
39700 KB |
Output is correct |
14 |
Correct |
42 ms |
39752 KB |
Output is correct |
15 |
Correct |
34 ms |
39620 KB |
Output is correct |
16 |
Correct |
35 ms |
39712 KB |
Output is correct |
17 |
Correct |
35 ms |
39740 KB |
Output is correct |
18 |
Correct |
42 ms |
39748 KB |
Output is correct |
19 |
Correct |
34 ms |
39732 KB |
Output is correct |
20 |
Correct |
33 ms |
39764 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
39616 KB |
Output is correct |
2 |
Correct |
40 ms |
39748 KB |
Output is correct |
3 |
Correct |
35 ms |
39620 KB |
Output is correct |
4 |
Correct |
45 ms |
39748 KB |
Output is correct |
5 |
Correct |
34 ms |
39620 KB |
Output is correct |
6 |
Correct |
35 ms |
39720 KB |
Output is correct |
7 |
Correct |
35 ms |
39780 KB |
Output is correct |
8 |
Correct |
36 ms |
39724 KB |
Output is correct |
9 |
Correct |
44 ms |
39752 KB |
Output is correct |
10 |
Correct |
37 ms |
39748 KB |
Output is correct |
11 |
Correct |
36 ms |
39680 KB |
Output is correct |
12 |
Correct |
35 ms |
39724 KB |
Output is correct |
13 |
Correct |
34 ms |
39700 KB |
Output is correct |
14 |
Correct |
42 ms |
39752 KB |
Output is correct |
15 |
Correct |
34 ms |
39620 KB |
Output is correct |
16 |
Correct |
35 ms |
39712 KB |
Output is correct |
17 |
Correct |
35 ms |
39740 KB |
Output is correct |
18 |
Correct |
42 ms |
39748 KB |
Output is correct |
19 |
Correct |
34 ms |
39732 KB |
Output is correct |
20 |
Correct |
33 ms |
39764 KB |
Output is correct |
21 |
Correct |
34 ms |
39672 KB |
Output is correct |
22 |
Correct |
34 ms |
39748 KB |
Output is correct |
23 |
Correct |
35 ms |
39668 KB |
Output is correct |
24 |
Correct |
43 ms |
39748 KB |
Output is correct |
25 |
Correct |
31 ms |
39736 KB |
Output is correct |
26 |
Correct |
32 ms |
39752 KB |
Output is correct |
27 |
Correct |
35 ms |
39748 KB |
Output is correct |
28 |
Correct |
33 ms |
39740 KB |
Output is correct |
29 |
Correct |
34 ms |
39660 KB |
Output is correct |
30 |
Correct |
34 ms |
39776 KB |
Output is correct |
31 |
Correct |
36 ms |
39744 KB |
Output is correct |
32 |
Correct |
35 ms |
39784 KB |
Output is correct |
33 |
Correct |
35 ms |
39740 KB |
Output is correct |
34 |
Correct |
39 ms |
39748 KB |
Output is correct |
35 |
Correct |
33 ms |
39724 KB |
Output is correct |
36 |
Correct |
33 ms |
39728 KB |
Output is correct |
37 |
Correct |
32 ms |
39656 KB |
Output is correct |
38 |
Correct |
34 ms |
39756 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
171 ms |
45048 KB |
Output is correct |
2 |
Correct |
149 ms |
45024 KB |
Output is correct |
3 |
Correct |
145 ms |
45424 KB |
Output is correct |
4 |
Correct |
141 ms |
45348 KB |
Output is correct |
5 |
Correct |
152 ms |
45144 KB |
Output is correct |
6 |
Correct |
160 ms |
45144 KB |
Output is correct |
7 |
Correct |
81 ms |
45236 KB |
Output is correct |
8 |
Correct |
86 ms |
44872 KB |
Output is correct |
9 |
Correct |
157 ms |
44972 KB |
Output is correct |
10 |
Correct |
166 ms |
45144 KB |
Output is correct |
11 |
Correct |
154 ms |
45044 KB |
Output is correct |
12 |
Correct |
153 ms |
45084 KB |
Output is correct |
13 |
Correct |
126 ms |
45084 KB |
Output is correct |
14 |
Correct |
157 ms |
45236 KB |
Output is correct |
15 |
Correct |
144 ms |
45160 KB |
Output is correct |
16 |
Correct |
147 ms |
45224 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
632 ms |
60876 KB |
Output is correct |
2 |
Correct |
495 ms |
52884 KB |
Output is correct |
3 |
Correct |
729 ms |
60416 KB |
Output is correct |
4 |
Correct |
511 ms |
59604 KB |
Output is correct |
5 |
Correct |
607 ms |
59508 KB |
Output is correct |
6 |
Correct |
744 ms |
59548 KB |
Output is correct |
7 |
Correct |
248 ms |
60444 KB |
Output is correct |
8 |
Correct |
286 ms |
60188 KB |
Output is correct |
9 |
Correct |
655 ms |
56476 KB |
Output is correct |
10 |
Correct |
668 ms |
56536 KB |
Output is correct |
11 |
Correct |
730 ms |
59468 KB |
Output is correct |
12 |
Correct |
727 ms |
59688 KB |
Output is correct |
13 |
Correct |
699 ms |
59216 KB |
Output is correct |
14 |
Correct |
730 ms |
59560 KB |
Output is correct |
15 |
Correct |
751 ms |
59732 KB |
Output is correct |
16 |
Correct |
732 ms |
59280 KB |
Output is correct |
17 |
Correct |
746 ms |
59356 KB |
Output is correct |
18 |
Correct |
730 ms |
59600 KB |
Output is correct |
19 |
Correct |
727 ms |
59600 KB |
Output is correct |
20 |
Correct |
736 ms |
59576 KB |
Output is correct |
21 |
Correct |
737 ms |
59552 KB |
Output is correct |
22 |
Correct |
732 ms |
59440 KB |
Output is correct |
23 |
Correct |
733 ms |
59572 KB |
Output is correct |
24 |
Correct |
723 ms |
59640 KB |
Output is correct |
25 |
Correct |
726 ms |
60208 KB |
Output is correct |
26 |
Correct |
738 ms |
60400 KB |
Output is correct |
27 |
Correct |
529 ms |
59212 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
39616 KB |
Output is correct |
2 |
Correct |
40 ms |
39748 KB |
Output is correct |
3 |
Correct |
35 ms |
39620 KB |
Output is correct |
4 |
Correct |
45 ms |
39748 KB |
Output is correct |
5 |
Correct |
34 ms |
39620 KB |
Output is correct |
6 |
Correct |
35 ms |
39720 KB |
Output is correct |
7 |
Correct |
35 ms |
39780 KB |
Output is correct |
8 |
Correct |
36 ms |
39724 KB |
Output is correct |
9 |
Correct |
44 ms |
39752 KB |
Output is correct |
10 |
Correct |
37 ms |
39748 KB |
Output is correct |
11 |
Correct |
36 ms |
39680 KB |
Output is correct |
12 |
Correct |
35 ms |
39724 KB |
Output is correct |
13 |
Correct |
34 ms |
39700 KB |
Output is correct |
14 |
Correct |
42 ms |
39752 KB |
Output is correct |
15 |
Correct |
34 ms |
39620 KB |
Output is correct |
16 |
Correct |
35 ms |
39712 KB |
Output is correct |
17 |
Correct |
35 ms |
39740 KB |
Output is correct |
18 |
Correct |
42 ms |
39748 KB |
Output is correct |
19 |
Correct |
34 ms |
39732 KB |
Output is correct |
20 |
Correct |
33 ms |
39764 KB |
Output is correct |
21 |
Correct |
171 ms |
45048 KB |
Output is correct |
22 |
Correct |
149 ms |
45024 KB |
Output is correct |
23 |
Correct |
145 ms |
45424 KB |
Output is correct |
24 |
Correct |
141 ms |
45348 KB |
Output is correct |
25 |
Correct |
152 ms |
45144 KB |
Output is correct |
26 |
Correct |
160 ms |
45144 KB |
Output is correct |
27 |
Correct |
81 ms |
45236 KB |
Output is correct |
28 |
Correct |
86 ms |
44872 KB |
Output is correct |
29 |
Correct |
157 ms |
44972 KB |
Output is correct |
30 |
Correct |
166 ms |
45144 KB |
Output is correct |
31 |
Correct |
154 ms |
45044 KB |
Output is correct |
32 |
Correct |
153 ms |
45084 KB |
Output is correct |
33 |
Correct |
126 ms |
45084 KB |
Output is correct |
34 |
Correct |
157 ms |
45236 KB |
Output is correct |
35 |
Correct |
144 ms |
45160 KB |
Output is correct |
36 |
Correct |
147 ms |
45224 KB |
Output is correct |
37 |
Correct |
143 ms |
45108 KB |
Output is correct |
38 |
Correct |
126 ms |
44948 KB |
Output is correct |
39 |
Correct |
78 ms |
44616 KB |
Output is correct |
40 |
Correct |
91 ms |
44572 KB |
Output is correct |
41 |
Correct |
157 ms |
44976 KB |
Output is correct |
42 |
Correct |
157 ms |
45108 KB |
Output is correct |
43 |
Correct |
175 ms |
44928 KB |
Output is correct |
44 |
Correct |
159 ms |
45040 KB |
Output is correct |
45 |
Correct |
160 ms |
44980 KB |
Output is correct |
46 |
Correct |
165 ms |
44904 KB |
Output is correct |
47 |
Correct |
126 ms |
45076 KB |
Output is correct |
48 |
Correct |
153 ms |
45080 KB |
Output is correct |
49 |
Correct |
117 ms |
44712 KB |
Output is correct |
50 |
Correct |
132 ms |
44824 KB |
Output is correct |
51 |
Correct |
158 ms |
44908 KB |
Output is correct |
52 |
Correct |
156 ms |
44968 KB |
Output is correct |
53 |
Correct |
128 ms |
44908 KB |
Output is correct |
54 |
Correct |
191 ms |
45228 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
137 ms |
43952 KB |
Output is correct |
2 |
Correct |
161 ms |
44848 KB |
Output is correct |
3 |
Correct |
156 ms |
44928 KB |
Output is correct |
4 |
Correct |
114 ms |
43272 KB |
Output is correct |
5 |
Correct |
132 ms |
44356 KB |
Output is correct |
6 |
Correct |
158 ms |
44976 KB |
Output is correct |
7 |
Correct |
83 ms |
44176 KB |
Output is correct |
8 |
Correct |
87 ms |
43704 KB |
Output is correct |
9 |
Correct |
140 ms |
44852 KB |
Output is correct |
10 |
Correct |
118 ms |
43156 KB |
Output is correct |
11 |
Correct |
149 ms |
44852 KB |
Output is correct |
12 |
Correct |
153 ms |
44840 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
39616 KB |
Output is correct |
2 |
Correct |
40 ms |
39748 KB |
Output is correct |
3 |
Correct |
35 ms |
39620 KB |
Output is correct |
4 |
Correct |
45 ms |
39748 KB |
Output is correct |
5 |
Correct |
34 ms |
39620 KB |
Output is correct |
6 |
Correct |
35 ms |
39720 KB |
Output is correct |
7 |
Correct |
35 ms |
39780 KB |
Output is correct |
8 |
Correct |
36 ms |
39724 KB |
Output is correct |
9 |
Correct |
44 ms |
39752 KB |
Output is correct |
10 |
Correct |
37 ms |
39748 KB |
Output is correct |
11 |
Correct |
36 ms |
39680 KB |
Output is correct |
12 |
Correct |
35 ms |
39724 KB |
Output is correct |
13 |
Correct |
34 ms |
39700 KB |
Output is correct |
14 |
Correct |
42 ms |
39752 KB |
Output is correct |
15 |
Correct |
34 ms |
39620 KB |
Output is correct |
16 |
Correct |
35 ms |
39712 KB |
Output is correct |
17 |
Correct |
35 ms |
39740 KB |
Output is correct |
18 |
Correct |
42 ms |
39748 KB |
Output is correct |
19 |
Correct |
34 ms |
39732 KB |
Output is correct |
20 |
Correct |
33 ms |
39764 KB |
Output is correct |
21 |
Correct |
34 ms |
39672 KB |
Output is correct |
22 |
Correct |
34 ms |
39748 KB |
Output is correct |
23 |
Correct |
35 ms |
39668 KB |
Output is correct |
24 |
Correct |
43 ms |
39748 KB |
Output is correct |
25 |
Correct |
31 ms |
39736 KB |
Output is correct |
26 |
Correct |
32 ms |
39752 KB |
Output is correct |
27 |
Correct |
35 ms |
39748 KB |
Output is correct |
28 |
Correct |
33 ms |
39740 KB |
Output is correct |
29 |
Correct |
34 ms |
39660 KB |
Output is correct |
30 |
Correct |
34 ms |
39776 KB |
Output is correct |
31 |
Correct |
36 ms |
39744 KB |
Output is correct |
32 |
Correct |
35 ms |
39784 KB |
Output is correct |
33 |
Correct |
35 ms |
39740 KB |
Output is correct |
34 |
Correct |
39 ms |
39748 KB |
Output is correct |
35 |
Correct |
33 ms |
39724 KB |
Output is correct |
36 |
Correct |
33 ms |
39728 KB |
Output is correct |
37 |
Correct |
32 ms |
39656 KB |
Output is correct |
38 |
Correct |
34 ms |
39756 KB |
Output is correct |
39 |
Correct |
171 ms |
45048 KB |
Output is correct |
40 |
Correct |
149 ms |
45024 KB |
Output is correct |
41 |
Correct |
145 ms |
45424 KB |
Output is correct |
42 |
Correct |
141 ms |
45348 KB |
Output is correct |
43 |
Correct |
152 ms |
45144 KB |
Output is correct |
44 |
Correct |
160 ms |
45144 KB |
Output is correct |
45 |
Correct |
81 ms |
45236 KB |
Output is correct |
46 |
Correct |
86 ms |
44872 KB |
Output is correct |
47 |
Correct |
157 ms |
44972 KB |
Output is correct |
48 |
Correct |
166 ms |
45144 KB |
Output is correct |
49 |
Correct |
154 ms |
45044 KB |
Output is correct |
50 |
Correct |
153 ms |
45084 KB |
Output is correct |
51 |
Correct |
126 ms |
45084 KB |
Output is correct |
52 |
Correct |
157 ms |
45236 KB |
Output is correct |
53 |
Correct |
144 ms |
45160 KB |
Output is correct |
54 |
Correct |
147 ms |
45224 KB |
Output is correct |
55 |
Correct |
143 ms |
45108 KB |
Output is correct |
56 |
Correct |
126 ms |
44948 KB |
Output is correct |
57 |
Correct |
78 ms |
44616 KB |
Output is correct |
58 |
Correct |
91 ms |
44572 KB |
Output is correct |
59 |
Correct |
157 ms |
44976 KB |
Output is correct |
60 |
Correct |
157 ms |
45108 KB |
Output is correct |
61 |
Correct |
175 ms |
44928 KB |
Output is correct |
62 |
Correct |
159 ms |
45040 KB |
Output is correct |
63 |
Correct |
160 ms |
44980 KB |
Output is correct |
64 |
Correct |
165 ms |
44904 KB |
Output is correct |
65 |
Correct |
126 ms |
45076 KB |
Output is correct |
66 |
Correct |
153 ms |
45080 KB |
Output is correct |
67 |
Correct |
117 ms |
44712 KB |
Output is correct |
68 |
Correct |
132 ms |
44824 KB |
Output is correct |
69 |
Correct |
158 ms |
44908 KB |
Output is correct |
70 |
Correct |
156 ms |
44968 KB |
Output is correct |
71 |
Correct |
128 ms |
44908 KB |
Output is correct |
72 |
Correct |
191 ms |
45228 KB |
Output is correct |
73 |
Correct |
137 ms |
43952 KB |
Output is correct |
74 |
Correct |
161 ms |
44848 KB |
Output is correct |
75 |
Correct |
156 ms |
44928 KB |
Output is correct |
76 |
Correct |
114 ms |
43272 KB |
Output is correct |
77 |
Correct |
132 ms |
44356 KB |
Output is correct |
78 |
Correct |
158 ms |
44976 KB |
Output is correct |
79 |
Correct |
83 ms |
44176 KB |
Output is correct |
80 |
Correct |
87 ms |
43704 KB |
Output is correct |
81 |
Correct |
140 ms |
44852 KB |
Output is correct |
82 |
Correct |
118 ms |
43156 KB |
Output is correct |
83 |
Correct |
149 ms |
44852 KB |
Output is correct |
84 |
Correct |
153 ms |
44840 KB |
Output is correct |
85 |
Correct |
144 ms |
45636 KB |
Output is correct |
86 |
Correct |
168 ms |
45592 KB |
Output is correct |
87 |
Correct |
149 ms |
45300 KB |
Output is correct |
88 |
Correct |
167 ms |
45512 KB |
Output is correct |
89 |
Correct |
108 ms |
43140 KB |
Output is correct |
90 |
Correct |
159 ms |
45448 KB |
Output is correct |
91 |
Correct |
144 ms |
45328 KB |
Output is correct |
92 |
Correct |
131 ms |
45312 KB |
Output is correct |
93 |
Correct |
173 ms |
45444 KB |
Output is correct |
94 |
Correct |
167 ms |
45236 KB |
Output is correct |
95 |
Correct |
185 ms |
45316 KB |
Output is correct |
96 |
Correct |
163 ms |
45356 KB |
Output is correct |
97 |
Correct |
169 ms |
45380 KB |
Output is correct |
98 |
Correct |
140 ms |
45236 KB |
Output is correct |
99 |
Correct |
118 ms |
45464 KB |
Output is correct |
100 |
Correct |
127 ms |
45432 KB |
Output is correct |
101 |
Correct |
195 ms |
45488 KB |
Output is correct |
102 |
Correct |
126 ms |
45692 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
39616 KB |
Output is correct |
2 |
Correct |
40 ms |
39748 KB |
Output is correct |
3 |
Correct |
35 ms |
39620 KB |
Output is correct |
4 |
Correct |
45 ms |
39748 KB |
Output is correct |
5 |
Correct |
34 ms |
39620 KB |
Output is correct |
6 |
Correct |
35 ms |
39720 KB |
Output is correct |
7 |
Correct |
35 ms |
39780 KB |
Output is correct |
8 |
Correct |
36 ms |
39724 KB |
Output is correct |
9 |
Correct |
44 ms |
39752 KB |
Output is correct |
10 |
Correct |
37 ms |
39748 KB |
Output is correct |
11 |
Correct |
36 ms |
39680 KB |
Output is correct |
12 |
Correct |
35 ms |
39724 KB |
Output is correct |
13 |
Correct |
34 ms |
39700 KB |
Output is correct |
14 |
Correct |
42 ms |
39752 KB |
Output is correct |
15 |
Correct |
34 ms |
39620 KB |
Output is correct |
16 |
Correct |
35 ms |
39712 KB |
Output is correct |
17 |
Correct |
35 ms |
39740 KB |
Output is correct |
18 |
Correct |
42 ms |
39748 KB |
Output is correct |
19 |
Correct |
34 ms |
39732 KB |
Output is correct |
20 |
Correct |
33 ms |
39764 KB |
Output is correct |
21 |
Correct |
34 ms |
39672 KB |
Output is correct |
22 |
Correct |
34 ms |
39748 KB |
Output is correct |
23 |
Correct |
35 ms |
39668 KB |
Output is correct |
24 |
Correct |
43 ms |
39748 KB |
Output is correct |
25 |
Correct |
31 ms |
39736 KB |
Output is correct |
26 |
Correct |
32 ms |
39752 KB |
Output is correct |
27 |
Correct |
35 ms |
39748 KB |
Output is correct |
28 |
Correct |
33 ms |
39740 KB |
Output is correct |
29 |
Correct |
34 ms |
39660 KB |
Output is correct |
30 |
Correct |
34 ms |
39776 KB |
Output is correct |
31 |
Correct |
36 ms |
39744 KB |
Output is correct |
32 |
Correct |
35 ms |
39784 KB |
Output is correct |
33 |
Correct |
35 ms |
39740 KB |
Output is correct |
34 |
Correct |
39 ms |
39748 KB |
Output is correct |
35 |
Correct |
33 ms |
39724 KB |
Output is correct |
36 |
Correct |
33 ms |
39728 KB |
Output is correct |
37 |
Correct |
32 ms |
39656 KB |
Output is correct |
38 |
Correct |
34 ms |
39756 KB |
Output is correct |
39 |
Correct |
171 ms |
45048 KB |
Output is correct |
40 |
Correct |
149 ms |
45024 KB |
Output is correct |
41 |
Correct |
145 ms |
45424 KB |
Output is correct |
42 |
Correct |
141 ms |
45348 KB |
Output is correct |
43 |
Correct |
152 ms |
45144 KB |
Output is correct |
44 |
Correct |
160 ms |
45144 KB |
Output is correct |
45 |
Correct |
81 ms |
45236 KB |
Output is correct |
46 |
Correct |
86 ms |
44872 KB |
Output is correct |
47 |
Correct |
157 ms |
44972 KB |
Output is correct |
48 |
Correct |
166 ms |
45144 KB |
Output is correct |
49 |
Correct |
154 ms |
45044 KB |
Output is correct |
50 |
Correct |
153 ms |
45084 KB |
Output is correct |
51 |
Correct |
126 ms |
45084 KB |
Output is correct |
52 |
Correct |
157 ms |
45236 KB |
Output is correct |
53 |
Correct |
144 ms |
45160 KB |
Output is correct |
54 |
Correct |
147 ms |
45224 KB |
Output is correct |
55 |
Correct |
632 ms |
60876 KB |
Output is correct |
56 |
Correct |
495 ms |
52884 KB |
Output is correct |
57 |
Correct |
729 ms |
60416 KB |
Output is correct |
58 |
Correct |
511 ms |
59604 KB |
Output is correct |
59 |
Correct |
607 ms |
59508 KB |
Output is correct |
60 |
Correct |
744 ms |
59548 KB |
Output is correct |
61 |
Correct |
248 ms |
60444 KB |
Output is correct |
62 |
Correct |
286 ms |
60188 KB |
Output is correct |
63 |
Correct |
655 ms |
56476 KB |
Output is correct |
64 |
Correct |
668 ms |
56536 KB |
Output is correct |
65 |
Correct |
730 ms |
59468 KB |
Output is correct |
66 |
Correct |
727 ms |
59688 KB |
Output is correct |
67 |
Correct |
699 ms |
59216 KB |
Output is correct |
68 |
Correct |
730 ms |
59560 KB |
Output is correct |
69 |
Correct |
751 ms |
59732 KB |
Output is correct |
70 |
Correct |
732 ms |
59280 KB |
Output is correct |
71 |
Correct |
746 ms |
59356 KB |
Output is correct |
72 |
Correct |
730 ms |
59600 KB |
Output is correct |
73 |
Correct |
727 ms |
59600 KB |
Output is correct |
74 |
Correct |
736 ms |
59576 KB |
Output is correct |
75 |
Correct |
737 ms |
59552 KB |
Output is correct |
76 |
Correct |
732 ms |
59440 KB |
Output is correct |
77 |
Correct |
733 ms |
59572 KB |
Output is correct |
78 |
Correct |
723 ms |
59640 KB |
Output is correct |
79 |
Correct |
726 ms |
60208 KB |
Output is correct |
80 |
Correct |
738 ms |
60400 KB |
Output is correct |
81 |
Correct |
529 ms |
59212 KB |
Output is correct |
82 |
Correct |
143 ms |
45108 KB |
Output is correct |
83 |
Correct |
126 ms |
44948 KB |
Output is correct |
84 |
Correct |
78 ms |
44616 KB |
Output is correct |
85 |
Correct |
91 ms |
44572 KB |
Output is correct |
86 |
Correct |
157 ms |
44976 KB |
Output is correct |
87 |
Correct |
157 ms |
45108 KB |
Output is correct |
88 |
Correct |
175 ms |
44928 KB |
Output is correct |
89 |
Correct |
159 ms |
45040 KB |
Output is correct |
90 |
Correct |
160 ms |
44980 KB |
Output is correct |
91 |
Correct |
165 ms |
44904 KB |
Output is correct |
92 |
Correct |
126 ms |
45076 KB |
Output is correct |
93 |
Correct |
153 ms |
45080 KB |
Output is correct |
94 |
Correct |
117 ms |
44712 KB |
Output is correct |
95 |
Correct |
132 ms |
44824 KB |
Output is correct |
96 |
Correct |
158 ms |
44908 KB |
Output is correct |
97 |
Correct |
156 ms |
44968 KB |
Output is correct |
98 |
Correct |
128 ms |
44908 KB |
Output is correct |
99 |
Correct |
191 ms |
45228 KB |
Output is correct |
100 |
Correct |
137 ms |
43952 KB |
Output is correct |
101 |
Correct |
161 ms |
44848 KB |
Output is correct |
102 |
Correct |
156 ms |
44928 KB |
Output is correct |
103 |
Correct |
114 ms |
43272 KB |
Output is correct |
104 |
Correct |
132 ms |
44356 KB |
Output is correct |
105 |
Correct |
158 ms |
44976 KB |
Output is correct |
106 |
Correct |
83 ms |
44176 KB |
Output is correct |
107 |
Correct |
87 ms |
43704 KB |
Output is correct |
108 |
Correct |
140 ms |
44852 KB |
Output is correct |
109 |
Correct |
118 ms |
43156 KB |
Output is correct |
110 |
Correct |
149 ms |
44852 KB |
Output is correct |
111 |
Correct |
153 ms |
44840 KB |
Output is correct |
112 |
Correct |
144 ms |
45636 KB |
Output is correct |
113 |
Correct |
168 ms |
45592 KB |
Output is correct |
114 |
Correct |
149 ms |
45300 KB |
Output is correct |
115 |
Correct |
167 ms |
45512 KB |
Output is correct |
116 |
Correct |
108 ms |
43140 KB |
Output is correct |
117 |
Correct |
159 ms |
45448 KB |
Output is correct |
118 |
Correct |
144 ms |
45328 KB |
Output is correct |
119 |
Correct |
131 ms |
45312 KB |
Output is correct |
120 |
Correct |
173 ms |
45444 KB |
Output is correct |
121 |
Correct |
167 ms |
45236 KB |
Output is correct |
122 |
Correct |
185 ms |
45316 KB |
Output is correct |
123 |
Correct |
163 ms |
45356 KB |
Output is correct |
124 |
Correct |
169 ms |
45380 KB |
Output is correct |
125 |
Correct |
140 ms |
45236 KB |
Output is correct |
126 |
Correct |
118 ms |
45464 KB |
Output is correct |
127 |
Correct |
127 ms |
45432 KB |
Output is correct |
128 |
Correct |
195 ms |
45488 KB |
Output is correct |
129 |
Correct |
126 ms |
45692 KB |
Output is correct |
130 |
Correct |
692 ms |
62044 KB |
Output is correct |
131 |
Correct |
507 ms |
54428 KB |
Output is correct |
132 |
Correct |
711 ms |
61984 KB |
Output is correct |
133 |
Correct |
726 ms |
61056 KB |
Output is correct |
134 |
Correct |
608 ms |
61212 KB |
Output is correct |
135 |
Correct |
752 ms |
60996 KB |
Output is correct |
136 |
Correct |
697 ms |
59164 KB |
Output is correct |
137 |
Correct |
741 ms |
59108 KB |
Output is correct |
138 |
Correct |
791 ms |
61204 KB |
Output is correct |
139 |
Correct |
734 ms |
61108 KB |
Output is correct |
140 |
Correct |
743 ms |
60668 KB |
Output is correct |
141 |
Correct |
766 ms |
61152 KB |
Output is correct |
142 |
Correct |
730 ms |
60984 KB |
Output is correct |
143 |
Correct |
752 ms |
61076 KB |
Output is correct |
144 |
Correct |
776 ms |
61416 KB |
Output is correct |
145 |
Correct |
715 ms |
61136 KB |
Output is correct |
146 |
Correct |
738 ms |
61252 KB |
Output is correct |
147 |
Correct |
727 ms |
61052 KB |
Output is correct |
148 |
Correct |
745 ms |
61192 KB |
Output is correct |
149 |
Correct |
741 ms |
61016 KB |
Output is correct |
150 |
Correct |
368 ms |
61640 KB |
Output is correct |
151 |
Correct |
678 ms |
61852 KB |
Output is correct |
152 |
Correct |
687 ms |
62084 KB |
Output is correct |
153 |
Correct |
524 ms |
61608 KB |
Output is correct |