#define here cerr<<"===========================================\n"
#define dbg(x) cerr<<#x<<": "<<x<<endl;
#include "bits/stdc++.h"
//#include <ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/assoc_container.hpp>
#define ld double
#define ll long long
#define llinf 100000000000000000LL // 10^17
#define pb push_back
#define popb pop_back
#define fi first
#define sc second
#define endl '\n'
#define pll pair<ll,ll>
#define pld pair<ld,ld>
#define all(a) a.begin(),a.end()
#define ceri(a,l,r) {cerr<<#a<<": ";for(ll i_ = l;i_<=r;i_++) cerr<<a[i_]<< " ";cerr<<endl;}
#define cer(a) {cerr<<#a<<": ";for(ll x_ : a) cerr<<x_<< " ";cerr<<endl;}
#define daj_mi_malo_vremena ios_base::sync_with_stdio(false);cerr.tie(0);cout.tie(0);cin.tie(0);
using namespace std;
#define maxn 250005
ll n,m,q;
vector<pll> tq[maxn],t2q[maxn],Q[maxn];
ll tip[maxn];
pll t[2*maxn];
ll t2[2*maxn];
ll ls[2*maxn],rs[2*maxn],tsz = 0,root = 0;
ll ans[maxn];
ll c[maxn];
pll mrg(pll a,pll b){
return {a.fi+b.fi,max(b.sc,b.fi+a.sc)};
}
void init(ll &v,ll tl,ll tr){
if(!v) v = ++tsz;
if(tl==tr){return;}
ll mid = (tl+tr)/2;
init(ls[v],tl,mid);
init(rs[v],mid+1,tr);
}
void upd(ll v,ll tl,ll tr,ll i,ll x){
if(tl==tr){t[v] = {x,max(0LL,x)};return;}
ll mid = (tl+tr)/2;
if(i<=mid) upd(ls[v],tl,mid,i,x);
else upd(rs[v],mid+1,tr,i,x);
t[v] = mrg(t[ls[v]],t[rs[v]]);
}
pll get(ll v,ll tl,ll tr,ll l,ll r){
if(l>r||tl>tr||tl>r||tr<l) return {0LL,0LL};
if(tl>=l&&tr<=r) return t[v];
ll mid = (tl+tr)/2;
return mrg(get(ls[v],tl,mid,l,r),get(rs[v],mid+1,tr,l,r));
}
void upd2(ll v,ll tl,ll tr,ll i,ll x){
if(tl==tr){t2[v] = x;return;}
ll mid = (tl+tr)/2;
if(i<=mid) upd2(ls[v],tl,mid,i,x);
else upd2(rs[v],mid+1,tr,i,x);
t2[v] = t2[ls[v]] + t2[rs[v]];
}
ll sum(ll v,ll tl,ll tr,ll l,ll r){
if(l>r||tl>tr||tl>r||tr<l) return 0;
if(tl>=l&&tr<=r) return t2[v];
ll mid = (tl+tr)/2;
return sum(ls[v],tl,mid,l,r) + sum(rs[v],mid+1,tr,l,r);
}
ll walk(ll v,ll tl,ll tr,ll x){
if(tl==tr){
if(t2[v]<x) return tl;
return tl-1;
}
ll mid = (tl+tr)/2;
if(t2[ls[v]]>x) return walk(ls[v],tl,mid,x);
return walk(rs[v],mid+1,tr,x-t2[ls[v]]);
}
void tc(){
cin >> n >> m >> q;
init(root,1,q);
for(ll i = 1;i<=q;i++){
cin >> tip[i];
if(tip[i]==1){
ll l,r,x;
cin >> l >> r >> c[i] >> x;
tq[l].pb({i,x});
tq[r+1].pb({i,0});
t2q[l].pb({i,x});
t2q[r+1].pb({i,0});
}else if(tip[i]==2){
ll l,r,x; cin >> l >> r >> x;
tq[l].pb({i,-x});
tq[r+1].pb({i,0});
}else{
ll x,y;
cin >> x >> y;
Q[x].pb({i,y});
}
}
for(ll i = 1;i<=n;i++){
for(pll p : tq[i]) upd(1,1,q,p.fi,p.sc);
for(pll p : t2q[i]) upd2(1,1,q,p.fi,p.sc);
for(pll p : Q[i]){
ll id = p.fi;
ll x = get(1,1,q,1,id).sc,y = p.sc;
if(x<y) ans[id] = 0;
else{
ll d = sum(1,1,q,1,id) - x + y;
ll j = walk(1,1,q,d-1) + 1;
ans[id] = c[j];
}
}
}
for(ll i = 1;i<=q;i++){
if(tip[i]==3) cout<<ans[i]<<endl;
}
}
int main(){
daj_mi_malo_vremena
int t; t = 1;
while(t--){
tc();
}
return 0;
}
/**
3 5 7
1 2 3 5 2
1 1 2 2 4
3 2 3
2 1 3 3
3 1 2
1 2 3 4 2
3 3 2
3 4 7
1 1 2 1 1
1 1 3 4 1
2 2 3 1
2 1 3 1
1 1 2 2 1
3 1 1
3 3 2
183326 218318 22
1 106761 160918 151683 574906362
3 68709 1
1 29240 156379 22166 957318472
1 14054 181502 82845 97183925
2 112033 122908 587808357
2 57819 160939 215041262
3 36674 524274467
1 35854 69866 32334 322730299
1 1384 7230 115069 454256926
1 44192 158235 8750 84192710
3 54457 1077490708
2 10592 110384 979714505
2 44594 79244 311724477
3 160965 97183926
1 88748 101697 39148 373927458
3 41166 58039001
1 91501 137591 205480 958877326
2 77775 169655 135756956
1 12497 57047 60918 15666764
1 47839 51716 144688 732270998
3 114514 774994894
3 48645 169986425
**/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
18184 KB |
Output is correct |
2 |
Correct |
12 ms |
18340 KB |
Output is correct |
3 |
Correct |
14 ms |
18260 KB |
Output is correct |
4 |
Correct |
12 ms |
18260 KB |
Output is correct |
5 |
Correct |
11 ms |
18212 KB |
Output is correct |
6 |
Correct |
10 ms |
18260 KB |
Output is correct |
7 |
Correct |
11 ms |
18260 KB |
Output is correct |
8 |
Correct |
11 ms |
18260 KB |
Output is correct |
9 |
Correct |
11 ms |
18360 KB |
Output is correct |
10 |
Correct |
12 ms |
18348 KB |
Output is correct |
11 |
Correct |
11 ms |
18304 KB |
Output is correct |
12 |
Correct |
11 ms |
18348 KB |
Output is correct |
13 |
Correct |
12 ms |
18256 KB |
Output is correct |
14 |
Correct |
11 ms |
18260 KB |
Output is correct |
15 |
Correct |
11 ms |
18208 KB |
Output is correct |
16 |
Correct |
12 ms |
18260 KB |
Output is correct |
17 |
Correct |
14 ms |
18264 KB |
Output is correct |
18 |
Correct |
12 ms |
18340 KB |
Output is correct |
19 |
Correct |
12 ms |
18328 KB |
Output is correct |
20 |
Correct |
12 ms |
18388 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
18184 KB |
Output is correct |
2 |
Correct |
12 ms |
18340 KB |
Output is correct |
3 |
Correct |
14 ms |
18260 KB |
Output is correct |
4 |
Correct |
12 ms |
18260 KB |
Output is correct |
5 |
Correct |
11 ms |
18212 KB |
Output is correct |
6 |
Correct |
10 ms |
18260 KB |
Output is correct |
7 |
Correct |
11 ms |
18260 KB |
Output is correct |
8 |
Correct |
11 ms |
18260 KB |
Output is correct |
9 |
Correct |
11 ms |
18360 KB |
Output is correct |
10 |
Correct |
12 ms |
18348 KB |
Output is correct |
11 |
Correct |
11 ms |
18304 KB |
Output is correct |
12 |
Correct |
11 ms |
18348 KB |
Output is correct |
13 |
Correct |
12 ms |
18256 KB |
Output is correct |
14 |
Correct |
11 ms |
18260 KB |
Output is correct |
15 |
Correct |
11 ms |
18208 KB |
Output is correct |
16 |
Correct |
12 ms |
18260 KB |
Output is correct |
17 |
Correct |
14 ms |
18264 KB |
Output is correct |
18 |
Correct |
12 ms |
18340 KB |
Output is correct |
19 |
Correct |
12 ms |
18328 KB |
Output is correct |
20 |
Correct |
12 ms |
18388 KB |
Output is correct |
21 |
Correct |
11 ms |
18260 KB |
Output is correct |
22 |
Correct |
11 ms |
18260 KB |
Output is correct |
23 |
Correct |
12 ms |
18260 KB |
Output is correct |
24 |
Correct |
12 ms |
18332 KB |
Output is correct |
25 |
Correct |
10 ms |
18316 KB |
Output is correct |
26 |
Correct |
12 ms |
18260 KB |
Output is correct |
27 |
Correct |
13 ms |
18336 KB |
Output is correct |
28 |
Correct |
12 ms |
18332 KB |
Output is correct |
29 |
Correct |
13 ms |
18364 KB |
Output is correct |
30 |
Correct |
12 ms |
18344 KB |
Output is correct |
31 |
Correct |
13 ms |
18260 KB |
Output is correct |
32 |
Correct |
12 ms |
18336 KB |
Output is correct |
33 |
Correct |
12 ms |
18208 KB |
Output is correct |
34 |
Correct |
11 ms |
18260 KB |
Output is correct |
35 |
Correct |
12 ms |
18328 KB |
Output is correct |
36 |
Correct |
11 ms |
18260 KB |
Output is correct |
37 |
Correct |
13 ms |
18232 KB |
Output is correct |
38 |
Correct |
13 ms |
18388 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
126 ms |
29848 KB |
Output is correct |
2 |
Correct |
107 ms |
30564 KB |
Output is correct |
3 |
Correct |
108 ms |
29924 KB |
Output is correct |
4 |
Correct |
101 ms |
29812 KB |
Output is correct |
5 |
Correct |
121 ms |
30476 KB |
Output is correct |
6 |
Correct |
96 ms |
30564 KB |
Output is correct |
7 |
Correct |
42 ms |
27376 KB |
Output is correct |
8 |
Correct |
44 ms |
27776 KB |
Output is correct |
9 |
Correct |
127 ms |
29516 KB |
Output is correct |
10 |
Correct |
97 ms |
30064 KB |
Output is correct |
11 |
Correct |
93 ms |
29900 KB |
Output is correct |
12 |
Correct |
100 ms |
30152 KB |
Output is correct |
13 |
Correct |
96 ms |
29060 KB |
Output is correct |
14 |
Correct |
108 ms |
30356 KB |
Output is correct |
15 |
Correct |
112 ms |
31544 KB |
Output is correct |
16 |
Correct |
118 ms |
31692 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
558 ms |
61324 KB |
Output is correct |
2 |
Correct |
438 ms |
52612 KB |
Output is correct |
3 |
Correct |
657 ms |
65176 KB |
Output is correct |
4 |
Correct |
441 ms |
54152 KB |
Output is correct |
5 |
Correct |
482 ms |
54752 KB |
Output is correct |
6 |
Correct |
672 ms |
67840 KB |
Output is correct |
7 |
Correct |
159 ms |
58652 KB |
Output is correct |
8 |
Correct |
174 ms |
59164 KB |
Output is correct |
9 |
Correct |
678 ms |
66392 KB |
Output is correct |
10 |
Correct |
668 ms |
66436 KB |
Output is correct |
11 |
Correct |
633 ms |
63264 KB |
Output is correct |
12 |
Correct |
689 ms |
66124 KB |
Output is correct |
13 |
Correct |
631 ms |
63412 KB |
Output is correct |
14 |
Correct |
640 ms |
65964 KB |
Output is correct |
15 |
Correct |
644 ms |
65988 KB |
Output is correct |
16 |
Correct |
608 ms |
66004 KB |
Output is correct |
17 |
Correct |
641 ms |
65964 KB |
Output is correct |
18 |
Correct |
639 ms |
64696 KB |
Output is correct |
19 |
Correct |
630 ms |
66100 KB |
Output is correct |
20 |
Correct |
624 ms |
64868 KB |
Output is correct |
21 |
Correct |
631 ms |
66028 KB |
Output is correct |
22 |
Correct |
639 ms |
65892 KB |
Output is correct |
23 |
Correct |
619 ms |
66052 KB |
Output is correct |
24 |
Correct |
598 ms |
65992 KB |
Output is correct |
25 |
Correct |
466 ms |
64076 KB |
Output is correct |
26 |
Correct |
487 ms |
65036 KB |
Output is correct |
27 |
Correct |
438 ms |
68908 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
18184 KB |
Output is correct |
2 |
Correct |
12 ms |
18340 KB |
Output is correct |
3 |
Correct |
14 ms |
18260 KB |
Output is correct |
4 |
Correct |
12 ms |
18260 KB |
Output is correct |
5 |
Correct |
11 ms |
18212 KB |
Output is correct |
6 |
Correct |
10 ms |
18260 KB |
Output is correct |
7 |
Correct |
11 ms |
18260 KB |
Output is correct |
8 |
Correct |
11 ms |
18260 KB |
Output is correct |
9 |
Correct |
11 ms |
18360 KB |
Output is correct |
10 |
Correct |
12 ms |
18348 KB |
Output is correct |
11 |
Correct |
11 ms |
18304 KB |
Output is correct |
12 |
Correct |
11 ms |
18348 KB |
Output is correct |
13 |
Correct |
12 ms |
18256 KB |
Output is correct |
14 |
Correct |
11 ms |
18260 KB |
Output is correct |
15 |
Correct |
11 ms |
18208 KB |
Output is correct |
16 |
Correct |
12 ms |
18260 KB |
Output is correct |
17 |
Correct |
14 ms |
18264 KB |
Output is correct |
18 |
Correct |
12 ms |
18340 KB |
Output is correct |
19 |
Correct |
12 ms |
18328 KB |
Output is correct |
20 |
Correct |
12 ms |
18388 KB |
Output is correct |
21 |
Correct |
126 ms |
29848 KB |
Output is correct |
22 |
Correct |
107 ms |
30564 KB |
Output is correct |
23 |
Correct |
108 ms |
29924 KB |
Output is correct |
24 |
Correct |
101 ms |
29812 KB |
Output is correct |
25 |
Correct |
121 ms |
30476 KB |
Output is correct |
26 |
Correct |
96 ms |
30564 KB |
Output is correct |
27 |
Correct |
42 ms |
27376 KB |
Output is correct |
28 |
Correct |
44 ms |
27776 KB |
Output is correct |
29 |
Correct |
127 ms |
29516 KB |
Output is correct |
30 |
Correct |
97 ms |
30064 KB |
Output is correct |
31 |
Correct |
93 ms |
29900 KB |
Output is correct |
32 |
Correct |
100 ms |
30152 KB |
Output is correct |
33 |
Correct |
96 ms |
29060 KB |
Output is correct |
34 |
Correct |
108 ms |
30356 KB |
Output is correct |
35 |
Correct |
112 ms |
31544 KB |
Output is correct |
36 |
Correct |
118 ms |
31692 KB |
Output is correct |
37 |
Correct |
90 ms |
28492 KB |
Output is correct |
38 |
Correct |
90 ms |
27848 KB |
Output is correct |
39 |
Correct |
40 ms |
26244 KB |
Output is correct |
40 |
Correct |
49 ms |
27752 KB |
Output is correct |
41 |
Correct |
99 ms |
29216 KB |
Output is correct |
42 |
Correct |
116 ms |
30028 KB |
Output is correct |
43 |
Correct |
116 ms |
29948 KB |
Output is correct |
44 |
Correct |
99 ms |
29584 KB |
Output is correct |
45 |
Correct |
110 ms |
30040 KB |
Output is correct |
46 |
Correct |
99 ms |
30016 KB |
Output is correct |
47 |
Correct |
56 ms |
28568 KB |
Output is correct |
48 |
Correct |
80 ms |
29684 KB |
Output is correct |
49 |
Correct |
65 ms |
26444 KB |
Output is correct |
50 |
Correct |
92 ms |
28296 KB |
Output is correct |
51 |
Correct |
101 ms |
30148 KB |
Output is correct |
52 |
Correct |
95 ms |
30076 KB |
Output is correct |
53 |
Correct |
101 ms |
28736 KB |
Output is correct |
54 |
Correct |
115 ms |
31912 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
101 ms |
29520 KB |
Output is correct |
2 |
Correct |
102 ms |
30552 KB |
Output is correct |
3 |
Correct |
113 ms |
30752 KB |
Output is correct |
4 |
Correct |
74 ms |
26948 KB |
Output is correct |
5 |
Correct |
107 ms |
29016 KB |
Output is correct |
6 |
Correct |
125 ms |
30668 KB |
Output is correct |
7 |
Correct |
49 ms |
27680 KB |
Output is correct |
8 |
Correct |
52 ms |
26908 KB |
Output is correct |
9 |
Correct |
68 ms |
29212 KB |
Output is correct |
10 |
Correct |
68 ms |
26644 KB |
Output is correct |
11 |
Correct |
92 ms |
29912 KB |
Output is correct |
12 |
Correct |
89 ms |
30044 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
18184 KB |
Output is correct |
2 |
Correct |
12 ms |
18340 KB |
Output is correct |
3 |
Correct |
14 ms |
18260 KB |
Output is correct |
4 |
Correct |
12 ms |
18260 KB |
Output is correct |
5 |
Correct |
11 ms |
18212 KB |
Output is correct |
6 |
Correct |
10 ms |
18260 KB |
Output is correct |
7 |
Correct |
11 ms |
18260 KB |
Output is correct |
8 |
Correct |
11 ms |
18260 KB |
Output is correct |
9 |
Correct |
11 ms |
18360 KB |
Output is correct |
10 |
Correct |
12 ms |
18348 KB |
Output is correct |
11 |
Correct |
11 ms |
18304 KB |
Output is correct |
12 |
Correct |
11 ms |
18348 KB |
Output is correct |
13 |
Correct |
12 ms |
18256 KB |
Output is correct |
14 |
Correct |
11 ms |
18260 KB |
Output is correct |
15 |
Correct |
11 ms |
18208 KB |
Output is correct |
16 |
Correct |
12 ms |
18260 KB |
Output is correct |
17 |
Correct |
14 ms |
18264 KB |
Output is correct |
18 |
Correct |
12 ms |
18340 KB |
Output is correct |
19 |
Correct |
12 ms |
18328 KB |
Output is correct |
20 |
Correct |
12 ms |
18388 KB |
Output is correct |
21 |
Correct |
11 ms |
18260 KB |
Output is correct |
22 |
Correct |
11 ms |
18260 KB |
Output is correct |
23 |
Correct |
12 ms |
18260 KB |
Output is correct |
24 |
Correct |
12 ms |
18332 KB |
Output is correct |
25 |
Correct |
10 ms |
18316 KB |
Output is correct |
26 |
Correct |
12 ms |
18260 KB |
Output is correct |
27 |
Correct |
13 ms |
18336 KB |
Output is correct |
28 |
Correct |
12 ms |
18332 KB |
Output is correct |
29 |
Correct |
13 ms |
18364 KB |
Output is correct |
30 |
Correct |
12 ms |
18344 KB |
Output is correct |
31 |
Correct |
13 ms |
18260 KB |
Output is correct |
32 |
Correct |
12 ms |
18336 KB |
Output is correct |
33 |
Correct |
12 ms |
18208 KB |
Output is correct |
34 |
Correct |
11 ms |
18260 KB |
Output is correct |
35 |
Correct |
12 ms |
18328 KB |
Output is correct |
36 |
Correct |
11 ms |
18260 KB |
Output is correct |
37 |
Correct |
13 ms |
18232 KB |
Output is correct |
38 |
Correct |
13 ms |
18388 KB |
Output is correct |
39 |
Correct |
126 ms |
29848 KB |
Output is correct |
40 |
Correct |
107 ms |
30564 KB |
Output is correct |
41 |
Correct |
108 ms |
29924 KB |
Output is correct |
42 |
Correct |
101 ms |
29812 KB |
Output is correct |
43 |
Correct |
121 ms |
30476 KB |
Output is correct |
44 |
Correct |
96 ms |
30564 KB |
Output is correct |
45 |
Correct |
42 ms |
27376 KB |
Output is correct |
46 |
Correct |
44 ms |
27776 KB |
Output is correct |
47 |
Correct |
127 ms |
29516 KB |
Output is correct |
48 |
Correct |
97 ms |
30064 KB |
Output is correct |
49 |
Correct |
93 ms |
29900 KB |
Output is correct |
50 |
Correct |
100 ms |
30152 KB |
Output is correct |
51 |
Correct |
96 ms |
29060 KB |
Output is correct |
52 |
Correct |
108 ms |
30356 KB |
Output is correct |
53 |
Correct |
112 ms |
31544 KB |
Output is correct |
54 |
Correct |
118 ms |
31692 KB |
Output is correct |
55 |
Correct |
90 ms |
28492 KB |
Output is correct |
56 |
Correct |
90 ms |
27848 KB |
Output is correct |
57 |
Correct |
40 ms |
26244 KB |
Output is correct |
58 |
Correct |
49 ms |
27752 KB |
Output is correct |
59 |
Correct |
99 ms |
29216 KB |
Output is correct |
60 |
Correct |
116 ms |
30028 KB |
Output is correct |
61 |
Correct |
116 ms |
29948 KB |
Output is correct |
62 |
Correct |
99 ms |
29584 KB |
Output is correct |
63 |
Correct |
110 ms |
30040 KB |
Output is correct |
64 |
Correct |
99 ms |
30016 KB |
Output is correct |
65 |
Correct |
56 ms |
28568 KB |
Output is correct |
66 |
Correct |
80 ms |
29684 KB |
Output is correct |
67 |
Correct |
65 ms |
26444 KB |
Output is correct |
68 |
Correct |
92 ms |
28296 KB |
Output is correct |
69 |
Correct |
101 ms |
30148 KB |
Output is correct |
70 |
Correct |
95 ms |
30076 KB |
Output is correct |
71 |
Correct |
101 ms |
28736 KB |
Output is correct |
72 |
Correct |
115 ms |
31912 KB |
Output is correct |
73 |
Correct |
101 ms |
29520 KB |
Output is correct |
74 |
Correct |
102 ms |
30552 KB |
Output is correct |
75 |
Correct |
113 ms |
30752 KB |
Output is correct |
76 |
Correct |
74 ms |
26948 KB |
Output is correct |
77 |
Correct |
107 ms |
29016 KB |
Output is correct |
78 |
Correct |
125 ms |
30668 KB |
Output is correct |
79 |
Correct |
49 ms |
27680 KB |
Output is correct |
80 |
Correct |
52 ms |
26908 KB |
Output is correct |
81 |
Correct |
68 ms |
29212 KB |
Output is correct |
82 |
Correct |
68 ms |
26644 KB |
Output is correct |
83 |
Correct |
92 ms |
29912 KB |
Output is correct |
84 |
Correct |
89 ms |
30044 KB |
Output is correct |
85 |
Correct |
93 ms |
29072 KB |
Output is correct |
86 |
Correct |
111 ms |
30356 KB |
Output is correct |
87 |
Correct |
103 ms |
29336 KB |
Output is correct |
88 |
Correct |
118 ms |
31028 KB |
Output is correct |
89 |
Correct |
69 ms |
25952 KB |
Output is correct |
90 |
Correct |
106 ms |
30520 KB |
Output is correct |
91 |
Correct |
90 ms |
28232 KB |
Output is correct |
92 |
Correct |
84 ms |
27748 KB |
Output is correct |
93 |
Correct |
144 ms |
30472 KB |
Output is correct |
94 |
Correct |
111 ms |
30140 KB |
Output is correct |
95 |
Correct |
110 ms |
30144 KB |
Output is correct |
96 |
Correct |
113 ms |
30508 KB |
Output is correct |
97 |
Correct |
105 ms |
30536 KB |
Output is correct |
98 |
Correct |
123 ms |
28616 KB |
Output is correct |
99 |
Correct |
60 ms |
28804 KB |
Output is correct |
100 |
Correct |
73 ms |
27968 KB |
Output is correct |
101 |
Correct |
82 ms |
30236 KB |
Output is correct |
102 |
Correct |
103 ms |
31412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
11 ms |
18184 KB |
Output is correct |
2 |
Correct |
12 ms |
18340 KB |
Output is correct |
3 |
Correct |
14 ms |
18260 KB |
Output is correct |
4 |
Correct |
12 ms |
18260 KB |
Output is correct |
5 |
Correct |
11 ms |
18212 KB |
Output is correct |
6 |
Correct |
10 ms |
18260 KB |
Output is correct |
7 |
Correct |
11 ms |
18260 KB |
Output is correct |
8 |
Correct |
11 ms |
18260 KB |
Output is correct |
9 |
Correct |
11 ms |
18360 KB |
Output is correct |
10 |
Correct |
12 ms |
18348 KB |
Output is correct |
11 |
Correct |
11 ms |
18304 KB |
Output is correct |
12 |
Correct |
11 ms |
18348 KB |
Output is correct |
13 |
Correct |
12 ms |
18256 KB |
Output is correct |
14 |
Correct |
11 ms |
18260 KB |
Output is correct |
15 |
Correct |
11 ms |
18208 KB |
Output is correct |
16 |
Correct |
12 ms |
18260 KB |
Output is correct |
17 |
Correct |
14 ms |
18264 KB |
Output is correct |
18 |
Correct |
12 ms |
18340 KB |
Output is correct |
19 |
Correct |
12 ms |
18328 KB |
Output is correct |
20 |
Correct |
12 ms |
18388 KB |
Output is correct |
21 |
Correct |
11 ms |
18260 KB |
Output is correct |
22 |
Correct |
11 ms |
18260 KB |
Output is correct |
23 |
Correct |
12 ms |
18260 KB |
Output is correct |
24 |
Correct |
12 ms |
18332 KB |
Output is correct |
25 |
Correct |
10 ms |
18316 KB |
Output is correct |
26 |
Correct |
12 ms |
18260 KB |
Output is correct |
27 |
Correct |
13 ms |
18336 KB |
Output is correct |
28 |
Correct |
12 ms |
18332 KB |
Output is correct |
29 |
Correct |
13 ms |
18364 KB |
Output is correct |
30 |
Correct |
12 ms |
18344 KB |
Output is correct |
31 |
Correct |
13 ms |
18260 KB |
Output is correct |
32 |
Correct |
12 ms |
18336 KB |
Output is correct |
33 |
Correct |
12 ms |
18208 KB |
Output is correct |
34 |
Correct |
11 ms |
18260 KB |
Output is correct |
35 |
Correct |
12 ms |
18328 KB |
Output is correct |
36 |
Correct |
11 ms |
18260 KB |
Output is correct |
37 |
Correct |
13 ms |
18232 KB |
Output is correct |
38 |
Correct |
13 ms |
18388 KB |
Output is correct |
39 |
Correct |
126 ms |
29848 KB |
Output is correct |
40 |
Correct |
107 ms |
30564 KB |
Output is correct |
41 |
Correct |
108 ms |
29924 KB |
Output is correct |
42 |
Correct |
101 ms |
29812 KB |
Output is correct |
43 |
Correct |
121 ms |
30476 KB |
Output is correct |
44 |
Correct |
96 ms |
30564 KB |
Output is correct |
45 |
Correct |
42 ms |
27376 KB |
Output is correct |
46 |
Correct |
44 ms |
27776 KB |
Output is correct |
47 |
Correct |
127 ms |
29516 KB |
Output is correct |
48 |
Correct |
97 ms |
30064 KB |
Output is correct |
49 |
Correct |
93 ms |
29900 KB |
Output is correct |
50 |
Correct |
100 ms |
30152 KB |
Output is correct |
51 |
Correct |
96 ms |
29060 KB |
Output is correct |
52 |
Correct |
108 ms |
30356 KB |
Output is correct |
53 |
Correct |
112 ms |
31544 KB |
Output is correct |
54 |
Correct |
118 ms |
31692 KB |
Output is correct |
55 |
Correct |
558 ms |
61324 KB |
Output is correct |
56 |
Correct |
438 ms |
52612 KB |
Output is correct |
57 |
Correct |
657 ms |
65176 KB |
Output is correct |
58 |
Correct |
441 ms |
54152 KB |
Output is correct |
59 |
Correct |
482 ms |
54752 KB |
Output is correct |
60 |
Correct |
672 ms |
67840 KB |
Output is correct |
61 |
Correct |
159 ms |
58652 KB |
Output is correct |
62 |
Correct |
174 ms |
59164 KB |
Output is correct |
63 |
Correct |
678 ms |
66392 KB |
Output is correct |
64 |
Correct |
668 ms |
66436 KB |
Output is correct |
65 |
Correct |
633 ms |
63264 KB |
Output is correct |
66 |
Correct |
689 ms |
66124 KB |
Output is correct |
67 |
Correct |
631 ms |
63412 KB |
Output is correct |
68 |
Correct |
640 ms |
65964 KB |
Output is correct |
69 |
Correct |
644 ms |
65988 KB |
Output is correct |
70 |
Correct |
608 ms |
66004 KB |
Output is correct |
71 |
Correct |
641 ms |
65964 KB |
Output is correct |
72 |
Correct |
639 ms |
64696 KB |
Output is correct |
73 |
Correct |
630 ms |
66100 KB |
Output is correct |
74 |
Correct |
624 ms |
64868 KB |
Output is correct |
75 |
Correct |
631 ms |
66028 KB |
Output is correct |
76 |
Correct |
639 ms |
65892 KB |
Output is correct |
77 |
Correct |
619 ms |
66052 KB |
Output is correct |
78 |
Correct |
598 ms |
65992 KB |
Output is correct |
79 |
Correct |
466 ms |
64076 KB |
Output is correct |
80 |
Correct |
487 ms |
65036 KB |
Output is correct |
81 |
Correct |
438 ms |
68908 KB |
Output is correct |
82 |
Correct |
90 ms |
28492 KB |
Output is correct |
83 |
Correct |
90 ms |
27848 KB |
Output is correct |
84 |
Correct |
40 ms |
26244 KB |
Output is correct |
85 |
Correct |
49 ms |
27752 KB |
Output is correct |
86 |
Correct |
99 ms |
29216 KB |
Output is correct |
87 |
Correct |
116 ms |
30028 KB |
Output is correct |
88 |
Correct |
116 ms |
29948 KB |
Output is correct |
89 |
Correct |
99 ms |
29584 KB |
Output is correct |
90 |
Correct |
110 ms |
30040 KB |
Output is correct |
91 |
Correct |
99 ms |
30016 KB |
Output is correct |
92 |
Correct |
56 ms |
28568 KB |
Output is correct |
93 |
Correct |
80 ms |
29684 KB |
Output is correct |
94 |
Correct |
65 ms |
26444 KB |
Output is correct |
95 |
Correct |
92 ms |
28296 KB |
Output is correct |
96 |
Correct |
101 ms |
30148 KB |
Output is correct |
97 |
Correct |
95 ms |
30076 KB |
Output is correct |
98 |
Correct |
101 ms |
28736 KB |
Output is correct |
99 |
Correct |
115 ms |
31912 KB |
Output is correct |
100 |
Correct |
101 ms |
29520 KB |
Output is correct |
101 |
Correct |
102 ms |
30552 KB |
Output is correct |
102 |
Correct |
113 ms |
30752 KB |
Output is correct |
103 |
Correct |
74 ms |
26948 KB |
Output is correct |
104 |
Correct |
107 ms |
29016 KB |
Output is correct |
105 |
Correct |
125 ms |
30668 KB |
Output is correct |
106 |
Correct |
49 ms |
27680 KB |
Output is correct |
107 |
Correct |
52 ms |
26908 KB |
Output is correct |
108 |
Correct |
68 ms |
29212 KB |
Output is correct |
109 |
Correct |
68 ms |
26644 KB |
Output is correct |
110 |
Correct |
92 ms |
29912 KB |
Output is correct |
111 |
Correct |
89 ms |
30044 KB |
Output is correct |
112 |
Correct |
93 ms |
29072 KB |
Output is correct |
113 |
Correct |
111 ms |
30356 KB |
Output is correct |
114 |
Correct |
103 ms |
29336 KB |
Output is correct |
115 |
Correct |
118 ms |
31028 KB |
Output is correct |
116 |
Correct |
69 ms |
25952 KB |
Output is correct |
117 |
Correct |
106 ms |
30520 KB |
Output is correct |
118 |
Correct |
90 ms |
28232 KB |
Output is correct |
119 |
Correct |
84 ms |
27748 KB |
Output is correct |
120 |
Correct |
144 ms |
30472 KB |
Output is correct |
121 |
Correct |
111 ms |
30140 KB |
Output is correct |
122 |
Correct |
110 ms |
30144 KB |
Output is correct |
123 |
Correct |
113 ms |
30508 KB |
Output is correct |
124 |
Correct |
105 ms |
30536 KB |
Output is correct |
125 |
Correct |
123 ms |
28616 KB |
Output is correct |
126 |
Correct |
60 ms |
28804 KB |
Output is correct |
127 |
Correct |
73 ms |
27968 KB |
Output is correct |
128 |
Correct |
82 ms |
30236 KB |
Output is correct |
129 |
Correct |
103 ms |
31412 KB |
Output is correct |
130 |
Correct |
622 ms |
65748 KB |
Output is correct |
131 |
Correct |
407 ms |
52700 KB |
Output is correct |
132 |
Correct |
590 ms |
65788 KB |
Output is correct |
133 |
Correct |
618 ms |
66236 KB |
Output is correct |
134 |
Correct |
581 ms |
61004 KB |
Output is correct |
135 |
Correct |
691 ms |
68548 KB |
Output is correct |
136 |
Correct |
606 ms |
67272 KB |
Output is correct |
137 |
Correct |
628 ms |
67232 KB |
Output is correct |
138 |
Correct |
609 ms |
63952 KB |
Output is correct |
139 |
Correct |
605 ms |
66716 KB |
Output is correct |
140 |
Correct |
597 ms |
64332 KB |
Output is correct |
141 |
Correct |
620 ms |
66660 KB |
Output is correct |
142 |
Correct |
691 ms |
66684 KB |
Output is correct |
143 |
Correct |
708 ms |
66588 KB |
Output is correct |
144 |
Correct |
598 ms |
65172 KB |
Output is correct |
145 |
Correct |
625 ms |
66636 KB |
Output is correct |
146 |
Correct |
623 ms |
65668 KB |
Output is correct |
147 |
Correct |
614 ms |
66544 KB |
Output is correct |
148 |
Correct |
661 ms |
66720 KB |
Output is correct |
149 |
Correct |
614 ms |
66668 KB |
Output is correct |
150 |
Correct |
244 ms |
61332 KB |
Output is correct |
151 |
Correct |
469 ms |
65596 KB |
Output is correct |
152 |
Correct |
470 ms |
65600 KB |
Output is correct |
153 |
Correct |
422 ms |
69768 KB |
Output is correct |