# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1010233 |
2024-06-28T13:59:35 Z |
pcc |
Food Court (JOI21_foodcourt) |
C++17 |
|
305 ms |
62404 KB |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
const ll mxn = 250005;
#define tlll tuple<ll,ll,ll>
#define pll pair<ll,ll>
#define fs first
#define sc second
#define int ll
#define ls now*2+1
#define rs now*2+2
#define mid ((l+r)>>1)
struct SEG1{
struct node{
ll in,out,debt;
node(ll ii = 0,ll oo = 0,ll dd = 0){
in = ii,out = oo,debt = dd;
}
};
node seg[mxn*4];
node addtag(node u,node d){
ll dif = min(u.debt,d.in);
d.in -= dif;
u.debt -= dif;
d.out = u.out+d.out+dif;
d.debt = d.debt+u.debt;
d.in = d.in+u.in;
return d;
}
void push(int now,int l,int r){
seg[ls] = addtag(seg[now],seg[ls]);
seg[rs] = addtag(seg[now],seg[rs]);
seg[now].in = seg[now].out = seg[now].debt = 0;
return;
}
void add(int now,int l,int r,int s,int e,ll v){
if(l>=s&&e>=r){
seg[now].in += v;
return;
}
push(now,l,r);
if(mid>=s)add(ls,l,mid,s,e,v);
if(mid<e)add(rs,mid+1,r,s,e,v);
return;
}
void del(int now,int l,int r,int s,int e,ll v){
if(l>=s&&e>=r){
seg[now] = addtag(node(0,0,v),seg[now]);
return;
}
push(now,l,r);
if(mid>=s)del(ls,l,mid,s,e,v);
if(mid<e)del(rs,mid+1,r,s,e,v);
}
ll getval(int now,int l,int r,int p,ll cnt){
if(l == r){
if(seg[now].in<cnt)return -1;
else return seg[now].out+cnt;
}
push(now,l,r);
if(mid>=p)return getval(ls,l,mid,p,cnt);
else return getval(rs,mid+1,r,p,cnt);
}
};
struct SEG2{
ll seg[mxn*4];
void modify(int now,int l,int r,int p,ll v){
if(l == r){
seg[now] += v;
return;
}
if(mid>=p)modify(ls,l,mid,p,v);
else modify(rs,mid+1,r,p,v);
seg[now] = seg[ls]+seg[rs];
}
ll getbig(int now,int l,int r,ll tar){
if(l == r)return l;
if(seg[ls]>=tar)return getbig(ls,l,mid,tar);
else return getbig(rs,mid+1,r,tar-seg[ls]);
}
};
#undef ls
#undef rs
#undef mid
SEG1 seg1;
SEG2 seg2;
ll N,M,Q;
int col[mxn];
vector<pll> req[mxn];
int ans[mxn];
vector<pll> op[mxn];
vector<int> askid;
main(){
ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>N>>M>>Q;
fill(col,col+mxn,1);
for(int i = 1;i<=Q;i++){
int t;
cin>>t;
if(t == 1){
ll l,r,c,k;
cin>>l>>r>>c>>k;
op[l].push_back(pll(i,k));
op[r+1].push_back(pll(i,-k));
col[i] = c;
seg1.add(0,1,N,l,r,k);
}
else if(t == 2){
ll l,r,k;
cin>>l>>r>>k;
seg1.del(0,1,N,l,r,k);
}
else{
ll a,b;
cin>>a>>b;
askid.push_back(i);
auto tmp = seg1.getval(0,1,N,a,b);
if(tmp == -1)ans[i] = -1;
else req[a].push_back(pll(i,tmp));
}
}
for(int i = 1;i<=N;i++){
for(auto &j:op[i]){
seg2.modify(0,1,Q,j.fs,j.sc);
}
for(auto &j:req[i]){
ans[j.fs] = col[seg2.getbig(0,1,Q,j.sc)];
}
}
for(auto &i:askid)cout<<max(ans[i],(int)0)<<'\n';
return 0;
}
Compilation message
foodcourt.cpp:99:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
99 | main(){
| ^~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41304 KB |
Output is correct |
2 |
Correct |
7 ms |
41304 KB |
Output is correct |
3 |
Correct |
6 ms |
41148 KB |
Output is correct |
4 |
Correct |
7 ms |
41304 KB |
Output is correct |
5 |
Correct |
6 ms |
41304 KB |
Output is correct |
6 |
Correct |
7 ms |
41308 KB |
Output is correct |
7 |
Correct |
7 ms |
41308 KB |
Output is correct |
8 |
Correct |
7 ms |
41308 KB |
Output is correct |
9 |
Correct |
8 ms |
41308 KB |
Output is correct |
10 |
Correct |
8 ms |
41308 KB |
Output is correct |
11 |
Correct |
7 ms |
41308 KB |
Output is correct |
12 |
Correct |
7 ms |
41308 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41308 KB |
Output is correct |
15 |
Correct |
6 ms |
41308 KB |
Output is correct |
16 |
Correct |
7 ms |
41308 KB |
Output is correct |
17 |
Correct |
9 ms |
41308 KB |
Output is correct |
18 |
Correct |
10 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
7 ms |
41268 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41304 KB |
Output is correct |
2 |
Correct |
7 ms |
41304 KB |
Output is correct |
3 |
Correct |
6 ms |
41148 KB |
Output is correct |
4 |
Correct |
7 ms |
41304 KB |
Output is correct |
5 |
Correct |
6 ms |
41304 KB |
Output is correct |
6 |
Correct |
7 ms |
41308 KB |
Output is correct |
7 |
Correct |
7 ms |
41308 KB |
Output is correct |
8 |
Correct |
7 ms |
41308 KB |
Output is correct |
9 |
Correct |
8 ms |
41308 KB |
Output is correct |
10 |
Correct |
8 ms |
41308 KB |
Output is correct |
11 |
Correct |
7 ms |
41308 KB |
Output is correct |
12 |
Correct |
7 ms |
41308 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41308 KB |
Output is correct |
15 |
Correct |
6 ms |
41308 KB |
Output is correct |
16 |
Correct |
7 ms |
41308 KB |
Output is correct |
17 |
Correct |
9 ms |
41308 KB |
Output is correct |
18 |
Correct |
10 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
7 ms |
41268 KB |
Output is correct |
21 |
Correct |
7 ms |
41304 KB |
Output is correct |
22 |
Correct |
7 ms |
41308 KB |
Output is correct |
23 |
Correct |
7 ms |
41308 KB |
Output is correct |
24 |
Correct |
7 ms |
41304 KB |
Output is correct |
25 |
Correct |
6 ms |
41228 KB |
Output is correct |
26 |
Correct |
6 ms |
41308 KB |
Output is correct |
27 |
Correct |
6 ms |
41308 KB |
Output is correct |
28 |
Correct |
7 ms |
41304 KB |
Output is correct |
29 |
Correct |
7 ms |
41356 KB |
Output is correct |
30 |
Correct |
7 ms |
41308 KB |
Output is correct |
31 |
Correct |
8 ms |
41308 KB |
Output is correct |
32 |
Correct |
7 ms |
41308 KB |
Output is correct |
33 |
Correct |
6 ms |
41272 KB |
Output is correct |
34 |
Correct |
6 ms |
41276 KB |
Output is correct |
35 |
Correct |
7 ms |
41308 KB |
Output is correct |
36 |
Correct |
7 ms |
41308 KB |
Output is correct |
37 |
Correct |
6 ms |
41308 KB |
Output is correct |
38 |
Correct |
6 ms |
41308 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
38 ms |
42704 KB |
Output is correct |
2 |
Correct |
39 ms |
43100 KB |
Output is correct |
3 |
Correct |
39 ms |
42612 KB |
Output is correct |
4 |
Correct |
39 ms |
42704 KB |
Output is correct |
5 |
Correct |
39 ms |
43088 KB |
Output is correct |
6 |
Correct |
36 ms |
43236 KB |
Output is correct |
7 |
Correct |
16 ms |
42444 KB |
Output is correct |
8 |
Correct |
17 ms |
42512 KB |
Output is correct |
9 |
Correct |
38 ms |
42756 KB |
Output is correct |
10 |
Correct |
35 ms |
42832 KB |
Output is correct |
11 |
Correct |
50 ms |
42796 KB |
Output is correct |
12 |
Correct |
41 ms |
42832 KB |
Output is correct |
13 |
Correct |
39 ms |
43280 KB |
Output is correct |
14 |
Correct |
40 ms |
43472 KB |
Output is correct |
15 |
Correct |
46 ms |
44116 KB |
Output is correct |
16 |
Correct |
46 ms |
44124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
197 ms |
51908 KB |
Output is correct |
2 |
Correct |
143 ms |
53708 KB |
Output is correct |
3 |
Correct |
206 ms |
58308 KB |
Output is correct |
4 |
Correct |
181 ms |
55136 KB |
Output is correct |
5 |
Correct |
162 ms |
56004 KB |
Output is correct |
6 |
Correct |
219 ms |
59080 KB |
Output is correct |
7 |
Correct |
68 ms |
53668 KB |
Output is correct |
8 |
Correct |
66 ms |
53284 KB |
Output is correct |
9 |
Correct |
247 ms |
60612 KB |
Output is correct |
10 |
Correct |
305 ms |
61376 KB |
Output is correct |
11 |
Correct |
201 ms |
56412 KB |
Output is correct |
12 |
Correct |
207 ms |
57544 KB |
Output is correct |
13 |
Correct |
218 ms |
56800 KB |
Output is correct |
14 |
Correct |
202 ms |
58316 KB |
Output is correct |
15 |
Correct |
211 ms |
58116 KB |
Output is correct |
16 |
Correct |
206 ms |
58316 KB |
Output is correct |
17 |
Correct |
220 ms |
57380 KB |
Output is correct |
18 |
Correct |
218 ms |
56952 KB |
Output is correct |
19 |
Correct |
207 ms |
57256 KB |
Output is correct |
20 |
Correct |
219 ms |
56520 KB |
Output is correct |
21 |
Correct |
244 ms |
58368 KB |
Output is correct |
22 |
Correct |
209 ms |
58312 KB |
Output is correct |
23 |
Correct |
215 ms |
57288 KB |
Output is correct |
24 |
Correct |
232 ms |
58144 KB |
Output is correct |
25 |
Correct |
165 ms |
56512 KB |
Output is correct |
26 |
Correct |
166 ms |
57028 KB |
Output is correct |
27 |
Correct |
174 ms |
61132 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41304 KB |
Output is correct |
2 |
Correct |
7 ms |
41304 KB |
Output is correct |
3 |
Correct |
6 ms |
41148 KB |
Output is correct |
4 |
Correct |
7 ms |
41304 KB |
Output is correct |
5 |
Correct |
6 ms |
41304 KB |
Output is correct |
6 |
Correct |
7 ms |
41308 KB |
Output is correct |
7 |
Correct |
7 ms |
41308 KB |
Output is correct |
8 |
Correct |
7 ms |
41308 KB |
Output is correct |
9 |
Correct |
8 ms |
41308 KB |
Output is correct |
10 |
Correct |
8 ms |
41308 KB |
Output is correct |
11 |
Correct |
7 ms |
41308 KB |
Output is correct |
12 |
Correct |
7 ms |
41308 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41308 KB |
Output is correct |
15 |
Correct |
6 ms |
41308 KB |
Output is correct |
16 |
Correct |
7 ms |
41308 KB |
Output is correct |
17 |
Correct |
9 ms |
41308 KB |
Output is correct |
18 |
Correct |
10 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
7 ms |
41268 KB |
Output is correct |
21 |
Correct |
38 ms |
42704 KB |
Output is correct |
22 |
Correct |
39 ms |
43100 KB |
Output is correct |
23 |
Correct |
39 ms |
42612 KB |
Output is correct |
24 |
Correct |
39 ms |
42704 KB |
Output is correct |
25 |
Correct |
39 ms |
43088 KB |
Output is correct |
26 |
Correct |
36 ms |
43236 KB |
Output is correct |
27 |
Correct |
16 ms |
42444 KB |
Output is correct |
28 |
Correct |
17 ms |
42512 KB |
Output is correct |
29 |
Correct |
38 ms |
42756 KB |
Output is correct |
30 |
Correct |
35 ms |
42832 KB |
Output is correct |
31 |
Correct |
50 ms |
42796 KB |
Output is correct |
32 |
Correct |
41 ms |
42832 KB |
Output is correct |
33 |
Correct |
39 ms |
43280 KB |
Output is correct |
34 |
Correct |
40 ms |
43472 KB |
Output is correct |
35 |
Correct |
46 ms |
44116 KB |
Output is correct |
36 |
Correct |
46 ms |
44124 KB |
Output is correct |
37 |
Correct |
41 ms |
42956 KB |
Output is correct |
38 |
Correct |
41 ms |
43120 KB |
Output is correct |
39 |
Correct |
18 ms |
42452 KB |
Output is correct |
40 |
Correct |
26 ms |
42648 KB |
Output is correct |
41 |
Correct |
45 ms |
43092 KB |
Output is correct |
42 |
Correct |
47 ms |
43092 KB |
Output is correct |
43 |
Correct |
47 ms |
43048 KB |
Output is correct |
44 |
Correct |
47 ms |
42960 KB |
Output is correct |
45 |
Correct |
46 ms |
43088 KB |
Output is correct |
46 |
Correct |
47 ms |
43088 KB |
Output is correct |
47 |
Correct |
25 ms |
42552 KB |
Output is correct |
48 |
Correct |
50 ms |
43052 KB |
Output is correct |
49 |
Correct |
36 ms |
42576 KB |
Output is correct |
50 |
Correct |
42 ms |
42856 KB |
Output is correct |
51 |
Correct |
47 ms |
43136 KB |
Output is correct |
52 |
Correct |
46 ms |
43100 KB |
Output is correct |
53 |
Correct |
38 ms |
43604 KB |
Output is correct |
54 |
Correct |
44 ms |
44116 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
48 ms |
43824 KB |
Output is correct |
2 |
Correct |
52 ms |
45512 KB |
Output is correct |
3 |
Correct |
52 ms |
45772 KB |
Output is correct |
4 |
Correct |
41 ms |
44336 KB |
Output is correct |
5 |
Correct |
46 ms |
45092 KB |
Output is correct |
6 |
Correct |
51 ms |
45776 KB |
Output is correct |
7 |
Correct |
23 ms |
44056 KB |
Output is correct |
8 |
Correct |
22 ms |
44108 KB |
Output is correct |
9 |
Correct |
33 ms |
44768 KB |
Output is correct |
10 |
Correct |
35 ms |
44240 KB |
Output is correct |
11 |
Correct |
55 ms |
45260 KB |
Output is correct |
12 |
Correct |
47 ms |
45260 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41304 KB |
Output is correct |
2 |
Correct |
7 ms |
41304 KB |
Output is correct |
3 |
Correct |
6 ms |
41148 KB |
Output is correct |
4 |
Correct |
7 ms |
41304 KB |
Output is correct |
5 |
Correct |
6 ms |
41304 KB |
Output is correct |
6 |
Correct |
7 ms |
41308 KB |
Output is correct |
7 |
Correct |
7 ms |
41308 KB |
Output is correct |
8 |
Correct |
7 ms |
41308 KB |
Output is correct |
9 |
Correct |
8 ms |
41308 KB |
Output is correct |
10 |
Correct |
8 ms |
41308 KB |
Output is correct |
11 |
Correct |
7 ms |
41308 KB |
Output is correct |
12 |
Correct |
7 ms |
41308 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41308 KB |
Output is correct |
15 |
Correct |
6 ms |
41308 KB |
Output is correct |
16 |
Correct |
7 ms |
41308 KB |
Output is correct |
17 |
Correct |
9 ms |
41308 KB |
Output is correct |
18 |
Correct |
10 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
7 ms |
41268 KB |
Output is correct |
21 |
Correct |
7 ms |
41304 KB |
Output is correct |
22 |
Correct |
7 ms |
41308 KB |
Output is correct |
23 |
Correct |
7 ms |
41308 KB |
Output is correct |
24 |
Correct |
7 ms |
41304 KB |
Output is correct |
25 |
Correct |
6 ms |
41228 KB |
Output is correct |
26 |
Correct |
6 ms |
41308 KB |
Output is correct |
27 |
Correct |
6 ms |
41308 KB |
Output is correct |
28 |
Correct |
7 ms |
41304 KB |
Output is correct |
29 |
Correct |
7 ms |
41356 KB |
Output is correct |
30 |
Correct |
7 ms |
41308 KB |
Output is correct |
31 |
Correct |
8 ms |
41308 KB |
Output is correct |
32 |
Correct |
7 ms |
41308 KB |
Output is correct |
33 |
Correct |
6 ms |
41272 KB |
Output is correct |
34 |
Correct |
6 ms |
41276 KB |
Output is correct |
35 |
Correct |
7 ms |
41308 KB |
Output is correct |
36 |
Correct |
7 ms |
41308 KB |
Output is correct |
37 |
Correct |
6 ms |
41308 KB |
Output is correct |
38 |
Correct |
6 ms |
41308 KB |
Output is correct |
39 |
Correct |
38 ms |
42704 KB |
Output is correct |
40 |
Correct |
39 ms |
43100 KB |
Output is correct |
41 |
Correct |
39 ms |
42612 KB |
Output is correct |
42 |
Correct |
39 ms |
42704 KB |
Output is correct |
43 |
Correct |
39 ms |
43088 KB |
Output is correct |
44 |
Correct |
36 ms |
43236 KB |
Output is correct |
45 |
Correct |
16 ms |
42444 KB |
Output is correct |
46 |
Correct |
17 ms |
42512 KB |
Output is correct |
47 |
Correct |
38 ms |
42756 KB |
Output is correct |
48 |
Correct |
35 ms |
42832 KB |
Output is correct |
49 |
Correct |
50 ms |
42796 KB |
Output is correct |
50 |
Correct |
41 ms |
42832 KB |
Output is correct |
51 |
Correct |
39 ms |
43280 KB |
Output is correct |
52 |
Correct |
40 ms |
43472 KB |
Output is correct |
53 |
Correct |
46 ms |
44116 KB |
Output is correct |
54 |
Correct |
46 ms |
44124 KB |
Output is correct |
55 |
Correct |
41 ms |
42956 KB |
Output is correct |
56 |
Correct |
41 ms |
43120 KB |
Output is correct |
57 |
Correct |
18 ms |
42452 KB |
Output is correct |
58 |
Correct |
26 ms |
42648 KB |
Output is correct |
59 |
Correct |
45 ms |
43092 KB |
Output is correct |
60 |
Correct |
47 ms |
43092 KB |
Output is correct |
61 |
Correct |
47 ms |
43048 KB |
Output is correct |
62 |
Correct |
47 ms |
42960 KB |
Output is correct |
63 |
Correct |
46 ms |
43088 KB |
Output is correct |
64 |
Correct |
47 ms |
43088 KB |
Output is correct |
65 |
Correct |
25 ms |
42552 KB |
Output is correct |
66 |
Correct |
50 ms |
43052 KB |
Output is correct |
67 |
Correct |
36 ms |
42576 KB |
Output is correct |
68 |
Correct |
42 ms |
42856 KB |
Output is correct |
69 |
Correct |
47 ms |
43136 KB |
Output is correct |
70 |
Correct |
46 ms |
43100 KB |
Output is correct |
71 |
Correct |
38 ms |
43604 KB |
Output is correct |
72 |
Correct |
44 ms |
44116 KB |
Output is correct |
73 |
Correct |
48 ms |
43824 KB |
Output is correct |
74 |
Correct |
52 ms |
45512 KB |
Output is correct |
75 |
Correct |
52 ms |
45772 KB |
Output is correct |
76 |
Correct |
41 ms |
44336 KB |
Output is correct |
77 |
Correct |
46 ms |
45092 KB |
Output is correct |
78 |
Correct |
51 ms |
45776 KB |
Output is correct |
79 |
Correct |
23 ms |
44056 KB |
Output is correct |
80 |
Correct |
22 ms |
44108 KB |
Output is correct |
81 |
Correct |
33 ms |
44768 KB |
Output is correct |
82 |
Correct |
35 ms |
44240 KB |
Output is correct |
83 |
Correct |
55 ms |
45260 KB |
Output is correct |
84 |
Correct |
47 ms |
45260 KB |
Output is correct |
85 |
Correct |
47 ms |
44416 KB |
Output is correct |
86 |
Correct |
56 ms |
44748 KB |
Output is correct |
87 |
Correct |
49 ms |
44880 KB |
Output is correct |
88 |
Correct |
53 ms |
45140 KB |
Output is correct |
89 |
Correct |
35 ms |
43604 KB |
Output is correct |
90 |
Correct |
56 ms |
44764 KB |
Output is correct |
91 |
Correct |
42 ms |
43952 KB |
Output is correct |
92 |
Correct |
40 ms |
43984 KB |
Output is correct |
93 |
Correct |
50 ms |
44768 KB |
Output is correct |
94 |
Correct |
52 ms |
44748 KB |
Output is correct |
95 |
Correct |
50 ms |
44628 KB |
Output is correct |
96 |
Correct |
50 ms |
44624 KB |
Output is correct |
97 |
Correct |
50 ms |
44628 KB |
Output is correct |
98 |
Correct |
44 ms |
44120 KB |
Output is correct |
99 |
Correct |
30 ms |
44016 KB |
Output is correct |
100 |
Correct |
37 ms |
43984 KB |
Output is correct |
101 |
Correct |
47 ms |
44492 KB |
Output is correct |
102 |
Correct |
48 ms |
45392 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
41304 KB |
Output is correct |
2 |
Correct |
7 ms |
41304 KB |
Output is correct |
3 |
Correct |
6 ms |
41148 KB |
Output is correct |
4 |
Correct |
7 ms |
41304 KB |
Output is correct |
5 |
Correct |
6 ms |
41304 KB |
Output is correct |
6 |
Correct |
7 ms |
41308 KB |
Output is correct |
7 |
Correct |
7 ms |
41308 KB |
Output is correct |
8 |
Correct |
7 ms |
41308 KB |
Output is correct |
9 |
Correct |
8 ms |
41308 KB |
Output is correct |
10 |
Correct |
8 ms |
41308 KB |
Output is correct |
11 |
Correct |
7 ms |
41308 KB |
Output is correct |
12 |
Correct |
7 ms |
41308 KB |
Output is correct |
13 |
Correct |
6 ms |
41308 KB |
Output is correct |
14 |
Correct |
6 ms |
41308 KB |
Output is correct |
15 |
Correct |
6 ms |
41308 KB |
Output is correct |
16 |
Correct |
7 ms |
41308 KB |
Output is correct |
17 |
Correct |
9 ms |
41308 KB |
Output is correct |
18 |
Correct |
10 ms |
41308 KB |
Output is correct |
19 |
Correct |
6 ms |
41308 KB |
Output is correct |
20 |
Correct |
7 ms |
41268 KB |
Output is correct |
21 |
Correct |
7 ms |
41304 KB |
Output is correct |
22 |
Correct |
7 ms |
41308 KB |
Output is correct |
23 |
Correct |
7 ms |
41308 KB |
Output is correct |
24 |
Correct |
7 ms |
41304 KB |
Output is correct |
25 |
Correct |
6 ms |
41228 KB |
Output is correct |
26 |
Correct |
6 ms |
41308 KB |
Output is correct |
27 |
Correct |
6 ms |
41308 KB |
Output is correct |
28 |
Correct |
7 ms |
41304 KB |
Output is correct |
29 |
Correct |
7 ms |
41356 KB |
Output is correct |
30 |
Correct |
7 ms |
41308 KB |
Output is correct |
31 |
Correct |
8 ms |
41308 KB |
Output is correct |
32 |
Correct |
7 ms |
41308 KB |
Output is correct |
33 |
Correct |
6 ms |
41272 KB |
Output is correct |
34 |
Correct |
6 ms |
41276 KB |
Output is correct |
35 |
Correct |
7 ms |
41308 KB |
Output is correct |
36 |
Correct |
7 ms |
41308 KB |
Output is correct |
37 |
Correct |
6 ms |
41308 KB |
Output is correct |
38 |
Correct |
6 ms |
41308 KB |
Output is correct |
39 |
Correct |
38 ms |
42704 KB |
Output is correct |
40 |
Correct |
39 ms |
43100 KB |
Output is correct |
41 |
Correct |
39 ms |
42612 KB |
Output is correct |
42 |
Correct |
39 ms |
42704 KB |
Output is correct |
43 |
Correct |
39 ms |
43088 KB |
Output is correct |
44 |
Correct |
36 ms |
43236 KB |
Output is correct |
45 |
Correct |
16 ms |
42444 KB |
Output is correct |
46 |
Correct |
17 ms |
42512 KB |
Output is correct |
47 |
Correct |
38 ms |
42756 KB |
Output is correct |
48 |
Correct |
35 ms |
42832 KB |
Output is correct |
49 |
Correct |
50 ms |
42796 KB |
Output is correct |
50 |
Correct |
41 ms |
42832 KB |
Output is correct |
51 |
Correct |
39 ms |
43280 KB |
Output is correct |
52 |
Correct |
40 ms |
43472 KB |
Output is correct |
53 |
Correct |
46 ms |
44116 KB |
Output is correct |
54 |
Correct |
46 ms |
44124 KB |
Output is correct |
55 |
Correct |
197 ms |
51908 KB |
Output is correct |
56 |
Correct |
143 ms |
53708 KB |
Output is correct |
57 |
Correct |
206 ms |
58308 KB |
Output is correct |
58 |
Correct |
181 ms |
55136 KB |
Output is correct |
59 |
Correct |
162 ms |
56004 KB |
Output is correct |
60 |
Correct |
219 ms |
59080 KB |
Output is correct |
61 |
Correct |
68 ms |
53668 KB |
Output is correct |
62 |
Correct |
66 ms |
53284 KB |
Output is correct |
63 |
Correct |
247 ms |
60612 KB |
Output is correct |
64 |
Correct |
305 ms |
61376 KB |
Output is correct |
65 |
Correct |
201 ms |
56412 KB |
Output is correct |
66 |
Correct |
207 ms |
57544 KB |
Output is correct |
67 |
Correct |
218 ms |
56800 KB |
Output is correct |
68 |
Correct |
202 ms |
58316 KB |
Output is correct |
69 |
Correct |
211 ms |
58116 KB |
Output is correct |
70 |
Correct |
206 ms |
58316 KB |
Output is correct |
71 |
Correct |
220 ms |
57380 KB |
Output is correct |
72 |
Correct |
218 ms |
56952 KB |
Output is correct |
73 |
Correct |
207 ms |
57256 KB |
Output is correct |
74 |
Correct |
219 ms |
56520 KB |
Output is correct |
75 |
Correct |
244 ms |
58368 KB |
Output is correct |
76 |
Correct |
209 ms |
58312 KB |
Output is correct |
77 |
Correct |
215 ms |
57288 KB |
Output is correct |
78 |
Correct |
232 ms |
58144 KB |
Output is correct |
79 |
Correct |
165 ms |
56512 KB |
Output is correct |
80 |
Correct |
166 ms |
57028 KB |
Output is correct |
81 |
Correct |
174 ms |
61132 KB |
Output is correct |
82 |
Correct |
41 ms |
42956 KB |
Output is correct |
83 |
Correct |
41 ms |
43120 KB |
Output is correct |
84 |
Correct |
18 ms |
42452 KB |
Output is correct |
85 |
Correct |
26 ms |
42648 KB |
Output is correct |
86 |
Correct |
45 ms |
43092 KB |
Output is correct |
87 |
Correct |
47 ms |
43092 KB |
Output is correct |
88 |
Correct |
47 ms |
43048 KB |
Output is correct |
89 |
Correct |
47 ms |
42960 KB |
Output is correct |
90 |
Correct |
46 ms |
43088 KB |
Output is correct |
91 |
Correct |
47 ms |
43088 KB |
Output is correct |
92 |
Correct |
25 ms |
42552 KB |
Output is correct |
93 |
Correct |
50 ms |
43052 KB |
Output is correct |
94 |
Correct |
36 ms |
42576 KB |
Output is correct |
95 |
Correct |
42 ms |
42856 KB |
Output is correct |
96 |
Correct |
47 ms |
43136 KB |
Output is correct |
97 |
Correct |
46 ms |
43100 KB |
Output is correct |
98 |
Correct |
38 ms |
43604 KB |
Output is correct |
99 |
Correct |
44 ms |
44116 KB |
Output is correct |
100 |
Correct |
48 ms |
43824 KB |
Output is correct |
101 |
Correct |
52 ms |
45512 KB |
Output is correct |
102 |
Correct |
52 ms |
45772 KB |
Output is correct |
103 |
Correct |
41 ms |
44336 KB |
Output is correct |
104 |
Correct |
46 ms |
45092 KB |
Output is correct |
105 |
Correct |
51 ms |
45776 KB |
Output is correct |
106 |
Correct |
23 ms |
44056 KB |
Output is correct |
107 |
Correct |
22 ms |
44108 KB |
Output is correct |
108 |
Correct |
33 ms |
44768 KB |
Output is correct |
109 |
Correct |
35 ms |
44240 KB |
Output is correct |
110 |
Correct |
55 ms |
45260 KB |
Output is correct |
111 |
Correct |
47 ms |
45260 KB |
Output is correct |
112 |
Correct |
47 ms |
44416 KB |
Output is correct |
113 |
Correct |
56 ms |
44748 KB |
Output is correct |
114 |
Correct |
49 ms |
44880 KB |
Output is correct |
115 |
Correct |
53 ms |
45140 KB |
Output is correct |
116 |
Correct |
35 ms |
43604 KB |
Output is correct |
117 |
Correct |
56 ms |
44764 KB |
Output is correct |
118 |
Correct |
42 ms |
43952 KB |
Output is correct |
119 |
Correct |
40 ms |
43984 KB |
Output is correct |
120 |
Correct |
50 ms |
44768 KB |
Output is correct |
121 |
Correct |
52 ms |
44748 KB |
Output is correct |
122 |
Correct |
50 ms |
44628 KB |
Output is correct |
123 |
Correct |
50 ms |
44624 KB |
Output is correct |
124 |
Correct |
50 ms |
44628 KB |
Output is correct |
125 |
Correct |
44 ms |
44120 KB |
Output is correct |
126 |
Correct |
30 ms |
44016 KB |
Output is correct |
127 |
Correct |
37 ms |
43984 KB |
Output is correct |
128 |
Correct |
47 ms |
44492 KB |
Output is correct |
129 |
Correct |
48 ms |
45392 KB |
Output is correct |
130 |
Correct |
200 ms |
58924 KB |
Output is correct |
131 |
Correct |
159 ms |
54272 KB |
Output is correct |
132 |
Correct |
207 ms |
57796 KB |
Output is correct |
133 |
Correct |
222 ms |
60104 KB |
Output is correct |
134 |
Correct |
189 ms |
58436 KB |
Output is correct |
135 |
Correct |
236 ms |
60688 KB |
Output is correct |
136 |
Correct |
230 ms |
61384 KB |
Output is correct |
137 |
Correct |
218 ms |
62404 KB |
Output is correct |
138 |
Correct |
191 ms |
56980 KB |
Output is correct |
139 |
Correct |
222 ms |
58192 KB |
Output is correct |
140 |
Correct |
214 ms |
58824 KB |
Output is correct |
141 |
Correct |
206 ms |
58052 KB |
Output is correct |
142 |
Correct |
208 ms |
57876 KB |
Output is correct |
143 |
Correct |
206 ms |
57840 KB |
Output is correct |
144 |
Correct |
183 ms |
58620 KB |
Output is correct |
145 |
Correct |
206 ms |
58016 KB |
Output is correct |
146 |
Correct |
215 ms |
57288 KB |
Output is correct |
147 |
Correct |
263 ms |
58008 KB |
Output is correct |
148 |
Correct |
212 ms |
57804 KB |
Output is correct |
149 |
Correct |
209 ms |
57952 KB |
Output is correct |
150 |
Correct |
104 ms |
55444 KB |
Output is correct |
151 |
Correct |
179 ms |
57540 KB |
Output is correct |
152 |
Correct |
166 ms |
57544 KB |
Output is correct |
153 |
Correct |
205 ms |
61208 KB |
Output is correct |