#include<bits/stdc++.h>
#define f first
#define s second
#define ll long long
#define int long long
#define pii pair<ll,ll>
using namespace std;
const int N=250005,mod=1e9+7;
int t,n,m,q,g[N],ans[N];
ll tree[4*N],add[4*N],cnt[N],tr[4*N];
pii lazy[4*N];
vector<int> t1;
vector<pair<ll,int> > st[N],en[N],x[N];
void update2(int u,int ind,int l,int r,int val) {
if(l>ind || r<ind) return;
if(l==r) {
tr[u]+=val;
return;
}
int mid = (l+r)/2;
update2(2*u,ind,l,mid,val);
update2(2*u+1,ind,mid+1,r,val);
tr[u] = tr[2*u] + tr[2*u+1];
}
int getans2(int u,int l,int r,int c) {
if(l==r) return l;
int mid = (l+r)/2;
if(tr[2*u] >= c) return getans2(2*u,l,mid,c);
else return getans2(2*u+1,mid+1,r,c - tr[2*u]);
}
int getans1(int u,int start,int end,int l,int r){
if(l>end || r<start) return 0;
if(start<=l && r<=end) return tr[u];
int mid = (l+r)/2;
return getans1(2*u,start,end,l,mid) + getans1(2*u+1,start,end,mid+1,r);
}
void upd(pii &a,pii b){
if(a.s >= b.f) {
a.s = a.s - b.f + b.s;
}
else {
a.f += b.f - a.s;
a.s = b.s;
}
}
void update(int u,int start,int end,int l,int r,int val) {
if(lazy[u].f||lazy[u].s) {
tree[u] = max(tree[u]-lazy[u].f,0ll) + lazy[u].s;
if(l!=r){
upd(lazy[2*u],lazy[u]);
upd(lazy[2*u+1],lazy[u]);
}
lazy[u] = {0,0};
}
if(l>end || r<start) return;
if(start<=l && r<=end) {
if(val>0) lazy[u].s = val;
else lazy[u].f = -val;
tree[u] = max(tree[u]-lazy[u].f,0ll) + lazy[u].s;
if(l!=r){
upd(lazy[2*u],lazy[u]);
upd(lazy[2*u+1],lazy[u]);
}
lazy[u] = {0,0};
return;
}
int mid = (l+r)/2;
update(2*u,start,end,l,mid,val);
update(2*u+1,start,end,mid+1,r,val);
}
ll getans(int u,int ind,int l,int r) {
if(lazy[u].f||lazy[u].s) {
tree[u] = max(tree[u]-lazy[u].f,0ll) + lazy[u].s;
if(l!=r){
upd(lazy[2*u],lazy[u]);
upd(lazy[2*u+1],lazy[u]);
}
lazy[u] = {0,0};
}
if(l>ind || r<ind) return 0;
if(l==r) return tree[u];
int mid = (l+r)/2;
return getans(2*u,ind,l,mid) + getans(2*u+1,ind,mid+1,r);
}
main(){
ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
cin>>n>>m>>q;
for(int i=1;i<=q;i++){
int t,l,r,c,k;
cin>>t;
if(t==1) {
cin>>l>>r>>c>>k;
g[i] = c;
st[l].push_back({i,k});
en[r].push_back({i,k});
update(1,l,r,1,n,k);
t1.push_back(i);
}
else if(t==2){
cin>>l>>r>>k;
update(1,l,r,1,n,-k);
}
else {
ll a,c;
cin>>a>>c;
x[a].push_back({c,i});
cnt[i] = getans(1,a,1,n);
}
}
for(int i=1;i<=n;i++) {
for(int j=0;j<st[i].size();j++) {
update2(1,st[i][j].f,1,q,st[i][j].s);// cout<<"++"<<st[i][j].f<<"__"<<st[i][j].s<<endl;
}
for(int j=0;j<x[i].size();j++) {
int ind = x[i][j].s;
ll c = getans1(1,1,ind,1,q);
if(cnt[ind] < x[i][j].f) {
ans[ind] = -1;
continue;
}
else {
ans[ind] = g[getans2(1,1,q,c - (cnt[ind] - x[i][j].f+1)+1)];
// cout<<ind<<" "<<c<<"__"<<getans2(1,1,q,c-(cnt[ind]-x[i][j].f+1)+1)<<endl;
}
}
for(int j=0;j<en[i].size();j++){
update2(1,en[i][j].f,1,q,-en[i][j].s);
}
}
for(int i=1;i<=q;i++) {
if(ans[i]) cout<<max(0ll,ans[i])<<" ";
}
}
Compilation message
foodcourt.cpp:86:2: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
86 | main(){
| ^~~~
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:115:16: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
115 | for(int j=0;j<st[i].size();j++) {
| ~^~~~~~~~~~~~~
foodcourt.cpp:118:16: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
118 | for(int j=0;j<x[i].size();j++) {
| ~^~~~~~~~~~~~
foodcourt.cpp:131:16: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<std::pair<long long int, long long int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
131 | for(int j=0;j<en[i].size();j++){
| ~^~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
18124 KB |
Output is correct |
2 |
Correct |
14 ms |
18188 KB |
Output is correct |
3 |
Correct |
13 ms |
18124 KB |
Output is correct |
4 |
Correct |
14 ms |
18124 KB |
Output is correct |
5 |
Correct |
13 ms |
17996 KB |
Output is correct |
6 |
Correct |
12 ms |
18124 KB |
Output is correct |
7 |
Correct |
14 ms |
18112 KB |
Output is correct |
8 |
Correct |
15 ms |
18224 KB |
Output is correct |
9 |
Correct |
14 ms |
18124 KB |
Output is correct |
10 |
Correct |
14 ms |
18212 KB |
Output is correct |
11 |
Correct |
14 ms |
18160 KB |
Output is correct |
12 |
Correct |
14 ms |
18124 KB |
Output is correct |
13 |
Correct |
13 ms |
18124 KB |
Output is correct |
14 |
Correct |
13 ms |
18124 KB |
Output is correct |
15 |
Correct |
13 ms |
18124 KB |
Output is correct |
16 |
Correct |
13 ms |
18124 KB |
Output is correct |
17 |
Correct |
14 ms |
18152 KB |
Output is correct |
18 |
Correct |
14 ms |
18124 KB |
Output is correct |
19 |
Correct |
14 ms |
18164 KB |
Output is correct |
20 |
Correct |
14 ms |
18216 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
18124 KB |
Output is correct |
2 |
Correct |
14 ms |
18188 KB |
Output is correct |
3 |
Correct |
13 ms |
18124 KB |
Output is correct |
4 |
Correct |
14 ms |
18124 KB |
Output is correct |
5 |
Correct |
13 ms |
17996 KB |
Output is correct |
6 |
Correct |
12 ms |
18124 KB |
Output is correct |
7 |
Correct |
14 ms |
18112 KB |
Output is correct |
8 |
Correct |
15 ms |
18224 KB |
Output is correct |
9 |
Correct |
14 ms |
18124 KB |
Output is correct |
10 |
Correct |
14 ms |
18212 KB |
Output is correct |
11 |
Correct |
14 ms |
18160 KB |
Output is correct |
12 |
Correct |
14 ms |
18124 KB |
Output is correct |
13 |
Correct |
13 ms |
18124 KB |
Output is correct |
14 |
Correct |
13 ms |
18124 KB |
Output is correct |
15 |
Correct |
13 ms |
18124 KB |
Output is correct |
16 |
Correct |
13 ms |
18124 KB |
Output is correct |
17 |
Correct |
14 ms |
18152 KB |
Output is correct |
18 |
Correct |
14 ms |
18124 KB |
Output is correct |
19 |
Correct |
14 ms |
18164 KB |
Output is correct |
20 |
Correct |
14 ms |
18216 KB |
Output is correct |
21 |
Correct |
14 ms |
18124 KB |
Output is correct |
22 |
Correct |
14 ms |
18252 KB |
Output is correct |
23 |
Correct |
15 ms |
18160 KB |
Output is correct |
24 |
Correct |
15 ms |
18252 KB |
Output is correct |
25 |
Correct |
13 ms |
18076 KB |
Output is correct |
26 |
Correct |
14 ms |
18124 KB |
Output is correct |
27 |
Correct |
15 ms |
18252 KB |
Output is correct |
28 |
Correct |
14 ms |
18272 KB |
Output is correct |
29 |
Correct |
16 ms |
18248 KB |
Output is correct |
30 |
Correct |
15 ms |
18252 KB |
Output is correct |
31 |
Correct |
15 ms |
18200 KB |
Output is correct |
32 |
Correct |
14 ms |
18252 KB |
Output is correct |
33 |
Correct |
13 ms |
18152 KB |
Output is correct |
34 |
Correct |
13 ms |
18252 KB |
Output is correct |
35 |
Correct |
14 ms |
18124 KB |
Output is correct |
36 |
Correct |
14 ms |
18192 KB |
Output is correct |
37 |
Correct |
14 ms |
18124 KB |
Output is correct |
38 |
Correct |
14 ms |
18208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
117 ms |
25632 KB |
Output is correct |
2 |
Correct |
126 ms |
26104 KB |
Output is correct |
3 |
Correct |
128 ms |
25680 KB |
Output is correct |
4 |
Correct |
116 ms |
25660 KB |
Output is correct |
5 |
Correct |
137 ms |
26352 KB |
Output is correct |
6 |
Correct |
125 ms |
26176 KB |
Output is correct |
7 |
Correct |
48 ms |
21640 KB |
Output is correct |
8 |
Correct |
56 ms |
21704 KB |
Output is correct |
9 |
Correct |
124 ms |
25148 KB |
Output is correct |
10 |
Correct |
126 ms |
25764 KB |
Output is correct |
11 |
Correct |
124 ms |
25468 KB |
Output is correct |
12 |
Correct |
119 ms |
25664 KB |
Output is correct |
13 |
Correct |
107 ms |
25928 KB |
Output is correct |
14 |
Correct |
120 ms |
26428 KB |
Output is correct |
15 |
Correct |
134 ms |
27200 KB |
Output is correct |
16 |
Correct |
132 ms |
27240 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
608 ms |
47192 KB |
Output is correct |
2 |
Correct |
463 ms |
45576 KB |
Output is correct |
3 |
Correct |
674 ms |
49344 KB |
Output is correct |
4 |
Correct |
521 ms |
46740 KB |
Output is correct |
5 |
Correct |
501 ms |
46980 KB |
Output is correct |
6 |
Correct |
699 ms |
51024 KB |
Output is correct |
7 |
Correct |
175 ms |
34568 KB |
Output is correct |
8 |
Correct |
189 ms |
34232 KB |
Output is correct |
9 |
Correct |
673 ms |
52624 KB |
Output is correct |
10 |
Correct |
691 ms |
57568 KB |
Output is correct |
11 |
Correct |
632 ms |
51348 KB |
Output is correct |
12 |
Correct |
656 ms |
54324 KB |
Output is correct |
13 |
Correct |
598 ms |
51384 KB |
Output is correct |
14 |
Correct |
624 ms |
54116 KB |
Output is correct |
15 |
Correct |
624 ms |
54080 KB |
Output is correct |
16 |
Correct |
647 ms |
54036 KB |
Output is correct |
17 |
Correct |
643 ms |
54220 KB |
Output is correct |
18 |
Correct |
617 ms |
52740 KB |
Output is correct |
19 |
Correct |
657 ms |
54328 KB |
Output is correct |
20 |
Correct |
649 ms |
53044 KB |
Output is correct |
21 |
Correct |
639 ms |
54068 KB |
Output is correct |
22 |
Correct |
650 ms |
54072 KB |
Output is correct |
23 |
Correct |
660 ms |
54260 KB |
Output is correct |
24 |
Correct |
696 ms |
54140 KB |
Output is correct |
25 |
Correct |
537 ms |
53060 KB |
Output is correct |
26 |
Correct |
556 ms |
53432 KB |
Output is correct |
27 |
Correct |
493 ms |
56444 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
18124 KB |
Output is correct |
2 |
Correct |
14 ms |
18188 KB |
Output is correct |
3 |
Correct |
13 ms |
18124 KB |
Output is correct |
4 |
Correct |
14 ms |
18124 KB |
Output is correct |
5 |
Correct |
13 ms |
17996 KB |
Output is correct |
6 |
Correct |
12 ms |
18124 KB |
Output is correct |
7 |
Correct |
14 ms |
18112 KB |
Output is correct |
8 |
Correct |
15 ms |
18224 KB |
Output is correct |
9 |
Correct |
14 ms |
18124 KB |
Output is correct |
10 |
Correct |
14 ms |
18212 KB |
Output is correct |
11 |
Correct |
14 ms |
18160 KB |
Output is correct |
12 |
Correct |
14 ms |
18124 KB |
Output is correct |
13 |
Correct |
13 ms |
18124 KB |
Output is correct |
14 |
Correct |
13 ms |
18124 KB |
Output is correct |
15 |
Correct |
13 ms |
18124 KB |
Output is correct |
16 |
Correct |
13 ms |
18124 KB |
Output is correct |
17 |
Correct |
14 ms |
18152 KB |
Output is correct |
18 |
Correct |
14 ms |
18124 KB |
Output is correct |
19 |
Correct |
14 ms |
18164 KB |
Output is correct |
20 |
Correct |
14 ms |
18216 KB |
Output is correct |
21 |
Correct |
117 ms |
25632 KB |
Output is correct |
22 |
Correct |
126 ms |
26104 KB |
Output is correct |
23 |
Correct |
128 ms |
25680 KB |
Output is correct |
24 |
Correct |
116 ms |
25660 KB |
Output is correct |
25 |
Correct |
137 ms |
26352 KB |
Output is correct |
26 |
Correct |
125 ms |
26176 KB |
Output is correct |
27 |
Correct |
48 ms |
21640 KB |
Output is correct |
28 |
Correct |
56 ms |
21704 KB |
Output is correct |
29 |
Correct |
124 ms |
25148 KB |
Output is correct |
30 |
Correct |
126 ms |
25764 KB |
Output is correct |
31 |
Correct |
124 ms |
25468 KB |
Output is correct |
32 |
Correct |
119 ms |
25664 KB |
Output is correct |
33 |
Correct |
107 ms |
25928 KB |
Output is correct |
34 |
Correct |
120 ms |
26428 KB |
Output is correct |
35 |
Correct |
134 ms |
27200 KB |
Output is correct |
36 |
Correct |
132 ms |
27240 KB |
Output is correct |
37 |
Correct |
115 ms |
25272 KB |
Output is correct |
38 |
Correct |
107 ms |
25232 KB |
Output is correct |
39 |
Correct |
41 ms |
21416 KB |
Output is correct |
40 |
Correct |
49 ms |
21856 KB |
Output is correct |
41 |
Correct |
118 ms |
24920 KB |
Output is correct |
42 |
Correct |
124 ms |
25672 KB |
Output is correct |
43 |
Correct |
131 ms |
25688 KB |
Output is correct |
44 |
Correct |
125 ms |
25248 KB |
Output is correct |
45 |
Correct |
125 ms |
25636 KB |
Output is correct |
46 |
Correct |
128 ms |
25664 KB |
Output is correct |
47 |
Correct |
73 ms |
25140 KB |
Output is correct |
48 |
Correct |
114 ms |
25592 KB |
Output is correct |
49 |
Correct |
90 ms |
24644 KB |
Output is correct |
50 |
Correct |
112 ms |
25160 KB |
Output is correct |
51 |
Correct |
126 ms |
25724 KB |
Output is correct |
52 |
Correct |
128 ms |
25656 KB |
Output is correct |
53 |
Correct |
104 ms |
26156 KB |
Output is correct |
54 |
Correct |
140 ms |
27380 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
144 ms |
26176 KB |
Output is correct |
2 |
Correct |
150 ms |
27384 KB |
Output is correct |
3 |
Correct |
163 ms |
27456 KB |
Output is correct |
4 |
Correct |
106 ms |
26132 KB |
Output is correct |
5 |
Correct |
125 ms |
26864 KB |
Output is correct |
6 |
Correct |
139 ms |
27460 KB |
Output is correct |
7 |
Correct |
59 ms |
22928 KB |
Output is correct |
8 |
Correct |
58 ms |
22976 KB |
Output is correct |
9 |
Correct |
96 ms |
26736 KB |
Output is correct |
10 |
Correct |
86 ms |
26048 KB |
Output is correct |
11 |
Correct |
126 ms |
27080 KB |
Output is correct |
12 |
Correct |
128 ms |
27100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
18124 KB |
Output is correct |
2 |
Correct |
14 ms |
18188 KB |
Output is correct |
3 |
Correct |
13 ms |
18124 KB |
Output is correct |
4 |
Correct |
14 ms |
18124 KB |
Output is correct |
5 |
Correct |
13 ms |
17996 KB |
Output is correct |
6 |
Correct |
12 ms |
18124 KB |
Output is correct |
7 |
Correct |
14 ms |
18112 KB |
Output is correct |
8 |
Correct |
15 ms |
18224 KB |
Output is correct |
9 |
Correct |
14 ms |
18124 KB |
Output is correct |
10 |
Correct |
14 ms |
18212 KB |
Output is correct |
11 |
Correct |
14 ms |
18160 KB |
Output is correct |
12 |
Correct |
14 ms |
18124 KB |
Output is correct |
13 |
Correct |
13 ms |
18124 KB |
Output is correct |
14 |
Correct |
13 ms |
18124 KB |
Output is correct |
15 |
Correct |
13 ms |
18124 KB |
Output is correct |
16 |
Correct |
13 ms |
18124 KB |
Output is correct |
17 |
Correct |
14 ms |
18152 KB |
Output is correct |
18 |
Correct |
14 ms |
18124 KB |
Output is correct |
19 |
Correct |
14 ms |
18164 KB |
Output is correct |
20 |
Correct |
14 ms |
18216 KB |
Output is correct |
21 |
Correct |
14 ms |
18124 KB |
Output is correct |
22 |
Correct |
14 ms |
18252 KB |
Output is correct |
23 |
Correct |
15 ms |
18160 KB |
Output is correct |
24 |
Correct |
15 ms |
18252 KB |
Output is correct |
25 |
Correct |
13 ms |
18076 KB |
Output is correct |
26 |
Correct |
14 ms |
18124 KB |
Output is correct |
27 |
Correct |
15 ms |
18252 KB |
Output is correct |
28 |
Correct |
14 ms |
18272 KB |
Output is correct |
29 |
Correct |
16 ms |
18248 KB |
Output is correct |
30 |
Correct |
15 ms |
18252 KB |
Output is correct |
31 |
Correct |
15 ms |
18200 KB |
Output is correct |
32 |
Correct |
14 ms |
18252 KB |
Output is correct |
33 |
Correct |
13 ms |
18152 KB |
Output is correct |
34 |
Correct |
13 ms |
18252 KB |
Output is correct |
35 |
Correct |
14 ms |
18124 KB |
Output is correct |
36 |
Correct |
14 ms |
18192 KB |
Output is correct |
37 |
Correct |
14 ms |
18124 KB |
Output is correct |
38 |
Correct |
14 ms |
18208 KB |
Output is correct |
39 |
Correct |
117 ms |
25632 KB |
Output is correct |
40 |
Correct |
126 ms |
26104 KB |
Output is correct |
41 |
Correct |
128 ms |
25680 KB |
Output is correct |
42 |
Correct |
116 ms |
25660 KB |
Output is correct |
43 |
Correct |
137 ms |
26352 KB |
Output is correct |
44 |
Correct |
125 ms |
26176 KB |
Output is correct |
45 |
Correct |
48 ms |
21640 KB |
Output is correct |
46 |
Correct |
56 ms |
21704 KB |
Output is correct |
47 |
Correct |
124 ms |
25148 KB |
Output is correct |
48 |
Correct |
126 ms |
25764 KB |
Output is correct |
49 |
Correct |
124 ms |
25468 KB |
Output is correct |
50 |
Correct |
119 ms |
25664 KB |
Output is correct |
51 |
Correct |
107 ms |
25928 KB |
Output is correct |
52 |
Correct |
120 ms |
26428 KB |
Output is correct |
53 |
Correct |
134 ms |
27200 KB |
Output is correct |
54 |
Correct |
132 ms |
27240 KB |
Output is correct |
55 |
Correct |
115 ms |
25272 KB |
Output is correct |
56 |
Correct |
107 ms |
25232 KB |
Output is correct |
57 |
Correct |
41 ms |
21416 KB |
Output is correct |
58 |
Correct |
49 ms |
21856 KB |
Output is correct |
59 |
Correct |
118 ms |
24920 KB |
Output is correct |
60 |
Correct |
124 ms |
25672 KB |
Output is correct |
61 |
Correct |
131 ms |
25688 KB |
Output is correct |
62 |
Correct |
125 ms |
25248 KB |
Output is correct |
63 |
Correct |
125 ms |
25636 KB |
Output is correct |
64 |
Correct |
128 ms |
25664 KB |
Output is correct |
65 |
Correct |
73 ms |
25140 KB |
Output is correct |
66 |
Correct |
114 ms |
25592 KB |
Output is correct |
67 |
Correct |
90 ms |
24644 KB |
Output is correct |
68 |
Correct |
112 ms |
25160 KB |
Output is correct |
69 |
Correct |
126 ms |
25724 KB |
Output is correct |
70 |
Correct |
128 ms |
25656 KB |
Output is correct |
71 |
Correct |
104 ms |
26156 KB |
Output is correct |
72 |
Correct |
140 ms |
27380 KB |
Output is correct |
73 |
Correct |
144 ms |
26176 KB |
Output is correct |
74 |
Correct |
150 ms |
27384 KB |
Output is correct |
75 |
Correct |
163 ms |
27456 KB |
Output is correct |
76 |
Correct |
106 ms |
26132 KB |
Output is correct |
77 |
Correct |
125 ms |
26864 KB |
Output is correct |
78 |
Correct |
139 ms |
27460 KB |
Output is correct |
79 |
Correct |
59 ms |
22928 KB |
Output is correct |
80 |
Correct |
58 ms |
22976 KB |
Output is correct |
81 |
Correct |
96 ms |
26736 KB |
Output is correct |
82 |
Correct |
86 ms |
26048 KB |
Output is correct |
83 |
Correct |
126 ms |
27080 KB |
Output is correct |
84 |
Correct |
128 ms |
27100 KB |
Output is correct |
85 |
Correct |
122 ms |
26076 KB |
Output is correct |
86 |
Correct |
154 ms |
26432 KB |
Output is correct |
87 |
Correct |
126 ms |
26388 KB |
Output is correct |
88 |
Correct |
142 ms |
26904 KB |
Output is correct |
89 |
Correct |
86 ms |
24592 KB |
Output is correct |
90 |
Correct |
139 ms |
26392 KB |
Output is correct |
91 |
Correct |
134 ms |
25876 KB |
Output is correct |
92 |
Correct |
115 ms |
25576 KB |
Output is correct |
93 |
Correct |
142 ms |
26556 KB |
Output is correct |
94 |
Correct |
131 ms |
26040 KB |
Output is correct |
95 |
Correct |
131 ms |
26340 KB |
Output is correct |
96 |
Correct |
138 ms |
26396 KB |
Output is correct |
97 |
Correct |
141 ms |
26504 KB |
Output is correct |
98 |
Correct |
114 ms |
25904 KB |
Output is correct |
99 |
Correct |
79 ms |
25904 KB |
Output is correct |
100 |
Correct |
98 ms |
25688 KB |
Output is correct |
101 |
Correct |
116 ms |
26380 KB |
Output is correct |
102 |
Correct |
112 ms |
27060 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
13 ms |
18124 KB |
Output is correct |
2 |
Correct |
14 ms |
18188 KB |
Output is correct |
3 |
Correct |
13 ms |
18124 KB |
Output is correct |
4 |
Correct |
14 ms |
18124 KB |
Output is correct |
5 |
Correct |
13 ms |
17996 KB |
Output is correct |
6 |
Correct |
12 ms |
18124 KB |
Output is correct |
7 |
Correct |
14 ms |
18112 KB |
Output is correct |
8 |
Correct |
15 ms |
18224 KB |
Output is correct |
9 |
Correct |
14 ms |
18124 KB |
Output is correct |
10 |
Correct |
14 ms |
18212 KB |
Output is correct |
11 |
Correct |
14 ms |
18160 KB |
Output is correct |
12 |
Correct |
14 ms |
18124 KB |
Output is correct |
13 |
Correct |
13 ms |
18124 KB |
Output is correct |
14 |
Correct |
13 ms |
18124 KB |
Output is correct |
15 |
Correct |
13 ms |
18124 KB |
Output is correct |
16 |
Correct |
13 ms |
18124 KB |
Output is correct |
17 |
Correct |
14 ms |
18152 KB |
Output is correct |
18 |
Correct |
14 ms |
18124 KB |
Output is correct |
19 |
Correct |
14 ms |
18164 KB |
Output is correct |
20 |
Correct |
14 ms |
18216 KB |
Output is correct |
21 |
Correct |
14 ms |
18124 KB |
Output is correct |
22 |
Correct |
14 ms |
18252 KB |
Output is correct |
23 |
Correct |
15 ms |
18160 KB |
Output is correct |
24 |
Correct |
15 ms |
18252 KB |
Output is correct |
25 |
Correct |
13 ms |
18076 KB |
Output is correct |
26 |
Correct |
14 ms |
18124 KB |
Output is correct |
27 |
Correct |
15 ms |
18252 KB |
Output is correct |
28 |
Correct |
14 ms |
18272 KB |
Output is correct |
29 |
Correct |
16 ms |
18248 KB |
Output is correct |
30 |
Correct |
15 ms |
18252 KB |
Output is correct |
31 |
Correct |
15 ms |
18200 KB |
Output is correct |
32 |
Correct |
14 ms |
18252 KB |
Output is correct |
33 |
Correct |
13 ms |
18152 KB |
Output is correct |
34 |
Correct |
13 ms |
18252 KB |
Output is correct |
35 |
Correct |
14 ms |
18124 KB |
Output is correct |
36 |
Correct |
14 ms |
18192 KB |
Output is correct |
37 |
Correct |
14 ms |
18124 KB |
Output is correct |
38 |
Correct |
14 ms |
18208 KB |
Output is correct |
39 |
Correct |
117 ms |
25632 KB |
Output is correct |
40 |
Correct |
126 ms |
26104 KB |
Output is correct |
41 |
Correct |
128 ms |
25680 KB |
Output is correct |
42 |
Correct |
116 ms |
25660 KB |
Output is correct |
43 |
Correct |
137 ms |
26352 KB |
Output is correct |
44 |
Correct |
125 ms |
26176 KB |
Output is correct |
45 |
Correct |
48 ms |
21640 KB |
Output is correct |
46 |
Correct |
56 ms |
21704 KB |
Output is correct |
47 |
Correct |
124 ms |
25148 KB |
Output is correct |
48 |
Correct |
126 ms |
25764 KB |
Output is correct |
49 |
Correct |
124 ms |
25468 KB |
Output is correct |
50 |
Correct |
119 ms |
25664 KB |
Output is correct |
51 |
Correct |
107 ms |
25928 KB |
Output is correct |
52 |
Correct |
120 ms |
26428 KB |
Output is correct |
53 |
Correct |
134 ms |
27200 KB |
Output is correct |
54 |
Correct |
132 ms |
27240 KB |
Output is correct |
55 |
Correct |
608 ms |
47192 KB |
Output is correct |
56 |
Correct |
463 ms |
45576 KB |
Output is correct |
57 |
Correct |
674 ms |
49344 KB |
Output is correct |
58 |
Correct |
521 ms |
46740 KB |
Output is correct |
59 |
Correct |
501 ms |
46980 KB |
Output is correct |
60 |
Correct |
699 ms |
51024 KB |
Output is correct |
61 |
Correct |
175 ms |
34568 KB |
Output is correct |
62 |
Correct |
189 ms |
34232 KB |
Output is correct |
63 |
Correct |
673 ms |
52624 KB |
Output is correct |
64 |
Correct |
691 ms |
57568 KB |
Output is correct |
65 |
Correct |
632 ms |
51348 KB |
Output is correct |
66 |
Correct |
656 ms |
54324 KB |
Output is correct |
67 |
Correct |
598 ms |
51384 KB |
Output is correct |
68 |
Correct |
624 ms |
54116 KB |
Output is correct |
69 |
Correct |
624 ms |
54080 KB |
Output is correct |
70 |
Correct |
647 ms |
54036 KB |
Output is correct |
71 |
Correct |
643 ms |
54220 KB |
Output is correct |
72 |
Correct |
617 ms |
52740 KB |
Output is correct |
73 |
Correct |
657 ms |
54328 KB |
Output is correct |
74 |
Correct |
649 ms |
53044 KB |
Output is correct |
75 |
Correct |
639 ms |
54068 KB |
Output is correct |
76 |
Correct |
650 ms |
54072 KB |
Output is correct |
77 |
Correct |
660 ms |
54260 KB |
Output is correct |
78 |
Correct |
696 ms |
54140 KB |
Output is correct |
79 |
Correct |
537 ms |
53060 KB |
Output is correct |
80 |
Correct |
556 ms |
53432 KB |
Output is correct |
81 |
Correct |
493 ms |
56444 KB |
Output is correct |
82 |
Correct |
115 ms |
25272 KB |
Output is correct |
83 |
Correct |
107 ms |
25232 KB |
Output is correct |
84 |
Correct |
41 ms |
21416 KB |
Output is correct |
85 |
Correct |
49 ms |
21856 KB |
Output is correct |
86 |
Correct |
118 ms |
24920 KB |
Output is correct |
87 |
Correct |
124 ms |
25672 KB |
Output is correct |
88 |
Correct |
131 ms |
25688 KB |
Output is correct |
89 |
Correct |
125 ms |
25248 KB |
Output is correct |
90 |
Correct |
125 ms |
25636 KB |
Output is correct |
91 |
Correct |
128 ms |
25664 KB |
Output is correct |
92 |
Correct |
73 ms |
25140 KB |
Output is correct |
93 |
Correct |
114 ms |
25592 KB |
Output is correct |
94 |
Correct |
90 ms |
24644 KB |
Output is correct |
95 |
Correct |
112 ms |
25160 KB |
Output is correct |
96 |
Correct |
126 ms |
25724 KB |
Output is correct |
97 |
Correct |
128 ms |
25656 KB |
Output is correct |
98 |
Correct |
104 ms |
26156 KB |
Output is correct |
99 |
Correct |
140 ms |
27380 KB |
Output is correct |
100 |
Correct |
144 ms |
26176 KB |
Output is correct |
101 |
Correct |
150 ms |
27384 KB |
Output is correct |
102 |
Correct |
163 ms |
27456 KB |
Output is correct |
103 |
Correct |
106 ms |
26132 KB |
Output is correct |
104 |
Correct |
125 ms |
26864 KB |
Output is correct |
105 |
Correct |
139 ms |
27460 KB |
Output is correct |
106 |
Correct |
59 ms |
22928 KB |
Output is correct |
107 |
Correct |
58 ms |
22976 KB |
Output is correct |
108 |
Correct |
96 ms |
26736 KB |
Output is correct |
109 |
Correct |
86 ms |
26048 KB |
Output is correct |
110 |
Correct |
126 ms |
27080 KB |
Output is correct |
111 |
Correct |
128 ms |
27100 KB |
Output is correct |
112 |
Correct |
122 ms |
26076 KB |
Output is correct |
113 |
Correct |
154 ms |
26432 KB |
Output is correct |
114 |
Correct |
126 ms |
26388 KB |
Output is correct |
115 |
Correct |
142 ms |
26904 KB |
Output is correct |
116 |
Correct |
86 ms |
24592 KB |
Output is correct |
117 |
Correct |
139 ms |
26392 KB |
Output is correct |
118 |
Correct |
134 ms |
25876 KB |
Output is correct |
119 |
Correct |
115 ms |
25576 KB |
Output is correct |
120 |
Correct |
142 ms |
26556 KB |
Output is correct |
121 |
Correct |
131 ms |
26040 KB |
Output is correct |
122 |
Correct |
131 ms |
26340 KB |
Output is correct |
123 |
Correct |
138 ms |
26396 KB |
Output is correct |
124 |
Correct |
141 ms |
26504 KB |
Output is correct |
125 |
Correct |
114 ms |
25904 KB |
Output is correct |
126 |
Correct |
79 ms |
25904 KB |
Output is correct |
127 |
Correct |
98 ms |
25688 KB |
Output is correct |
128 |
Correct |
116 ms |
26380 KB |
Output is correct |
129 |
Correct |
112 ms |
27060 KB |
Output is correct |
130 |
Correct |
647 ms |
54788 KB |
Output is correct |
131 |
Correct |
462 ms |
49200 KB |
Output is correct |
132 |
Correct |
634 ms |
54744 KB |
Output is correct |
133 |
Correct |
653 ms |
55992 KB |
Output is correct |
134 |
Correct |
575 ms |
53564 KB |
Output is correct |
135 |
Correct |
714 ms |
56908 KB |
Output is correct |
136 |
Correct |
763 ms |
58512 KB |
Output is correct |
137 |
Correct |
744 ms |
58680 KB |
Output is correct |
138 |
Correct |
672 ms |
52028 KB |
Output is correct |
139 |
Correct |
661 ms |
55044 KB |
Output is correct |
140 |
Correct |
656 ms |
52536 KB |
Output is correct |
141 |
Correct |
694 ms |
54860 KB |
Output is correct |
142 |
Correct |
669 ms |
54840 KB |
Output is correct |
143 |
Correct |
697 ms |
54748 KB |
Output is correct |
144 |
Correct |
683 ms |
53472 KB |
Output is correct |
145 |
Correct |
638 ms |
54764 KB |
Output is correct |
146 |
Correct |
623 ms |
53816 KB |
Output is correct |
147 |
Correct |
647 ms |
54696 KB |
Output is correct |
148 |
Correct |
649 ms |
54840 KB |
Output is correct |
149 |
Correct |
640 ms |
54712 KB |
Output is correct |
150 |
Correct |
326 ms |
52084 KB |
Output is correct |
151 |
Correct |
514 ms |
54152 KB |
Output is correct |
152 |
Correct |
499 ms |
54172 KB |
Output is correct |
153 |
Correct |
486 ms |
57376 KB |
Output is correct |