// vaziat meshki-ghermeze !
#include <bits/stdc++.h>
// #pragma GCC optimize("O3")
#pragma GCC target ("avx2")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#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 = 250e3 + 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].S = min(seg[id].S, seg[id].F + X.S);
seg[id].F += X.F;
}
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]));
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 |
46 ms |
23884 KB |
Output is correct |
2 |
Correct |
47 ms |
24016 KB |
Output is correct |
3 |
Correct |
44 ms |
23960 KB |
Output is correct |
4 |
Correct |
46 ms |
23984 KB |
Output is correct |
5 |
Correct |
39 ms |
23884 KB |
Output is correct |
6 |
Correct |
40 ms |
23884 KB |
Output is correct |
7 |
Correct |
48 ms |
23992 KB |
Output is correct |
8 |
Correct |
47 ms |
24000 KB |
Output is correct |
9 |
Correct |
46 ms |
24140 KB |
Output is correct |
10 |
Correct |
47 ms |
24000 KB |
Output is correct |
11 |
Correct |
50 ms |
24028 KB |
Output is correct |
12 |
Correct |
47 ms |
23972 KB |
Output is correct |
13 |
Correct |
41 ms |
23960 KB |
Output is correct |
14 |
Correct |
40 ms |
24016 KB |
Output is correct |
15 |
Correct |
40 ms |
23960 KB |
Output is correct |
16 |
Correct |
44 ms |
24012 KB |
Output is correct |
17 |
Correct |
43 ms |
23884 KB |
Output is correct |
18 |
Correct |
45 ms |
23984 KB |
Output is correct |
19 |
Correct |
42 ms |
24008 KB |
Output is correct |
20 |
Correct |
43 ms |
24012 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
46 ms |
23884 KB |
Output is correct |
2 |
Correct |
47 ms |
24016 KB |
Output is correct |
3 |
Correct |
44 ms |
23960 KB |
Output is correct |
4 |
Correct |
46 ms |
23984 KB |
Output is correct |
5 |
Correct |
39 ms |
23884 KB |
Output is correct |
6 |
Correct |
40 ms |
23884 KB |
Output is correct |
7 |
Correct |
48 ms |
23992 KB |
Output is correct |
8 |
Correct |
47 ms |
24000 KB |
Output is correct |
9 |
Correct |
46 ms |
24140 KB |
Output is correct |
10 |
Correct |
47 ms |
24000 KB |
Output is correct |
11 |
Correct |
50 ms |
24028 KB |
Output is correct |
12 |
Correct |
47 ms |
23972 KB |
Output is correct |
13 |
Correct |
41 ms |
23960 KB |
Output is correct |
14 |
Correct |
40 ms |
24016 KB |
Output is correct |
15 |
Correct |
40 ms |
23960 KB |
Output is correct |
16 |
Correct |
44 ms |
24012 KB |
Output is correct |
17 |
Correct |
43 ms |
23884 KB |
Output is correct |
18 |
Correct |
45 ms |
23984 KB |
Output is correct |
19 |
Correct |
42 ms |
24008 KB |
Output is correct |
20 |
Correct |
43 ms |
24012 KB |
Output is correct |
21 |
Correct |
44 ms |
23992 KB |
Output is correct |
22 |
Correct |
44 ms |
24012 KB |
Output is correct |
23 |
Correct |
46 ms |
24012 KB |
Output is correct |
24 |
Correct |
46 ms |
24012 KB |
Output is correct |
25 |
Correct |
37 ms |
23976 KB |
Output is correct |
26 |
Correct |
41 ms |
24012 KB |
Output is correct |
27 |
Correct |
48 ms |
24012 KB |
Output is correct |
28 |
Correct |
45 ms |
24012 KB |
Output is correct |
29 |
Correct |
44 ms |
24048 KB |
Output is correct |
30 |
Correct |
43 ms |
24000 KB |
Output is correct |
31 |
Correct |
45 ms |
24000 KB |
Output is correct |
32 |
Correct |
46 ms |
24016 KB |
Output is correct |
33 |
Correct |
40 ms |
23996 KB |
Output is correct |
34 |
Correct |
41 ms |
24032 KB |
Output is correct |
35 |
Correct |
43 ms |
24016 KB |
Output is correct |
36 |
Correct |
44 ms |
24032 KB |
Output is correct |
37 |
Correct |
43 ms |
23884 KB |
Output is correct |
38 |
Correct |
43 ms |
23996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
549 ms |
29296 KB |
Output is correct |
2 |
Correct |
527 ms |
29196 KB |
Output is correct |
3 |
Correct |
565 ms |
29252 KB |
Output is correct |
4 |
Correct |
576 ms |
29212 KB |
Output is correct |
5 |
Correct |
537 ms |
29172 KB |
Output is correct |
6 |
Correct |
556 ms |
29252 KB |
Output is correct |
7 |
Correct |
136 ms |
28868 KB |
Output is correct |
8 |
Correct |
141 ms |
28900 KB |
Output is correct |
9 |
Correct |
564 ms |
29000 KB |
Output is correct |
10 |
Correct |
582 ms |
29124 KB |
Output is correct |
11 |
Correct |
579 ms |
29052 KB |
Output is correct |
12 |
Correct |
584 ms |
29124 KB |
Output is correct |
13 |
Correct |
432 ms |
28868 KB |
Output is correct |
14 |
Correct |
485 ms |
29124 KB |
Output is correct |
15 |
Correct |
478 ms |
29056 KB |
Output is correct |
16 |
Correct |
483 ms |
28960 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
370 ms |
38008 KB |
Output is correct |
2 |
Correct |
271 ms |
35236 KB |
Output is correct |
3 |
Correct |
378 ms |
39328 KB |
Output is correct |
4 |
Correct |
306 ms |
34504 KB |
Output is correct |
5 |
Correct |
283 ms |
34756 KB |
Output is correct |
6 |
Correct |
410 ms |
38680 KB |
Output is correct |
7 |
Correct |
154 ms |
39260 KB |
Output is correct |
8 |
Correct |
150 ms |
39344 KB |
Output is correct |
9 |
Correct |
331 ms |
40580 KB |
Output is correct |
10 |
Correct |
334 ms |
40544 KB |
Output is correct |
11 |
Correct |
371 ms |
37644 KB |
Output is correct |
12 |
Correct |
376 ms |
38684 KB |
Output is correct |
13 |
Correct |
373 ms |
37668 KB |
Output is correct |
14 |
Correct |
409 ms |
38672 KB |
Output is correct |
15 |
Correct |
381 ms |
38600 KB |
Output is correct |
16 |
Correct |
386 ms |
38640 KB |
Output is correct |
17 |
Correct |
354 ms |
38680 KB |
Output is correct |
18 |
Correct |
375 ms |
38208 KB |
Output is correct |
19 |
Correct |
390 ms |
38664 KB |
Output is correct |
20 |
Correct |
421 ms |
38216 KB |
Output is correct |
21 |
Correct |
396 ms |
38580 KB |
Output is correct |
22 |
Correct |
396 ms |
38640 KB |
Output is correct |
23 |
Correct |
363 ms |
38752 KB |
Output is correct |
24 |
Correct |
364 ms |
38600 KB |
Output is correct |
25 |
Correct |
281 ms |
39044 KB |
Output is correct |
26 |
Correct |
290 ms |
39348 KB |
Output is correct |
27 |
Correct |
270 ms |
36036 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
46 ms |
23884 KB |
Output is correct |
2 |
Correct |
47 ms |
24016 KB |
Output is correct |
3 |
Correct |
44 ms |
23960 KB |
Output is correct |
4 |
Correct |
46 ms |
23984 KB |
Output is correct |
5 |
Correct |
39 ms |
23884 KB |
Output is correct |
6 |
Correct |
40 ms |
23884 KB |
Output is correct |
7 |
Correct |
48 ms |
23992 KB |
Output is correct |
8 |
Correct |
47 ms |
24000 KB |
Output is correct |
9 |
Correct |
46 ms |
24140 KB |
Output is correct |
10 |
Correct |
47 ms |
24000 KB |
Output is correct |
11 |
Correct |
50 ms |
24028 KB |
Output is correct |
12 |
Correct |
47 ms |
23972 KB |
Output is correct |
13 |
Correct |
41 ms |
23960 KB |
Output is correct |
14 |
Correct |
40 ms |
24016 KB |
Output is correct |
15 |
Correct |
40 ms |
23960 KB |
Output is correct |
16 |
Correct |
44 ms |
24012 KB |
Output is correct |
17 |
Correct |
43 ms |
23884 KB |
Output is correct |
18 |
Correct |
45 ms |
23984 KB |
Output is correct |
19 |
Correct |
42 ms |
24008 KB |
Output is correct |
20 |
Correct |
43 ms |
24012 KB |
Output is correct |
21 |
Correct |
549 ms |
29296 KB |
Output is correct |
22 |
Correct |
527 ms |
29196 KB |
Output is correct |
23 |
Correct |
565 ms |
29252 KB |
Output is correct |
24 |
Correct |
576 ms |
29212 KB |
Output is correct |
25 |
Correct |
537 ms |
29172 KB |
Output is correct |
26 |
Correct |
556 ms |
29252 KB |
Output is correct |
27 |
Correct |
136 ms |
28868 KB |
Output is correct |
28 |
Correct |
141 ms |
28900 KB |
Output is correct |
29 |
Correct |
564 ms |
29000 KB |
Output is correct |
30 |
Correct |
582 ms |
29124 KB |
Output is correct |
31 |
Correct |
579 ms |
29052 KB |
Output is correct |
32 |
Correct |
584 ms |
29124 KB |
Output is correct |
33 |
Correct |
432 ms |
28868 KB |
Output is correct |
34 |
Correct |
485 ms |
29124 KB |
Output is correct |
35 |
Correct |
478 ms |
29056 KB |
Output is correct |
36 |
Correct |
483 ms |
28960 KB |
Output is correct |
37 |
Correct |
572 ms |
28608 KB |
Output is correct |
38 |
Correct |
582 ms |
27944 KB |
Output is correct |
39 |
Correct |
138 ms |
28228 KB |
Output is correct |
40 |
Correct |
153 ms |
28804 KB |
Output is correct |
41 |
Correct |
727 ms |
28784 KB |
Output is correct |
42 |
Correct |
754 ms |
29064 KB |
Output is correct |
43 |
Correct |
712 ms |
29252 KB |
Output is correct |
44 |
Correct |
714 ms |
28900 KB |
Output is correct |
45 |
Correct |
705 ms |
29168 KB |
Output is correct |
46 |
Correct |
706 ms |
29096 KB |
Output is correct |
47 |
Correct |
230 ms |
29240 KB |
Output is correct |
48 |
Correct |
588 ms |
29240 KB |
Output is correct |
49 |
Correct |
512 ms |
27604 KB |
Output is correct |
50 |
Correct |
604 ms |
28284 KB |
Output is correct |
51 |
Correct |
721 ms |
29092 KB |
Output is correct |
52 |
Correct |
702 ms |
29124 KB |
Output is correct |
53 |
Correct |
397 ms |
27916 KB |
Output is correct |
54 |
Correct |
465 ms |
29028 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
556 ms |
28712 KB |
Output is correct |
2 |
Correct |
592 ms |
29308 KB |
Output is correct |
3 |
Correct |
639 ms |
29396 KB |
Output is correct |
4 |
Correct |
439 ms |
27604 KB |
Output is correct |
5 |
Correct |
512 ms |
28484 KB |
Output is correct |
6 |
Correct |
611 ms |
29288 KB |
Output is correct |
7 |
Correct |
136 ms |
28636 KB |
Output is correct |
8 |
Correct |
133 ms |
28356 KB |
Output is correct |
9 |
Correct |
271 ms |
29232 KB |
Output is correct |
10 |
Correct |
382 ms |
27588 KB |
Output is correct |
11 |
Correct |
547 ms |
29304 KB |
Output is correct |
12 |
Correct |
565 ms |
29240 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
46 ms |
23884 KB |
Output is correct |
2 |
Correct |
47 ms |
24016 KB |
Output is correct |
3 |
Correct |
44 ms |
23960 KB |
Output is correct |
4 |
Correct |
46 ms |
23984 KB |
Output is correct |
5 |
Correct |
39 ms |
23884 KB |
Output is correct |
6 |
Correct |
40 ms |
23884 KB |
Output is correct |
7 |
Correct |
48 ms |
23992 KB |
Output is correct |
8 |
Correct |
47 ms |
24000 KB |
Output is correct |
9 |
Correct |
46 ms |
24140 KB |
Output is correct |
10 |
Correct |
47 ms |
24000 KB |
Output is correct |
11 |
Correct |
50 ms |
24028 KB |
Output is correct |
12 |
Correct |
47 ms |
23972 KB |
Output is correct |
13 |
Correct |
41 ms |
23960 KB |
Output is correct |
14 |
Correct |
40 ms |
24016 KB |
Output is correct |
15 |
Correct |
40 ms |
23960 KB |
Output is correct |
16 |
Correct |
44 ms |
24012 KB |
Output is correct |
17 |
Correct |
43 ms |
23884 KB |
Output is correct |
18 |
Correct |
45 ms |
23984 KB |
Output is correct |
19 |
Correct |
42 ms |
24008 KB |
Output is correct |
20 |
Correct |
43 ms |
24012 KB |
Output is correct |
21 |
Correct |
44 ms |
23992 KB |
Output is correct |
22 |
Correct |
44 ms |
24012 KB |
Output is correct |
23 |
Correct |
46 ms |
24012 KB |
Output is correct |
24 |
Correct |
46 ms |
24012 KB |
Output is correct |
25 |
Correct |
37 ms |
23976 KB |
Output is correct |
26 |
Correct |
41 ms |
24012 KB |
Output is correct |
27 |
Correct |
48 ms |
24012 KB |
Output is correct |
28 |
Correct |
45 ms |
24012 KB |
Output is correct |
29 |
Correct |
44 ms |
24048 KB |
Output is correct |
30 |
Correct |
43 ms |
24000 KB |
Output is correct |
31 |
Correct |
45 ms |
24000 KB |
Output is correct |
32 |
Correct |
46 ms |
24016 KB |
Output is correct |
33 |
Correct |
40 ms |
23996 KB |
Output is correct |
34 |
Correct |
41 ms |
24032 KB |
Output is correct |
35 |
Correct |
43 ms |
24016 KB |
Output is correct |
36 |
Correct |
44 ms |
24032 KB |
Output is correct |
37 |
Correct |
43 ms |
23884 KB |
Output is correct |
38 |
Correct |
43 ms |
23996 KB |
Output is correct |
39 |
Correct |
549 ms |
29296 KB |
Output is correct |
40 |
Correct |
527 ms |
29196 KB |
Output is correct |
41 |
Correct |
565 ms |
29252 KB |
Output is correct |
42 |
Correct |
576 ms |
29212 KB |
Output is correct |
43 |
Correct |
537 ms |
29172 KB |
Output is correct |
44 |
Correct |
556 ms |
29252 KB |
Output is correct |
45 |
Correct |
136 ms |
28868 KB |
Output is correct |
46 |
Correct |
141 ms |
28900 KB |
Output is correct |
47 |
Correct |
564 ms |
29000 KB |
Output is correct |
48 |
Correct |
582 ms |
29124 KB |
Output is correct |
49 |
Correct |
579 ms |
29052 KB |
Output is correct |
50 |
Correct |
584 ms |
29124 KB |
Output is correct |
51 |
Correct |
432 ms |
28868 KB |
Output is correct |
52 |
Correct |
485 ms |
29124 KB |
Output is correct |
53 |
Correct |
478 ms |
29056 KB |
Output is correct |
54 |
Correct |
483 ms |
28960 KB |
Output is correct |
55 |
Correct |
572 ms |
28608 KB |
Output is correct |
56 |
Correct |
582 ms |
27944 KB |
Output is correct |
57 |
Correct |
138 ms |
28228 KB |
Output is correct |
58 |
Correct |
153 ms |
28804 KB |
Output is correct |
59 |
Correct |
727 ms |
28784 KB |
Output is correct |
60 |
Correct |
754 ms |
29064 KB |
Output is correct |
61 |
Correct |
712 ms |
29252 KB |
Output is correct |
62 |
Correct |
714 ms |
28900 KB |
Output is correct |
63 |
Correct |
705 ms |
29168 KB |
Output is correct |
64 |
Correct |
706 ms |
29096 KB |
Output is correct |
65 |
Correct |
230 ms |
29240 KB |
Output is correct |
66 |
Correct |
588 ms |
29240 KB |
Output is correct |
67 |
Correct |
512 ms |
27604 KB |
Output is correct |
68 |
Correct |
604 ms |
28284 KB |
Output is correct |
69 |
Correct |
721 ms |
29092 KB |
Output is correct |
70 |
Correct |
702 ms |
29124 KB |
Output is correct |
71 |
Correct |
397 ms |
27916 KB |
Output is correct |
72 |
Correct |
465 ms |
29028 KB |
Output is correct |
73 |
Correct |
556 ms |
28712 KB |
Output is correct |
74 |
Correct |
592 ms |
29308 KB |
Output is correct |
75 |
Correct |
639 ms |
29396 KB |
Output is correct |
76 |
Correct |
439 ms |
27604 KB |
Output is correct |
77 |
Correct |
512 ms |
28484 KB |
Output is correct |
78 |
Correct |
611 ms |
29288 KB |
Output is correct |
79 |
Correct |
136 ms |
28636 KB |
Output is correct |
80 |
Correct |
133 ms |
28356 KB |
Output is correct |
81 |
Correct |
271 ms |
29232 KB |
Output is correct |
82 |
Correct |
382 ms |
27588 KB |
Output is correct |
83 |
Correct |
547 ms |
29304 KB |
Output is correct |
84 |
Correct |
565 ms |
29240 KB |
Output is correct |
85 |
Correct |
610 ms |
28696 KB |
Output is correct |
86 |
Correct |
668 ms |
29160 KB |
Output is correct |
87 |
Correct |
624 ms |
28460 KB |
Output is correct |
88 |
Correct |
739 ms |
29128 KB |
Output is correct |
89 |
Correct |
482 ms |
27204 KB |
Output is correct |
90 |
Correct |
722 ms |
29168 KB |
Output is correct |
91 |
Correct |
575 ms |
28268 KB |
Output is correct |
92 |
Correct |
530 ms |
28004 KB |
Output is correct |
93 |
Correct |
701 ms |
29144 KB |
Output is correct |
94 |
Correct |
715 ms |
29072 KB |
Output is correct |
95 |
Correct |
683 ms |
29016 KB |
Output is correct |
96 |
Correct |
709 ms |
29224 KB |
Output is correct |
97 |
Correct |
717 ms |
29212 KB |
Output is correct |
98 |
Correct |
580 ms |
28360 KB |
Output is correct |
99 |
Correct |
243 ms |
29188 KB |
Output is correct |
100 |
Correct |
493 ms |
28424 KB |
Output is correct |
101 |
Correct |
593 ms |
29176 KB |
Output is correct |
102 |
Correct |
521 ms |
28484 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
46 ms |
23884 KB |
Output is correct |
2 |
Correct |
47 ms |
24016 KB |
Output is correct |
3 |
Correct |
44 ms |
23960 KB |
Output is correct |
4 |
Correct |
46 ms |
23984 KB |
Output is correct |
5 |
Correct |
39 ms |
23884 KB |
Output is correct |
6 |
Correct |
40 ms |
23884 KB |
Output is correct |
7 |
Correct |
48 ms |
23992 KB |
Output is correct |
8 |
Correct |
47 ms |
24000 KB |
Output is correct |
9 |
Correct |
46 ms |
24140 KB |
Output is correct |
10 |
Correct |
47 ms |
24000 KB |
Output is correct |
11 |
Correct |
50 ms |
24028 KB |
Output is correct |
12 |
Correct |
47 ms |
23972 KB |
Output is correct |
13 |
Correct |
41 ms |
23960 KB |
Output is correct |
14 |
Correct |
40 ms |
24016 KB |
Output is correct |
15 |
Correct |
40 ms |
23960 KB |
Output is correct |
16 |
Correct |
44 ms |
24012 KB |
Output is correct |
17 |
Correct |
43 ms |
23884 KB |
Output is correct |
18 |
Correct |
45 ms |
23984 KB |
Output is correct |
19 |
Correct |
42 ms |
24008 KB |
Output is correct |
20 |
Correct |
43 ms |
24012 KB |
Output is correct |
21 |
Correct |
44 ms |
23992 KB |
Output is correct |
22 |
Correct |
44 ms |
24012 KB |
Output is correct |
23 |
Correct |
46 ms |
24012 KB |
Output is correct |
24 |
Correct |
46 ms |
24012 KB |
Output is correct |
25 |
Correct |
37 ms |
23976 KB |
Output is correct |
26 |
Correct |
41 ms |
24012 KB |
Output is correct |
27 |
Correct |
48 ms |
24012 KB |
Output is correct |
28 |
Correct |
45 ms |
24012 KB |
Output is correct |
29 |
Correct |
44 ms |
24048 KB |
Output is correct |
30 |
Correct |
43 ms |
24000 KB |
Output is correct |
31 |
Correct |
45 ms |
24000 KB |
Output is correct |
32 |
Correct |
46 ms |
24016 KB |
Output is correct |
33 |
Correct |
40 ms |
23996 KB |
Output is correct |
34 |
Correct |
41 ms |
24032 KB |
Output is correct |
35 |
Correct |
43 ms |
24016 KB |
Output is correct |
36 |
Correct |
44 ms |
24032 KB |
Output is correct |
37 |
Correct |
43 ms |
23884 KB |
Output is correct |
38 |
Correct |
43 ms |
23996 KB |
Output is correct |
39 |
Correct |
549 ms |
29296 KB |
Output is correct |
40 |
Correct |
527 ms |
29196 KB |
Output is correct |
41 |
Correct |
565 ms |
29252 KB |
Output is correct |
42 |
Correct |
576 ms |
29212 KB |
Output is correct |
43 |
Correct |
537 ms |
29172 KB |
Output is correct |
44 |
Correct |
556 ms |
29252 KB |
Output is correct |
45 |
Correct |
136 ms |
28868 KB |
Output is correct |
46 |
Correct |
141 ms |
28900 KB |
Output is correct |
47 |
Correct |
564 ms |
29000 KB |
Output is correct |
48 |
Correct |
582 ms |
29124 KB |
Output is correct |
49 |
Correct |
579 ms |
29052 KB |
Output is correct |
50 |
Correct |
584 ms |
29124 KB |
Output is correct |
51 |
Correct |
432 ms |
28868 KB |
Output is correct |
52 |
Correct |
485 ms |
29124 KB |
Output is correct |
53 |
Correct |
478 ms |
29056 KB |
Output is correct |
54 |
Correct |
483 ms |
28960 KB |
Output is correct |
55 |
Correct |
370 ms |
38008 KB |
Output is correct |
56 |
Correct |
271 ms |
35236 KB |
Output is correct |
57 |
Correct |
378 ms |
39328 KB |
Output is correct |
58 |
Correct |
306 ms |
34504 KB |
Output is correct |
59 |
Correct |
283 ms |
34756 KB |
Output is correct |
60 |
Correct |
410 ms |
38680 KB |
Output is correct |
61 |
Correct |
154 ms |
39260 KB |
Output is correct |
62 |
Correct |
150 ms |
39344 KB |
Output is correct |
63 |
Correct |
331 ms |
40580 KB |
Output is correct |
64 |
Correct |
334 ms |
40544 KB |
Output is correct |
65 |
Correct |
371 ms |
37644 KB |
Output is correct |
66 |
Correct |
376 ms |
38684 KB |
Output is correct |
67 |
Correct |
373 ms |
37668 KB |
Output is correct |
68 |
Correct |
409 ms |
38672 KB |
Output is correct |
69 |
Correct |
381 ms |
38600 KB |
Output is correct |
70 |
Correct |
386 ms |
38640 KB |
Output is correct |
71 |
Correct |
354 ms |
38680 KB |
Output is correct |
72 |
Correct |
375 ms |
38208 KB |
Output is correct |
73 |
Correct |
390 ms |
38664 KB |
Output is correct |
74 |
Correct |
421 ms |
38216 KB |
Output is correct |
75 |
Correct |
396 ms |
38580 KB |
Output is correct |
76 |
Correct |
396 ms |
38640 KB |
Output is correct |
77 |
Correct |
363 ms |
38752 KB |
Output is correct |
78 |
Correct |
364 ms |
38600 KB |
Output is correct |
79 |
Correct |
281 ms |
39044 KB |
Output is correct |
80 |
Correct |
290 ms |
39348 KB |
Output is correct |
81 |
Correct |
270 ms |
36036 KB |
Output is correct |
82 |
Correct |
572 ms |
28608 KB |
Output is correct |
83 |
Correct |
582 ms |
27944 KB |
Output is correct |
84 |
Correct |
138 ms |
28228 KB |
Output is correct |
85 |
Correct |
153 ms |
28804 KB |
Output is correct |
86 |
Correct |
727 ms |
28784 KB |
Output is correct |
87 |
Correct |
754 ms |
29064 KB |
Output is correct |
88 |
Correct |
712 ms |
29252 KB |
Output is correct |
89 |
Correct |
714 ms |
28900 KB |
Output is correct |
90 |
Correct |
705 ms |
29168 KB |
Output is correct |
91 |
Correct |
706 ms |
29096 KB |
Output is correct |
92 |
Correct |
230 ms |
29240 KB |
Output is correct |
93 |
Correct |
588 ms |
29240 KB |
Output is correct |
94 |
Correct |
512 ms |
27604 KB |
Output is correct |
95 |
Correct |
604 ms |
28284 KB |
Output is correct |
96 |
Correct |
721 ms |
29092 KB |
Output is correct |
97 |
Correct |
702 ms |
29124 KB |
Output is correct |
98 |
Correct |
397 ms |
27916 KB |
Output is correct |
99 |
Correct |
465 ms |
29028 KB |
Output is correct |
100 |
Correct |
556 ms |
28712 KB |
Output is correct |
101 |
Correct |
592 ms |
29308 KB |
Output is correct |
102 |
Correct |
639 ms |
29396 KB |
Output is correct |
103 |
Correct |
439 ms |
27604 KB |
Output is correct |
104 |
Correct |
512 ms |
28484 KB |
Output is correct |
105 |
Correct |
611 ms |
29288 KB |
Output is correct |
106 |
Correct |
136 ms |
28636 KB |
Output is correct |
107 |
Correct |
133 ms |
28356 KB |
Output is correct |
108 |
Correct |
271 ms |
29232 KB |
Output is correct |
109 |
Correct |
382 ms |
27588 KB |
Output is correct |
110 |
Correct |
547 ms |
29304 KB |
Output is correct |
111 |
Correct |
565 ms |
29240 KB |
Output is correct |
112 |
Correct |
610 ms |
28696 KB |
Output is correct |
113 |
Correct |
668 ms |
29160 KB |
Output is correct |
114 |
Correct |
624 ms |
28460 KB |
Output is correct |
115 |
Correct |
739 ms |
29128 KB |
Output is correct |
116 |
Correct |
482 ms |
27204 KB |
Output is correct |
117 |
Correct |
722 ms |
29168 KB |
Output is correct |
118 |
Correct |
575 ms |
28268 KB |
Output is correct |
119 |
Correct |
530 ms |
28004 KB |
Output is correct |
120 |
Correct |
701 ms |
29144 KB |
Output is correct |
121 |
Correct |
715 ms |
29072 KB |
Output is correct |
122 |
Correct |
683 ms |
29016 KB |
Output is correct |
123 |
Correct |
709 ms |
29224 KB |
Output is correct |
124 |
Correct |
717 ms |
29212 KB |
Output is correct |
125 |
Correct |
580 ms |
28360 KB |
Output is correct |
126 |
Correct |
243 ms |
29188 KB |
Output is correct |
127 |
Correct |
493 ms |
28424 KB |
Output is correct |
128 |
Correct |
593 ms |
29176 KB |
Output is correct |
129 |
Correct |
521 ms |
28484 KB |
Output is correct |
130 |
Execution timed out |
1090 ms |
42828 KB |
Time limit exceeded |
131 |
Halted |
0 ms |
0 KB |
- |