// vaziat meshki-ghermeze !
#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]; // sum ans
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; _++){
// debug(_);
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]){
// if(_>18) debug(_);
mid = (lf[i] + rt[i]) >> 1;
// debug(mid);
V[mid].pb(i);
fl = 1;
}
}
if(!fl) break;
for(int i = 1; i <= q; i++){
// debug(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]));
assert(dec >= 0);
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 |
49 ms |
23884 KB |
Output is correct |
2 |
Correct |
50 ms |
23992 KB |
Output is correct |
3 |
Correct |
48 ms |
23940 KB |
Output is correct |
4 |
Correct |
51 ms |
23984 KB |
Output is correct |
5 |
Correct |
45 ms |
23884 KB |
Output is correct |
6 |
Correct |
45 ms |
23884 KB |
Output is correct |
7 |
Correct |
51 ms |
23972 KB |
Output is correct |
8 |
Correct |
51 ms |
23992 KB |
Output is correct |
9 |
Correct |
52 ms |
23884 KB |
Output is correct |
10 |
Correct |
52 ms |
23884 KB |
Output is correct |
11 |
Correct |
51 ms |
23988 KB |
Output is correct |
12 |
Correct |
51 ms |
23984 KB |
Output is correct |
13 |
Correct |
45 ms |
23972 KB |
Output is correct |
14 |
Correct |
51 ms |
23992 KB |
Output is correct |
15 |
Correct |
53 ms |
23880 KB |
Output is correct |
16 |
Correct |
49 ms |
23992 KB |
Output is correct |
17 |
Correct |
51 ms |
23852 KB |
Output is correct |
18 |
Correct |
53 ms |
23976 KB |
Output is correct |
19 |
Correct |
50 ms |
24080 KB |
Output is correct |
20 |
Correct |
49 ms |
23924 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
23884 KB |
Output is correct |
2 |
Correct |
50 ms |
23992 KB |
Output is correct |
3 |
Correct |
48 ms |
23940 KB |
Output is correct |
4 |
Correct |
51 ms |
23984 KB |
Output is correct |
5 |
Correct |
45 ms |
23884 KB |
Output is correct |
6 |
Correct |
45 ms |
23884 KB |
Output is correct |
7 |
Correct |
51 ms |
23972 KB |
Output is correct |
8 |
Correct |
51 ms |
23992 KB |
Output is correct |
9 |
Correct |
52 ms |
23884 KB |
Output is correct |
10 |
Correct |
52 ms |
23884 KB |
Output is correct |
11 |
Correct |
51 ms |
23988 KB |
Output is correct |
12 |
Correct |
51 ms |
23984 KB |
Output is correct |
13 |
Correct |
45 ms |
23972 KB |
Output is correct |
14 |
Correct |
51 ms |
23992 KB |
Output is correct |
15 |
Correct |
53 ms |
23880 KB |
Output is correct |
16 |
Correct |
49 ms |
23992 KB |
Output is correct |
17 |
Correct |
51 ms |
23852 KB |
Output is correct |
18 |
Correct |
53 ms |
23976 KB |
Output is correct |
19 |
Correct |
50 ms |
24080 KB |
Output is correct |
20 |
Correct |
49 ms |
23924 KB |
Output is correct |
21 |
Correct |
52 ms |
23972 KB |
Output is correct |
22 |
Correct |
50 ms |
23956 KB |
Output is correct |
23 |
Correct |
50 ms |
23972 KB |
Output is correct |
24 |
Correct |
52 ms |
24000 KB |
Output is correct |
25 |
Correct |
45 ms |
23956 KB |
Output is correct |
26 |
Correct |
45 ms |
23884 KB |
Output is correct |
27 |
Correct |
51 ms |
24104 KB |
Output is correct |
28 |
Correct |
51 ms |
23976 KB |
Output is correct |
29 |
Correct |
52 ms |
24000 KB |
Output is correct |
30 |
Correct |
52 ms |
23984 KB |
Output is correct |
31 |
Correct |
51 ms |
23992 KB |
Output is correct |
32 |
Correct |
50 ms |
23996 KB |
Output is correct |
33 |
Correct |
44 ms |
23972 KB |
Output is correct |
34 |
Correct |
45 ms |
23976 KB |
Output is correct |
35 |
Correct |
51 ms |
23884 KB |
Output is correct |
36 |
Correct |
50 ms |
24012 KB |
Output is correct |
37 |
Correct |
46 ms |
23936 KB |
Output is correct |
38 |
Correct |
49 ms |
23884 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
580 ms |
29272 KB |
Output is correct |
2 |
Correct |
564 ms |
29128 KB |
Output is correct |
3 |
Correct |
591 ms |
29220 KB |
Output is correct |
4 |
Correct |
608 ms |
29216 KB |
Output is correct |
5 |
Correct |
572 ms |
29132 KB |
Output is correct |
6 |
Correct |
568 ms |
29132 KB |
Output is correct |
7 |
Correct |
143 ms |
28840 KB |
Output is correct |
8 |
Correct |
153 ms |
28912 KB |
Output is correct |
9 |
Correct |
592 ms |
28912 KB |
Output is correct |
10 |
Correct |
605 ms |
29124 KB |
Output is correct |
11 |
Correct |
611 ms |
28988 KB |
Output is correct |
12 |
Correct |
612 ms |
29128 KB |
Output is correct |
13 |
Correct |
444 ms |
28680 KB |
Output is correct |
14 |
Correct |
524 ms |
29252 KB |
Output is correct |
15 |
Correct |
470 ms |
28996 KB |
Output is correct |
16 |
Correct |
492 ms |
29124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
332 ms |
38088 KB |
Output is correct |
2 |
Correct |
259 ms |
35140 KB |
Output is correct |
3 |
Correct |
356 ms |
39236 KB |
Output is correct |
4 |
Correct |
288 ms |
34388 KB |
Output is correct |
5 |
Correct |
253 ms |
34652 KB |
Output is correct |
6 |
Correct |
382 ms |
38636 KB |
Output is correct |
7 |
Correct |
146 ms |
39236 KB |
Output is correct |
8 |
Correct |
152 ms |
39208 KB |
Output is correct |
9 |
Correct |
339 ms |
40476 KB |
Output is correct |
10 |
Correct |
322 ms |
40556 KB |
Output is correct |
11 |
Correct |
384 ms |
37624 KB |
Output is correct |
12 |
Correct |
388 ms |
38492 KB |
Output is correct |
13 |
Correct |
407 ms |
37644 KB |
Output is correct |
14 |
Correct |
415 ms |
38468 KB |
Output is correct |
15 |
Correct |
411 ms |
38596 KB |
Output is correct |
16 |
Correct |
441 ms |
38584 KB |
Output is correct |
17 |
Correct |
437 ms |
38584 KB |
Output is correct |
18 |
Correct |
407 ms |
38084 KB |
Output is correct |
19 |
Correct |
460 ms |
38576 KB |
Output is correct |
20 |
Correct |
448 ms |
38052 KB |
Output is correct |
21 |
Correct |
458 ms |
38512 KB |
Output is correct |
22 |
Correct |
438 ms |
38596 KB |
Output is correct |
23 |
Correct |
405 ms |
38560 KB |
Output is correct |
24 |
Correct |
417 ms |
38588 KB |
Output is correct |
25 |
Correct |
300 ms |
38928 KB |
Output is correct |
26 |
Correct |
312 ms |
39228 KB |
Output is correct |
27 |
Correct |
309 ms |
35876 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
23884 KB |
Output is correct |
2 |
Correct |
50 ms |
23992 KB |
Output is correct |
3 |
Correct |
48 ms |
23940 KB |
Output is correct |
4 |
Correct |
51 ms |
23984 KB |
Output is correct |
5 |
Correct |
45 ms |
23884 KB |
Output is correct |
6 |
Correct |
45 ms |
23884 KB |
Output is correct |
7 |
Correct |
51 ms |
23972 KB |
Output is correct |
8 |
Correct |
51 ms |
23992 KB |
Output is correct |
9 |
Correct |
52 ms |
23884 KB |
Output is correct |
10 |
Correct |
52 ms |
23884 KB |
Output is correct |
11 |
Correct |
51 ms |
23988 KB |
Output is correct |
12 |
Correct |
51 ms |
23984 KB |
Output is correct |
13 |
Correct |
45 ms |
23972 KB |
Output is correct |
14 |
Correct |
51 ms |
23992 KB |
Output is correct |
15 |
Correct |
53 ms |
23880 KB |
Output is correct |
16 |
Correct |
49 ms |
23992 KB |
Output is correct |
17 |
Correct |
51 ms |
23852 KB |
Output is correct |
18 |
Correct |
53 ms |
23976 KB |
Output is correct |
19 |
Correct |
50 ms |
24080 KB |
Output is correct |
20 |
Correct |
49 ms |
23924 KB |
Output is correct |
21 |
Correct |
580 ms |
29272 KB |
Output is correct |
22 |
Correct |
564 ms |
29128 KB |
Output is correct |
23 |
Correct |
591 ms |
29220 KB |
Output is correct |
24 |
Correct |
608 ms |
29216 KB |
Output is correct |
25 |
Correct |
572 ms |
29132 KB |
Output is correct |
26 |
Correct |
568 ms |
29132 KB |
Output is correct |
27 |
Correct |
143 ms |
28840 KB |
Output is correct |
28 |
Correct |
153 ms |
28912 KB |
Output is correct |
29 |
Correct |
592 ms |
28912 KB |
Output is correct |
30 |
Correct |
605 ms |
29124 KB |
Output is correct |
31 |
Correct |
611 ms |
28988 KB |
Output is correct |
32 |
Correct |
612 ms |
29128 KB |
Output is correct |
33 |
Correct |
444 ms |
28680 KB |
Output is correct |
34 |
Correct |
524 ms |
29252 KB |
Output is correct |
35 |
Correct |
470 ms |
28996 KB |
Output is correct |
36 |
Correct |
492 ms |
29124 KB |
Output is correct |
37 |
Correct |
688 ms |
28688 KB |
Output is correct |
38 |
Correct |
652 ms |
28016 KB |
Output is correct |
39 |
Correct |
157 ms |
28304 KB |
Output is correct |
40 |
Correct |
174 ms |
28772 KB |
Output is correct |
41 |
Correct |
803 ms |
28668 KB |
Output is correct |
42 |
Correct |
835 ms |
29120 KB |
Output is correct |
43 |
Correct |
750 ms |
29080 KB |
Output is correct |
44 |
Correct |
744 ms |
28944 KB |
Output is correct |
45 |
Correct |
740 ms |
29112 KB |
Output is correct |
46 |
Correct |
726 ms |
29204 KB |
Output is correct |
47 |
Correct |
248 ms |
29140 KB |
Output is correct |
48 |
Correct |
602 ms |
29236 KB |
Output is correct |
49 |
Correct |
517 ms |
27828 KB |
Output is correct |
50 |
Correct |
632 ms |
28316 KB |
Output is correct |
51 |
Correct |
732 ms |
29164 KB |
Output is correct |
52 |
Correct |
711 ms |
29100 KB |
Output is correct |
53 |
Correct |
412 ms |
28028 KB |
Output is correct |
54 |
Correct |
519 ms |
28964 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
591 ms |
28740 KB |
Output is correct |
2 |
Correct |
620 ms |
29260 KB |
Output is correct |
3 |
Correct |
633 ms |
29252 KB |
Output is correct |
4 |
Correct |
454 ms |
27588 KB |
Output is correct |
5 |
Correct |
562 ms |
28564 KB |
Output is correct |
6 |
Correct |
640 ms |
29344 KB |
Output is correct |
7 |
Correct |
144 ms |
28664 KB |
Output is correct |
8 |
Correct |
147 ms |
28292 KB |
Output is correct |
9 |
Correct |
300 ms |
29316 KB |
Output is correct |
10 |
Correct |
395 ms |
27508 KB |
Output is correct |
11 |
Correct |
584 ms |
29316 KB |
Output is correct |
12 |
Correct |
592 ms |
29516 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
23884 KB |
Output is correct |
2 |
Correct |
50 ms |
23992 KB |
Output is correct |
3 |
Correct |
48 ms |
23940 KB |
Output is correct |
4 |
Correct |
51 ms |
23984 KB |
Output is correct |
5 |
Correct |
45 ms |
23884 KB |
Output is correct |
6 |
Correct |
45 ms |
23884 KB |
Output is correct |
7 |
Correct |
51 ms |
23972 KB |
Output is correct |
8 |
Correct |
51 ms |
23992 KB |
Output is correct |
9 |
Correct |
52 ms |
23884 KB |
Output is correct |
10 |
Correct |
52 ms |
23884 KB |
Output is correct |
11 |
Correct |
51 ms |
23988 KB |
Output is correct |
12 |
Correct |
51 ms |
23984 KB |
Output is correct |
13 |
Correct |
45 ms |
23972 KB |
Output is correct |
14 |
Correct |
51 ms |
23992 KB |
Output is correct |
15 |
Correct |
53 ms |
23880 KB |
Output is correct |
16 |
Correct |
49 ms |
23992 KB |
Output is correct |
17 |
Correct |
51 ms |
23852 KB |
Output is correct |
18 |
Correct |
53 ms |
23976 KB |
Output is correct |
19 |
Correct |
50 ms |
24080 KB |
Output is correct |
20 |
Correct |
49 ms |
23924 KB |
Output is correct |
21 |
Correct |
52 ms |
23972 KB |
Output is correct |
22 |
Correct |
50 ms |
23956 KB |
Output is correct |
23 |
Correct |
50 ms |
23972 KB |
Output is correct |
24 |
Correct |
52 ms |
24000 KB |
Output is correct |
25 |
Correct |
45 ms |
23956 KB |
Output is correct |
26 |
Correct |
45 ms |
23884 KB |
Output is correct |
27 |
Correct |
51 ms |
24104 KB |
Output is correct |
28 |
Correct |
51 ms |
23976 KB |
Output is correct |
29 |
Correct |
52 ms |
24000 KB |
Output is correct |
30 |
Correct |
52 ms |
23984 KB |
Output is correct |
31 |
Correct |
51 ms |
23992 KB |
Output is correct |
32 |
Correct |
50 ms |
23996 KB |
Output is correct |
33 |
Correct |
44 ms |
23972 KB |
Output is correct |
34 |
Correct |
45 ms |
23976 KB |
Output is correct |
35 |
Correct |
51 ms |
23884 KB |
Output is correct |
36 |
Correct |
50 ms |
24012 KB |
Output is correct |
37 |
Correct |
46 ms |
23936 KB |
Output is correct |
38 |
Correct |
49 ms |
23884 KB |
Output is correct |
39 |
Correct |
580 ms |
29272 KB |
Output is correct |
40 |
Correct |
564 ms |
29128 KB |
Output is correct |
41 |
Correct |
591 ms |
29220 KB |
Output is correct |
42 |
Correct |
608 ms |
29216 KB |
Output is correct |
43 |
Correct |
572 ms |
29132 KB |
Output is correct |
44 |
Correct |
568 ms |
29132 KB |
Output is correct |
45 |
Correct |
143 ms |
28840 KB |
Output is correct |
46 |
Correct |
153 ms |
28912 KB |
Output is correct |
47 |
Correct |
592 ms |
28912 KB |
Output is correct |
48 |
Correct |
605 ms |
29124 KB |
Output is correct |
49 |
Correct |
611 ms |
28988 KB |
Output is correct |
50 |
Correct |
612 ms |
29128 KB |
Output is correct |
51 |
Correct |
444 ms |
28680 KB |
Output is correct |
52 |
Correct |
524 ms |
29252 KB |
Output is correct |
53 |
Correct |
470 ms |
28996 KB |
Output is correct |
54 |
Correct |
492 ms |
29124 KB |
Output is correct |
55 |
Correct |
688 ms |
28688 KB |
Output is correct |
56 |
Correct |
652 ms |
28016 KB |
Output is correct |
57 |
Correct |
157 ms |
28304 KB |
Output is correct |
58 |
Correct |
174 ms |
28772 KB |
Output is correct |
59 |
Correct |
803 ms |
28668 KB |
Output is correct |
60 |
Correct |
835 ms |
29120 KB |
Output is correct |
61 |
Correct |
750 ms |
29080 KB |
Output is correct |
62 |
Correct |
744 ms |
28944 KB |
Output is correct |
63 |
Correct |
740 ms |
29112 KB |
Output is correct |
64 |
Correct |
726 ms |
29204 KB |
Output is correct |
65 |
Correct |
248 ms |
29140 KB |
Output is correct |
66 |
Correct |
602 ms |
29236 KB |
Output is correct |
67 |
Correct |
517 ms |
27828 KB |
Output is correct |
68 |
Correct |
632 ms |
28316 KB |
Output is correct |
69 |
Correct |
732 ms |
29164 KB |
Output is correct |
70 |
Correct |
711 ms |
29100 KB |
Output is correct |
71 |
Correct |
412 ms |
28028 KB |
Output is correct |
72 |
Correct |
519 ms |
28964 KB |
Output is correct |
73 |
Correct |
591 ms |
28740 KB |
Output is correct |
74 |
Correct |
620 ms |
29260 KB |
Output is correct |
75 |
Correct |
633 ms |
29252 KB |
Output is correct |
76 |
Correct |
454 ms |
27588 KB |
Output is correct |
77 |
Correct |
562 ms |
28564 KB |
Output is correct |
78 |
Correct |
640 ms |
29344 KB |
Output is correct |
79 |
Correct |
144 ms |
28664 KB |
Output is correct |
80 |
Correct |
147 ms |
28292 KB |
Output is correct |
81 |
Correct |
300 ms |
29316 KB |
Output is correct |
82 |
Correct |
395 ms |
27508 KB |
Output is correct |
83 |
Correct |
584 ms |
29316 KB |
Output is correct |
84 |
Correct |
592 ms |
29516 KB |
Output is correct |
85 |
Correct |
618 ms |
28708 KB |
Output is correct |
86 |
Correct |
695 ms |
29176 KB |
Output is correct |
87 |
Correct |
651 ms |
28484 KB |
Output is correct |
88 |
Correct |
746 ms |
29124 KB |
Output is correct |
89 |
Correct |
508 ms |
27076 KB |
Output is correct |
90 |
Correct |
733 ms |
29112 KB |
Output is correct |
91 |
Correct |
598 ms |
28212 KB |
Output is correct |
92 |
Correct |
566 ms |
27968 KB |
Output is correct |
93 |
Correct |
738 ms |
29244 KB |
Output is correct |
94 |
Correct |
737 ms |
28940 KB |
Output is correct |
95 |
Correct |
718 ms |
28980 KB |
Output is correct |
96 |
Correct |
741 ms |
29124 KB |
Output is correct |
97 |
Correct |
735 ms |
29252 KB |
Output is correct |
98 |
Correct |
614 ms |
28356 KB |
Output is correct |
99 |
Correct |
260 ms |
29252 KB |
Output is correct |
100 |
Correct |
518 ms |
28396 KB |
Output is correct |
101 |
Correct |
611 ms |
29252 KB |
Output is correct |
102 |
Correct |
544 ms |
28484 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
49 ms |
23884 KB |
Output is correct |
2 |
Correct |
50 ms |
23992 KB |
Output is correct |
3 |
Correct |
48 ms |
23940 KB |
Output is correct |
4 |
Correct |
51 ms |
23984 KB |
Output is correct |
5 |
Correct |
45 ms |
23884 KB |
Output is correct |
6 |
Correct |
45 ms |
23884 KB |
Output is correct |
7 |
Correct |
51 ms |
23972 KB |
Output is correct |
8 |
Correct |
51 ms |
23992 KB |
Output is correct |
9 |
Correct |
52 ms |
23884 KB |
Output is correct |
10 |
Correct |
52 ms |
23884 KB |
Output is correct |
11 |
Correct |
51 ms |
23988 KB |
Output is correct |
12 |
Correct |
51 ms |
23984 KB |
Output is correct |
13 |
Correct |
45 ms |
23972 KB |
Output is correct |
14 |
Correct |
51 ms |
23992 KB |
Output is correct |
15 |
Correct |
53 ms |
23880 KB |
Output is correct |
16 |
Correct |
49 ms |
23992 KB |
Output is correct |
17 |
Correct |
51 ms |
23852 KB |
Output is correct |
18 |
Correct |
53 ms |
23976 KB |
Output is correct |
19 |
Correct |
50 ms |
24080 KB |
Output is correct |
20 |
Correct |
49 ms |
23924 KB |
Output is correct |
21 |
Correct |
52 ms |
23972 KB |
Output is correct |
22 |
Correct |
50 ms |
23956 KB |
Output is correct |
23 |
Correct |
50 ms |
23972 KB |
Output is correct |
24 |
Correct |
52 ms |
24000 KB |
Output is correct |
25 |
Correct |
45 ms |
23956 KB |
Output is correct |
26 |
Correct |
45 ms |
23884 KB |
Output is correct |
27 |
Correct |
51 ms |
24104 KB |
Output is correct |
28 |
Correct |
51 ms |
23976 KB |
Output is correct |
29 |
Correct |
52 ms |
24000 KB |
Output is correct |
30 |
Correct |
52 ms |
23984 KB |
Output is correct |
31 |
Correct |
51 ms |
23992 KB |
Output is correct |
32 |
Correct |
50 ms |
23996 KB |
Output is correct |
33 |
Correct |
44 ms |
23972 KB |
Output is correct |
34 |
Correct |
45 ms |
23976 KB |
Output is correct |
35 |
Correct |
51 ms |
23884 KB |
Output is correct |
36 |
Correct |
50 ms |
24012 KB |
Output is correct |
37 |
Correct |
46 ms |
23936 KB |
Output is correct |
38 |
Correct |
49 ms |
23884 KB |
Output is correct |
39 |
Correct |
580 ms |
29272 KB |
Output is correct |
40 |
Correct |
564 ms |
29128 KB |
Output is correct |
41 |
Correct |
591 ms |
29220 KB |
Output is correct |
42 |
Correct |
608 ms |
29216 KB |
Output is correct |
43 |
Correct |
572 ms |
29132 KB |
Output is correct |
44 |
Correct |
568 ms |
29132 KB |
Output is correct |
45 |
Correct |
143 ms |
28840 KB |
Output is correct |
46 |
Correct |
153 ms |
28912 KB |
Output is correct |
47 |
Correct |
592 ms |
28912 KB |
Output is correct |
48 |
Correct |
605 ms |
29124 KB |
Output is correct |
49 |
Correct |
611 ms |
28988 KB |
Output is correct |
50 |
Correct |
612 ms |
29128 KB |
Output is correct |
51 |
Correct |
444 ms |
28680 KB |
Output is correct |
52 |
Correct |
524 ms |
29252 KB |
Output is correct |
53 |
Correct |
470 ms |
28996 KB |
Output is correct |
54 |
Correct |
492 ms |
29124 KB |
Output is correct |
55 |
Correct |
332 ms |
38088 KB |
Output is correct |
56 |
Correct |
259 ms |
35140 KB |
Output is correct |
57 |
Correct |
356 ms |
39236 KB |
Output is correct |
58 |
Correct |
288 ms |
34388 KB |
Output is correct |
59 |
Correct |
253 ms |
34652 KB |
Output is correct |
60 |
Correct |
382 ms |
38636 KB |
Output is correct |
61 |
Correct |
146 ms |
39236 KB |
Output is correct |
62 |
Correct |
152 ms |
39208 KB |
Output is correct |
63 |
Correct |
339 ms |
40476 KB |
Output is correct |
64 |
Correct |
322 ms |
40556 KB |
Output is correct |
65 |
Correct |
384 ms |
37624 KB |
Output is correct |
66 |
Correct |
388 ms |
38492 KB |
Output is correct |
67 |
Correct |
407 ms |
37644 KB |
Output is correct |
68 |
Correct |
415 ms |
38468 KB |
Output is correct |
69 |
Correct |
411 ms |
38596 KB |
Output is correct |
70 |
Correct |
441 ms |
38584 KB |
Output is correct |
71 |
Correct |
437 ms |
38584 KB |
Output is correct |
72 |
Correct |
407 ms |
38084 KB |
Output is correct |
73 |
Correct |
460 ms |
38576 KB |
Output is correct |
74 |
Correct |
448 ms |
38052 KB |
Output is correct |
75 |
Correct |
458 ms |
38512 KB |
Output is correct |
76 |
Correct |
438 ms |
38596 KB |
Output is correct |
77 |
Correct |
405 ms |
38560 KB |
Output is correct |
78 |
Correct |
417 ms |
38588 KB |
Output is correct |
79 |
Correct |
300 ms |
38928 KB |
Output is correct |
80 |
Correct |
312 ms |
39228 KB |
Output is correct |
81 |
Correct |
309 ms |
35876 KB |
Output is correct |
82 |
Correct |
688 ms |
28688 KB |
Output is correct |
83 |
Correct |
652 ms |
28016 KB |
Output is correct |
84 |
Correct |
157 ms |
28304 KB |
Output is correct |
85 |
Correct |
174 ms |
28772 KB |
Output is correct |
86 |
Correct |
803 ms |
28668 KB |
Output is correct |
87 |
Correct |
835 ms |
29120 KB |
Output is correct |
88 |
Correct |
750 ms |
29080 KB |
Output is correct |
89 |
Correct |
744 ms |
28944 KB |
Output is correct |
90 |
Correct |
740 ms |
29112 KB |
Output is correct |
91 |
Correct |
726 ms |
29204 KB |
Output is correct |
92 |
Correct |
248 ms |
29140 KB |
Output is correct |
93 |
Correct |
602 ms |
29236 KB |
Output is correct |
94 |
Correct |
517 ms |
27828 KB |
Output is correct |
95 |
Correct |
632 ms |
28316 KB |
Output is correct |
96 |
Correct |
732 ms |
29164 KB |
Output is correct |
97 |
Correct |
711 ms |
29100 KB |
Output is correct |
98 |
Correct |
412 ms |
28028 KB |
Output is correct |
99 |
Correct |
519 ms |
28964 KB |
Output is correct |
100 |
Correct |
591 ms |
28740 KB |
Output is correct |
101 |
Correct |
620 ms |
29260 KB |
Output is correct |
102 |
Correct |
633 ms |
29252 KB |
Output is correct |
103 |
Correct |
454 ms |
27588 KB |
Output is correct |
104 |
Correct |
562 ms |
28564 KB |
Output is correct |
105 |
Correct |
640 ms |
29344 KB |
Output is correct |
106 |
Correct |
144 ms |
28664 KB |
Output is correct |
107 |
Correct |
147 ms |
28292 KB |
Output is correct |
108 |
Correct |
300 ms |
29316 KB |
Output is correct |
109 |
Correct |
395 ms |
27508 KB |
Output is correct |
110 |
Correct |
584 ms |
29316 KB |
Output is correct |
111 |
Correct |
592 ms |
29516 KB |
Output is correct |
112 |
Correct |
618 ms |
28708 KB |
Output is correct |
113 |
Correct |
695 ms |
29176 KB |
Output is correct |
114 |
Correct |
651 ms |
28484 KB |
Output is correct |
115 |
Correct |
746 ms |
29124 KB |
Output is correct |
116 |
Correct |
508 ms |
27076 KB |
Output is correct |
117 |
Correct |
733 ms |
29112 KB |
Output is correct |
118 |
Correct |
598 ms |
28212 KB |
Output is correct |
119 |
Correct |
566 ms |
27968 KB |
Output is correct |
120 |
Correct |
738 ms |
29244 KB |
Output is correct |
121 |
Correct |
737 ms |
28940 KB |
Output is correct |
122 |
Correct |
718 ms |
28980 KB |
Output is correct |
123 |
Correct |
741 ms |
29124 KB |
Output is correct |
124 |
Correct |
735 ms |
29252 KB |
Output is correct |
125 |
Correct |
614 ms |
28356 KB |
Output is correct |
126 |
Correct |
260 ms |
29252 KB |
Output is correct |
127 |
Correct |
518 ms |
28396 KB |
Output is correct |
128 |
Correct |
611 ms |
29252 KB |
Output is correct |
129 |
Correct |
544 ms |
28484 KB |
Output is correct |
130 |
Execution timed out |
1096 ms |
42788 KB |
Time limit exceeded |
131 |
Halted |
0 ms |
0 KB |
- |