#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pii;
int n,m,q,ans[250005],base[250005];
ll s[1<<20],lz[1<<20],fen[250050];
struct Gr {
int val,idx,gr;
};
vector<pii> want[250005]; //number on queue and the index of ans
vector<Gr> p[250005]; //people, idx, group
vector<pii> qu[250005]; //queue, idx
ll find(int x) {
ll sum=0;
while (x) {
sum+=fen[x];
x-=x&-x;
}
return sum;
}
void upd(int x, ll val) {
while (x<=q+5) {
fen[x]+=val;
x+=x&-x;
}
}
void push(int l, int r, int idx) {
s[idx]+=lz[idx];
if (l!=r) {
lz[2*idx]+=lz[idx];
lz[2*idx+1]+=lz[idx];
}
lz[idx]=0;
}
void update(int l, int r, int idx, int x, int y, ll val) {
push(l,r,idx);
if (x>r || y<l) return;
if (x<=l && r<=y) {
lz[idx]+=val;
push(l,r,idx);
} else {
int mid=(l+r)/2;
update(l,mid,2*idx,x,y,val);
update(mid+1,r,2*idx+1,x,y,val);
s[idx]=min(s[2*idx],s[2*idx+1]);
}
}
ll query(int l, int r, int idx, int x, int y) {
push(l,r,idx);
if (x>r || y<l) return LLONG_MAX;
if (x<=l && r<=y) return s[idx];
int mid=(l+r)/2;
return min(query(l,mid,2*idx,x,y),query(mid+1,r,2*idx+1,x,y));
}
ll seg[1<<20]; //sum of people
void update2(int l, int r, int idx, int x, ll val) {
if (x>r || x<l) return;
if (l==r) seg[idx]+=val;
else {
int mid=(l+r)/2;
update2(l,mid,2*idx,x,val);
update2(mid+1,r,2*idx+1,x,val);
seg[idx]=seg[2*idx]+seg[2*idx+1];
}
}
int query2(int l, int r, int idx, ll want) {
if (l==r) return l;
int mid=(l+r)/2;
if (seg[2*idx]>=want) return query2(l,mid,2*idx,want);
else return query2(mid+1,r,2*idx+1,want-seg[2*idx]);
}
int f(ll want, int d) {
if (seg[1]<want) return 0;
int h=query2(1,q,1,want);
if (h<=d) return h;
else return 0;
}
int main() {
ios_base::sync_with_stdio(0); cin.tie(0);
memset(ans,-1,sizeof(ans));
memset(base,-1,sizeof(base));
base[0]=0;
cin>>n>>m>>q;
for (int i=1; i<=q; ++i) {
int mode; cin>>mode;
if (mode==1) {
int l,r,c,k; cin>>l>>r>>c>>k;
p[l].push_back({k,i,c});
p[r+1].push_back({-k,i,c});
} else if (mode==2) {
int l,r,k; cin>>l>>r>>k;
qu[l].push_back(pii(k,i));
qu[r+1].push_back(pii(-k,i));
} else {
ll a,b; cin>>a>>b;
want[a].push_back(pii(b,i));
}
}
for (int i=1; i<=n; ++i) {
//add people
for (auto s : p[i]) {
update(1,q,1,s.idx,q,s.val);
upd(s.idx,s.val);
base[s.idx]=s.gr;
update2(1,q,1,s.idx,s.val);
}
//add bound of queue
for (auto s : qu[i]) update(1,q,1,s.second,q,-s.first);
//find real queue
for (auto s : want[i]) {
ll want=s.first+(find(s.second)-(query(1,q,1,s.second,s.second)-min(0ll,query(1,q,1,1,s.second))));
ans[s.second]=base[f(want,s.second)];
}
}
for (int i=1; i<=q; ++i) {
if (ans[i]!=-1) cout<<ans[i]<<"\n";
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
20052 KB |
Output is correct |
2 |
Correct |
11 ms |
20120 KB |
Output is correct |
3 |
Correct |
10 ms |
20052 KB |
Output is correct |
4 |
Correct |
11 ms |
20052 KB |
Output is correct |
5 |
Correct |
11 ms |
20052 KB |
Output is correct |
6 |
Correct |
9 ms |
20052 KB |
Output is correct |
7 |
Correct |
13 ms |
20016 KB |
Output is correct |
8 |
Correct |
10 ms |
20048 KB |
Output is correct |
9 |
Correct |
11 ms |
20052 KB |
Output is correct |
10 |
Correct |
11 ms |
20052 KB |
Output is correct |
11 |
Correct |
10 ms |
20096 KB |
Output is correct |
12 |
Correct |
13 ms |
20052 KB |
Output is correct |
13 |
Correct |
10 ms |
20128 KB |
Output is correct |
14 |
Correct |
9 ms |
20052 KB |
Output is correct |
15 |
Correct |
9 ms |
20024 KB |
Output is correct |
16 |
Correct |
10 ms |
20124 KB |
Output is correct |
17 |
Correct |
10 ms |
20052 KB |
Output is correct |
18 |
Correct |
10 ms |
20092 KB |
Output is correct |
19 |
Correct |
10 ms |
20052 KB |
Output is correct |
20 |
Correct |
10 ms |
20052 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
20052 KB |
Output is correct |
2 |
Correct |
11 ms |
20120 KB |
Output is correct |
3 |
Correct |
10 ms |
20052 KB |
Output is correct |
4 |
Correct |
11 ms |
20052 KB |
Output is correct |
5 |
Correct |
11 ms |
20052 KB |
Output is correct |
6 |
Correct |
9 ms |
20052 KB |
Output is correct |
7 |
Correct |
13 ms |
20016 KB |
Output is correct |
8 |
Correct |
10 ms |
20048 KB |
Output is correct |
9 |
Correct |
11 ms |
20052 KB |
Output is correct |
10 |
Correct |
11 ms |
20052 KB |
Output is correct |
11 |
Correct |
10 ms |
20096 KB |
Output is correct |
12 |
Correct |
13 ms |
20052 KB |
Output is correct |
13 |
Correct |
10 ms |
20128 KB |
Output is correct |
14 |
Correct |
9 ms |
20052 KB |
Output is correct |
15 |
Correct |
9 ms |
20024 KB |
Output is correct |
16 |
Correct |
10 ms |
20124 KB |
Output is correct |
17 |
Correct |
10 ms |
20052 KB |
Output is correct |
18 |
Correct |
10 ms |
20092 KB |
Output is correct |
19 |
Correct |
10 ms |
20052 KB |
Output is correct |
20 |
Correct |
10 ms |
20052 KB |
Output is correct |
21 |
Correct |
10 ms |
20124 KB |
Output is correct |
22 |
Correct |
10 ms |
20176 KB |
Output is correct |
23 |
Correct |
11 ms |
20132 KB |
Output is correct |
24 |
Correct |
13 ms |
20148 KB |
Output is correct |
25 |
Correct |
9 ms |
20052 KB |
Output is correct |
26 |
Correct |
10 ms |
20044 KB |
Output is correct |
27 |
Correct |
10 ms |
20100 KB |
Output is correct |
28 |
Correct |
10 ms |
20052 KB |
Output is correct |
29 |
Correct |
11 ms |
20104 KB |
Output is correct |
30 |
Correct |
11 ms |
20100 KB |
Output is correct |
31 |
Correct |
10 ms |
20176 KB |
Output is correct |
32 |
Correct |
10 ms |
20176 KB |
Output is correct |
33 |
Correct |
10 ms |
20084 KB |
Output is correct |
34 |
Correct |
10 ms |
20172 KB |
Output is correct |
35 |
Correct |
10 ms |
20052 KB |
Output is correct |
36 |
Correct |
10 ms |
20132 KB |
Output is correct |
37 |
Correct |
11 ms |
20052 KB |
Output is correct |
38 |
Correct |
10 ms |
20100 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
84 ms |
26412 KB |
Output is correct |
2 |
Correct |
84 ms |
26384 KB |
Output is correct |
3 |
Correct |
78 ms |
26372 KB |
Output is correct |
4 |
Correct |
87 ms |
26376 KB |
Output is correct |
5 |
Correct |
79 ms |
26352 KB |
Output is correct |
6 |
Correct |
93 ms |
26352 KB |
Output is correct |
7 |
Correct |
44 ms |
25296 KB |
Output is correct |
8 |
Correct |
45 ms |
25080 KB |
Output is correct |
9 |
Correct |
74 ms |
25944 KB |
Output is correct |
10 |
Correct |
92 ms |
26452 KB |
Output is correct |
11 |
Correct |
91 ms |
26280 KB |
Output is correct |
12 |
Correct |
94 ms |
26452 KB |
Output is correct |
13 |
Correct |
89 ms |
25780 KB |
Output is correct |
14 |
Correct |
109 ms |
26164 KB |
Output is correct |
15 |
Correct |
118 ms |
25972 KB |
Output is correct |
16 |
Correct |
101 ms |
26048 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
439 ms |
49648 KB |
Output is correct |
2 |
Correct |
383 ms |
46224 KB |
Output is correct |
3 |
Correct |
495 ms |
51360 KB |
Output is correct |
4 |
Correct |
375 ms |
46304 KB |
Output is correct |
5 |
Correct |
389 ms |
46312 KB |
Output is correct |
6 |
Correct |
470 ms |
51436 KB |
Output is correct |
7 |
Correct |
184 ms |
44384 KB |
Output is correct |
8 |
Correct |
196 ms |
44416 KB |
Output is correct |
9 |
Correct |
531 ms |
49648 KB |
Output is correct |
10 |
Correct |
476 ms |
49660 KB |
Output is correct |
11 |
Correct |
473 ms |
48804 KB |
Output is correct |
12 |
Correct |
435 ms |
51776 KB |
Output is correct |
13 |
Correct |
438 ms |
49080 KB |
Output is correct |
14 |
Correct |
440 ms |
51720 KB |
Output is correct |
15 |
Correct |
477 ms |
51648 KB |
Output is correct |
16 |
Correct |
452 ms |
51632 KB |
Output is correct |
17 |
Correct |
450 ms |
51648 KB |
Output is correct |
18 |
Correct |
453 ms |
50260 KB |
Output is correct |
19 |
Correct |
431 ms |
51724 KB |
Output is correct |
20 |
Correct |
451 ms |
50512 KB |
Output is correct |
21 |
Correct |
453 ms |
51660 KB |
Output is correct |
22 |
Correct |
509 ms |
51736 KB |
Output is correct |
23 |
Correct |
471 ms |
51660 KB |
Output is correct |
24 |
Correct |
448 ms |
51640 KB |
Output is correct |
25 |
Correct |
373 ms |
49880 KB |
Output is correct |
26 |
Correct |
351 ms |
50216 KB |
Output is correct |
27 |
Correct |
367 ms |
49900 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
20052 KB |
Output is correct |
2 |
Correct |
11 ms |
20120 KB |
Output is correct |
3 |
Correct |
10 ms |
20052 KB |
Output is correct |
4 |
Correct |
11 ms |
20052 KB |
Output is correct |
5 |
Correct |
11 ms |
20052 KB |
Output is correct |
6 |
Correct |
9 ms |
20052 KB |
Output is correct |
7 |
Correct |
13 ms |
20016 KB |
Output is correct |
8 |
Correct |
10 ms |
20048 KB |
Output is correct |
9 |
Correct |
11 ms |
20052 KB |
Output is correct |
10 |
Correct |
11 ms |
20052 KB |
Output is correct |
11 |
Correct |
10 ms |
20096 KB |
Output is correct |
12 |
Correct |
13 ms |
20052 KB |
Output is correct |
13 |
Correct |
10 ms |
20128 KB |
Output is correct |
14 |
Correct |
9 ms |
20052 KB |
Output is correct |
15 |
Correct |
9 ms |
20024 KB |
Output is correct |
16 |
Correct |
10 ms |
20124 KB |
Output is correct |
17 |
Correct |
10 ms |
20052 KB |
Output is correct |
18 |
Correct |
10 ms |
20092 KB |
Output is correct |
19 |
Correct |
10 ms |
20052 KB |
Output is correct |
20 |
Correct |
10 ms |
20052 KB |
Output is correct |
21 |
Correct |
84 ms |
26412 KB |
Output is correct |
22 |
Correct |
84 ms |
26384 KB |
Output is correct |
23 |
Correct |
78 ms |
26372 KB |
Output is correct |
24 |
Correct |
87 ms |
26376 KB |
Output is correct |
25 |
Correct |
79 ms |
26352 KB |
Output is correct |
26 |
Correct |
93 ms |
26352 KB |
Output is correct |
27 |
Correct |
44 ms |
25296 KB |
Output is correct |
28 |
Correct |
45 ms |
25080 KB |
Output is correct |
29 |
Correct |
74 ms |
25944 KB |
Output is correct |
30 |
Correct |
92 ms |
26452 KB |
Output is correct |
31 |
Correct |
91 ms |
26280 KB |
Output is correct |
32 |
Correct |
94 ms |
26452 KB |
Output is correct |
33 |
Correct |
89 ms |
25780 KB |
Output is correct |
34 |
Correct |
109 ms |
26164 KB |
Output is correct |
35 |
Correct |
118 ms |
25972 KB |
Output is correct |
36 |
Correct |
101 ms |
26048 KB |
Output is correct |
37 |
Correct |
69 ms |
26104 KB |
Output is correct |
38 |
Correct |
73 ms |
25724 KB |
Output is correct |
39 |
Correct |
38 ms |
24876 KB |
Output is correct |
40 |
Correct |
46 ms |
25256 KB |
Output is correct |
41 |
Correct |
82 ms |
25736 KB |
Output is correct |
42 |
Correct |
82 ms |
26444 KB |
Output is correct |
43 |
Correct |
89 ms |
26516 KB |
Output is correct |
44 |
Correct |
80 ms |
26092 KB |
Output is correct |
45 |
Correct |
80 ms |
26480 KB |
Output is correct |
46 |
Correct |
80 ms |
26444 KB |
Output is correct |
47 |
Correct |
59 ms |
25396 KB |
Output is correct |
48 |
Correct |
74 ms |
26168 KB |
Output is correct |
49 |
Correct |
60 ms |
25476 KB |
Output is correct |
50 |
Correct |
73 ms |
26012 KB |
Output is correct |
51 |
Correct |
84 ms |
26496 KB |
Output is correct |
52 |
Correct |
84 ms |
26492 KB |
Output is correct |
53 |
Correct |
75 ms |
25424 KB |
Output is correct |
54 |
Correct |
86 ms |
26076 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
83 ms |
27084 KB |
Output is correct |
2 |
Correct |
90 ms |
27496 KB |
Output is correct |
3 |
Correct |
92 ms |
27632 KB |
Output is correct |
4 |
Correct |
70 ms |
26232 KB |
Output is correct |
5 |
Correct |
76 ms |
26956 KB |
Output is correct |
6 |
Correct |
87 ms |
27568 KB |
Output is correct |
7 |
Correct |
49 ms |
25908 KB |
Output is correct |
8 |
Correct |
50 ms |
25788 KB |
Output is correct |
9 |
Correct |
61 ms |
26844 KB |
Output is correct |
10 |
Correct |
58 ms |
25964 KB |
Output is correct |
11 |
Correct |
79 ms |
27104 KB |
Output is correct |
12 |
Correct |
79 ms |
27124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
20052 KB |
Output is correct |
2 |
Correct |
11 ms |
20120 KB |
Output is correct |
3 |
Correct |
10 ms |
20052 KB |
Output is correct |
4 |
Correct |
11 ms |
20052 KB |
Output is correct |
5 |
Correct |
11 ms |
20052 KB |
Output is correct |
6 |
Correct |
9 ms |
20052 KB |
Output is correct |
7 |
Correct |
13 ms |
20016 KB |
Output is correct |
8 |
Correct |
10 ms |
20048 KB |
Output is correct |
9 |
Correct |
11 ms |
20052 KB |
Output is correct |
10 |
Correct |
11 ms |
20052 KB |
Output is correct |
11 |
Correct |
10 ms |
20096 KB |
Output is correct |
12 |
Correct |
13 ms |
20052 KB |
Output is correct |
13 |
Correct |
10 ms |
20128 KB |
Output is correct |
14 |
Correct |
9 ms |
20052 KB |
Output is correct |
15 |
Correct |
9 ms |
20024 KB |
Output is correct |
16 |
Correct |
10 ms |
20124 KB |
Output is correct |
17 |
Correct |
10 ms |
20052 KB |
Output is correct |
18 |
Correct |
10 ms |
20092 KB |
Output is correct |
19 |
Correct |
10 ms |
20052 KB |
Output is correct |
20 |
Correct |
10 ms |
20052 KB |
Output is correct |
21 |
Correct |
10 ms |
20124 KB |
Output is correct |
22 |
Correct |
10 ms |
20176 KB |
Output is correct |
23 |
Correct |
11 ms |
20132 KB |
Output is correct |
24 |
Correct |
13 ms |
20148 KB |
Output is correct |
25 |
Correct |
9 ms |
20052 KB |
Output is correct |
26 |
Correct |
10 ms |
20044 KB |
Output is correct |
27 |
Correct |
10 ms |
20100 KB |
Output is correct |
28 |
Correct |
10 ms |
20052 KB |
Output is correct |
29 |
Correct |
11 ms |
20104 KB |
Output is correct |
30 |
Correct |
11 ms |
20100 KB |
Output is correct |
31 |
Correct |
10 ms |
20176 KB |
Output is correct |
32 |
Correct |
10 ms |
20176 KB |
Output is correct |
33 |
Correct |
10 ms |
20084 KB |
Output is correct |
34 |
Correct |
10 ms |
20172 KB |
Output is correct |
35 |
Correct |
10 ms |
20052 KB |
Output is correct |
36 |
Correct |
10 ms |
20132 KB |
Output is correct |
37 |
Correct |
11 ms |
20052 KB |
Output is correct |
38 |
Correct |
10 ms |
20100 KB |
Output is correct |
39 |
Correct |
84 ms |
26412 KB |
Output is correct |
40 |
Correct |
84 ms |
26384 KB |
Output is correct |
41 |
Correct |
78 ms |
26372 KB |
Output is correct |
42 |
Correct |
87 ms |
26376 KB |
Output is correct |
43 |
Correct |
79 ms |
26352 KB |
Output is correct |
44 |
Correct |
93 ms |
26352 KB |
Output is correct |
45 |
Correct |
44 ms |
25296 KB |
Output is correct |
46 |
Correct |
45 ms |
25080 KB |
Output is correct |
47 |
Correct |
74 ms |
25944 KB |
Output is correct |
48 |
Correct |
92 ms |
26452 KB |
Output is correct |
49 |
Correct |
91 ms |
26280 KB |
Output is correct |
50 |
Correct |
94 ms |
26452 KB |
Output is correct |
51 |
Correct |
89 ms |
25780 KB |
Output is correct |
52 |
Correct |
109 ms |
26164 KB |
Output is correct |
53 |
Correct |
118 ms |
25972 KB |
Output is correct |
54 |
Correct |
101 ms |
26048 KB |
Output is correct |
55 |
Correct |
69 ms |
26104 KB |
Output is correct |
56 |
Correct |
73 ms |
25724 KB |
Output is correct |
57 |
Correct |
38 ms |
24876 KB |
Output is correct |
58 |
Correct |
46 ms |
25256 KB |
Output is correct |
59 |
Correct |
82 ms |
25736 KB |
Output is correct |
60 |
Correct |
82 ms |
26444 KB |
Output is correct |
61 |
Correct |
89 ms |
26516 KB |
Output is correct |
62 |
Correct |
80 ms |
26092 KB |
Output is correct |
63 |
Correct |
80 ms |
26480 KB |
Output is correct |
64 |
Correct |
80 ms |
26444 KB |
Output is correct |
65 |
Correct |
59 ms |
25396 KB |
Output is correct |
66 |
Correct |
74 ms |
26168 KB |
Output is correct |
67 |
Correct |
60 ms |
25476 KB |
Output is correct |
68 |
Correct |
73 ms |
26012 KB |
Output is correct |
69 |
Correct |
84 ms |
26496 KB |
Output is correct |
70 |
Correct |
84 ms |
26492 KB |
Output is correct |
71 |
Correct |
75 ms |
25424 KB |
Output is correct |
72 |
Correct |
86 ms |
26076 KB |
Output is correct |
73 |
Correct |
83 ms |
27084 KB |
Output is correct |
74 |
Correct |
90 ms |
27496 KB |
Output is correct |
75 |
Correct |
92 ms |
27632 KB |
Output is correct |
76 |
Correct |
70 ms |
26232 KB |
Output is correct |
77 |
Correct |
76 ms |
26956 KB |
Output is correct |
78 |
Correct |
87 ms |
27568 KB |
Output is correct |
79 |
Correct |
49 ms |
25908 KB |
Output is correct |
80 |
Correct |
50 ms |
25788 KB |
Output is correct |
81 |
Correct |
61 ms |
26844 KB |
Output is correct |
82 |
Correct |
58 ms |
25964 KB |
Output is correct |
83 |
Correct |
79 ms |
27104 KB |
Output is correct |
84 |
Correct |
79 ms |
27124 KB |
Output is correct |
85 |
Correct |
101 ms |
27524 KB |
Output is correct |
86 |
Correct |
94 ms |
27924 KB |
Output is correct |
87 |
Correct |
79 ms |
27384 KB |
Output is correct |
88 |
Correct |
95 ms |
28008 KB |
Output is correct |
89 |
Correct |
58 ms |
25804 KB |
Output is correct |
90 |
Correct |
95 ms |
28052 KB |
Output is correct |
91 |
Correct |
71 ms |
27132 KB |
Output is correct |
92 |
Correct |
68 ms |
26872 KB |
Output is correct |
93 |
Correct |
101 ms |
28016 KB |
Output is correct |
94 |
Correct |
84 ms |
27680 KB |
Output is correct |
95 |
Correct |
84 ms |
27892 KB |
Output is correct |
96 |
Correct |
86 ms |
28068 KB |
Output is correct |
97 |
Correct |
87 ms |
28020 KB |
Output is correct |
98 |
Correct |
77 ms |
27236 KB |
Output is correct |
99 |
Correct |
65 ms |
26832 KB |
Output is correct |
100 |
Correct |
66 ms |
26732 KB |
Output is correct |
101 |
Correct |
75 ms |
27676 KB |
Output is correct |
102 |
Correct |
81 ms |
27684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
9 ms |
20052 KB |
Output is correct |
2 |
Correct |
11 ms |
20120 KB |
Output is correct |
3 |
Correct |
10 ms |
20052 KB |
Output is correct |
4 |
Correct |
11 ms |
20052 KB |
Output is correct |
5 |
Correct |
11 ms |
20052 KB |
Output is correct |
6 |
Correct |
9 ms |
20052 KB |
Output is correct |
7 |
Correct |
13 ms |
20016 KB |
Output is correct |
8 |
Correct |
10 ms |
20048 KB |
Output is correct |
9 |
Correct |
11 ms |
20052 KB |
Output is correct |
10 |
Correct |
11 ms |
20052 KB |
Output is correct |
11 |
Correct |
10 ms |
20096 KB |
Output is correct |
12 |
Correct |
13 ms |
20052 KB |
Output is correct |
13 |
Correct |
10 ms |
20128 KB |
Output is correct |
14 |
Correct |
9 ms |
20052 KB |
Output is correct |
15 |
Correct |
9 ms |
20024 KB |
Output is correct |
16 |
Correct |
10 ms |
20124 KB |
Output is correct |
17 |
Correct |
10 ms |
20052 KB |
Output is correct |
18 |
Correct |
10 ms |
20092 KB |
Output is correct |
19 |
Correct |
10 ms |
20052 KB |
Output is correct |
20 |
Correct |
10 ms |
20052 KB |
Output is correct |
21 |
Correct |
10 ms |
20124 KB |
Output is correct |
22 |
Correct |
10 ms |
20176 KB |
Output is correct |
23 |
Correct |
11 ms |
20132 KB |
Output is correct |
24 |
Correct |
13 ms |
20148 KB |
Output is correct |
25 |
Correct |
9 ms |
20052 KB |
Output is correct |
26 |
Correct |
10 ms |
20044 KB |
Output is correct |
27 |
Correct |
10 ms |
20100 KB |
Output is correct |
28 |
Correct |
10 ms |
20052 KB |
Output is correct |
29 |
Correct |
11 ms |
20104 KB |
Output is correct |
30 |
Correct |
11 ms |
20100 KB |
Output is correct |
31 |
Correct |
10 ms |
20176 KB |
Output is correct |
32 |
Correct |
10 ms |
20176 KB |
Output is correct |
33 |
Correct |
10 ms |
20084 KB |
Output is correct |
34 |
Correct |
10 ms |
20172 KB |
Output is correct |
35 |
Correct |
10 ms |
20052 KB |
Output is correct |
36 |
Correct |
10 ms |
20132 KB |
Output is correct |
37 |
Correct |
11 ms |
20052 KB |
Output is correct |
38 |
Correct |
10 ms |
20100 KB |
Output is correct |
39 |
Correct |
84 ms |
26412 KB |
Output is correct |
40 |
Correct |
84 ms |
26384 KB |
Output is correct |
41 |
Correct |
78 ms |
26372 KB |
Output is correct |
42 |
Correct |
87 ms |
26376 KB |
Output is correct |
43 |
Correct |
79 ms |
26352 KB |
Output is correct |
44 |
Correct |
93 ms |
26352 KB |
Output is correct |
45 |
Correct |
44 ms |
25296 KB |
Output is correct |
46 |
Correct |
45 ms |
25080 KB |
Output is correct |
47 |
Correct |
74 ms |
25944 KB |
Output is correct |
48 |
Correct |
92 ms |
26452 KB |
Output is correct |
49 |
Correct |
91 ms |
26280 KB |
Output is correct |
50 |
Correct |
94 ms |
26452 KB |
Output is correct |
51 |
Correct |
89 ms |
25780 KB |
Output is correct |
52 |
Correct |
109 ms |
26164 KB |
Output is correct |
53 |
Correct |
118 ms |
25972 KB |
Output is correct |
54 |
Correct |
101 ms |
26048 KB |
Output is correct |
55 |
Correct |
439 ms |
49648 KB |
Output is correct |
56 |
Correct |
383 ms |
46224 KB |
Output is correct |
57 |
Correct |
495 ms |
51360 KB |
Output is correct |
58 |
Correct |
375 ms |
46304 KB |
Output is correct |
59 |
Correct |
389 ms |
46312 KB |
Output is correct |
60 |
Correct |
470 ms |
51436 KB |
Output is correct |
61 |
Correct |
184 ms |
44384 KB |
Output is correct |
62 |
Correct |
196 ms |
44416 KB |
Output is correct |
63 |
Correct |
531 ms |
49648 KB |
Output is correct |
64 |
Correct |
476 ms |
49660 KB |
Output is correct |
65 |
Correct |
473 ms |
48804 KB |
Output is correct |
66 |
Correct |
435 ms |
51776 KB |
Output is correct |
67 |
Correct |
438 ms |
49080 KB |
Output is correct |
68 |
Correct |
440 ms |
51720 KB |
Output is correct |
69 |
Correct |
477 ms |
51648 KB |
Output is correct |
70 |
Correct |
452 ms |
51632 KB |
Output is correct |
71 |
Correct |
450 ms |
51648 KB |
Output is correct |
72 |
Correct |
453 ms |
50260 KB |
Output is correct |
73 |
Correct |
431 ms |
51724 KB |
Output is correct |
74 |
Correct |
451 ms |
50512 KB |
Output is correct |
75 |
Correct |
453 ms |
51660 KB |
Output is correct |
76 |
Correct |
509 ms |
51736 KB |
Output is correct |
77 |
Correct |
471 ms |
51660 KB |
Output is correct |
78 |
Correct |
448 ms |
51640 KB |
Output is correct |
79 |
Correct |
373 ms |
49880 KB |
Output is correct |
80 |
Correct |
351 ms |
50216 KB |
Output is correct |
81 |
Correct |
367 ms |
49900 KB |
Output is correct |
82 |
Correct |
69 ms |
26104 KB |
Output is correct |
83 |
Correct |
73 ms |
25724 KB |
Output is correct |
84 |
Correct |
38 ms |
24876 KB |
Output is correct |
85 |
Correct |
46 ms |
25256 KB |
Output is correct |
86 |
Correct |
82 ms |
25736 KB |
Output is correct |
87 |
Correct |
82 ms |
26444 KB |
Output is correct |
88 |
Correct |
89 ms |
26516 KB |
Output is correct |
89 |
Correct |
80 ms |
26092 KB |
Output is correct |
90 |
Correct |
80 ms |
26480 KB |
Output is correct |
91 |
Correct |
80 ms |
26444 KB |
Output is correct |
92 |
Correct |
59 ms |
25396 KB |
Output is correct |
93 |
Correct |
74 ms |
26168 KB |
Output is correct |
94 |
Correct |
60 ms |
25476 KB |
Output is correct |
95 |
Correct |
73 ms |
26012 KB |
Output is correct |
96 |
Correct |
84 ms |
26496 KB |
Output is correct |
97 |
Correct |
84 ms |
26492 KB |
Output is correct |
98 |
Correct |
75 ms |
25424 KB |
Output is correct |
99 |
Correct |
86 ms |
26076 KB |
Output is correct |
100 |
Correct |
83 ms |
27084 KB |
Output is correct |
101 |
Correct |
90 ms |
27496 KB |
Output is correct |
102 |
Correct |
92 ms |
27632 KB |
Output is correct |
103 |
Correct |
70 ms |
26232 KB |
Output is correct |
104 |
Correct |
76 ms |
26956 KB |
Output is correct |
105 |
Correct |
87 ms |
27568 KB |
Output is correct |
106 |
Correct |
49 ms |
25908 KB |
Output is correct |
107 |
Correct |
50 ms |
25788 KB |
Output is correct |
108 |
Correct |
61 ms |
26844 KB |
Output is correct |
109 |
Correct |
58 ms |
25964 KB |
Output is correct |
110 |
Correct |
79 ms |
27104 KB |
Output is correct |
111 |
Correct |
79 ms |
27124 KB |
Output is correct |
112 |
Correct |
101 ms |
27524 KB |
Output is correct |
113 |
Correct |
94 ms |
27924 KB |
Output is correct |
114 |
Correct |
79 ms |
27384 KB |
Output is correct |
115 |
Correct |
95 ms |
28008 KB |
Output is correct |
116 |
Correct |
58 ms |
25804 KB |
Output is correct |
117 |
Correct |
95 ms |
28052 KB |
Output is correct |
118 |
Correct |
71 ms |
27132 KB |
Output is correct |
119 |
Correct |
68 ms |
26872 KB |
Output is correct |
120 |
Correct |
101 ms |
28016 KB |
Output is correct |
121 |
Correct |
84 ms |
27680 KB |
Output is correct |
122 |
Correct |
84 ms |
27892 KB |
Output is correct |
123 |
Correct |
86 ms |
28068 KB |
Output is correct |
124 |
Correct |
87 ms |
28020 KB |
Output is correct |
125 |
Correct |
77 ms |
27236 KB |
Output is correct |
126 |
Correct |
65 ms |
26832 KB |
Output is correct |
127 |
Correct |
66 ms |
26732 KB |
Output is correct |
128 |
Correct |
75 ms |
27676 KB |
Output is correct |
129 |
Correct |
81 ms |
27684 KB |
Output is correct |
130 |
Correct |
443 ms |
51888 KB |
Output is correct |
131 |
Correct |
325 ms |
46540 KB |
Output is correct |
132 |
Correct |
455 ms |
51896 KB |
Output is correct |
133 |
Correct |
444 ms |
51244 KB |
Output is correct |
134 |
Correct |
399 ms |
49324 KB |
Output is correct |
135 |
Correct |
513 ms |
52140 KB |
Output is correct |
136 |
Correct |
433 ms |
50588 KB |
Output is correct |
137 |
Correct |
444 ms |
50704 KB |
Output is correct |
138 |
Correct |
436 ms |
49356 KB |
Output is correct |
139 |
Correct |
449 ms |
52304 KB |
Output is correct |
140 |
Correct |
426 ms |
50168 KB |
Output is correct |
141 |
Correct |
468 ms |
52240 KB |
Output is correct |
142 |
Correct |
455 ms |
52256 KB |
Output is correct |
143 |
Correct |
443 ms |
52248 KB |
Output is correct |
144 |
Correct |
489 ms |
50816 KB |
Output is correct |
145 |
Correct |
521 ms |
52300 KB |
Output is correct |
146 |
Correct |
475 ms |
51444 KB |
Output is correct |
147 |
Correct |
480 ms |
52244 KB |
Output is correct |
148 |
Correct |
528 ms |
52200 KB |
Output is correct |
149 |
Correct |
494 ms |
52212 KB |
Output is correct |
150 |
Correct |
239 ms |
47196 KB |
Output is correct |
151 |
Correct |
360 ms |
50828 KB |
Output is correct |
152 |
Correct |
417 ms |
50852 KB |
Output is correct |
153 |
Correct |
393 ms |
50784 KB |
Output is correct |