#include <bits/stdc++.h>
#define debug(x) cerr << #x << " " << x << "\n"
#define debugs(x) cerr << #x << " " << x << " "
#pragma GCC optimize ("Ofast")
#pragma GCC target ("avx2")
#define int ll
using namespace std;
typedef long long ll;
typedef pair <ll, ll> pii;
const ll NMAX = 250002;
const int INF = 1e9;
const ll nrbits = 20;
const ll MOD = 998244353;
vector <int> events[NMAX];
vector <int> queries[NMAX];
int t[NMAX];
pii q[NMAX];
int qq;
int sol[NMAX];
struct Node{
int total, maxSuff;
}aint[NMAX * 4];
Node combine(Node a, Node b){
Node sol = {a.total + b.total, max({b.maxSuff, a.maxSuff + b.total})};
/// Am nevoie de cel mai mare sufix care se TERMINA IN MINE
return sol;
}
void update(int node, int st, int dr, int a, int b){
if(st == dr){
aint[node] = {b, max(0LL, b)};
return;
}
int mid = (st + dr) / 2;
if(a <= mid)
update(node * 2, st, mid, a, b);
else update(node * 2 + 1, mid + 1, dr, a, b);
aint[node] = combine(aint[node * 2], aint[node * 2 + 1]);
}
Node maxSuff(int node, int st, int dr, int a, int b){
if(a <= st && dr <= b){
return aint[node];
}
int mid = (st + dr) / 2;
Node sol = {0, 0};
if(a <= mid) sol = combine(sol, maxSuff(node * 2, st, mid, a, b));
if(b > mid) sol = combine(sol, maxSuff(node * 2 + 1, mid + 1, dr, a, b));
return sol;
}
pii aib[NMAX];
void baga(pii x, int val){
aib[x.first].second = x.second;
for(; x.first <= qq; x.first += x.first&(-x.first))
aib[x.first].first += val;
}
int query(int x){
int sol = 0;
for(; x; x -= x&(-x))
sol += aib[x].first;
return sol;
}
int Search(int x){
int r = 0, pas = (1 << nrbits), s = 0;
while(pas){
if(r + pas <= qq && (s + aib[r + pas].first) < x){
s += aib[r + pas].first;
r += pas;
}
pas /= 2;
}
r++;
return aib[r].second;
}
ll cv;
signed main() {
#ifdef HOME
ifstream cin(".in");
ofstream cout(".out");
#endif // HOME
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n, m, i;
for(i = 0; i < NMAX * 4; i++) aint[i] = {0, 0};
cin >> n >> m >> qq;
for(i = 1; i <= qq; i++){
cin >> t[i];
if(t[i] == 3){
cin >> q[i].first >> q[i].second;
queries[q[i].first].push_back(i);
}else if(t[i] == 2){
int l, r;
cin >> l >> r >> q[i].first;
events[l].push_back(i);
events[r + 1].push_back(-i);
}else{
int l, r;
cin >> l >> r >> q[i].second >> q[i].first;
if(l <= 114514 && 114514 <= r){
cv += q[i].first;
}
events[l].push_back(i);
events[r + 1].push_back(-i);
}
}
for(i = 1; i <= n; i++){
for(auto x : events[i]){
if(x < 0){
if(t[-x] == 1){
baga({-x, q[-x].second}, -q[-x].first);
}
update(1, 1, qq, -x, 0);
}else{
if(t[x] == 1){
baga({x, q[x].second}, q[x].first);
update(1, 1, qq, x, q[x].first);
}else{
update(1, 1, qq, x, -q[x].first);
}
}
}
for(auto x : queries[i]){
int untilNow = query(x);
int currentSize = maxSuff(1, 1, qq, 1, x).maxSuff;
int b = q[x].second;
if(b <= currentSize)
sol[x] = Search(untilNow - currentSize + b);
else
sol[x] = 0;
}
}
for(i = 1; i <= qq; i++){
if(t[i] == 3) cout << sol[i] << "\n";
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
35160 KB |
Output is correct |
2 |
Correct |
8 ms |
35420 KB |
Output is correct |
3 |
Correct |
8 ms |
35164 KB |
Output is correct |
4 |
Correct |
8 ms |
35420 KB |
Output is correct |
5 |
Correct |
8 ms |
35248 KB |
Output is correct |
6 |
Correct |
7 ms |
35164 KB |
Output is correct |
7 |
Correct |
8 ms |
35420 KB |
Output is correct |
8 |
Correct |
7 ms |
35420 KB |
Output is correct |
9 |
Correct |
8 ms |
35304 KB |
Output is correct |
10 |
Correct |
8 ms |
35420 KB |
Output is correct |
11 |
Correct |
8 ms |
35420 KB |
Output is correct |
12 |
Correct |
8 ms |
35248 KB |
Output is correct |
13 |
Correct |
8 ms |
35420 KB |
Output is correct |
14 |
Correct |
8 ms |
35420 KB |
Output is correct |
15 |
Correct |
7 ms |
35164 KB |
Output is correct |
16 |
Correct |
8 ms |
35416 KB |
Output is correct |
17 |
Correct |
7 ms |
35416 KB |
Output is correct |
18 |
Correct |
8 ms |
35416 KB |
Output is correct |
19 |
Correct |
8 ms |
35420 KB |
Output is correct |
20 |
Correct |
9 ms |
35416 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
35160 KB |
Output is correct |
2 |
Correct |
8 ms |
35420 KB |
Output is correct |
3 |
Correct |
8 ms |
35164 KB |
Output is correct |
4 |
Correct |
8 ms |
35420 KB |
Output is correct |
5 |
Correct |
8 ms |
35248 KB |
Output is correct |
6 |
Correct |
7 ms |
35164 KB |
Output is correct |
7 |
Correct |
8 ms |
35420 KB |
Output is correct |
8 |
Correct |
7 ms |
35420 KB |
Output is correct |
9 |
Correct |
8 ms |
35304 KB |
Output is correct |
10 |
Correct |
8 ms |
35420 KB |
Output is correct |
11 |
Correct |
8 ms |
35420 KB |
Output is correct |
12 |
Correct |
8 ms |
35248 KB |
Output is correct |
13 |
Correct |
8 ms |
35420 KB |
Output is correct |
14 |
Correct |
8 ms |
35420 KB |
Output is correct |
15 |
Correct |
7 ms |
35164 KB |
Output is correct |
16 |
Correct |
8 ms |
35416 KB |
Output is correct |
17 |
Correct |
7 ms |
35416 KB |
Output is correct |
18 |
Correct |
8 ms |
35416 KB |
Output is correct |
19 |
Correct |
8 ms |
35420 KB |
Output is correct |
20 |
Correct |
9 ms |
35416 KB |
Output is correct |
21 |
Correct |
8 ms |
35416 KB |
Output is correct |
22 |
Correct |
8 ms |
35420 KB |
Output is correct |
23 |
Correct |
9 ms |
35236 KB |
Output is correct |
24 |
Correct |
8 ms |
35420 KB |
Output is correct |
25 |
Correct |
7 ms |
35324 KB |
Output is correct |
26 |
Correct |
8 ms |
35296 KB |
Output is correct |
27 |
Correct |
8 ms |
35420 KB |
Output is correct |
28 |
Correct |
8 ms |
35452 KB |
Output is correct |
29 |
Correct |
8 ms |
35320 KB |
Output is correct |
30 |
Correct |
8 ms |
35416 KB |
Output is correct |
31 |
Correct |
7 ms |
35416 KB |
Output is correct |
32 |
Correct |
8 ms |
35416 KB |
Output is correct |
33 |
Correct |
7 ms |
35420 KB |
Output is correct |
34 |
Correct |
7 ms |
35420 KB |
Output is correct |
35 |
Correct |
8 ms |
35420 KB |
Output is correct |
36 |
Correct |
8 ms |
35420 KB |
Output is correct |
37 |
Correct |
7 ms |
35164 KB |
Output is correct |
38 |
Correct |
8 ms |
35232 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
51 ms |
39820 KB |
Output is correct |
2 |
Correct |
58 ms |
41044 KB |
Output is correct |
3 |
Correct |
53 ms |
39744 KB |
Output is correct |
4 |
Correct |
59 ms |
40784 KB |
Output is correct |
5 |
Correct |
53 ms |
41044 KB |
Output is correct |
6 |
Correct |
52 ms |
41044 KB |
Output is correct |
7 |
Correct |
27 ms |
39224 KB |
Output is correct |
8 |
Correct |
28 ms |
39292 KB |
Output is correct |
9 |
Correct |
58 ms |
40788 KB |
Output is correct |
10 |
Correct |
53 ms |
41060 KB |
Output is correct |
11 |
Correct |
61 ms |
41040 KB |
Output is correct |
12 |
Correct |
59 ms |
41028 KB |
Output is correct |
13 |
Correct |
46 ms |
40272 KB |
Output is correct |
14 |
Correct |
51 ms |
40784 KB |
Output is correct |
15 |
Correct |
55 ms |
40784 KB |
Output is correct |
16 |
Correct |
64 ms |
41248 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
309 ms |
47488 KB |
Output is correct |
2 |
Correct |
211 ms |
50636 KB |
Output is correct |
3 |
Correct |
319 ms |
54284 KB |
Output is correct |
4 |
Correct |
239 ms |
50772 KB |
Output is correct |
5 |
Correct |
251 ms |
50568 KB |
Output is correct |
6 |
Correct |
328 ms |
54356 KB |
Output is correct |
7 |
Correct |
103 ms |
47828 KB |
Output is correct |
8 |
Correct |
116 ms |
47556 KB |
Output is correct |
9 |
Correct |
315 ms |
54008 KB |
Output is correct |
10 |
Correct |
352 ms |
54352 KB |
Output is correct |
11 |
Correct |
369 ms |
54324 KB |
Output is correct |
12 |
Correct |
336 ms |
54556 KB |
Output is correct |
13 |
Correct |
320 ms |
54352 KB |
Output is correct |
14 |
Correct |
318 ms |
54164 KB |
Output is correct |
15 |
Correct |
309 ms |
54100 KB |
Output is correct |
16 |
Correct |
340 ms |
54100 KB |
Output is correct |
17 |
Correct |
334 ms |
54196 KB |
Output is correct |
18 |
Correct |
334 ms |
54356 KB |
Output is correct |
19 |
Correct |
373 ms |
54380 KB |
Output is correct |
20 |
Correct |
323 ms |
54096 KB |
Output is correct |
21 |
Correct |
367 ms |
54356 KB |
Output is correct |
22 |
Correct |
310 ms |
54100 KB |
Output is correct |
23 |
Correct |
330 ms |
54356 KB |
Output is correct |
24 |
Correct |
359 ms |
54300 KB |
Output is correct |
25 |
Correct |
229 ms |
51936 KB |
Output is correct |
26 |
Correct |
233 ms |
52304 KB |
Output is correct |
27 |
Correct |
219 ms |
53364 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
35160 KB |
Output is correct |
2 |
Correct |
8 ms |
35420 KB |
Output is correct |
3 |
Correct |
8 ms |
35164 KB |
Output is correct |
4 |
Correct |
8 ms |
35420 KB |
Output is correct |
5 |
Correct |
8 ms |
35248 KB |
Output is correct |
6 |
Correct |
7 ms |
35164 KB |
Output is correct |
7 |
Correct |
8 ms |
35420 KB |
Output is correct |
8 |
Correct |
7 ms |
35420 KB |
Output is correct |
9 |
Correct |
8 ms |
35304 KB |
Output is correct |
10 |
Correct |
8 ms |
35420 KB |
Output is correct |
11 |
Correct |
8 ms |
35420 KB |
Output is correct |
12 |
Correct |
8 ms |
35248 KB |
Output is correct |
13 |
Correct |
8 ms |
35420 KB |
Output is correct |
14 |
Correct |
8 ms |
35420 KB |
Output is correct |
15 |
Correct |
7 ms |
35164 KB |
Output is correct |
16 |
Correct |
8 ms |
35416 KB |
Output is correct |
17 |
Correct |
7 ms |
35416 KB |
Output is correct |
18 |
Correct |
8 ms |
35416 KB |
Output is correct |
19 |
Correct |
8 ms |
35420 KB |
Output is correct |
20 |
Correct |
9 ms |
35416 KB |
Output is correct |
21 |
Correct |
51 ms |
39820 KB |
Output is correct |
22 |
Correct |
58 ms |
41044 KB |
Output is correct |
23 |
Correct |
53 ms |
39744 KB |
Output is correct |
24 |
Correct |
59 ms |
40784 KB |
Output is correct |
25 |
Correct |
53 ms |
41044 KB |
Output is correct |
26 |
Correct |
52 ms |
41044 KB |
Output is correct |
27 |
Correct |
27 ms |
39224 KB |
Output is correct |
28 |
Correct |
28 ms |
39292 KB |
Output is correct |
29 |
Correct |
58 ms |
40788 KB |
Output is correct |
30 |
Correct |
53 ms |
41060 KB |
Output is correct |
31 |
Correct |
61 ms |
41040 KB |
Output is correct |
32 |
Correct |
59 ms |
41028 KB |
Output is correct |
33 |
Correct |
46 ms |
40272 KB |
Output is correct |
34 |
Correct |
51 ms |
40784 KB |
Output is correct |
35 |
Correct |
55 ms |
40784 KB |
Output is correct |
36 |
Correct |
64 ms |
41248 KB |
Output is correct |
37 |
Correct |
47 ms |
40532 KB |
Output is correct |
38 |
Correct |
54 ms |
40280 KB |
Output is correct |
39 |
Correct |
25 ms |
38928 KB |
Output is correct |
40 |
Correct |
28 ms |
39236 KB |
Output is correct |
41 |
Correct |
54 ms |
40792 KB |
Output is correct |
42 |
Correct |
56 ms |
40836 KB |
Output is correct |
43 |
Correct |
53 ms |
40784 KB |
Output is correct |
44 |
Correct |
55 ms |
40852 KB |
Output is correct |
45 |
Correct |
52 ms |
40788 KB |
Output is correct |
46 |
Correct |
53 ms |
40784 KB |
Output is correct |
47 |
Correct |
36 ms |
39700 KB |
Output is correct |
48 |
Correct |
49 ms |
40320 KB |
Output is correct |
49 |
Correct |
47 ms |
39760 KB |
Output is correct |
50 |
Correct |
47 ms |
40440 KB |
Output is correct |
51 |
Correct |
54 ms |
40852 KB |
Output is correct |
52 |
Correct |
70 ms |
40788 KB |
Output is correct |
53 |
Correct |
49 ms |
40328 KB |
Output is correct |
54 |
Correct |
53 ms |
41056 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
52 ms |
38228 KB |
Output is correct |
2 |
Correct |
55 ms |
41208 KB |
Output is correct |
3 |
Correct |
60 ms |
40276 KB |
Output is correct |
4 |
Correct |
42 ms |
40272 KB |
Output is correct |
5 |
Correct |
55 ms |
40792 KB |
Output is correct |
6 |
Correct |
55 ms |
41296 KB |
Output is correct |
7 |
Correct |
30 ms |
39632 KB |
Output is correct |
8 |
Correct |
29 ms |
39640 KB |
Output is correct |
9 |
Correct |
40 ms |
40524 KB |
Output is correct |
10 |
Correct |
40 ms |
39760 KB |
Output is correct |
11 |
Correct |
56 ms |
40808 KB |
Output is correct |
12 |
Correct |
52 ms |
40664 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
35160 KB |
Output is correct |
2 |
Correct |
8 ms |
35420 KB |
Output is correct |
3 |
Correct |
8 ms |
35164 KB |
Output is correct |
4 |
Correct |
8 ms |
35420 KB |
Output is correct |
5 |
Correct |
8 ms |
35248 KB |
Output is correct |
6 |
Correct |
7 ms |
35164 KB |
Output is correct |
7 |
Correct |
8 ms |
35420 KB |
Output is correct |
8 |
Correct |
7 ms |
35420 KB |
Output is correct |
9 |
Correct |
8 ms |
35304 KB |
Output is correct |
10 |
Correct |
8 ms |
35420 KB |
Output is correct |
11 |
Correct |
8 ms |
35420 KB |
Output is correct |
12 |
Correct |
8 ms |
35248 KB |
Output is correct |
13 |
Correct |
8 ms |
35420 KB |
Output is correct |
14 |
Correct |
8 ms |
35420 KB |
Output is correct |
15 |
Correct |
7 ms |
35164 KB |
Output is correct |
16 |
Correct |
8 ms |
35416 KB |
Output is correct |
17 |
Correct |
7 ms |
35416 KB |
Output is correct |
18 |
Correct |
8 ms |
35416 KB |
Output is correct |
19 |
Correct |
8 ms |
35420 KB |
Output is correct |
20 |
Correct |
9 ms |
35416 KB |
Output is correct |
21 |
Correct |
8 ms |
35416 KB |
Output is correct |
22 |
Correct |
8 ms |
35420 KB |
Output is correct |
23 |
Correct |
9 ms |
35236 KB |
Output is correct |
24 |
Correct |
8 ms |
35420 KB |
Output is correct |
25 |
Correct |
7 ms |
35324 KB |
Output is correct |
26 |
Correct |
8 ms |
35296 KB |
Output is correct |
27 |
Correct |
8 ms |
35420 KB |
Output is correct |
28 |
Correct |
8 ms |
35452 KB |
Output is correct |
29 |
Correct |
8 ms |
35320 KB |
Output is correct |
30 |
Correct |
8 ms |
35416 KB |
Output is correct |
31 |
Correct |
7 ms |
35416 KB |
Output is correct |
32 |
Correct |
8 ms |
35416 KB |
Output is correct |
33 |
Correct |
7 ms |
35420 KB |
Output is correct |
34 |
Correct |
7 ms |
35420 KB |
Output is correct |
35 |
Correct |
8 ms |
35420 KB |
Output is correct |
36 |
Correct |
8 ms |
35420 KB |
Output is correct |
37 |
Correct |
7 ms |
35164 KB |
Output is correct |
38 |
Correct |
8 ms |
35232 KB |
Output is correct |
39 |
Correct |
51 ms |
39820 KB |
Output is correct |
40 |
Correct |
58 ms |
41044 KB |
Output is correct |
41 |
Correct |
53 ms |
39744 KB |
Output is correct |
42 |
Correct |
59 ms |
40784 KB |
Output is correct |
43 |
Correct |
53 ms |
41044 KB |
Output is correct |
44 |
Correct |
52 ms |
41044 KB |
Output is correct |
45 |
Correct |
27 ms |
39224 KB |
Output is correct |
46 |
Correct |
28 ms |
39292 KB |
Output is correct |
47 |
Correct |
58 ms |
40788 KB |
Output is correct |
48 |
Correct |
53 ms |
41060 KB |
Output is correct |
49 |
Correct |
61 ms |
41040 KB |
Output is correct |
50 |
Correct |
59 ms |
41028 KB |
Output is correct |
51 |
Correct |
46 ms |
40272 KB |
Output is correct |
52 |
Correct |
51 ms |
40784 KB |
Output is correct |
53 |
Correct |
55 ms |
40784 KB |
Output is correct |
54 |
Correct |
64 ms |
41248 KB |
Output is correct |
55 |
Correct |
47 ms |
40532 KB |
Output is correct |
56 |
Correct |
54 ms |
40280 KB |
Output is correct |
57 |
Correct |
25 ms |
38928 KB |
Output is correct |
58 |
Correct |
28 ms |
39236 KB |
Output is correct |
59 |
Correct |
54 ms |
40792 KB |
Output is correct |
60 |
Correct |
56 ms |
40836 KB |
Output is correct |
61 |
Correct |
53 ms |
40784 KB |
Output is correct |
62 |
Correct |
55 ms |
40852 KB |
Output is correct |
63 |
Correct |
52 ms |
40788 KB |
Output is correct |
64 |
Correct |
53 ms |
40784 KB |
Output is correct |
65 |
Correct |
36 ms |
39700 KB |
Output is correct |
66 |
Correct |
49 ms |
40320 KB |
Output is correct |
67 |
Correct |
47 ms |
39760 KB |
Output is correct |
68 |
Correct |
47 ms |
40440 KB |
Output is correct |
69 |
Correct |
54 ms |
40852 KB |
Output is correct |
70 |
Correct |
70 ms |
40788 KB |
Output is correct |
71 |
Correct |
49 ms |
40328 KB |
Output is correct |
72 |
Correct |
53 ms |
41056 KB |
Output is correct |
73 |
Correct |
52 ms |
38228 KB |
Output is correct |
74 |
Correct |
55 ms |
41208 KB |
Output is correct |
75 |
Correct |
60 ms |
40276 KB |
Output is correct |
76 |
Correct |
42 ms |
40272 KB |
Output is correct |
77 |
Correct |
55 ms |
40792 KB |
Output is correct |
78 |
Correct |
55 ms |
41296 KB |
Output is correct |
79 |
Correct |
30 ms |
39632 KB |
Output is correct |
80 |
Correct |
29 ms |
39640 KB |
Output is correct |
81 |
Correct |
40 ms |
40524 KB |
Output is correct |
82 |
Correct |
40 ms |
39760 KB |
Output is correct |
83 |
Correct |
56 ms |
40808 KB |
Output is correct |
84 |
Correct |
52 ms |
40664 KB |
Output is correct |
85 |
Correct |
51 ms |
40780 KB |
Output is correct |
86 |
Correct |
61 ms |
41344 KB |
Output is correct |
87 |
Correct |
54 ms |
40888 KB |
Output is correct |
88 |
Correct |
59 ms |
41300 KB |
Output is correct |
89 |
Correct |
42 ms |
40060 KB |
Output is correct |
90 |
Correct |
58 ms |
41460 KB |
Output is correct |
91 |
Correct |
47 ms |
40528 KB |
Output is correct |
92 |
Correct |
46 ms |
40428 KB |
Output is correct |
93 |
Correct |
73 ms |
41452 KB |
Output is correct |
94 |
Correct |
58 ms |
41300 KB |
Output is correct |
95 |
Correct |
59 ms |
41296 KB |
Output is correct |
96 |
Correct |
59 ms |
41304 KB |
Output is correct |
97 |
Correct |
58 ms |
41312 KB |
Output is correct |
98 |
Correct |
48 ms |
40532 KB |
Output is correct |
99 |
Correct |
36 ms |
40228 KB |
Output is correct |
100 |
Correct |
41 ms |
40028 KB |
Output is correct |
101 |
Correct |
50 ms |
40784 KB |
Output is correct |
102 |
Correct |
50 ms |
41284 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
14 ms |
35160 KB |
Output is correct |
2 |
Correct |
8 ms |
35420 KB |
Output is correct |
3 |
Correct |
8 ms |
35164 KB |
Output is correct |
4 |
Correct |
8 ms |
35420 KB |
Output is correct |
5 |
Correct |
8 ms |
35248 KB |
Output is correct |
6 |
Correct |
7 ms |
35164 KB |
Output is correct |
7 |
Correct |
8 ms |
35420 KB |
Output is correct |
8 |
Correct |
7 ms |
35420 KB |
Output is correct |
9 |
Correct |
8 ms |
35304 KB |
Output is correct |
10 |
Correct |
8 ms |
35420 KB |
Output is correct |
11 |
Correct |
8 ms |
35420 KB |
Output is correct |
12 |
Correct |
8 ms |
35248 KB |
Output is correct |
13 |
Correct |
8 ms |
35420 KB |
Output is correct |
14 |
Correct |
8 ms |
35420 KB |
Output is correct |
15 |
Correct |
7 ms |
35164 KB |
Output is correct |
16 |
Correct |
8 ms |
35416 KB |
Output is correct |
17 |
Correct |
7 ms |
35416 KB |
Output is correct |
18 |
Correct |
8 ms |
35416 KB |
Output is correct |
19 |
Correct |
8 ms |
35420 KB |
Output is correct |
20 |
Correct |
9 ms |
35416 KB |
Output is correct |
21 |
Correct |
8 ms |
35416 KB |
Output is correct |
22 |
Correct |
8 ms |
35420 KB |
Output is correct |
23 |
Correct |
9 ms |
35236 KB |
Output is correct |
24 |
Correct |
8 ms |
35420 KB |
Output is correct |
25 |
Correct |
7 ms |
35324 KB |
Output is correct |
26 |
Correct |
8 ms |
35296 KB |
Output is correct |
27 |
Correct |
8 ms |
35420 KB |
Output is correct |
28 |
Correct |
8 ms |
35452 KB |
Output is correct |
29 |
Correct |
8 ms |
35320 KB |
Output is correct |
30 |
Correct |
8 ms |
35416 KB |
Output is correct |
31 |
Correct |
7 ms |
35416 KB |
Output is correct |
32 |
Correct |
8 ms |
35416 KB |
Output is correct |
33 |
Correct |
7 ms |
35420 KB |
Output is correct |
34 |
Correct |
7 ms |
35420 KB |
Output is correct |
35 |
Correct |
8 ms |
35420 KB |
Output is correct |
36 |
Correct |
8 ms |
35420 KB |
Output is correct |
37 |
Correct |
7 ms |
35164 KB |
Output is correct |
38 |
Correct |
8 ms |
35232 KB |
Output is correct |
39 |
Correct |
51 ms |
39820 KB |
Output is correct |
40 |
Correct |
58 ms |
41044 KB |
Output is correct |
41 |
Correct |
53 ms |
39744 KB |
Output is correct |
42 |
Correct |
59 ms |
40784 KB |
Output is correct |
43 |
Correct |
53 ms |
41044 KB |
Output is correct |
44 |
Correct |
52 ms |
41044 KB |
Output is correct |
45 |
Correct |
27 ms |
39224 KB |
Output is correct |
46 |
Correct |
28 ms |
39292 KB |
Output is correct |
47 |
Correct |
58 ms |
40788 KB |
Output is correct |
48 |
Correct |
53 ms |
41060 KB |
Output is correct |
49 |
Correct |
61 ms |
41040 KB |
Output is correct |
50 |
Correct |
59 ms |
41028 KB |
Output is correct |
51 |
Correct |
46 ms |
40272 KB |
Output is correct |
52 |
Correct |
51 ms |
40784 KB |
Output is correct |
53 |
Correct |
55 ms |
40784 KB |
Output is correct |
54 |
Correct |
64 ms |
41248 KB |
Output is correct |
55 |
Correct |
309 ms |
47488 KB |
Output is correct |
56 |
Correct |
211 ms |
50636 KB |
Output is correct |
57 |
Correct |
319 ms |
54284 KB |
Output is correct |
58 |
Correct |
239 ms |
50772 KB |
Output is correct |
59 |
Correct |
251 ms |
50568 KB |
Output is correct |
60 |
Correct |
328 ms |
54356 KB |
Output is correct |
61 |
Correct |
103 ms |
47828 KB |
Output is correct |
62 |
Correct |
116 ms |
47556 KB |
Output is correct |
63 |
Correct |
315 ms |
54008 KB |
Output is correct |
64 |
Correct |
352 ms |
54352 KB |
Output is correct |
65 |
Correct |
369 ms |
54324 KB |
Output is correct |
66 |
Correct |
336 ms |
54556 KB |
Output is correct |
67 |
Correct |
320 ms |
54352 KB |
Output is correct |
68 |
Correct |
318 ms |
54164 KB |
Output is correct |
69 |
Correct |
309 ms |
54100 KB |
Output is correct |
70 |
Correct |
340 ms |
54100 KB |
Output is correct |
71 |
Correct |
334 ms |
54196 KB |
Output is correct |
72 |
Correct |
334 ms |
54356 KB |
Output is correct |
73 |
Correct |
373 ms |
54380 KB |
Output is correct |
74 |
Correct |
323 ms |
54096 KB |
Output is correct |
75 |
Correct |
367 ms |
54356 KB |
Output is correct |
76 |
Correct |
310 ms |
54100 KB |
Output is correct |
77 |
Correct |
330 ms |
54356 KB |
Output is correct |
78 |
Correct |
359 ms |
54300 KB |
Output is correct |
79 |
Correct |
229 ms |
51936 KB |
Output is correct |
80 |
Correct |
233 ms |
52304 KB |
Output is correct |
81 |
Correct |
219 ms |
53364 KB |
Output is correct |
82 |
Correct |
47 ms |
40532 KB |
Output is correct |
83 |
Correct |
54 ms |
40280 KB |
Output is correct |
84 |
Correct |
25 ms |
38928 KB |
Output is correct |
85 |
Correct |
28 ms |
39236 KB |
Output is correct |
86 |
Correct |
54 ms |
40792 KB |
Output is correct |
87 |
Correct |
56 ms |
40836 KB |
Output is correct |
88 |
Correct |
53 ms |
40784 KB |
Output is correct |
89 |
Correct |
55 ms |
40852 KB |
Output is correct |
90 |
Correct |
52 ms |
40788 KB |
Output is correct |
91 |
Correct |
53 ms |
40784 KB |
Output is correct |
92 |
Correct |
36 ms |
39700 KB |
Output is correct |
93 |
Correct |
49 ms |
40320 KB |
Output is correct |
94 |
Correct |
47 ms |
39760 KB |
Output is correct |
95 |
Correct |
47 ms |
40440 KB |
Output is correct |
96 |
Correct |
54 ms |
40852 KB |
Output is correct |
97 |
Correct |
70 ms |
40788 KB |
Output is correct |
98 |
Correct |
49 ms |
40328 KB |
Output is correct |
99 |
Correct |
53 ms |
41056 KB |
Output is correct |
100 |
Correct |
52 ms |
38228 KB |
Output is correct |
101 |
Correct |
55 ms |
41208 KB |
Output is correct |
102 |
Correct |
60 ms |
40276 KB |
Output is correct |
103 |
Correct |
42 ms |
40272 KB |
Output is correct |
104 |
Correct |
55 ms |
40792 KB |
Output is correct |
105 |
Correct |
55 ms |
41296 KB |
Output is correct |
106 |
Correct |
30 ms |
39632 KB |
Output is correct |
107 |
Correct |
29 ms |
39640 KB |
Output is correct |
108 |
Correct |
40 ms |
40524 KB |
Output is correct |
109 |
Correct |
40 ms |
39760 KB |
Output is correct |
110 |
Correct |
56 ms |
40808 KB |
Output is correct |
111 |
Correct |
52 ms |
40664 KB |
Output is correct |
112 |
Correct |
51 ms |
40780 KB |
Output is correct |
113 |
Correct |
61 ms |
41344 KB |
Output is correct |
114 |
Correct |
54 ms |
40888 KB |
Output is correct |
115 |
Correct |
59 ms |
41300 KB |
Output is correct |
116 |
Correct |
42 ms |
40060 KB |
Output is correct |
117 |
Correct |
58 ms |
41460 KB |
Output is correct |
118 |
Correct |
47 ms |
40528 KB |
Output is correct |
119 |
Correct |
46 ms |
40428 KB |
Output is correct |
120 |
Correct |
73 ms |
41452 KB |
Output is correct |
121 |
Correct |
58 ms |
41300 KB |
Output is correct |
122 |
Correct |
59 ms |
41296 KB |
Output is correct |
123 |
Correct |
59 ms |
41304 KB |
Output is correct |
124 |
Correct |
58 ms |
41312 KB |
Output is correct |
125 |
Correct |
48 ms |
40532 KB |
Output is correct |
126 |
Correct |
36 ms |
40228 KB |
Output is correct |
127 |
Correct |
41 ms |
40028 KB |
Output is correct |
128 |
Correct |
50 ms |
40784 KB |
Output is correct |
129 |
Correct |
50 ms |
41284 KB |
Output is correct |
130 |
Correct |
332 ms |
54868 KB |
Output is correct |
131 |
Correct |
228 ms |
50512 KB |
Output is correct |
132 |
Correct |
340 ms |
54788 KB |
Output is correct |
133 |
Correct |
309 ms |
54608 KB |
Output is correct |
134 |
Correct |
282 ms |
53232 KB |
Output is correct |
135 |
Correct |
326 ms |
55124 KB |
Output is correct |
136 |
Correct |
334 ms |
55124 KB |
Output is correct |
137 |
Correct |
338 ms |
55016 KB |
Output is correct |
138 |
Correct |
323 ms |
55036 KB |
Output is correct |
139 |
Correct |
302 ms |
54868 KB |
Output is correct |
140 |
Correct |
331 ms |
54868 KB |
Output is correct |
141 |
Correct |
325 ms |
54924 KB |
Output is correct |
142 |
Correct |
316 ms |
54864 KB |
Output is correct |
143 |
Correct |
325 ms |
54840 KB |
Output is correct |
144 |
Correct |
324 ms |
54864 KB |
Output is correct |
145 |
Correct |
335 ms |
54868 KB |
Output is correct |
146 |
Correct |
327 ms |
54868 KB |
Output is correct |
147 |
Correct |
357 ms |
54936 KB |
Output is correct |
148 |
Correct |
322 ms |
54868 KB |
Output is correct |
149 |
Correct |
336 ms |
54868 KB |
Output is correct |
150 |
Correct |
149 ms |
50348 KB |
Output is correct |
151 |
Correct |
242 ms |
52744 KB |
Output is correct |
152 |
Correct |
260 ms |
53080 KB |
Output is correct |
153 |
Correct |
236 ms |
54252 KB |
Output is correct |