#include <bits/stdc++.h>
#define pb push_back
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define debug(x) cerr << #x << " : " << x << '\n'
using namespace std;
typedef long long ll;
typedef long double ld;
typedef string str;
typedef pair<ll, ll> pll;
const ll Mod = 1000000007LL;
const int N = 25e4 + 10;
const ll Inf = 2242545357980376863LL;
const ll Log = 30;
typedef pll pii;
pii seg[N << 2];
pii nl = {0, 0};
pii Merge(pii &A, pii &B){
return {A.F + B.F, min(A.S, A.F + B.S)};
}
void Apply(int id, pii X){
seg[id] = Merge(seg[id], X);
}
void Shift(int id){
Apply(id << 1, seg[id]);
Apply(id << 1 | 1, seg[id]);
seg[id] = nl;
}
void Add(int id, int l, int r, pii X, int L, int R){
if(r <= L || R <= l) return ;
if(l <= L && R <= r){
Apply(id, X);
return ;
}
int mid = (L + R) >> 1;
Shift(id);
Add(id << 1, l, r, X, L, mid);
Add(id<<1|1, l, r, X, mid, R);
}
pll Get(int id, int idx, int L, int R){
if(L + 1 == R) return seg[id];
int mid = (L + R) >> 1;
Shift(id);
if(idx < mid)
return Get(id << 1, idx, L, mid);
return Get(id << 1 | 1, idx, mid, R);
}
ll fen[N];
void Add(int idx, ll x){
for(; idx < N; idx += idx & (-idx))
fen[idx] += x;
}
ll Get(int idx){
ll res = 0;
for(; idx; idx -= idx & (-idx))
res += fen[idx];
return res;
}
int t[N];
ll a[N], b[N], c[N], d[N], ps[N];
int lf[N], rt[N];
vector<int> V[N];
int main(){
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n, m, q;
cin >> n >> m >> q;
for(int i = 1; i <= q; i++){
cin >> t[i];
if(t[i] == 1)
cin >> a[i] >> b[i] >> c[i] >> d[i];
if(t[i] == 2){
cin >> a[i] >> b[i] >> c[i];
Add(a[i], c[i]);
Add(b[i] + 1, -c[i]);
}
if(t[i] == 3){
cin >> a[i] >> b[i];
lf[i] = m == 1 ? i - 1 : 0;
rt[i] = i + 1;
ps[i] = Get(a[i]);
}
}
for(int _ = 0; _ < 20; _++){
for(int i = 1; i <= q; i++) V[i].clear();
memset(fen, 0, sizeof fen);
fill(seg, seg + (N << 2), nl);
int mid;
int fl = 0;
for(int i = 1; i <= q; i++){
if(t[i] == 3 && lf[i] + 1 < rt[i]){
mid = (lf[i] + rt[i]) >> 1;
V[mid].pb(i);
fl = 1;
}
}
if(!fl) break;
for(int i = 1; i <= q; i++){
if(t[i] == 1){
Add(1, a[i], b[i] + 1, {d[i], 0}, 1, n + 1);
} else if(t[i] == 2){
Add(1, a[i], b[i] + 1, {-c[i], -c[i]}, 1, n + 1);
Add(a[i], c[i]);
Add(b[i] + 1, -c[i]);
}
for(int q_id : V[i]){
pll res = Get(1, a[q_id], 1, n + 1);
ll nw = res.F - res.S;
ll dec = (ps[q_id] - Get(a[q_id]));
nw -= dec;
if(nw >= b[q_id]) rt[q_id] = i;
else lf[q_id] = i;
}
}
}
for(int i = 1; i <= q; i++){
if(t[i] != 3) continue;
if(rt[i] == i + 1) cout << "0\n";
else cout << (m == 1 ? 1 : c[rt[i]]) << '\n';
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
36700 KB |
Output is correct |
2 |
Correct |
40 ms |
36700 KB |
Output is correct |
3 |
Correct |
34 ms |
36440 KB |
Output is correct |
4 |
Correct |
39 ms |
36732 KB |
Output is correct |
5 |
Correct |
31 ms |
36692 KB |
Output is correct |
6 |
Correct |
31 ms |
36700 KB |
Output is correct |
7 |
Correct |
38 ms |
36700 KB |
Output is correct |
8 |
Correct |
38 ms |
36700 KB |
Output is correct |
9 |
Correct |
37 ms |
36712 KB |
Output is correct |
10 |
Correct |
42 ms |
36700 KB |
Output is correct |
11 |
Correct |
40 ms |
36692 KB |
Output is correct |
12 |
Correct |
37 ms |
36700 KB |
Output is correct |
13 |
Correct |
31 ms |
36696 KB |
Output is correct |
14 |
Correct |
31 ms |
36696 KB |
Output is correct |
15 |
Correct |
34 ms |
36700 KB |
Output is correct |
16 |
Correct |
38 ms |
36700 KB |
Output is correct |
17 |
Correct |
40 ms |
36444 KB |
Output is correct |
18 |
Correct |
40 ms |
36700 KB |
Output is correct |
19 |
Correct |
35 ms |
36444 KB |
Output is correct |
20 |
Correct |
36 ms |
36696 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
36700 KB |
Output is correct |
2 |
Correct |
40 ms |
36700 KB |
Output is correct |
3 |
Correct |
34 ms |
36440 KB |
Output is correct |
4 |
Correct |
39 ms |
36732 KB |
Output is correct |
5 |
Correct |
31 ms |
36692 KB |
Output is correct |
6 |
Correct |
31 ms |
36700 KB |
Output is correct |
7 |
Correct |
38 ms |
36700 KB |
Output is correct |
8 |
Correct |
38 ms |
36700 KB |
Output is correct |
9 |
Correct |
37 ms |
36712 KB |
Output is correct |
10 |
Correct |
42 ms |
36700 KB |
Output is correct |
11 |
Correct |
40 ms |
36692 KB |
Output is correct |
12 |
Correct |
37 ms |
36700 KB |
Output is correct |
13 |
Correct |
31 ms |
36696 KB |
Output is correct |
14 |
Correct |
31 ms |
36696 KB |
Output is correct |
15 |
Correct |
34 ms |
36700 KB |
Output is correct |
16 |
Correct |
38 ms |
36700 KB |
Output is correct |
17 |
Correct |
40 ms |
36444 KB |
Output is correct |
18 |
Correct |
40 ms |
36700 KB |
Output is correct |
19 |
Correct |
35 ms |
36444 KB |
Output is correct |
20 |
Correct |
36 ms |
36696 KB |
Output is correct |
21 |
Correct |
38 ms |
36700 KB |
Output is correct |
22 |
Correct |
37 ms |
36696 KB |
Output is correct |
23 |
Correct |
37 ms |
36692 KB |
Output is correct |
24 |
Correct |
39 ms |
36700 KB |
Output is correct |
25 |
Correct |
34 ms |
36696 KB |
Output is correct |
26 |
Correct |
32 ms |
36700 KB |
Output is correct |
27 |
Correct |
39 ms |
36700 KB |
Output is correct |
28 |
Correct |
39 ms |
36700 KB |
Output is correct |
29 |
Correct |
39 ms |
36700 KB |
Output is correct |
30 |
Correct |
36 ms |
36700 KB |
Output is correct |
31 |
Correct |
39 ms |
36688 KB |
Output is correct |
32 |
Correct |
42 ms |
36696 KB |
Output is correct |
33 |
Correct |
31 ms |
36712 KB |
Output is correct |
34 |
Correct |
32 ms |
36724 KB |
Output is correct |
35 |
Correct |
37 ms |
36696 KB |
Output is correct |
36 |
Correct |
36 ms |
36696 KB |
Output is correct |
37 |
Correct |
33 ms |
36440 KB |
Output is correct |
38 |
Correct |
35 ms |
36684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
400 ms |
38484 KB |
Output is correct |
2 |
Correct |
390 ms |
38616 KB |
Output is correct |
3 |
Correct |
400 ms |
38488 KB |
Output is correct |
4 |
Correct |
431 ms |
38896 KB |
Output is correct |
5 |
Correct |
389 ms |
38484 KB |
Output is correct |
6 |
Correct |
421 ms |
38520 KB |
Output is correct |
7 |
Correct |
101 ms |
38544 KB |
Output is correct |
8 |
Correct |
108 ms |
38548 KB |
Output is correct |
9 |
Correct |
424 ms |
38484 KB |
Output is correct |
10 |
Correct |
428 ms |
38484 KB |
Output is correct |
11 |
Correct |
461 ms |
38596 KB |
Output is correct |
12 |
Correct |
412 ms |
38600 KB |
Output is correct |
13 |
Correct |
305 ms |
38484 KB |
Output is correct |
14 |
Correct |
349 ms |
38648 KB |
Output is correct |
15 |
Correct |
340 ms |
38392 KB |
Output is correct |
16 |
Correct |
345 ms |
38484 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
228 ms |
38996 KB |
Output is correct |
2 |
Correct |
164 ms |
38484 KB |
Output is correct |
3 |
Correct |
240 ms |
39252 KB |
Output is correct |
4 |
Correct |
184 ms |
37968 KB |
Output is correct |
5 |
Correct |
166 ms |
38176 KB |
Output is correct |
6 |
Correct |
225 ms |
38480 KB |
Output is correct |
7 |
Correct |
90 ms |
39324 KB |
Output is correct |
8 |
Correct |
86 ms |
39408 KB |
Output is correct |
9 |
Correct |
199 ms |
40704 KB |
Output is correct |
10 |
Correct |
198 ms |
40468 KB |
Output is correct |
11 |
Correct |
229 ms |
38688 KB |
Output is correct |
12 |
Correct |
221 ms |
38560 KB |
Output is correct |
13 |
Correct |
240 ms |
38652 KB |
Output is correct |
14 |
Correct |
221 ms |
38480 KB |
Output is correct |
15 |
Correct |
258 ms |
38652 KB |
Output is correct |
16 |
Correct |
246 ms |
38820 KB |
Output is correct |
17 |
Correct |
250 ms |
38720 KB |
Output is correct |
18 |
Correct |
246 ms |
38552 KB |
Output is correct |
19 |
Correct |
238 ms |
38588 KB |
Output is correct |
20 |
Correct |
251 ms |
38592 KB |
Output is correct |
21 |
Correct |
251 ms |
38548 KB |
Output is correct |
22 |
Correct |
253 ms |
38564 KB |
Output is correct |
23 |
Correct |
260 ms |
38600 KB |
Output is correct |
24 |
Correct |
261 ms |
38592 KB |
Output is correct |
25 |
Correct |
197 ms |
39248 KB |
Output is correct |
26 |
Correct |
213 ms |
39372 KB |
Output is correct |
27 |
Correct |
183 ms |
37972 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
36700 KB |
Output is correct |
2 |
Correct |
40 ms |
36700 KB |
Output is correct |
3 |
Correct |
34 ms |
36440 KB |
Output is correct |
4 |
Correct |
39 ms |
36732 KB |
Output is correct |
5 |
Correct |
31 ms |
36692 KB |
Output is correct |
6 |
Correct |
31 ms |
36700 KB |
Output is correct |
7 |
Correct |
38 ms |
36700 KB |
Output is correct |
8 |
Correct |
38 ms |
36700 KB |
Output is correct |
9 |
Correct |
37 ms |
36712 KB |
Output is correct |
10 |
Correct |
42 ms |
36700 KB |
Output is correct |
11 |
Correct |
40 ms |
36692 KB |
Output is correct |
12 |
Correct |
37 ms |
36700 KB |
Output is correct |
13 |
Correct |
31 ms |
36696 KB |
Output is correct |
14 |
Correct |
31 ms |
36696 KB |
Output is correct |
15 |
Correct |
34 ms |
36700 KB |
Output is correct |
16 |
Correct |
38 ms |
36700 KB |
Output is correct |
17 |
Correct |
40 ms |
36444 KB |
Output is correct |
18 |
Correct |
40 ms |
36700 KB |
Output is correct |
19 |
Correct |
35 ms |
36444 KB |
Output is correct |
20 |
Correct |
36 ms |
36696 KB |
Output is correct |
21 |
Correct |
400 ms |
38484 KB |
Output is correct |
22 |
Correct |
390 ms |
38616 KB |
Output is correct |
23 |
Correct |
400 ms |
38488 KB |
Output is correct |
24 |
Correct |
431 ms |
38896 KB |
Output is correct |
25 |
Correct |
389 ms |
38484 KB |
Output is correct |
26 |
Correct |
421 ms |
38520 KB |
Output is correct |
27 |
Correct |
101 ms |
38544 KB |
Output is correct |
28 |
Correct |
108 ms |
38548 KB |
Output is correct |
29 |
Correct |
424 ms |
38484 KB |
Output is correct |
30 |
Correct |
428 ms |
38484 KB |
Output is correct |
31 |
Correct |
461 ms |
38596 KB |
Output is correct |
32 |
Correct |
412 ms |
38600 KB |
Output is correct |
33 |
Correct |
305 ms |
38484 KB |
Output is correct |
34 |
Correct |
349 ms |
38648 KB |
Output is correct |
35 |
Correct |
340 ms |
38392 KB |
Output is correct |
36 |
Correct |
345 ms |
38484 KB |
Output is correct |
37 |
Correct |
494 ms |
38524 KB |
Output is correct |
38 |
Correct |
432 ms |
37968 KB |
Output is correct |
39 |
Correct |
105 ms |
38276 KB |
Output is correct |
40 |
Correct |
123 ms |
38480 KB |
Output is correct |
41 |
Correct |
502 ms |
38584 KB |
Output is correct |
42 |
Correct |
553 ms |
38480 KB |
Output is correct |
43 |
Correct |
604 ms |
38628 KB |
Output is correct |
44 |
Correct |
554 ms |
38640 KB |
Output is correct |
45 |
Correct |
597 ms |
38736 KB |
Output is correct |
46 |
Correct |
589 ms |
38584 KB |
Output is correct |
47 |
Correct |
195 ms |
38676 KB |
Output is correct |
48 |
Correct |
481 ms |
38624 KB |
Output is correct |
49 |
Correct |
394 ms |
38000 KB |
Output is correct |
50 |
Correct |
483 ms |
38488 KB |
Output is correct |
51 |
Correct |
551 ms |
38584 KB |
Output is correct |
52 |
Correct |
591 ms |
38556 KB |
Output is correct |
53 |
Correct |
285 ms |
38092 KB |
Output is correct |
54 |
Correct |
349 ms |
38552 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
387 ms |
38448 KB |
Output is correct |
2 |
Correct |
409 ms |
38640 KB |
Output is correct |
3 |
Correct |
475 ms |
38648 KB |
Output is correct |
4 |
Correct |
336 ms |
38016 KB |
Output is correct |
5 |
Correct |
363 ms |
38600 KB |
Output is correct |
6 |
Correct |
470 ms |
38732 KB |
Output is correct |
7 |
Correct |
108 ms |
38748 KB |
Output is correct |
8 |
Correct |
114 ms |
38248 KB |
Output is correct |
9 |
Correct |
210 ms |
38820 KB |
Output is correct |
10 |
Correct |
285 ms |
38036 KB |
Output is correct |
11 |
Correct |
391 ms |
38672 KB |
Output is correct |
12 |
Correct |
418 ms |
38744 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
36700 KB |
Output is correct |
2 |
Correct |
40 ms |
36700 KB |
Output is correct |
3 |
Correct |
34 ms |
36440 KB |
Output is correct |
4 |
Correct |
39 ms |
36732 KB |
Output is correct |
5 |
Correct |
31 ms |
36692 KB |
Output is correct |
6 |
Correct |
31 ms |
36700 KB |
Output is correct |
7 |
Correct |
38 ms |
36700 KB |
Output is correct |
8 |
Correct |
38 ms |
36700 KB |
Output is correct |
9 |
Correct |
37 ms |
36712 KB |
Output is correct |
10 |
Correct |
42 ms |
36700 KB |
Output is correct |
11 |
Correct |
40 ms |
36692 KB |
Output is correct |
12 |
Correct |
37 ms |
36700 KB |
Output is correct |
13 |
Correct |
31 ms |
36696 KB |
Output is correct |
14 |
Correct |
31 ms |
36696 KB |
Output is correct |
15 |
Correct |
34 ms |
36700 KB |
Output is correct |
16 |
Correct |
38 ms |
36700 KB |
Output is correct |
17 |
Correct |
40 ms |
36444 KB |
Output is correct |
18 |
Correct |
40 ms |
36700 KB |
Output is correct |
19 |
Correct |
35 ms |
36444 KB |
Output is correct |
20 |
Correct |
36 ms |
36696 KB |
Output is correct |
21 |
Correct |
38 ms |
36700 KB |
Output is correct |
22 |
Correct |
37 ms |
36696 KB |
Output is correct |
23 |
Correct |
37 ms |
36692 KB |
Output is correct |
24 |
Correct |
39 ms |
36700 KB |
Output is correct |
25 |
Correct |
34 ms |
36696 KB |
Output is correct |
26 |
Correct |
32 ms |
36700 KB |
Output is correct |
27 |
Correct |
39 ms |
36700 KB |
Output is correct |
28 |
Correct |
39 ms |
36700 KB |
Output is correct |
29 |
Correct |
39 ms |
36700 KB |
Output is correct |
30 |
Correct |
36 ms |
36700 KB |
Output is correct |
31 |
Correct |
39 ms |
36688 KB |
Output is correct |
32 |
Correct |
42 ms |
36696 KB |
Output is correct |
33 |
Correct |
31 ms |
36712 KB |
Output is correct |
34 |
Correct |
32 ms |
36724 KB |
Output is correct |
35 |
Correct |
37 ms |
36696 KB |
Output is correct |
36 |
Correct |
36 ms |
36696 KB |
Output is correct |
37 |
Correct |
33 ms |
36440 KB |
Output is correct |
38 |
Correct |
35 ms |
36684 KB |
Output is correct |
39 |
Correct |
400 ms |
38484 KB |
Output is correct |
40 |
Correct |
390 ms |
38616 KB |
Output is correct |
41 |
Correct |
400 ms |
38488 KB |
Output is correct |
42 |
Correct |
431 ms |
38896 KB |
Output is correct |
43 |
Correct |
389 ms |
38484 KB |
Output is correct |
44 |
Correct |
421 ms |
38520 KB |
Output is correct |
45 |
Correct |
101 ms |
38544 KB |
Output is correct |
46 |
Correct |
108 ms |
38548 KB |
Output is correct |
47 |
Correct |
424 ms |
38484 KB |
Output is correct |
48 |
Correct |
428 ms |
38484 KB |
Output is correct |
49 |
Correct |
461 ms |
38596 KB |
Output is correct |
50 |
Correct |
412 ms |
38600 KB |
Output is correct |
51 |
Correct |
305 ms |
38484 KB |
Output is correct |
52 |
Correct |
349 ms |
38648 KB |
Output is correct |
53 |
Correct |
340 ms |
38392 KB |
Output is correct |
54 |
Correct |
345 ms |
38484 KB |
Output is correct |
55 |
Correct |
494 ms |
38524 KB |
Output is correct |
56 |
Correct |
432 ms |
37968 KB |
Output is correct |
57 |
Correct |
105 ms |
38276 KB |
Output is correct |
58 |
Correct |
123 ms |
38480 KB |
Output is correct |
59 |
Correct |
502 ms |
38584 KB |
Output is correct |
60 |
Correct |
553 ms |
38480 KB |
Output is correct |
61 |
Correct |
604 ms |
38628 KB |
Output is correct |
62 |
Correct |
554 ms |
38640 KB |
Output is correct |
63 |
Correct |
597 ms |
38736 KB |
Output is correct |
64 |
Correct |
589 ms |
38584 KB |
Output is correct |
65 |
Correct |
195 ms |
38676 KB |
Output is correct |
66 |
Correct |
481 ms |
38624 KB |
Output is correct |
67 |
Correct |
394 ms |
38000 KB |
Output is correct |
68 |
Correct |
483 ms |
38488 KB |
Output is correct |
69 |
Correct |
551 ms |
38584 KB |
Output is correct |
70 |
Correct |
591 ms |
38556 KB |
Output is correct |
71 |
Correct |
285 ms |
38092 KB |
Output is correct |
72 |
Correct |
349 ms |
38552 KB |
Output is correct |
73 |
Correct |
387 ms |
38448 KB |
Output is correct |
74 |
Correct |
409 ms |
38640 KB |
Output is correct |
75 |
Correct |
475 ms |
38648 KB |
Output is correct |
76 |
Correct |
336 ms |
38016 KB |
Output is correct |
77 |
Correct |
363 ms |
38600 KB |
Output is correct |
78 |
Correct |
470 ms |
38732 KB |
Output is correct |
79 |
Correct |
108 ms |
38748 KB |
Output is correct |
80 |
Correct |
114 ms |
38248 KB |
Output is correct |
81 |
Correct |
210 ms |
38820 KB |
Output is correct |
82 |
Correct |
285 ms |
38036 KB |
Output is correct |
83 |
Correct |
391 ms |
38672 KB |
Output is correct |
84 |
Correct |
418 ms |
38744 KB |
Output is correct |
85 |
Correct |
528 ms |
38480 KB |
Output is correct |
86 |
Correct |
606 ms |
38772 KB |
Output is correct |
87 |
Correct |
542 ms |
38464 KB |
Output is correct |
88 |
Correct |
618 ms |
38480 KB |
Output is correct |
89 |
Correct |
379 ms |
37868 KB |
Output is correct |
90 |
Correct |
615 ms |
38624 KB |
Output is correct |
91 |
Correct |
484 ms |
38448 KB |
Output is correct |
92 |
Correct |
505 ms |
38040 KB |
Output is correct |
93 |
Correct |
666 ms |
38476 KB |
Output is correct |
94 |
Correct |
627 ms |
38520 KB |
Output is correct |
95 |
Correct |
629 ms |
38700 KB |
Output is correct |
96 |
Correct |
647 ms |
38480 KB |
Output is correct |
97 |
Correct |
640 ms |
38484 KB |
Output is correct |
98 |
Correct |
564 ms |
38356 KB |
Output is correct |
99 |
Correct |
243 ms |
38668 KB |
Output is correct |
100 |
Correct |
423 ms |
38216 KB |
Output is correct |
101 |
Correct |
563 ms |
38748 KB |
Output is correct |
102 |
Correct |
459 ms |
38608 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
36700 KB |
Output is correct |
2 |
Correct |
40 ms |
36700 KB |
Output is correct |
3 |
Correct |
34 ms |
36440 KB |
Output is correct |
4 |
Correct |
39 ms |
36732 KB |
Output is correct |
5 |
Correct |
31 ms |
36692 KB |
Output is correct |
6 |
Correct |
31 ms |
36700 KB |
Output is correct |
7 |
Correct |
38 ms |
36700 KB |
Output is correct |
8 |
Correct |
38 ms |
36700 KB |
Output is correct |
9 |
Correct |
37 ms |
36712 KB |
Output is correct |
10 |
Correct |
42 ms |
36700 KB |
Output is correct |
11 |
Correct |
40 ms |
36692 KB |
Output is correct |
12 |
Correct |
37 ms |
36700 KB |
Output is correct |
13 |
Correct |
31 ms |
36696 KB |
Output is correct |
14 |
Correct |
31 ms |
36696 KB |
Output is correct |
15 |
Correct |
34 ms |
36700 KB |
Output is correct |
16 |
Correct |
38 ms |
36700 KB |
Output is correct |
17 |
Correct |
40 ms |
36444 KB |
Output is correct |
18 |
Correct |
40 ms |
36700 KB |
Output is correct |
19 |
Correct |
35 ms |
36444 KB |
Output is correct |
20 |
Correct |
36 ms |
36696 KB |
Output is correct |
21 |
Correct |
38 ms |
36700 KB |
Output is correct |
22 |
Correct |
37 ms |
36696 KB |
Output is correct |
23 |
Correct |
37 ms |
36692 KB |
Output is correct |
24 |
Correct |
39 ms |
36700 KB |
Output is correct |
25 |
Correct |
34 ms |
36696 KB |
Output is correct |
26 |
Correct |
32 ms |
36700 KB |
Output is correct |
27 |
Correct |
39 ms |
36700 KB |
Output is correct |
28 |
Correct |
39 ms |
36700 KB |
Output is correct |
29 |
Correct |
39 ms |
36700 KB |
Output is correct |
30 |
Correct |
36 ms |
36700 KB |
Output is correct |
31 |
Correct |
39 ms |
36688 KB |
Output is correct |
32 |
Correct |
42 ms |
36696 KB |
Output is correct |
33 |
Correct |
31 ms |
36712 KB |
Output is correct |
34 |
Correct |
32 ms |
36724 KB |
Output is correct |
35 |
Correct |
37 ms |
36696 KB |
Output is correct |
36 |
Correct |
36 ms |
36696 KB |
Output is correct |
37 |
Correct |
33 ms |
36440 KB |
Output is correct |
38 |
Correct |
35 ms |
36684 KB |
Output is correct |
39 |
Correct |
400 ms |
38484 KB |
Output is correct |
40 |
Correct |
390 ms |
38616 KB |
Output is correct |
41 |
Correct |
400 ms |
38488 KB |
Output is correct |
42 |
Correct |
431 ms |
38896 KB |
Output is correct |
43 |
Correct |
389 ms |
38484 KB |
Output is correct |
44 |
Correct |
421 ms |
38520 KB |
Output is correct |
45 |
Correct |
101 ms |
38544 KB |
Output is correct |
46 |
Correct |
108 ms |
38548 KB |
Output is correct |
47 |
Correct |
424 ms |
38484 KB |
Output is correct |
48 |
Correct |
428 ms |
38484 KB |
Output is correct |
49 |
Correct |
461 ms |
38596 KB |
Output is correct |
50 |
Correct |
412 ms |
38600 KB |
Output is correct |
51 |
Correct |
305 ms |
38484 KB |
Output is correct |
52 |
Correct |
349 ms |
38648 KB |
Output is correct |
53 |
Correct |
340 ms |
38392 KB |
Output is correct |
54 |
Correct |
345 ms |
38484 KB |
Output is correct |
55 |
Correct |
228 ms |
38996 KB |
Output is correct |
56 |
Correct |
164 ms |
38484 KB |
Output is correct |
57 |
Correct |
240 ms |
39252 KB |
Output is correct |
58 |
Correct |
184 ms |
37968 KB |
Output is correct |
59 |
Correct |
166 ms |
38176 KB |
Output is correct |
60 |
Correct |
225 ms |
38480 KB |
Output is correct |
61 |
Correct |
90 ms |
39324 KB |
Output is correct |
62 |
Correct |
86 ms |
39408 KB |
Output is correct |
63 |
Correct |
199 ms |
40704 KB |
Output is correct |
64 |
Correct |
198 ms |
40468 KB |
Output is correct |
65 |
Correct |
229 ms |
38688 KB |
Output is correct |
66 |
Correct |
221 ms |
38560 KB |
Output is correct |
67 |
Correct |
240 ms |
38652 KB |
Output is correct |
68 |
Correct |
221 ms |
38480 KB |
Output is correct |
69 |
Correct |
258 ms |
38652 KB |
Output is correct |
70 |
Correct |
246 ms |
38820 KB |
Output is correct |
71 |
Correct |
250 ms |
38720 KB |
Output is correct |
72 |
Correct |
246 ms |
38552 KB |
Output is correct |
73 |
Correct |
238 ms |
38588 KB |
Output is correct |
74 |
Correct |
251 ms |
38592 KB |
Output is correct |
75 |
Correct |
251 ms |
38548 KB |
Output is correct |
76 |
Correct |
253 ms |
38564 KB |
Output is correct |
77 |
Correct |
260 ms |
38600 KB |
Output is correct |
78 |
Correct |
261 ms |
38592 KB |
Output is correct |
79 |
Correct |
197 ms |
39248 KB |
Output is correct |
80 |
Correct |
213 ms |
39372 KB |
Output is correct |
81 |
Correct |
183 ms |
37972 KB |
Output is correct |
82 |
Correct |
494 ms |
38524 KB |
Output is correct |
83 |
Correct |
432 ms |
37968 KB |
Output is correct |
84 |
Correct |
105 ms |
38276 KB |
Output is correct |
85 |
Correct |
123 ms |
38480 KB |
Output is correct |
86 |
Correct |
502 ms |
38584 KB |
Output is correct |
87 |
Correct |
553 ms |
38480 KB |
Output is correct |
88 |
Correct |
604 ms |
38628 KB |
Output is correct |
89 |
Correct |
554 ms |
38640 KB |
Output is correct |
90 |
Correct |
597 ms |
38736 KB |
Output is correct |
91 |
Correct |
589 ms |
38584 KB |
Output is correct |
92 |
Correct |
195 ms |
38676 KB |
Output is correct |
93 |
Correct |
481 ms |
38624 KB |
Output is correct |
94 |
Correct |
394 ms |
38000 KB |
Output is correct |
95 |
Correct |
483 ms |
38488 KB |
Output is correct |
96 |
Correct |
551 ms |
38584 KB |
Output is correct |
97 |
Correct |
591 ms |
38556 KB |
Output is correct |
98 |
Correct |
285 ms |
38092 KB |
Output is correct |
99 |
Correct |
349 ms |
38552 KB |
Output is correct |
100 |
Correct |
387 ms |
38448 KB |
Output is correct |
101 |
Correct |
409 ms |
38640 KB |
Output is correct |
102 |
Correct |
475 ms |
38648 KB |
Output is correct |
103 |
Correct |
336 ms |
38016 KB |
Output is correct |
104 |
Correct |
363 ms |
38600 KB |
Output is correct |
105 |
Correct |
470 ms |
38732 KB |
Output is correct |
106 |
Correct |
108 ms |
38748 KB |
Output is correct |
107 |
Correct |
114 ms |
38248 KB |
Output is correct |
108 |
Correct |
210 ms |
38820 KB |
Output is correct |
109 |
Correct |
285 ms |
38036 KB |
Output is correct |
110 |
Correct |
391 ms |
38672 KB |
Output is correct |
111 |
Correct |
418 ms |
38744 KB |
Output is correct |
112 |
Correct |
528 ms |
38480 KB |
Output is correct |
113 |
Correct |
606 ms |
38772 KB |
Output is correct |
114 |
Correct |
542 ms |
38464 KB |
Output is correct |
115 |
Correct |
618 ms |
38480 KB |
Output is correct |
116 |
Correct |
379 ms |
37868 KB |
Output is correct |
117 |
Correct |
615 ms |
38624 KB |
Output is correct |
118 |
Correct |
484 ms |
38448 KB |
Output is correct |
119 |
Correct |
505 ms |
38040 KB |
Output is correct |
120 |
Correct |
666 ms |
38476 KB |
Output is correct |
121 |
Correct |
627 ms |
38520 KB |
Output is correct |
122 |
Correct |
629 ms |
38700 KB |
Output is correct |
123 |
Correct |
647 ms |
38480 KB |
Output is correct |
124 |
Correct |
640 ms |
38484 KB |
Output is correct |
125 |
Correct |
564 ms |
38356 KB |
Output is correct |
126 |
Correct |
243 ms |
38668 KB |
Output is correct |
127 |
Correct |
423 ms |
38216 KB |
Output is correct |
128 |
Correct |
563 ms |
38748 KB |
Output is correct |
129 |
Correct |
459 ms |
38608 KB |
Output is correct |
130 |
Execution timed out |
1043 ms |
49564 KB |
Time limit exceeded |
131 |
Halted |
0 ms |
0 KB |
- |