#include<bits/stdc++.h>
using namespace std;
const int N = 250005;
struct ainthelp{
long long lazy;
long long minv;
int minp;
};
ainthelp aint[4*N];
void propag(int nod, int l, int r){
aint[nod].minv += aint[nod].lazy;
if(l != r){
aint[2*nod].lazy += aint[nod].lazy;
aint[2*nod + 1].lazy += aint[nod].lazy;
}
aint[nod].lazy = 0;
}
ainthelp join(ainthelp a, ainthelp b){
ainthelp rsp;
rsp.lazy = 0;
if(a.minv < b.minv){
rsp.minv = a.minv;
rsp.minp = a.minp;
}
else if(b.minv < a.minv){
rsp.minv = b.minv;
rsp.minp = b.minp;
}
else if(a.minv == b.minv){
rsp.minv = a.minv;
rsp.minp = max(a.minp, b.minp);
}
return rsp;
}
void aint_build(int nod, int l, int r){
if(l == r){
aint[nod].lazy = aint[nod].minv = 0;
aint[nod].minp = l;
return;
}
int mid = (l +r)/2;
aint_build(2*nod, l, mid);
aint_build(2*nod + 1, mid + 1, r);
aint[nod] = join(aint[2*nod], aint[2*nod + 1]);
}
void update(int nod, int l, int r, int ul, int ur, long long val){
propag(nod, l, r);
if(r < ul || ur < l)
return;
if(ul <= l && r <= ur){
aint[nod].lazy += val;
propag(nod, l, r);
return;
}
int mid = (l +r)/2;
update(2*nod, l, mid, ul, ur, val);
update(2*nod + 1, mid + 1, r, ul, ur, val);
aint[nod] = join(aint[2*nod], aint[2*nod + 1]);
}
long long querypoz(int nod, int l, int r, int poz){
propag(nod, l, r);
if(poz < l || poz > r)
return LLONG_MIN;
if(l == r)
return aint[nod].minv;
int mid = (l + r)/2;
long long ls = querypoz(2*nod, l, mid, poz);
long long dr = querypoz(2*nod + 1, mid + 1, r, poz);
aint[nod] = join(aint[2*nod], aint[2*nod + 1]);
return max(ls, dr);
}
ainthelp queryitv(int nod, int l, int r, int ql, int qr){
propag(nod, l, r);
if(r < ql || l > qr)
return {0, LLONG_MAX, INT_MAX};
if(ql <= l && r <= qr)
return aint[nod];
int mid = (l +r)/2;
ainthelp left = queryitv(2*nod, l, mid, ql, qr);
ainthelp right = queryitv(2*nod + 1, mid + 1, r, ql, qr);
aint[nod] = join(aint[2*nod], aint[2*nod + 1]);
return join(left, right);
}
long long aibpoz[N];
void aib_upd(int poz, long long val){
for(int i = poz; i < N; i += i&(-i))
aibpoz[i] += val;
}
long long aib_query(int poz){
long long rsp = 0;
for(int i = poz; i >0; i-= i&(-i)){
rsp += aibpoz[i];
}
return rsp;
}
int aib_bs(long long val){ /// first >= val
int pas = 0;
for(int p2 = 1<<20; p2>0; p2>>=1){
if(pas + p2 < N && aibpoz[pas + p2] < val){
pas += p2;
val -= aibpoz[pas];
}
}
return pas + 1;
}
struct updates{
long long val; /// val > 0, group > 0 => type 1; val < 0 => type = 2
int group;
};
updates tme[N];
struct smenhelper{
int type; /// add(1), erase(-1)
int time;
updates upd;
};
vector<smenhelper> smen[N];
vector<smenhelper> queries[N];
int answers[N];
int main()
{
//freopen(".in","r",stdin);
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
int n, m, q;
cin>>n>>m>>q;
for(int i = 1; i <=q; i++){
answers[i] = -1;
int t;
cin>>t;
if(t == 1){
int l, r, gr;
long long val;
cin>>l>>r>>gr>>val;
smenhelper addval{1, i, {val, gr}};
smen[l].push_back(addval);
smenhelper delval{-1, i, {val, gr}};
smen[r + 1].push_back(delval);
}
else if(t == 2){
int l, r, gr;
long long val;
cin>>l>>r>>val;
smenhelper addval{1, i, {-val, 0}};
smen[l].push_back(addval);
smenhelper delval{-1, i, {-val, 0}};
smen[r + 1].push_back(delval);
}
else if(t == 3){
int poz;
long long val;
cin>>poz>>val;
smenhelper qry{0, i, {val, 0}};
queries[poz].push_back(qry);
}
}
///aint size = q ( TMAX = q)
/// aint de la 0 la q
aint_build(1, 0, q);
for(int i = 1; i<=n; i++){
for(auto change:smen[i]){
if(change.type == 1){ ///insert new update
updates upd = change.upd;
tme[change.time] = upd;
if(upd.val > 0){ /// type = 1 => new members in queues
update(1, 0, q, change.time, q, 1LL*upd.val);
aib_upd(change.time, 1LL * upd.val);
}
else if(upd.val < 0){ /// type = 2 => leave from queue
update(1, 0, q, change.time, q, 1LL * upd.val);
}
}
else if(change.type == -1){ /// delete old update
updates upd = change.upd;
tme[change.time] = {0, 0};
if(upd.val > 0){ ///type = 1 => have to remove old members
update(1, 0, q, change.time, q, -1LL * upd.val);
aib_upd(change.time, -1LL * upd.val);
}
else if(upd.val <0){ ///type = 2 => have to add them back
update(1, 0, q, change.time, q, -1LL * upd.val);
}
}
}
for(auto qry:queries[i]){
int time = qry.time;
long long val = qry.upd.val;
ainthelp minq = queryitv(1, 0, q, 0, time);
long long minval = minq.minv;
long long lastval = querypoz(1, 0, q, time);
long long cval = lastval - minval;
if(val > cval){
answers[time] = 0;
}
else{
long long alladded = aib_query(time);
long long lookingfor = alladded - (cval - val);
int id = aib_bs(lookingfor);
answers[time] = tme[id].group;
}
}
}
for(int i = 1; i <=q; i++){
if(answers[i] != -1)
cout<<answers[i]<<"\n";
}
return 0;
}
Compilation message
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:143:17: warning: unused variable 'gr' [-Wunused-variable]
143 | int l, r, gr;
| ^~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
8 ms |
12364 KB |
Output is correct |
3 |
Correct |
7 ms |
12236 KB |
Output is correct |
4 |
Correct |
8 ms |
12364 KB |
Output is correct |
5 |
Correct |
7 ms |
12356 KB |
Output is correct |
6 |
Correct |
8 ms |
12336 KB |
Output is correct |
7 |
Correct |
8 ms |
12364 KB |
Output is correct |
8 |
Correct |
11 ms |
12380 KB |
Output is correct |
9 |
Correct |
8 ms |
12364 KB |
Output is correct |
10 |
Correct |
8 ms |
12260 KB |
Output is correct |
11 |
Correct |
8 ms |
12364 KB |
Output is correct |
12 |
Correct |
8 ms |
12364 KB |
Output is correct |
13 |
Correct |
7 ms |
12364 KB |
Output is correct |
14 |
Correct |
7 ms |
12364 KB |
Output is correct |
15 |
Correct |
7 ms |
12236 KB |
Output is correct |
16 |
Correct |
8 ms |
12396 KB |
Output is correct |
17 |
Correct |
8 ms |
12236 KB |
Output is correct |
18 |
Correct |
8 ms |
12376 KB |
Output is correct |
19 |
Correct |
7 ms |
12364 KB |
Output is correct |
20 |
Correct |
8 ms |
12388 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
8 ms |
12364 KB |
Output is correct |
3 |
Correct |
7 ms |
12236 KB |
Output is correct |
4 |
Correct |
8 ms |
12364 KB |
Output is correct |
5 |
Correct |
7 ms |
12356 KB |
Output is correct |
6 |
Correct |
8 ms |
12336 KB |
Output is correct |
7 |
Correct |
8 ms |
12364 KB |
Output is correct |
8 |
Correct |
11 ms |
12380 KB |
Output is correct |
9 |
Correct |
8 ms |
12364 KB |
Output is correct |
10 |
Correct |
8 ms |
12260 KB |
Output is correct |
11 |
Correct |
8 ms |
12364 KB |
Output is correct |
12 |
Correct |
8 ms |
12364 KB |
Output is correct |
13 |
Correct |
7 ms |
12364 KB |
Output is correct |
14 |
Correct |
7 ms |
12364 KB |
Output is correct |
15 |
Correct |
7 ms |
12236 KB |
Output is correct |
16 |
Correct |
8 ms |
12396 KB |
Output is correct |
17 |
Correct |
8 ms |
12236 KB |
Output is correct |
18 |
Correct |
8 ms |
12376 KB |
Output is correct |
19 |
Correct |
7 ms |
12364 KB |
Output is correct |
20 |
Correct |
8 ms |
12388 KB |
Output is correct |
21 |
Correct |
8 ms |
12364 KB |
Output is correct |
22 |
Correct |
8 ms |
12332 KB |
Output is correct |
23 |
Correct |
8 ms |
12316 KB |
Output is correct |
24 |
Correct |
8 ms |
12364 KB |
Output is correct |
25 |
Correct |
8 ms |
12416 KB |
Output is correct |
26 |
Correct |
7 ms |
12364 KB |
Output is correct |
27 |
Correct |
9 ms |
12344 KB |
Output is correct |
28 |
Correct |
9 ms |
12364 KB |
Output is correct |
29 |
Correct |
8 ms |
12336 KB |
Output is correct |
30 |
Correct |
8 ms |
12328 KB |
Output is correct |
31 |
Correct |
8 ms |
12364 KB |
Output is correct |
32 |
Correct |
8 ms |
12336 KB |
Output is correct |
33 |
Correct |
7 ms |
12336 KB |
Output is correct |
34 |
Correct |
7 ms |
12468 KB |
Output is correct |
35 |
Correct |
8 ms |
12364 KB |
Output is correct |
36 |
Correct |
8 ms |
12340 KB |
Output is correct |
37 |
Correct |
8 ms |
12236 KB |
Output is correct |
38 |
Correct |
9 ms |
12336 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
104 ms |
20424 KB |
Output is correct |
2 |
Correct |
93 ms |
20624 KB |
Output is correct |
3 |
Correct |
94 ms |
20424 KB |
Output is correct |
4 |
Correct |
89 ms |
20452 KB |
Output is correct |
5 |
Correct |
91 ms |
20608 KB |
Output is correct |
6 |
Correct |
90 ms |
20628 KB |
Output is correct |
7 |
Correct |
50 ms |
19608 KB |
Output is correct |
8 |
Correct |
52 ms |
19844 KB |
Output is correct |
9 |
Correct |
92 ms |
20432 KB |
Output is correct |
10 |
Correct |
90 ms |
20648 KB |
Output is correct |
11 |
Correct |
89 ms |
20548 KB |
Output is correct |
12 |
Correct |
90 ms |
20544 KB |
Output is correct |
13 |
Correct |
81 ms |
19964 KB |
Output is correct |
14 |
Correct |
93 ms |
20420 KB |
Output is correct |
15 |
Correct |
90 ms |
20900 KB |
Output is correct |
16 |
Correct |
105 ms |
20872 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
472 ms |
48512 KB |
Output is correct |
2 |
Correct |
364 ms |
43588 KB |
Output is correct |
3 |
Correct |
516 ms |
50796 KB |
Output is correct |
4 |
Correct |
357 ms |
43948 KB |
Output is correct |
5 |
Correct |
366 ms |
44468 KB |
Output is correct |
6 |
Correct |
530 ms |
51652 KB |
Output is correct |
7 |
Correct |
213 ms |
48264 KB |
Output is correct |
8 |
Correct |
236 ms |
47288 KB |
Output is correct |
9 |
Correct |
483 ms |
49588 KB |
Output is correct |
10 |
Correct |
514 ms |
49640 KB |
Output is correct |
11 |
Correct |
514 ms |
50700 KB |
Output is correct |
12 |
Correct |
511 ms |
51660 KB |
Output is correct |
13 |
Correct |
494 ms |
50756 KB |
Output is correct |
14 |
Correct |
507 ms |
51740 KB |
Output is correct |
15 |
Correct |
500 ms |
51524 KB |
Output is correct |
16 |
Correct |
511 ms |
51576 KB |
Output is correct |
17 |
Correct |
535 ms |
51524 KB |
Output is correct |
18 |
Correct |
506 ms |
51132 KB |
Output is correct |
19 |
Correct |
522 ms |
51656 KB |
Output is correct |
20 |
Correct |
505 ms |
51268 KB |
Output is correct |
21 |
Correct |
512 ms |
51652 KB |
Output is correct |
22 |
Correct |
511 ms |
51520 KB |
Output is correct |
23 |
Correct |
534 ms |
51548 KB |
Output is correct |
24 |
Correct |
517 ms |
51536 KB |
Output is correct |
25 |
Correct |
431 ms |
52776 KB |
Output is correct |
26 |
Correct |
466 ms |
53264 KB |
Output is correct |
27 |
Correct |
416 ms |
52140 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
8 ms |
12364 KB |
Output is correct |
3 |
Correct |
7 ms |
12236 KB |
Output is correct |
4 |
Correct |
8 ms |
12364 KB |
Output is correct |
5 |
Correct |
7 ms |
12356 KB |
Output is correct |
6 |
Correct |
8 ms |
12336 KB |
Output is correct |
7 |
Correct |
8 ms |
12364 KB |
Output is correct |
8 |
Correct |
11 ms |
12380 KB |
Output is correct |
9 |
Correct |
8 ms |
12364 KB |
Output is correct |
10 |
Correct |
8 ms |
12260 KB |
Output is correct |
11 |
Correct |
8 ms |
12364 KB |
Output is correct |
12 |
Correct |
8 ms |
12364 KB |
Output is correct |
13 |
Correct |
7 ms |
12364 KB |
Output is correct |
14 |
Correct |
7 ms |
12364 KB |
Output is correct |
15 |
Correct |
7 ms |
12236 KB |
Output is correct |
16 |
Correct |
8 ms |
12396 KB |
Output is correct |
17 |
Correct |
8 ms |
12236 KB |
Output is correct |
18 |
Correct |
8 ms |
12376 KB |
Output is correct |
19 |
Correct |
7 ms |
12364 KB |
Output is correct |
20 |
Correct |
8 ms |
12388 KB |
Output is correct |
21 |
Correct |
104 ms |
20424 KB |
Output is correct |
22 |
Correct |
93 ms |
20624 KB |
Output is correct |
23 |
Correct |
94 ms |
20424 KB |
Output is correct |
24 |
Correct |
89 ms |
20452 KB |
Output is correct |
25 |
Correct |
91 ms |
20608 KB |
Output is correct |
26 |
Correct |
90 ms |
20628 KB |
Output is correct |
27 |
Correct |
50 ms |
19608 KB |
Output is correct |
28 |
Correct |
52 ms |
19844 KB |
Output is correct |
29 |
Correct |
92 ms |
20432 KB |
Output is correct |
30 |
Correct |
90 ms |
20648 KB |
Output is correct |
31 |
Correct |
89 ms |
20548 KB |
Output is correct |
32 |
Correct |
90 ms |
20544 KB |
Output is correct |
33 |
Correct |
81 ms |
19964 KB |
Output is correct |
34 |
Correct |
93 ms |
20420 KB |
Output is correct |
35 |
Correct |
90 ms |
20900 KB |
Output is correct |
36 |
Correct |
105 ms |
20872 KB |
Output is correct |
37 |
Correct |
90 ms |
19880 KB |
Output is correct |
38 |
Correct |
76 ms |
19428 KB |
Output is correct |
39 |
Correct |
43 ms |
19188 KB |
Output is correct |
40 |
Correct |
62 ms |
19520 KB |
Output is correct |
41 |
Correct |
92 ms |
20388 KB |
Output is correct |
42 |
Correct |
101 ms |
20624 KB |
Output is correct |
43 |
Correct |
100 ms |
20712 KB |
Output is correct |
44 |
Correct |
94 ms |
20496 KB |
Output is correct |
45 |
Correct |
116 ms |
20692 KB |
Output is correct |
46 |
Correct |
104 ms |
20616 KB |
Output is correct |
47 |
Correct |
74 ms |
19784 KB |
Output is correct |
48 |
Correct |
92 ms |
21160 KB |
Output is correct |
49 |
Correct |
65 ms |
19196 KB |
Output is correct |
50 |
Correct |
101 ms |
19908 KB |
Output is correct |
51 |
Correct |
99 ms |
20716 KB |
Output is correct |
52 |
Correct |
96 ms |
20732 KB |
Output is correct |
53 |
Correct |
74 ms |
19636 KB |
Output is correct |
54 |
Correct |
108 ms |
20868 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
87 ms |
21012 KB |
Output is correct |
2 |
Correct |
93 ms |
21744 KB |
Output is correct |
3 |
Correct |
98 ms |
21740 KB |
Output is correct |
4 |
Correct |
69 ms |
19760 KB |
Output is correct |
5 |
Correct |
89 ms |
20804 KB |
Output is correct |
6 |
Correct |
97 ms |
21832 KB |
Output is correct |
7 |
Correct |
55 ms |
20124 KB |
Output is correct |
8 |
Correct |
54 ms |
19792 KB |
Output is correct |
9 |
Correct |
74 ms |
21180 KB |
Output is correct |
10 |
Correct |
70 ms |
20008 KB |
Output is correct |
11 |
Correct |
90 ms |
21780 KB |
Output is correct |
12 |
Correct |
88 ms |
21800 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
8 ms |
12364 KB |
Output is correct |
3 |
Correct |
7 ms |
12236 KB |
Output is correct |
4 |
Correct |
8 ms |
12364 KB |
Output is correct |
5 |
Correct |
7 ms |
12356 KB |
Output is correct |
6 |
Correct |
8 ms |
12336 KB |
Output is correct |
7 |
Correct |
8 ms |
12364 KB |
Output is correct |
8 |
Correct |
11 ms |
12380 KB |
Output is correct |
9 |
Correct |
8 ms |
12364 KB |
Output is correct |
10 |
Correct |
8 ms |
12260 KB |
Output is correct |
11 |
Correct |
8 ms |
12364 KB |
Output is correct |
12 |
Correct |
8 ms |
12364 KB |
Output is correct |
13 |
Correct |
7 ms |
12364 KB |
Output is correct |
14 |
Correct |
7 ms |
12364 KB |
Output is correct |
15 |
Correct |
7 ms |
12236 KB |
Output is correct |
16 |
Correct |
8 ms |
12396 KB |
Output is correct |
17 |
Correct |
8 ms |
12236 KB |
Output is correct |
18 |
Correct |
8 ms |
12376 KB |
Output is correct |
19 |
Correct |
7 ms |
12364 KB |
Output is correct |
20 |
Correct |
8 ms |
12388 KB |
Output is correct |
21 |
Correct |
8 ms |
12364 KB |
Output is correct |
22 |
Correct |
8 ms |
12332 KB |
Output is correct |
23 |
Correct |
8 ms |
12316 KB |
Output is correct |
24 |
Correct |
8 ms |
12364 KB |
Output is correct |
25 |
Correct |
8 ms |
12416 KB |
Output is correct |
26 |
Correct |
7 ms |
12364 KB |
Output is correct |
27 |
Correct |
9 ms |
12344 KB |
Output is correct |
28 |
Correct |
9 ms |
12364 KB |
Output is correct |
29 |
Correct |
8 ms |
12336 KB |
Output is correct |
30 |
Correct |
8 ms |
12328 KB |
Output is correct |
31 |
Correct |
8 ms |
12364 KB |
Output is correct |
32 |
Correct |
8 ms |
12336 KB |
Output is correct |
33 |
Correct |
7 ms |
12336 KB |
Output is correct |
34 |
Correct |
7 ms |
12468 KB |
Output is correct |
35 |
Correct |
8 ms |
12364 KB |
Output is correct |
36 |
Correct |
8 ms |
12340 KB |
Output is correct |
37 |
Correct |
8 ms |
12236 KB |
Output is correct |
38 |
Correct |
9 ms |
12336 KB |
Output is correct |
39 |
Correct |
104 ms |
20424 KB |
Output is correct |
40 |
Correct |
93 ms |
20624 KB |
Output is correct |
41 |
Correct |
94 ms |
20424 KB |
Output is correct |
42 |
Correct |
89 ms |
20452 KB |
Output is correct |
43 |
Correct |
91 ms |
20608 KB |
Output is correct |
44 |
Correct |
90 ms |
20628 KB |
Output is correct |
45 |
Correct |
50 ms |
19608 KB |
Output is correct |
46 |
Correct |
52 ms |
19844 KB |
Output is correct |
47 |
Correct |
92 ms |
20432 KB |
Output is correct |
48 |
Correct |
90 ms |
20648 KB |
Output is correct |
49 |
Correct |
89 ms |
20548 KB |
Output is correct |
50 |
Correct |
90 ms |
20544 KB |
Output is correct |
51 |
Correct |
81 ms |
19964 KB |
Output is correct |
52 |
Correct |
93 ms |
20420 KB |
Output is correct |
53 |
Correct |
90 ms |
20900 KB |
Output is correct |
54 |
Correct |
105 ms |
20872 KB |
Output is correct |
55 |
Correct |
90 ms |
19880 KB |
Output is correct |
56 |
Correct |
76 ms |
19428 KB |
Output is correct |
57 |
Correct |
43 ms |
19188 KB |
Output is correct |
58 |
Correct |
62 ms |
19520 KB |
Output is correct |
59 |
Correct |
92 ms |
20388 KB |
Output is correct |
60 |
Correct |
101 ms |
20624 KB |
Output is correct |
61 |
Correct |
100 ms |
20712 KB |
Output is correct |
62 |
Correct |
94 ms |
20496 KB |
Output is correct |
63 |
Correct |
116 ms |
20692 KB |
Output is correct |
64 |
Correct |
104 ms |
20616 KB |
Output is correct |
65 |
Correct |
74 ms |
19784 KB |
Output is correct |
66 |
Correct |
92 ms |
21160 KB |
Output is correct |
67 |
Correct |
65 ms |
19196 KB |
Output is correct |
68 |
Correct |
101 ms |
19908 KB |
Output is correct |
69 |
Correct |
99 ms |
20716 KB |
Output is correct |
70 |
Correct |
96 ms |
20732 KB |
Output is correct |
71 |
Correct |
74 ms |
19636 KB |
Output is correct |
72 |
Correct |
108 ms |
20868 KB |
Output is correct |
73 |
Correct |
87 ms |
21012 KB |
Output is correct |
74 |
Correct |
93 ms |
21744 KB |
Output is correct |
75 |
Correct |
98 ms |
21740 KB |
Output is correct |
76 |
Correct |
69 ms |
19760 KB |
Output is correct |
77 |
Correct |
89 ms |
20804 KB |
Output is correct |
78 |
Correct |
97 ms |
21832 KB |
Output is correct |
79 |
Correct |
55 ms |
20124 KB |
Output is correct |
80 |
Correct |
54 ms |
19792 KB |
Output is correct |
81 |
Correct |
74 ms |
21180 KB |
Output is correct |
82 |
Correct |
70 ms |
20008 KB |
Output is correct |
83 |
Correct |
90 ms |
21780 KB |
Output is correct |
84 |
Correct |
88 ms |
21800 KB |
Output is correct |
85 |
Correct |
112 ms |
21384 KB |
Output is correct |
86 |
Correct |
102 ms |
22028 KB |
Output is correct |
87 |
Correct |
93 ms |
21444 KB |
Output is correct |
88 |
Correct |
100 ms |
22368 KB |
Output is correct |
89 |
Correct |
65 ms |
19772 KB |
Output is correct |
90 |
Correct |
95 ms |
22288 KB |
Output is correct |
91 |
Correct |
82 ms |
20968 KB |
Output is correct |
92 |
Correct |
81 ms |
20676 KB |
Output is correct |
93 |
Correct |
102 ms |
22204 KB |
Output is correct |
94 |
Correct |
105 ms |
22096 KB |
Output is correct |
95 |
Correct |
97 ms |
22084 KB |
Output is correct |
96 |
Correct |
110 ms |
22180 KB |
Output is correct |
97 |
Correct |
104 ms |
22180 KB |
Output is correct |
98 |
Correct |
88 ms |
21196 KB |
Output is correct |
99 |
Correct |
65 ms |
21180 KB |
Output is correct |
100 |
Correct |
74 ms |
21044 KB |
Output is correct |
101 |
Correct |
108 ms |
22648 KB |
Output is correct |
102 |
Correct |
93 ms |
22468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
8 ms |
12236 KB |
Output is correct |
2 |
Correct |
8 ms |
12364 KB |
Output is correct |
3 |
Correct |
7 ms |
12236 KB |
Output is correct |
4 |
Correct |
8 ms |
12364 KB |
Output is correct |
5 |
Correct |
7 ms |
12356 KB |
Output is correct |
6 |
Correct |
8 ms |
12336 KB |
Output is correct |
7 |
Correct |
8 ms |
12364 KB |
Output is correct |
8 |
Correct |
11 ms |
12380 KB |
Output is correct |
9 |
Correct |
8 ms |
12364 KB |
Output is correct |
10 |
Correct |
8 ms |
12260 KB |
Output is correct |
11 |
Correct |
8 ms |
12364 KB |
Output is correct |
12 |
Correct |
8 ms |
12364 KB |
Output is correct |
13 |
Correct |
7 ms |
12364 KB |
Output is correct |
14 |
Correct |
7 ms |
12364 KB |
Output is correct |
15 |
Correct |
7 ms |
12236 KB |
Output is correct |
16 |
Correct |
8 ms |
12396 KB |
Output is correct |
17 |
Correct |
8 ms |
12236 KB |
Output is correct |
18 |
Correct |
8 ms |
12376 KB |
Output is correct |
19 |
Correct |
7 ms |
12364 KB |
Output is correct |
20 |
Correct |
8 ms |
12388 KB |
Output is correct |
21 |
Correct |
8 ms |
12364 KB |
Output is correct |
22 |
Correct |
8 ms |
12332 KB |
Output is correct |
23 |
Correct |
8 ms |
12316 KB |
Output is correct |
24 |
Correct |
8 ms |
12364 KB |
Output is correct |
25 |
Correct |
8 ms |
12416 KB |
Output is correct |
26 |
Correct |
7 ms |
12364 KB |
Output is correct |
27 |
Correct |
9 ms |
12344 KB |
Output is correct |
28 |
Correct |
9 ms |
12364 KB |
Output is correct |
29 |
Correct |
8 ms |
12336 KB |
Output is correct |
30 |
Correct |
8 ms |
12328 KB |
Output is correct |
31 |
Correct |
8 ms |
12364 KB |
Output is correct |
32 |
Correct |
8 ms |
12336 KB |
Output is correct |
33 |
Correct |
7 ms |
12336 KB |
Output is correct |
34 |
Correct |
7 ms |
12468 KB |
Output is correct |
35 |
Correct |
8 ms |
12364 KB |
Output is correct |
36 |
Correct |
8 ms |
12340 KB |
Output is correct |
37 |
Correct |
8 ms |
12236 KB |
Output is correct |
38 |
Correct |
9 ms |
12336 KB |
Output is correct |
39 |
Correct |
104 ms |
20424 KB |
Output is correct |
40 |
Correct |
93 ms |
20624 KB |
Output is correct |
41 |
Correct |
94 ms |
20424 KB |
Output is correct |
42 |
Correct |
89 ms |
20452 KB |
Output is correct |
43 |
Correct |
91 ms |
20608 KB |
Output is correct |
44 |
Correct |
90 ms |
20628 KB |
Output is correct |
45 |
Correct |
50 ms |
19608 KB |
Output is correct |
46 |
Correct |
52 ms |
19844 KB |
Output is correct |
47 |
Correct |
92 ms |
20432 KB |
Output is correct |
48 |
Correct |
90 ms |
20648 KB |
Output is correct |
49 |
Correct |
89 ms |
20548 KB |
Output is correct |
50 |
Correct |
90 ms |
20544 KB |
Output is correct |
51 |
Correct |
81 ms |
19964 KB |
Output is correct |
52 |
Correct |
93 ms |
20420 KB |
Output is correct |
53 |
Correct |
90 ms |
20900 KB |
Output is correct |
54 |
Correct |
105 ms |
20872 KB |
Output is correct |
55 |
Correct |
472 ms |
48512 KB |
Output is correct |
56 |
Correct |
364 ms |
43588 KB |
Output is correct |
57 |
Correct |
516 ms |
50796 KB |
Output is correct |
58 |
Correct |
357 ms |
43948 KB |
Output is correct |
59 |
Correct |
366 ms |
44468 KB |
Output is correct |
60 |
Correct |
530 ms |
51652 KB |
Output is correct |
61 |
Correct |
213 ms |
48264 KB |
Output is correct |
62 |
Correct |
236 ms |
47288 KB |
Output is correct |
63 |
Correct |
483 ms |
49588 KB |
Output is correct |
64 |
Correct |
514 ms |
49640 KB |
Output is correct |
65 |
Correct |
514 ms |
50700 KB |
Output is correct |
66 |
Correct |
511 ms |
51660 KB |
Output is correct |
67 |
Correct |
494 ms |
50756 KB |
Output is correct |
68 |
Correct |
507 ms |
51740 KB |
Output is correct |
69 |
Correct |
500 ms |
51524 KB |
Output is correct |
70 |
Correct |
511 ms |
51576 KB |
Output is correct |
71 |
Correct |
535 ms |
51524 KB |
Output is correct |
72 |
Correct |
506 ms |
51132 KB |
Output is correct |
73 |
Correct |
522 ms |
51656 KB |
Output is correct |
74 |
Correct |
505 ms |
51268 KB |
Output is correct |
75 |
Correct |
512 ms |
51652 KB |
Output is correct |
76 |
Correct |
511 ms |
51520 KB |
Output is correct |
77 |
Correct |
534 ms |
51548 KB |
Output is correct |
78 |
Correct |
517 ms |
51536 KB |
Output is correct |
79 |
Correct |
431 ms |
52776 KB |
Output is correct |
80 |
Correct |
466 ms |
53264 KB |
Output is correct |
81 |
Correct |
416 ms |
52140 KB |
Output is correct |
82 |
Correct |
90 ms |
19880 KB |
Output is correct |
83 |
Correct |
76 ms |
19428 KB |
Output is correct |
84 |
Correct |
43 ms |
19188 KB |
Output is correct |
85 |
Correct |
62 ms |
19520 KB |
Output is correct |
86 |
Correct |
92 ms |
20388 KB |
Output is correct |
87 |
Correct |
101 ms |
20624 KB |
Output is correct |
88 |
Correct |
100 ms |
20712 KB |
Output is correct |
89 |
Correct |
94 ms |
20496 KB |
Output is correct |
90 |
Correct |
116 ms |
20692 KB |
Output is correct |
91 |
Correct |
104 ms |
20616 KB |
Output is correct |
92 |
Correct |
74 ms |
19784 KB |
Output is correct |
93 |
Correct |
92 ms |
21160 KB |
Output is correct |
94 |
Correct |
65 ms |
19196 KB |
Output is correct |
95 |
Correct |
101 ms |
19908 KB |
Output is correct |
96 |
Correct |
99 ms |
20716 KB |
Output is correct |
97 |
Correct |
96 ms |
20732 KB |
Output is correct |
98 |
Correct |
74 ms |
19636 KB |
Output is correct |
99 |
Correct |
108 ms |
20868 KB |
Output is correct |
100 |
Correct |
87 ms |
21012 KB |
Output is correct |
101 |
Correct |
93 ms |
21744 KB |
Output is correct |
102 |
Correct |
98 ms |
21740 KB |
Output is correct |
103 |
Correct |
69 ms |
19760 KB |
Output is correct |
104 |
Correct |
89 ms |
20804 KB |
Output is correct |
105 |
Correct |
97 ms |
21832 KB |
Output is correct |
106 |
Correct |
55 ms |
20124 KB |
Output is correct |
107 |
Correct |
54 ms |
19792 KB |
Output is correct |
108 |
Correct |
74 ms |
21180 KB |
Output is correct |
109 |
Correct |
70 ms |
20008 KB |
Output is correct |
110 |
Correct |
90 ms |
21780 KB |
Output is correct |
111 |
Correct |
88 ms |
21800 KB |
Output is correct |
112 |
Correct |
112 ms |
21384 KB |
Output is correct |
113 |
Correct |
102 ms |
22028 KB |
Output is correct |
114 |
Correct |
93 ms |
21444 KB |
Output is correct |
115 |
Correct |
100 ms |
22368 KB |
Output is correct |
116 |
Correct |
65 ms |
19772 KB |
Output is correct |
117 |
Correct |
95 ms |
22288 KB |
Output is correct |
118 |
Correct |
82 ms |
20968 KB |
Output is correct |
119 |
Correct |
81 ms |
20676 KB |
Output is correct |
120 |
Correct |
102 ms |
22204 KB |
Output is correct |
121 |
Correct |
105 ms |
22096 KB |
Output is correct |
122 |
Correct |
97 ms |
22084 KB |
Output is correct |
123 |
Correct |
110 ms |
22180 KB |
Output is correct |
124 |
Correct |
104 ms |
22180 KB |
Output is correct |
125 |
Correct |
88 ms |
21196 KB |
Output is correct |
126 |
Correct |
65 ms |
21180 KB |
Output is correct |
127 |
Correct |
74 ms |
21044 KB |
Output is correct |
128 |
Correct |
108 ms |
22648 KB |
Output is correct |
129 |
Correct |
93 ms |
22468 KB |
Output is correct |
130 |
Correct |
533 ms |
51308 KB |
Output is correct |
131 |
Correct |
356 ms |
43904 KB |
Output is correct |
132 |
Correct |
515 ms |
51336 KB |
Output is correct |
133 |
Correct |
488 ms |
51208 KB |
Output is correct |
134 |
Correct |
448 ms |
48144 KB |
Output is correct |
135 |
Correct |
523 ms |
52416 KB |
Output is correct |
136 |
Correct |
494 ms |
50500 KB |
Output is correct |
137 |
Correct |
493 ms |
50440 KB |
Output is correct |
138 |
Correct |
520 ms |
51372 KB |
Output is correct |
139 |
Correct |
488 ms |
52164 KB |
Output is correct |
140 |
Correct |
501 ms |
51456 KB |
Output is correct |
141 |
Correct |
511 ms |
52136 KB |
Output is correct |
142 |
Correct |
512 ms |
52108 KB |
Output is correct |
143 |
Correct |
525 ms |
52072 KB |
Output is correct |
144 |
Correct |
515 ms |
51652 KB |
Output is correct |
145 |
Correct |
508 ms |
52152 KB |
Output is correct |
146 |
Correct |
532 ms |
51984 KB |
Output is correct |
147 |
Correct |
541 ms |
52180 KB |
Output is correct |
148 |
Correct |
560 ms |
52156 KB |
Output is correct |
149 |
Correct |
546 ms |
52064 KB |
Output is correct |
150 |
Correct |
282 ms |
47712 KB |
Output is correct |
151 |
Correct |
456 ms |
53916 KB |
Output is correct |
152 |
Correct |
457 ms |
54020 KB |
Output is correct |
153 |
Correct |
424 ms |
53024 KB |
Output is correct |