#include<bits/stdc++.h>
using ll = long long;
using namespace std;
#define pll pair <ll,ll>
#define fi first
#define se second
#define MP make_pair
#define sz(a) (ll((a).size()))
#define BIT(mask,i) (((mask) >> (i))&1)
#define MASK(i) (1LL << (i))
const ll MAXN=2.5e5;
struct node{
ll sum,worst,cus;
node(ll a=0,ll b=0,ll c=0):sum(a),worst(b),cus(c){
}
};
node operator + (const node &x,const node &y){
node res;
res.sum = x.sum+y.sum;
res.worst = min(x.worst,y.worst+x.sum);
res.cus = x.cus+y.cus;
return res;
}
node tree[MAXN*4+100];
void update(ll id,ll l,ll r,ll i,node v){
if (l > i || r < i)return;
if (l == r){tree[id]=v;return;}
ll mid = (l + r) >> 1;
update(id<<1,l,mid,i,v);
update(id<<1|1,mid+1,r,i,v);
tree[id] = tree[id<<1]+tree[id<<1|1];
}
node get(ll id,ll l,ll r,ll l1,ll r1){
if (l > r1 || l1 > r || l1 > r1)return node(0,0,0);
if (l1 <= l && r <= r1)return tree[id];
ll mid = (l + r) >> 1;
return get(id<<1,l,mid,l1,r1) + get(id<<1|1,mid+1,r,l1,r1);
}
ll get_cus(ll id,ll l,ll r,ll k){
if (l==r)return l;
ll mid = (l + r) >> 1;
if (tree[id<<1].cus >= k)return get_cus(id<<1,l,mid,k);
else return get_cus(id<<1|1,mid+1,r,k-tree[id<<1].cus);
}
struct query{
ll x,id;
node v;
};
void out(ll id,ll l,ll r){
cout<<id<<' '<<l<<' '<<r<<" : "<<tree[id].sum<<' '<<tree[id].worst<<' '<<tree[id].cus<<'\n';
if (l != r){
ll mid = (l + r) >> 1;
out(id<<1,l,mid);
out(id<<1|1,mid+1,r);
}
}
vector <pll> question[MAXN+100];
ll ans[MAXN+100];
ll customer_type[MAXN+100];
ll n,m,q;
int main(){
ios_base::sync_with_stdio(0);cin.tie(nullptr);
cin>>n>>m>>q;
vector <query> all;
for (ll i = 1;i <= q;i ++){
ans[i] = -1;
ll t,l,r,k,c;
cin>>t;
if (t==1){
cin>>l>>r>>c>>k;
all.push_back({l,i,node(k,0,k)});
all.push_back({r+1,i,node(0,0,0)});
customer_type[i] = c;
}
if (t==2){
cin>>l>>r>>k;
all.push_back({l,i,node(-k,-k,0)});
all.push_back({r+1,i,node(0,0,0)});
}
if (t==3){cin>>l>>r;question[l].push_back(MP(r,i));}
}
sort(all.begin(),all.end(),[&](query x,query y){return x.x < y.x;});
for (ll i = 1,ptr = 0;i <= n;i ++){
while (ptr < sz(all) && all[ptr].x<=i){
update(1,1,q,all[ptr].id,all[ptr].v);
ptr++;
}
// cout<<"SHOP "<<i<<endl;
// out(1,1,q);
for (auto x:question[i]){
node tmp = get(1,1,q,1,x.se);
if (x.fi > tmp.sum - tmp.worst)ans[x.se] = 0;
else ans[x.se] = customer_type[get_cus(1,1,q,tmp.cus - (tmp.sum - tmp.worst) + x.fi)];
}
}
for (ll i = 1;i <= q;i++){
if (ans[i] != -1)cout<<ans[i]<<'\n';
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
30060 KB |
Output is correct |
2 |
Correct |
18 ms |
32092 KB |
Output is correct |
3 |
Correct |
15 ms |
30044 KB |
Output is correct |
4 |
Correct |
14 ms |
30044 KB |
Output is correct |
5 |
Correct |
13 ms |
30040 KB |
Output is correct |
6 |
Correct |
13 ms |
30044 KB |
Output is correct |
7 |
Correct |
16 ms |
30120 KB |
Output is correct |
8 |
Correct |
16 ms |
30044 KB |
Output is correct |
9 |
Correct |
16 ms |
30304 KB |
Output is correct |
10 |
Correct |
15 ms |
30048 KB |
Output is correct |
11 |
Correct |
15 ms |
30296 KB |
Output is correct |
12 |
Correct |
13 ms |
30040 KB |
Output is correct |
13 |
Correct |
14 ms |
30136 KB |
Output is correct |
14 |
Correct |
12 ms |
30160 KB |
Output is correct |
15 |
Correct |
12 ms |
29784 KB |
Output is correct |
16 |
Correct |
13 ms |
30136 KB |
Output is correct |
17 |
Correct |
13 ms |
30052 KB |
Output is correct |
18 |
Correct |
17 ms |
30052 KB |
Output is correct |
19 |
Correct |
17 ms |
30056 KB |
Output is correct |
20 |
Correct |
14 ms |
30048 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
30060 KB |
Output is correct |
2 |
Correct |
18 ms |
32092 KB |
Output is correct |
3 |
Correct |
15 ms |
30044 KB |
Output is correct |
4 |
Correct |
14 ms |
30044 KB |
Output is correct |
5 |
Correct |
13 ms |
30040 KB |
Output is correct |
6 |
Correct |
13 ms |
30044 KB |
Output is correct |
7 |
Correct |
16 ms |
30120 KB |
Output is correct |
8 |
Correct |
16 ms |
30044 KB |
Output is correct |
9 |
Correct |
16 ms |
30304 KB |
Output is correct |
10 |
Correct |
15 ms |
30048 KB |
Output is correct |
11 |
Correct |
15 ms |
30296 KB |
Output is correct |
12 |
Correct |
13 ms |
30040 KB |
Output is correct |
13 |
Correct |
14 ms |
30136 KB |
Output is correct |
14 |
Correct |
12 ms |
30160 KB |
Output is correct |
15 |
Correct |
12 ms |
29784 KB |
Output is correct |
16 |
Correct |
13 ms |
30136 KB |
Output is correct |
17 |
Correct |
13 ms |
30052 KB |
Output is correct |
18 |
Correct |
17 ms |
30052 KB |
Output is correct |
19 |
Correct |
17 ms |
30056 KB |
Output is correct |
20 |
Correct |
14 ms |
30048 KB |
Output is correct |
21 |
Correct |
13 ms |
30308 KB |
Output is correct |
22 |
Correct |
14 ms |
30056 KB |
Output is correct |
23 |
Correct |
13 ms |
30048 KB |
Output is correct |
24 |
Correct |
14 ms |
30052 KB |
Output is correct |
25 |
Correct |
13 ms |
29968 KB |
Output is correct |
26 |
Correct |
13 ms |
30172 KB |
Output is correct |
27 |
Correct |
18 ms |
30056 KB |
Output is correct |
28 |
Correct |
14 ms |
30056 KB |
Output is correct |
29 |
Correct |
15 ms |
30056 KB |
Output is correct |
30 |
Correct |
14 ms |
29996 KB |
Output is correct |
31 |
Correct |
14 ms |
30308 KB |
Output is correct |
32 |
Correct |
17 ms |
30056 KB |
Output is correct |
33 |
Correct |
14 ms |
29960 KB |
Output is correct |
34 |
Correct |
13 ms |
30012 KB |
Output is correct |
35 |
Correct |
13 ms |
30056 KB |
Output is correct |
36 |
Correct |
14 ms |
29968 KB |
Output is correct |
37 |
Correct |
15 ms |
30056 KB |
Output is correct |
38 |
Correct |
14 ms |
30104 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
74 ms |
37860 KB |
Output is correct |
2 |
Correct |
76 ms |
36816 KB |
Output is correct |
3 |
Correct |
77 ms |
37328 KB |
Output is correct |
4 |
Correct |
63 ms |
37344 KB |
Output is correct |
5 |
Correct |
82 ms |
36792 KB |
Output is correct |
6 |
Correct |
75 ms |
36872 KB |
Output is correct |
7 |
Correct |
49 ms |
37100 KB |
Output is correct |
8 |
Correct |
58 ms |
37092 KB |
Output is correct |
9 |
Correct |
65 ms |
36824 KB |
Output is correct |
10 |
Correct |
65 ms |
37004 KB |
Output is correct |
11 |
Correct |
67 ms |
37028 KB |
Output is correct |
12 |
Correct |
80 ms |
36924 KB |
Output is correct |
13 |
Correct |
65 ms |
36968 KB |
Output is correct |
14 |
Correct |
72 ms |
37076 KB |
Output is correct |
15 |
Correct |
67 ms |
37060 KB |
Output is correct |
16 |
Correct |
71 ms |
36756 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
306 ms |
60000 KB |
Output is correct |
2 |
Correct |
227 ms |
48368 KB |
Output is correct |
3 |
Correct |
334 ms |
60100 KB |
Output is correct |
4 |
Correct |
223 ms |
58704 KB |
Output is correct |
5 |
Correct |
236 ms |
59532 KB |
Output is correct |
6 |
Correct |
304 ms |
58804 KB |
Output is correct |
7 |
Correct |
149 ms |
58840 KB |
Output is correct |
8 |
Correct |
177 ms |
58456 KB |
Output is correct |
9 |
Correct |
318 ms |
53288 KB |
Output is correct |
10 |
Correct |
275 ms |
53392 KB |
Output is correct |
11 |
Correct |
308 ms |
58572 KB |
Output is correct |
12 |
Correct |
339 ms |
58796 KB |
Output is correct |
13 |
Correct |
374 ms |
57952 KB |
Output is correct |
14 |
Correct |
371 ms |
58800 KB |
Output is correct |
15 |
Correct |
341 ms |
58540 KB |
Output is correct |
16 |
Correct |
363 ms |
58548 KB |
Output is correct |
17 |
Correct |
328 ms |
58592 KB |
Output is correct |
18 |
Correct |
324 ms |
58808 KB |
Output is correct |
19 |
Correct |
311 ms |
58816 KB |
Output is correct |
20 |
Correct |
349 ms |
58508 KB |
Output is correct |
21 |
Correct |
328 ms |
58844 KB |
Output is correct |
22 |
Correct |
331 ms |
58696 KB |
Output is correct |
23 |
Correct |
364 ms |
58500 KB |
Output is correct |
24 |
Correct |
321 ms |
58692 KB |
Output is correct |
25 |
Correct |
322 ms |
59928 KB |
Output is correct |
26 |
Correct |
348 ms |
59888 KB |
Output is correct |
27 |
Correct |
291 ms |
57084 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
30060 KB |
Output is correct |
2 |
Correct |
18 ms |
32092 KB |
Output is correct |
3 |
Correct |
15 ms |
30044 KB |
Output is correct |
4 |
Correct |
14 ms |
30044 KB |
Output is correct |
5 |
Correct |
13 ms |
30040 KB |
Output is correct |
6 |
Correct |
13 ms |
30044 KB |
Output is correct |
7 |
Correct |
16 ms |
30120 KB |
Output is correct |
8 |
Correct |
16 ms |
30044 KB |
Output is correct |
9 |
Correct |
16 ms |
30304 KB |
Output is correct |
10 |
Correct |
15 ms |
30048 KB |
Output is correct |
11 |
Correct |
15 ms |
30296 KB |
Output is correct |
12 |
Correct |
13 ms |
30040 KB |
Output is correct |
13 |
Correct |
14 ms |
30136 KB |
Output is correct |
14 |
Correct |
12 ms |
30160 KB |
Output is correct |
15 |
Correct |
12 ms |
29784 KB |
Output is correct |
16 |
Correct |
13 ms |
30136 KB |
Output is correct |
17 |
Correct |
13 ms |
30052 KB |
Output is correct |
18 |
Correct |
17 ms |
30052 KB |
Output is correct |
19 |
Correct |
17 ms |
30056 KB |
Output is correct |
20 |
Correct |
14 ms |
30048 KB |
Output is correct |
21 |
Correct |
74 ms |
37860 KB |
Output is correct |
22 |
Correct |
76 ms |
36816 KB |
Output is correct |
23 |
Correct |
77 ms |
37328 KB |
Output is correct |
24 |
Correct |
63 ms |
37344 KB |
Output is correct |
25 |
Correct |
82 ms |
36792 KB |
Output is correct |
26 |
Correct |
75 ms |
36872 KB |
Output is correct |
27 |
Correct |
49 ms |
37100 KB |
Output is correct |
28 |
Correct |
58 ms |
37092 KB |
Output is correct |
29 |
Correct |
65 ms |
36824 KB |
Output is correct |
30 |
Correct |
65 ms |
37004 KB |
Output is correct |
31 |
Correct |
67 ms |
37028 KB |
Output is correct |
32 |
Correct |
80 ms |
36924 KB |
Output is correct |
33 |
Correct |
65 ms |
36968 KB |
Output is correct |
34 |
Correct |
72 ms |
37076 KB |
Output is correct |
35 |
Correct |
67 ms |
37060 KB |
Output is correct |
36 |
Correct |
71 ms |
36756 KB |
Output is correct |
37 |
Correct |
70 ms |
37084 KB |
Output is correct |
38 |
Correct |
64 ms |
36836 KB |
Output is correct |
39 |
Correct |
37 ms |
36648 KB |
Output is correct |
40 |
Correct |
49 ms |
36452 KB |
Output is correct |
41 |
Correct |
71 ms |
36800 KB |
Output is correct |
42 |
Correct |
80 ms |
37012 KB |
Output is correct |
43 |
Correct |
74 ms |
36816 KB |
Output is correct |
44 |
Correct |
73 ms |
36952 KB |
Output is correct |
45 |
Correct |
78 ms |
36816 KB |
Output is correct |
46 |
Correct |
72 ms |
36828 KB |
Output is correct |
47 |
Correct |
53 ms |
36876 KB |
Output is correct |
48 |
Correct |
70 ms |
37080 KB |
Output is correct |
49 |
Correct |
56 ms |
36832 KB |
Output is correct |
50 |
Correct |
69 ms |
36820 KB |
Output is correct |
51 |
Correct |
87 ms |
36580 KB |
Output is correct |
52 |
Correct |
70 ms |
36624 KB |
Output is correct |
53 |
Correct |
54 ms |
36568 KB |
Output is correct |
54 |
Correct |
67 ms |
36780 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
66 ms |
35320 KB |
Output is correct |
2 |
Correct |
74 ms |
35872 KB |
Output is correct |
3 |
Correct |
59 ms |
36080 KB |
Output is correct |
4 |
Correct |
69 ms |
34292 KB |
Output is correct |
5 |
Correct |
71 ms |
35056 KB |
Output is correct |
6 |
Correct |
68 ms |
36056 KB |
Output is correct |
7 |
Correct |
44 ms |
36640 KB |
Output is correct |
8 |
Correct |
45 ms |
34528 KB |
Output is correct |
9 |
Correct |
54 ms |
35860 KB |
Output is correct |
10 |
Correct |
48 ms |
34268 KB |
Output is correct |
11 |
Correct |
68 ms |
35880 KB |
Output is correct |
12 |
Correct |
61 ms |
35876 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
30060 KB |
Output is correct |
2 |
Correct |
18 ms |
32092 KB |
Output is correct |
3 |
Correct |
15 ms |
30044 KB |
Output is correct |
4 |
Correct |
14 ms |
30044 KB |
Output is correct |
5 |
Correct |
13 ms |
30040 KB |
Output is correct |
6 |
Correct |
13 ms |
30044 KB |
Output is correct |
7 |
Correct |
16 ms |
30120 KB |
Output is correct |
8 |
Correct |
16 ms |
30044 KB |
Output is correct |
9 |
Correct |
16 ms |
30304 KB |
Output is correct |
10 |
Correct |
15 ms |
30048 KB |
Output is correct |
11 |
Correct |
15 ms |
30296 KB |
Output is correct |
12 |
Correct |
13 ms |
30040 KB |
Output is correct |
13 |
Correct |
14 ms |
30136 KB |
Output is correct |
14 |
Correct |
12 ms |
30160 KB |
Output is correct |
15 |
Correct |
12 ms |
29784 KB |
Output is correct |
16 |
Correct |
13 ms |
30136 KB |
Output is correct |
17 |
Correct |
13 ms |
30052 KB |
Output is correct |
18 |
Correct |
17 ms |
30052 KB |
Output is correct |
19 |
Correct |
17 ms |
30056 KB |
Output is correct |
20 |
Correct |
14 ms |
30048 KB |
Output is correct |
21 |
Correct |
13 ms |
30308 KB |
Output is correct |
22 |
Correct |
14 ms |
30056 KB |
Output is correct |
23 |
Correct |
13 ms |
30048 KB |
Output is correct |
24 |
Correct |
14 ms |
30052 KB |
Output is correct |
25 |
Correct |
13 ms |
29968 KB |
Output is correct |
26 |
Correct |
13 ms |
30172 KB |
Output is correct |
27 |
Correct |
18 ms |
30056 KB |
Output is correct |
28 |
Correct |
14 ms |
30056 KB |
Output is correct |
29 |
Correct |
15 ms |
30056 KB |
Output is correct |
30 |
Correct |
14 ms |
29996 KB |
Output is correct |
31 |
Correct |
14 ms |
30308 KB |
Output is correct |
32 |
Correct |
17 ms |
30056 KB |
Output is correct |
33 |
Correct |
14 ms |
29960 KB |
Output is correct |
34 |
Correct |
13 ms |
30012 KB |
Output is correct |
35 |
Correct |
13 ms |
30056 KB |
Output is correct |
36 |
Correct |
14 ms |
29968 KB |
Output is correct |
37 |
Correct |
15 ms |
30056 KB |
Output is correct |
38 |
Correct |
14 ms |
30104 KB |
Output is correct |
39 |
Correct |
74 ms |
37860 KB |
Output is correct |
40 |
Correct |
76 ms |
36816 KB |
Output is correct |
41 |
Correct |
77 ms |
37328 KB |
Output is correct |
42 |
Correct |
63 ms |
37344 KB |
Output is correct |
43 |
Correct |
82 ms |
36792 KB |
Output is correct |
44 |
Correct |
75 ms |
36872 KB |
Output is correct |
45 |
Correct |
49 ms |
37100 KB |
Output is correct |
46 |
Correct |
58 ms |
37092 KB |
Output is correct |
47 |
Correct |
65 ms |
36824 KB |
Output is correct |
48 |
Correct |
65 ms |
37004 KB |
Output is correct |
49 |
Correct |
67 ms |
37028 KB |
Output is correct |
50 |
Correct |
80 ms |
36924 KB |
Output is correct |
51 |
Correct |
65 ms |
36968 KB |
Output is correct |
52 |
Correct |
72 ms |
37076 KB |
Output is correct |
53 |
Correct |
67 ms |
37060 KB |
Output is correct |
54 |
Correct |
71 ms |
36756 KB |
Output is correct |
55 |
Correct |
70 ms |
37084 KB |
Output is correct |
56 |
Correct |
64 ms |
36836 KB |
Output is correct |
57 |
Correct |
37 ms |
36648 KB |
Output is correct |
58 |
Correct |
49 ms |
36452 KB |
Output is correct |
59 |
Correct |
71 ms |
36800 KB |
Output is correct |
60 |
Correct |
80 ms |
37012 KB |
Output is correct |
61 |
Correct |
74 ms |
36816 KB |
Output is correct |
62 |
Correct |
73 ms |
36952 KB |
Output is correct |
63 |
Correct |
78 ms |
36816 KB |
Output is correct |
64 |
Correct |
72 ms |
36828 KB |
Output is correct |
65 |
Correct |
53 ms |
36876 KB |
Output is correct |
66 |
Correct |
70 ms |
37080 KB |
Output is correct |
67 |
Correct |
56 ms |
36832 KB |
Output is correct |
68 |
Correct |
69 ms |
36820 KB |
Output is correct |
69 |
Correct |
87 ms |
36580 KB |
Output is correct |
70 |
Correct |
70 ms |
36624 KB |
Output is correct |
71 |
Correct |
54 ms |
36568 KB |
Output is correct |
72 |
Correct |
67 ms |
36780 KB |
Output is correct |
73 |
Correct |
66 ms |
35320 KB |
Output is correct |
74 |
Correct |
74 ms |
35872 KB |
Output is correct |
75 |
Correct |
59 ms |
36080 KB |
Output is correct |
76 |
Correct |
69 ms |
34292 KB |
Output is correct |
77 |
Correct |
71 ms |
35056 KB |
Output is correct |
78 |
Correct |
68 ms |
36056 KB |
Output is correct |
79 |
Correct |
44 ms |
36640 KB |
Output is correct |
80 |
Correct |
45 ms |
34528 KB |
Output is correct |
81 |
Correct |
54 ms |
35860 KB |
Output is correct |
82 |
Correct |
48 ms |
34268 KB |
Output is correct |
83 |
Correct |
68 ms |
35880 KB |
Output is correct |
84 |
Correct |
61 ms |
35876 KB |
Output is correct |
85 |
Correct |
61 ms |
37592 KB |
Output is correct |
86 |
Correct |
68 ms |
37444 KB |
Output is correct |
87 |
Correct |
59 ms |
37072 KB |
Output is correct |
88 |
Correct |
67 ms |
37120 KB |
Output is correct |
89 |
Correct |
47 ms |
34304 KB |
Output is correct |
90 |
Correct |
66 ms |
37072 KB |
Output is correct |
91 |
Correct |
58 ms |
37080 KB |
Output is correct |
92 |
Correct |
58 ms |
37080 KB |
Output is correct |
93 |
Correct |
69 ms |
37072 KB |
Output is correct |
94 |
Correct |
67 ms |
37072 KB |
Output is correct |
95 |
Correct |
67 ms |
37068 KB |
Output is correct |
96 |
Correct |
67 ms |
37084 KB |
Output is correct |
97 |
Correct |
70 ms |
37072 KB |
Output is correct |
98 |
Correct |
59 ms |
37076 KB |
Output is correct |
99 |
Correct |
49 ms |
37236 KB |
Output is correct |
100 |
Correct |
56 ms |
37332 KB |
Output is correct |
101 |
Correct |
63 ms |
37332 KB |
Output is correct |
102 |
Correct |
67 ms |
37044 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
30060 KB |
Output is correct |
2 |
Correct |
18 ms |
32092 KB |
Output is correct |
3 |
Correct |
15 ms |
30044 KB |
Output is correct |
4 |
Correct |
14 ms |
30044 KB |
Output is correct |
5 |
Correct |
13 ms |
30040 KB |
Output is correct |
6 |
Correct |
13 ms |
30044 KB |
Output is correct |
7 |
Correct |
16 ms |
30120 KB |
Output is correct |
8 |
Correct |
16 ms |
30044 KB |
Output is correct |
9 |
Correct |
16 ms |
30304 KB |
Output is correct |
10 |
Correct |
15 ms |
30048 KB |
Output is correct |
11 |
Correct |
15 ms |
30296 KB |
Output is correct |
12 |
Correct |
13 ms |
30040 KB |
Output is correct |
13 |
Correct |
14 ms |
30136 KB |
Output is correct |
14 |
Correct |
12 ms |
30160 KB |
Output is correct |
15 |
Correct |
12 ms |
29784 KB |
Output is correct |
16 |
Correct |
13 ms |
30136 KB |
Output is correct |
17 |
Correct |
13 ms |
30052 KB |
Output is correct |
18 |
Correct |
17 ms |
30052 KB |
Output is correct |
19 |
Correct |
17 ms |
30056 KB |
Output is correct |
20 |
Correct |
14 ms |
30048 KB |
Output is correct |
21 |
Correct |
13 ms |
30308 KB |
Output is correct |
22 |
Correct |
14 ms |
30056 KB |
Output is correct |
23 |
Correct |
13 ms |
30048 KB |
Output is correct |
24 |
Correct |
14 ms |
30052 KB |
Output is correct |
25 |
Correct |
13 ms |
29968 KB |
Output is correct |
26 |
Correct |
13 ms |
30172 KB |
Output is correct |
27 |
Correct |
18 ms |
30056 KB |
Output is correct |
28 |
Correct |
14 ms |
30056 KB |
Output is correct |
29 |
Correct |
15 ms |
30056 KB |
Output is correct |
30 |
Correct |
14 ms |
29996 KB |
Output is correct |
31 |
Correct |
14 ms |
30308 KB |
Output is correct |
32 |
Correct |
17 ms |
30056 KB |
Output is correct |
33 |
Correct |
14 ms |
29960 KB |
Output is correct |
34 |
Correct |
13 ms |
30012 KB |
Output is correct |
35 |
Correct |
13 ms |
30056 KB |
Output is correct |
36 |
Correct |
14 ms |
29968 KB |
Output is correct |
37 |
Correct |
15 ms |
30056 KB |
Output is correct |
38 |
Correct |
14 ms |
30104 KB |
Output is correct |
39 |
Correct |
74 ms |
37860 KB |
Output is correct |
40 |
Correct |
76 ms |
36816 KB |
Output is correct |
41 |
Correct |
77 ms |
37328 KB |
Output is correct |
42 |
Correct |
63 ms |
37344 KB |
Output is correct |
43 |
Correct |
82 ms |
36792 KB |
Output is correct |
44 |
Correct |
75 ms |
36872 KB |
Output is correct |
45 |
Correct |
49 ms |
37100 KB |
Output is correct |
46 |
Correct |
58 ms |
37092 KB |
Output is correct |
47 |
Correct |
65 ms |
36824 KB |
Output is correct |
48 |
Correct |
65 ms |
37004 KB |
Output is correct |
49 |
Correct |
67 ms |
37028 KB |
Output is correct |
50 |
Correct |
80 ms |
36924 KB |
Output is correct |
51 |
Correct |
65 ms |
36968 KB |
Output is correct |
52 |
Correct |
72 ms |
37076 KB |
Output is correct |
53 |
Correct |
67 ms |
37060 KB |
Output is correct |
54 |
Correct |
71 ms |
36756 KB |
Output is correct |
55 |
Correct |
306 ms |
60000 KB |
Output is correct |
56 |
Correct |
227 ms |
48368 KB |
Output is correct |
57 |
Correct |
334 ms |
60100 KB |
Output is correct |
58 |
Correct |
223 ms |
58704 KB |
Output is correct |
59 |
Correct |
236 ms |
59532 KB |
Output is correct |
60 |
Correct |
304 ms |
58804 KB |
Output is correct |
61 |
Correct |
149 ms |
58840 KB |
Output is correct |
62 |
Correct |
177 ms |
58456 KB |
Output is correct |
63 |
Correct |
318 ms |
53288 KB |
Output is correct |
64 |
Correct |
275 ms |
53392 KB |
Output is correct |
65 |
Correct |
308 ms |
58572 KB |
Output is correct |
66 |
Correct |
339 ms |
58796 KB |
Output is correct |
67 |
Correct |
374 ms |
57952 KB |
Output is correct |
68 |
Correct |
371 ms |
58800 KB |
Output is correct |
69 |
Correct |
341 ms |
58540 KB |
Output is correct |
70 |
Correct |
363 ms |
58548 KB |
Output is correct |
71 |
Correct |
328 ms |
58592 KB |
Output is correct |
72 |
Correct |
324 ms |
58808 KB |
Output is correct |
73 |
Correct |
311 ms |
58816 KB |
Output is correct |
74 |
Correct |
349 ms |
58508 KB |
Output is correct |
75 |
Correct |
328 ms |
58844 KB |
Output is correct |
76 |
Correct |
331 ms |
58696 KB |
Output is correct |
77 |
Correct |
364 ms |
58500 KB |
Output is correct |
78 |
Correct |
321 ms |
58692 KB |
Output is correct |
79 |
Correct |
322 ms |
59928 KB |
Output is correct |
80 |
Correct |
348 ms |
59888 KB |
Output is correct |
81 |
Correct |
291 ms |
57084 KB |
Output is correct |
82 |
Correct |
70 ms |
37084 KB |
Output is correct |
83 |
Correct |
64 ms |
36836 KB |
Output is correct |
84 |
Correct |
37 ms |
36648 KB |
Output is correct |
85 |
Correct |
49 ms |
36452 KB |
Output is correct |
86 |
Correct |
71 ms |
36800 KB |
Output is correct |
87 |
Correct |
80 ms |
37012 KB |
Output is correct |
88 |
Correct |
74 ms |
36816 KB |
Output is correct |
89 |
Correct |
73 ms |
36952 KB |
Output is correct |
90 |
Correct |
78 ms |
36816 KB |
Output is correct |
91 |
Correct |
72 ms |
36828 KB |
Output is correct |
92 |
Correct |
53 ms |
36876 KB |
Output is correct |
93 |
Correct |
70 ms |
37080 KB |
Output is correct |
94 |
Correct |
56 ms |
36832 KB |
Output is correct |
95 |
Correct |
69 ms |
36820 KB |
Output is correct |
96 |
Correct |
87 ms |
36580 KB |
Output is correct |
97 |
Correct |
70 ms |
36624 KB |
Output is correct |
98 |
Correct |
54 ms |
36568 KB |
Output is correct |
99 |
Correct |
67 ms |
36780 KB |
Output is correct |
100 |
Correct |
66 ms |
35320 KB |
Output is correct |
101 |
Correct |
74 ms |
35872 KB |
Output is correct |
102 |
Correct |
59 ms |
36080 KB |
Output is correct |
103 |
Correct |
69 ms |
34292 KB |
Output is correct |
104 |
Correct |
71 ms |
35056 KB |
Output is correct |
105 |
Correct |
68 ms |
36056 KB |
Output is correct |
106 |
Correct |
44 ms |
36640 KB |
Output is correct |
107 |
Correct |
45 ms |
34528 KB |
Output is correct |
108 |
Correct |
54 ms |
35860 KB |
Output is correct |
109 |
Correct |
48 ms |
34268 KB |
Output is correct |
110 |
Correct |
68 ms |
35880 KB |
Output is correct |
111 |
Correct |
61 ms |
35876 KB |
Output is correct |
112 |
Correct |
61 ms |
37592 KB |
Output is correct |
113 |
Correct |
68 ms |
37444 KB |
Output is correct |
114 |
Correct |
59 ms |
37072 KB |
Output is correct |
115 |
Correct |
67 ms |
37120 KB |
Output is correct |
116 |
Correct |
47 ms |
34304 KB |
Output is correct |
117 |
Correct |
66 ms |
37072 KB |
Output is correct |
118 |
Correct |
58 ms |
37080 KB |
Output is correct |
119 |
Correct |
58 ms |
37080 KB |
Output is correct |
120 |
Correct |
69 ms |
37072 KB |
Output is correct |
121 |
Correct |
67 ms |
37072 KB |
Output is correct |
122 |
Correct |
67 ms |
37068 KB |
Output is correct |
123 |
Correct |
67 ms |
37084 KB |
Output is correct |
124 |
Correct |
70 ms |
37072 KB |
Output is correct |
125 |
Correct |
59 ms |
37076 KB |
Output is correct |
126 |
Correct |
49 ms |
37236 KB |
Output is correct |
127 |
Correct |
56 ms |
37332 KB |
Output is correct |
128 |
Correct |
63 ms |
37332 KB |
Output is correct |
129 |
Correct |
67 ms |
37044 KB |
Output is correct |
130 |
Correct |
319 ms |
60488 KB |
Output is correct |
131 |
Correct |
205 ms |
48716 KB |
Output is correct |
132 |
Correct |
312 ms |
60340 KB |
Output is correct |
133 |
Correct |
263 ms |
59176 KB |
Output is correct |
134 |
Correct |
234 ms |
59020 KB |
Output is correct |
135 |
Correct |
284 ms |
59056 KB |
Output is correct |
136 |
Correct |
257 ms |
54468 KB |
Output is correct |
137 |
Correct |
276 ms |
54248 KB |
Output is correct |
138 |
Correct |
302 ms |
58836 KB |
Output is correct |
139 |
Correct |
278 ms |
59184 KB |
Output is correct |
140 |
Correct |
279 ms |
58296 KB |
Output is correct |
141 |
Correct |
285 ms |
59056 KB |
Output is correct |
142 |
Correct |
296 ms |
58896 KB |
Output is correct |
143 |
Correct |
304 ms |
59128 KB |
Output is correct |
144 |
Correct |
282 ms |
59024 KB |
Output is correct |
145 |
Correct |
301 ms |
59056 KB |
Output is correct |
146 |
Correct |
319 ms |
58704 KB |
Output is correct |
147 |
Correct |
295 ms |
58904 KB |
Output is correct |
148 |
Correct |
332 ms |
59056 KB |
Output is correct |
149 |
Correct |
370 ms |
58956 KB |
Output is correct |
150 |
Correct |
240 ms |
60284 KB |
Output is correct |
151 |
Correct |
346 ms |
60120 KB |
Output is correct |
152 |
Correct |
337 ms |
60296 KB |
Output is correct |
153 |
Correct |
322 ms |
57528 KB |
Output is correct |