#include <bits/stdc++.h>
#define FOR(i, x, n) for(LL i = x; i < n; i++)
#define F0R(i, n) FOR(i, 0, n)
#define ROF(i, x, n) for(LL i = n - 1; i >= x; i--)
#define R0F(i, n) ROF(i, 0, n)
#define WTF cout << "WTF" << endl
#define IOS ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define F first
#define S second
#define PB push_back
#define ALL(x) x.begin(), x.end()
#define RALL(x) x.rbegin(), x.rend()
using namespace std;
typedef long long LL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<PII> VPII;
typedef vector<PLL> VPLL;
#define lc now << 1
#define rc now << 1 | 1
#define T 0
#define L 1
#define R 2
#define C 3
#define K 4
#define A 1
#define B 2
const int N = 3e5 + 5;
const LL INF = 1e18;
int n, m, q;
LL qs[N][5], ans[N];
VLL st[N], ft[N], mq[N];
struct LazySeg {
PLL tree[N << 2];
LL lz[N << 2];
void shift(int now) {
tree[lc].F += lz[now];
lz[lc] += lz[now];
tree[rc].F += lz[now];
lz[rc] += lz[now];
lz[now] = 0;
return;
}
PLL init(int now = 1, int ls = 0, int rs = q) {
if (ls == rs) return tree[now] = {0, ls};
int mid = (ls + rs) >> 1;
return tree[now] = min(init(lc, ls, mid), init(rc, mid + 1, rs));
}
void add(int lq, int rq, LL val, int now = 1, int ls = 0, int rs = q) {
if (rq < lq || rq < ls || rs < lq) return;
if (lq <= ls && rs <= rq) {
tree[now].F += val;
lz[now] += val;
return;
}
int mid = (ls + rs) >> 1;
shift(now);
add(lq, rq, val, lc, ls, mid);
add(lq, rq, val, rc, mid + 1, rs);
tree[now] = min(tree[lc], tree[rc]);
return;
}
PLL get(int lq, int rq, int now = 1, int ls = 0, int rs = q) {
if (rq < lq || rq < ls || rs < lq) return {INF, INF};
if (lq <= ls && rs <= rq) return tree[now];
shift(now);
int mid = (ls + rs) >> 1;
return min(get(lq, rq, lc, ls, mid), get(lq, rq, rc, mid + 1, rs));
}
} sum;
struct NormSeg {
LL tree[N << 2];
void add(int id, LL val, int now = 1, int ls = 0, int rs = q) {
if (ls == rs) {
tree[now] += val;
return;
}
int mid = (ls + rs) >> 1;
if (id <= mid) add(id, val, lc, ls, mid);
else add(id, val, rc, mid + 1, rs);
tree[now] = tree[lc] + tree[rc];
return;
}
LL get(int lq, int rq, int now = 1, int ls = 0, int rs = q) {
if (rq < lq || rq < ls || rs < lq) return 0;
if (lq <= ls && rs <= rq) return tree[now];
int mid = (ls + rs) >> 1;
return get(lq, rq, lc, ls, mid) + get(lq, rq, rc, mid + 1, rs);
}
int rightest(LL val, int now = 1, int ls = 0, int rs = q) {
//cout << "ls rs " << ls << ' ' << rs << endl;
if (ls == rs) return ls;
int mid = (ls + rs) >> 1;
if (tree[lc] >= val) return rightest(val, lc, ls, mid);
return rightest(val - tree[lc], rc, mid + 1, rs);
}
} pos, neg;
void init() {
cin >> n >> m >> q;
FOR(i, 1, q + 1) {
cin >> qs[i][T];
if (qs[i][T] == 1) {
cin >> qs[i][L] >> qs[i][R] >> qs[i][C] >> qs[i][K];
st[ qs[i][L] ].PB(i);
ft[ qs[i][R] ].PB(i);
}
if (qs[i][T] == 2) {
cin >> qs[i][L] >> qs[i][R] >> qs[i][K];
st[ qs[i][L] ].PB(i);
ft[ qs[i][R] ].PB(i);
}
if (qs[i][T] == 3) {
cin >> qs[i][A] >> qs[i][B];
mq[ qs[i][A] ].PB(i);
}
}
}
int main() {
IOS;
init();
sum.init();
FOR(i, 1, n + 1) {
for(const int &on : st[i]) {
if (qs[on][T] == 1) {
sum.add(on, q, qs[on][K]);
pos.add(on, qs[on][K]);
}
else {
sum.add(on, q, -qs[on][K]);
neg.add(on, qs[on][K]);
}
}
for(const int &on : mq[i]) {
LL pl = sum.get(0, on).S;
LL ppl = pos.get(0, pl) + neg.get(pl + 1, on - 1) + qs[on][B];
if (pos.get(0, on) < ppl) ans[on] = 0;
else ans[on] = qs[pos.rightest(ppl)][C];
}
for(const int &on : ft[i]) {
if (qs[on][T] == 1) {
sum.add(on, q, -qs[on][K]);
pos.add(on, -qs[on][K]);
}
else {
sum.add(on, q, qs[on][K]);
neg.add(on, -qs[on][K]);
}
}
}
FOR(i, 1, q + 1) if (qs[i][T] == 3) cout << ans[i] << '\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
40428 KB |
Output is correct |
2 |
Correct |
21 ms |
40532 KB |
Output is correct |
3 |
Correct |
21 ms |
40408 KB |
Output is correct |
4 |
Correct |
23 ms |
40532 KB |
Output is correct |
5 |
Correct |
21 ms |
40472 KB |
Output is correct |
6 |
Correct |
20 ms |
40404 KB |
Output is correct |
7 |
Correct |
20 ms |
40484 KB |
Output is correct |
8 |
Correct |
19 ms |
40532 KB |
Output is correct |
9 |
Correct |
19 ms |
40560 KB |
Output is correct |
10 |
Correct |
20 ms |
40532 KB |
Output is correct |
11 |
Correct |
20 ms |
40536 KB |
Output is correct |
12 |
Correct |
22 ms |
40532 KB |
Output is correct |
13 |
Correct |
19 ms |
40532 KB |
Output is correct |
14 |
Correct |
21 ms |
40520 KB |
Output is correct |
15 |
Correct |
24 ms |
40408 KB |
Output is correct |
16 |
Correct |
24 ms |
40524 KB |
Output is correct |
17 |
Correct |
24 ms |
40504 KB |
Output is correct |
18 |
Correct |
22 ms |
40540 KB |
Output is correct |
19 |
Correct |
19 ms |
40540 KB |
Output is correct |
20 |
Correct |
20 ms |
40532 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
40428 KB |
Output is correct |
2 |
Correct |
21 ms |
40532 KB |
Output is correct |
3 |
Correct |
21 ms |
40408 KB |
Output is correct |
4 |
Correct |
23 ms |
40532 KB |
Output is correct |
5 |
Correct |
21 ms |
40472 KB |
Output is correct |
6 |
Correct |
20 ms |
40404 KB |
Output is correct |
7 |
Correct |
20 ms |
40484 KB |
Output is correct |
8 |
Correct |
19 ms |
40532 KB |
Output is correct |
9 |
Correct |
19 ms |
40560 KB |
Output is correct |
10 |
Correct |
20 ms |
40532 KB |
Output is correct |
11 |
Correct |
20 ms |
40536 KB |
Output is correct |
12 |
Correct |
22 ms |
40532 KB |
Output is correct |
13 |
Correct |
19 ms |
40532 KB |
Output is correct |
14 |
Correct |
21 ms |
40520 KB |
Output is correct |
15 |
Correct |
24 ms |
40408 KB |
Output is correct |
16 |
Correct |
24 ms |
40524 KB |
Output is correct |
17 |
Correct |
24 ms |
40504 KB |
Output is correct |
18 |
Correct |
22 ms |
40540 KB |
Output is correct |
19 |
Correct |
19 ms |
40540 KB |
Output is correct |
20 |
Correct |
20 ms |
40532 KB |
Output is correct |
21 |
Correct |
20 ms |
40532 KB |
Output is correct |
22 |
Correct |
20 ms |
40520 KB |
Output is correct |
23 |
Correct |
19 ms |
40520 KB |
Output is correct |
24 |
Correct |
22 ms |
40540 KB |
Output is correct |
25 |
Correct |
24 ms |
40540 KB |
Output is correct |
26 |
Correct |
21 ms |
40524 KB |
Output is correct |
27 |
Correct |
23 ms |
40532 KB |
Output is correct |
28 |
Correct |
22 ms |
40536 KB |
Output is correct |
29 |
Correct |
21 ms |
40528 KB |
Output is correct |
30 |
Correct |
20 ms |
40532 KB |
Output is correct |
31 |
Correct |
19 ms |
40480 KB |
Output is correct |
32 |
Correct |
20 ms |
40512 KB |
Output is correct |
33 |
Correct |
22 ms |
40476 KB |
Output is correct |
34 |
Correct |
22 ms |
40532 KB |
Output is correct |
35 |
Correct |
29 ms |
40516 KB |
Output is correct |
36 |
Correct |
21 ms |
40496 KB |
Output is correct |
37 |
Correct |
25 ms |
40408 KB |
Output is correct |
38 |
Correct |
21 ms |
40532 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
137 ms |
49244 KB |
Output is correct |
2 |
Correct |
138 ms |
49128 KB |
Output is correct |
3 |
Correct |
152 ms |
49040 KB |
Output is correct |
4 |
Correct |
123 ms |
49112 KB |
Output is correct |
5 |
Correct |
122 ms |
49216 KB |
Output is correct |
6 |
Correct |
137 ms |
49188 KB |
Output is correct |
7 |
Correct |
82 ms |
47404 KB |
Output is correct |
8 |
Correct |
73 ms |
47548 KB |
Output is correct |
9 |
Correct |
120 ms |
48500 KB |
Output is correct |
10 |
Correct |
169 ms |
49132 KB |
Output is correct |
11 |
Correct |
161 ms |
48836 KB |
Output is correct |
12 |
Correct |
117 ms |
49100 KB |
Output is correct |
13 |
Correct |
105 ms |
48324 KB |
Output is correct |
14 |
Correct |
121 ms |
49156 KB |
Output is correct |
15 |
Correct |
121 ms |
48868 KB |
Output is correct |
16 |
Correct |
135 ms |
49188 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
590 ms |
72408 KB |
Output is correct |
2 |
Correct |
420 ms |
68552 KB |
Output is correct |
3 |
Correct |
665 ms |
74292 KB |
Output is correct |
4 |
Correct |
498 ms |
68596 KB |
Output is correct |
5 |
Correct |
404 ms |
68472 KB |
Output is correct |
6 |
Correct |
623 ms |
74096 KB |
Output is correct |
7 |
Correct |
262 ms |
68724 KB |
Output is correct |
8 |
Correct |
313 ms |
68792 KB |
Output is correct |
9 |
Correct |
614 ms |
73436 KB |
Output is correct |
10 |
Correct |
545 ms |
73364 KB |
Output is correct |
11 |
Correct |
558 ms |
69840 KB |
Output is correct |
12 |
Correct |
563 ms |
73888 KB |
Output is correct |
13 |
Correct |
670 ms |
70232 KB |
Output is correct |
14 |
Correct |
598 ms |
73996 KB |
Output is correct |
15 |
Correct |
610 ms |
73856 KB |
Output is correct |
16 |
Correct |
615 ms |
73784 KB |
Output is correct |
17 |
Correct |
613 ms |
73956 KB |
Output is correct |
18 |
Correct |
579 ms |
72012 KB |
Output is correct |
19 |
Correct |
635 ms |
73880 KB |
Output is correct |
20 |
Correct |
605 ms |
72264 KB |
Output is correct |
21 |
Correct |
597 ms |
73880 KB |
Output is correct |
22 |
Correct |
651 ms |
73896 KB |
Output is correct |
23 |
Correct |
682 ms |
73888 KB |
Output is correct |
24 |
Correct |
586 ms |
73876 KB |
Output is correct |
25 |
Correct |
495 ms |
70960 KB |
Output is correct |
26 |
Correct |
496 ms |
71500 KB |
Output is correct |
27 |
Correct |
449 ms |
72840 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
40428 KB |
Output is correct |
2 |
Correct |
21 ms |
40532 KB |
Output is correct |
3 |
Correct |
21 ms |
40408 KB |
Output is correct |
4 |
Correct |
23 ms |
40532 KB |
Output is correct |
5 |
Correct |
21 ms |
40472 KB |
Output is correct |
6 |
Correct |
20 ms |
40404 KB |
Output is correct |
7 |
Correct |
20 ms |
40484 KB |
Output is correct |
8 |
Correct |
19 ms |
40532 KB |
Output is correct |
9 |
Correct |
19 ms |
40560 KB |
Output is correct |
10 |
Correct |
20 ms |
40532 KB |
Output is correct |
11 |
Correct |
20 ms |
40536 KB |
Output is correct |
12 |
Correct |
22 ms |
40532 KB |
Output is correct |
13 |
Correct |
19 ms |
40532 KB |
Output is correct |
14 |
Correct |
21 ms |
40520 KB |
Output is correct |
15 |
Correct |
24 ms |
40408 KB |
Output is correct |
16 |
Correct |
24 ms |
40524 KB |
Output is correct |
17 |
Correct |
24 ms |
40504 KB |
Output is correct |
18 |
Correct |
22 ms |
40540 KB |
Output is correct |
19 |
Correct |
19 ms |
40540 KB |
Output is correct |
20 |
Correct |
20 ms |
40532 KB |
Output is correct |
21 |
Correct |
137 ms |
49244 KB |
Output is correct |
22 |
Correct |
138 ms |
49128 KB |
Output is correct |
23 |
Correct |
152 ms |
49040 KB |
Output is correct |
24 |
Correct |
123 ms |
49112 KB |
Output is correct |
25 |
Correct |
122 ms |
49216 KB |
Output is correct |
26 |
Correct |
137 ms |
49188 KB |
Output is correct |
27 |
Correct |
82 ms |
47404 KB |
Output is correct |
28 |
Correct |
73 ms |
47548 KB |
Output is correct |
29 |
Correct |
120 ms |
48500 KB |
Output is correct |
30 |
Correct |
169 ms |
49132 KB |
Output is correct |
31 |
Correct |
161 ms |
48836 KB |
Output is correct |
32 |
Correct |
117 ms |
49100 KB |
Output is correct |
33 |
Correct |
105 ms |
48324 KB |
Output is correct |
34 |
Correct |
121 ms |
49156 KB |
Output is correct |
35 |
Correct |
121 ms |
48868 KB |
Output is correct |
36 |
Correct |
135 ms |
49188 KB |
Output is correct |
37 |
Correct |
137 ms |
48452 KB |
Output is correct |
38 |
Correct |
121 ms |
47952 KB |
Output is correct |
39 |
Correct |
69 ms |
46832 KB |
Output is correct |
40 |
Correct |
87 ms |
47396 KB |
Output is correct |
41 |
Correct |
130 ms |
48048 KB |
Output is correct |
42 |
Correct |
143 ms |
48992 KB |
Output is correct |
43 |
Correct |
162 ms |
48968 KB |
Output is correct |
44 |
Correct |
161 ms |
48480 KB |
Output is correct |
45 |
Correct |
154 ms |
48972 KB |
Output is correct |
46 |
Correct |
147 ms |
49064 KB |
Output is correct |
47 |
Correct |
118 ms |
47924 KB |
Output is correct |
48 |
Correct |
129 ms |
48428 KB |
Output is correct |
49 |
Correct |
104 ms |
47556 KB |
Output is correct |
50 |
Correct |
149 ms |
48388 KB |
Output is correct |
51 |
Correct |
159 ms |
49152 KB |
Output is correct |
52 |
Correct |
152 ms |
49156 KB |
Output is correct |
53 |
Correct |
116 ms |
48036 KB |
Output is correct |
54 |
Correct |
152 ms |
49300 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
147 ms |
47564 KB |
Output is correct |
2 |
Correct |
157 ms |
47960 KB |
Output is correct |
3 |
Correct |
155 ms |
48120 KB |
Output is correct |
4 |
Correct |
114 ms |
46424 KB |
Output is correct |
5 |
Correct |
119 ms |
47332 KB |
Output is correct |
6 |
Correct |
154 ms |
47980 KB |
Output is correct |
7 |
Correct |
89 ms |
46228 KB |
Output is correct |
8 |
Correct |
78 ms |
46024 KB |
Output is correct |
9 |
Correct |
116 ms |
47100 KB |
Output is correct |
10 |
Correct |
111 ms |
45876 KB |
Output is correct |
11 |
Correct |
133 ms |
47296 KB |
Output is correct |
12 |
Correct |
147 ms |
47320 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
40428 KB |
Output is correct |
2 |
Correct |
21 ms |
40532 KB |
Output is correct |
3 |
Correct |
21 ms |
40408 KB |
Output is correct |
4 |
Correct |
23 ms |
40532 KB |
Output is correct |
5 |
Correct |
21 ms |
40472 KB |
Output is correct |
6 |
Correct |
20 ms |
40404 KB |
Output is correct |
7 |
Correct |
20 ms |
40484 KB |
Output is correct |
8 |
Correct |
19 ms |
40532 KB |
Output is correct |
9 |
Correct |
19 ms |
40560 KB |
Output is correct |
10 |
Correct |
20 ms |
40532 KB |
Output is correct |
11 |
Correct |
20 ms |
40536 KB |
Output is correct |
12 |
Correct |
22 ms |
40532 KB |
Output is correct |
13 |
Correct |
19 ms |
40532 KB |
Output is correct |
14 |
Correct |
21 ms |
40520 KB |
Output is correct |
15 |
Correct |
24 ms |
40408 KB |
Output is correct |
16 |
Correct |
24 ms |
40524 KB |
Output is correct |
17 |
Correct |
24 ms |
40504 KB |
Output is correct |
18 |
Correct |
22 ms |
40540 KB |
Output is correct |
19 |
Correct |
19 ms |
40540 KB |
Output is correct |
20 |
Correct |
20 ms |
40532 KB |
Output is correct |
21 |
Correct |
20 ms |
40532 KB |
Output is correct |
22 |
Correct |
20 ms |
40520 KB |
Output is correct |
23 |
Correct |
19 ms |
40520 KB |
Output is correct |
24 |
Correct |
22 ms |
40540 KB |
Output is correct |
25 |
Correct |
24 ms |
40540 KB |
Output is correct |
26 |
Correct |
21 ms |
40524 KB |
Output is correct |
27 |
Correct |
23 ms |
40532 KB |
Output is correct |
28 |
Correct |
22 ms |
40536 KB |
Output is correct |
29 |
Correct |
21 ms |
40528 KB |
Output is correct |
30 |
Correct |
20 ms |
40532 KB |
Output is correct |
31 |
Correct |
19 ms |
40480 KB |
Output is correct |
32 |
Correct |
20 ms |
40512 KB |
Output is correct |
33 |
Correct |
22 ms |
40476 KB |
Output is correct |
34 |
Correct |
22 ms |
40532 KB |
Output is correct |
35 |
Correct |
29 ms |
40516 KB |
Output is correct |
36 |
Correct |
21 ms |
40496 KB |
Output is correct |
37 |
Correct |
25 ms |
40408 KB |
Output is correct |
38 |
Correct |
21 ms |
40532 KB |
Output is correct |
39 |
Correct |
137 ms |
49244 KB |
Output is correct |
40 |
Correct |
138 ms |
49128 KB |
Output is correct |
41 |
Correct |
152 ms |
49040 KB |
Output is correct |
42 |
Correct |
123 ms |
49112 KB |
Output is correct |
43 |
Correct |
122 ms |
49216 KB |
Output is correct |
44 |
Correct |
137 ms |
49188 KB |
Output is correct |
45 |
Correct |
82 ms |
47404 KB |
Output is correct |
46 |
Correct |
73 ms |
47548 KB |
Output is correct |
47 |
Correct |
120 ms |
48500 KB |
Output is correct |
48 |
Correct |
169 ms |
49132 KB |
Output is correct |
49 |
Correct |
161 ms |
48836 KB |
Output is correct |
50 |
Correct |
117 ms |
49100 KB |
Output is correct |
51 |
Correct |
105 ms |
48324 KB |
Output is correct |
52 |
Correct |
121 ms |
49156 KB |
Output is correct |
53 |
Correct |
121 ms |
48868 KB |
Output is correct |
54 |
Correct |
135 ms |
49188 KB |
Output is correct |
55 |
Correct |
137 ms |
48452 KB |
Output is correct |
56 |
Correct |
121 ms |
47952 KB |
Output is correct |
57 |
Correct |
69 ms |
46832 KB |
Output is correct |
58 |
Correct |
87 ms |
47396 KB |
Output is correct |
59 |
Correct |
130 ms |
48048 KB |
Output is correct |
60 |
Correct |
143 ms |
48992 KB |
Output is correct |
61 |
Correct |
162 ms |
48968 KB |
Output is correct |
62 |
Correct |
161 ms |
48480 KB |
Output is correct |
63 |
Correct |
154 ms |
48972 KB |
Output is correct |
64 |
Correct |
147 ms |
49064 KB |
Output is correct |
65 |
Correct |
118 ms |
47924 KB |
Output is correct |
66 |
Correct |
129 ms |
48428 KB |
Output is correct |
67 |
Correct |
104 ms |
47556 KB |
Output is correct |
68 |
Correct |
149 ms |
48388 KB |
Output is correct |
69 |
Correct |
159 ms |
49152 KB |
Output is correct |
70 |
Correct |
152 ms |
49156 KB |
Output is correct |
71 |
Correct |
116 ms |
48036 KB |
Output is correct |
72 |
Correct |
152 ms |
49300 KB |
Output is correct |
73 |
Correct |
147 ms |
47564 KB |
Output is correct |
74 |
Correct |
157 ms |
47960 KB |
Output is correct |
75 |
Correct |
155 ms |
48120 KB |
Output is correct |
76 |
Correct |
114 ms |
46424 KB |
Output is correct |
77 |
Correct |
119 ms |
47332 KB |
Output is correct |
78 |
Correct |
154 ms |
47980 KB |
Output is correct |
79 |
Correct |
89 ms |
46228 KB |
Output is correct |
80 |
Correct |
78 ms |
46024 KB |
Output is correct |
81 |
Correct |
116 ms |
47100 KB |
Output is correct |
82 |
Correct |
111 ms |
45876 KB |
Output is correct |
83 |
Correct |
133 ms |
47296 KB |
Output is correct |
84 |
Correct |
147 ms |
47320 KB |
Output is correct |
85 |
Correct |
152 ms |
48584 KB |
Output is correct |
86 |
Correct |
186 ms |
49196 KB |
Output is correct |
87 |
Correct |
124 ms |
48456 KB |
Output is correct |
88 |
Correct |
162 ms |
49128 KB |
Output is correct |
89 |
Correct |
111 ms |
46384 KB |
Output is correct |
90 |
Correct |
156 ms |
49064 KB |
Output is correct |
91 |
Correct |
169 ms |
48028 KB |
Output is correct |
92 |
Correct |
120 ms |
47820 KB |
Output is correct |
93 |
Correct |
149 ms |
49152 KB |
Output is correct |
94 |
Correct |
159 ms |
49952 KB |
Output is correct |
95 |
Correct |
152 ms |
50208 KB |
Output is correct |
96 |
Correct |
145 ms |
50404 KB |
Output is correct |
97 |
Correct |
159 ms |
50392 KB |
Output is correct |
98 |
Correct |
134 ms |
49280 KB |
Output is correct |
99 |
Correct |
94 ms |
49076 KB |
Output is correct |
100 |
Correct |
116 ms |
48588 KB |
Output is correct |
101 |
Correct |
136 ms |
49660 KB |
Output is correct |
102 |
Correct |
137 ms |
50264 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
24 ms |
40428 KB |
Output is correct |
2 |
Correct |
21 ms |
40532 KB |
Output is correct |
3 |
Correct |
21 ms |
40408 KB |
Output is correct |
4 |
Correct |
23 ms |
40532 KB |
Output is correct |
5 |
Correct |
21 ms |
40472 KB |
Output is correct |
6 |
Correct |
20 ms |
40404 KB |
Output is correct |
7 |
Correct |
20 ms |
40484 KB |
Output is correct |
8 |
Correct |
19 ms |
40532 KB |
Output is correct |
9 |
Correct |
19 ms |
40560 KB |
Output is correct |
10 |
Correct |
20 ms |
40532 KB |
Output is correct |
11 |
Correct |
20 ms |
40536 KB |
Output is correct |
12 |
Correct |
22 ms |
40532 KB |
Output is correct |
13 |
Correct |
19 ms |
40532 KB |
Output is correct |
14 |
Correct |
21 ms |
40520 KB |
Output is correct |
15 |
Correct |
24 ms |
40408 KB |
Output is correct |
16 |
Correct |
24 ms |
40524 KB |
Output is correct |
17 |
Correct |
24 ms |
40504 KB |
Output is correct |
18 |
Correct |
22 ms |
40540 KB |
Output is correct |
19 |
Correct |
19 ms |
40540 KB |
Output is correct |
20 |
Correct |
20 ms |
40532 KB |
Output is correct |
21 |
Correct |
20 ms |
40532 KB |
Output is correct |
22 |
Correct |
20 ms |
40520 KB |
Output is correct |
23 |
Correct |
19 ms |
40520 KB |
Output is correct |
24 |
Correct |
22 ms |
40540 KB |
Output is correct |
25 |
Correct |
24 ms |
40540 KB |
Output is correct |
26 |
Correct |
21 ms |
40524 KB |
Output is correct |
27 |
Correct |
23 ms |
40532 KB |
Output is correct |
28 |
Correct |
22 ms |
40536 KB |
Output is correct |
29 |
Correct |
21 ms |
40528 KB |
Output is correct |
30 |
Correct |
20 ms |
40532 KB |
Output is correct |
31 |
Correct |
19 ms |
40480 KB |
Output is correct |
32 |
Correct |
20 ms |
40512 KB |
Output is correct |
33 |
Correct |
22 ms |
40476 KB |
Output is correct |
34 |
Correct |
22 ms |
40532 KB |
Output is correct |
35 |
Correct |
29 ms |
40516 KB |
Output is correct |
36 |
Correct |
21 ms |
40496 KB |
Output is correct |
37 |
Correct |
25 ms |
40408 KB |
Output is correct |
38 |
Correct |
21 ms |
40532 KB |
Output is correct |
39 |
Correct |
137 ms |
49244 KB |
Output is correct |
40 |
Correct |
138 ms |
49128 KB |
Output is correct |
41 |
Correct |
152 ms |
49040 KB |
Output is correct |
42 |
Correct |
123 ms |
49112 KB |
Output is correct |
43 |
Correct |
122 ms |
49216 KB |
Output is correct |
44 |
Correct |
137 ms |
49188 KB |
Output is correct |
45 |
Correct |
82 ms |
47404 KB |
Output is correct |
46 |
Correct |
73 ms |
47548 KB |
Output is correct |
47 |
Correct |
120 ms |
48500 KB |
Output is correct |
48 |
Correct |
169 ms |
49132 KB |
Output is correct |
49 |
Correct |
161 ms |
48836 KB |
Output is correct |
50 |
Correct |
117 ms |
49100 KB |
Output is correct |
51 |
Correct |
105 ms |
48324 KB |
Output is correct |
52 |
Correct |
121 ms |
49156 KB |
Output is correct |
53 |
Correct |
121 ms |
48868 KB |
Output is correct |
54 |
Correct |
135 ms |
49188 KB |
Output is correct |
55 |
Correct |
590 ms |
72408 KB |
Output is correct |
56 |
Correct |
420 ms |
68552 KB |
Output is correct |
57 |
Correct |
665 ms |
74292 KB |
Output is correct |
58 |
Correct |
498 ms |
68596 KB |
Output is correct |
59 |
Correct |
404 ms |
68472 KB |
Output is correct |
60 |
Correct |
623 ms |
74096 KB |
Output is correct |
61 |
Correct |
262 ms |
68724 KB |
Output is correct |
62 |
Correct |
313 ms |
68792 KB |
Output is correct |
63 |
Correct |
614 ms |
73436 KB |
Output is correct |
64 |
Correct |
545 ms |
73364 KB |
Output is correct |
65 |
Correct |
558 ms |
69840 KB |
Output is correct |
66 |
Correct |
563 ms |
73888 KB |
Output is correct |
67 |
Correct |
670 ms |
70232 KB |
Output is correct |
68 |
Correct |
598 ms |
73996 KB |
Output is correct |
69 |
Correct |
610 ms |
73856 KB |
Output is correct |
70 |
Correct |
615 ms |
73784 KB |
Output is correct |
71 |
Correct |
613 ms |
73956 KB |
Output is correct |
72 |
Correct |
579 ms |
72012 KB |
Output is correct |
73 |
Correct |
635 ms |
73880 KB |
Output is correct |
74 |
Correct |
605 ms |
72264 KB |
Output is correct |
75 |
Correct |
597 ms |
73880 KB |
Output is correct |
76 |
Correct |
651 ms |
73896 KB |
Output is correct |
77 |
Correct |
682 ms |
73888 KB |
Output is correct |
78 |
Correct |
586 ms |
73876 KB |
Output is correct |
79 |
Correct |
495 ms |
70960 KB |
Output is correct |
80 |
Correct |
496 ms |
71500 KB |
Output is correct |
81 |
Correct |
449 ms |
72840 KB |
Output is correct |
82 |
Correct |
137 ms |
48452 KB |
Output is correct |
83 |
Correct |
121 ms |
47952 KB |
Output is correct |
84 |
Correct |
69 ms |
46832 KB |
Output is correct |
85 |
Correct |
87 ms |
47396 KB |
Output is correct |
86 |
Correct |
130 ms |
48048 KB |
Output is correct |
87 |
Correct |
143 ms |
48992 KB |
Output is correct |
88 |
Correct |
162 ms |
48968 KB |
Output is correct |
89 |
Correct |
161 ms |
48480 KB |
Output is correct |
90 |
Correct |
154 ms |
48972 KB |
Output is correct |
91 |
Correct |
147 ms |
49064 KB |
Output is correct |
92 |
Correct |
118 ms |
47924 KB |
Output is correct |
93 |
Correct |
129 ms |
48428 KB |
Output is correct |
94 |
Correct |
104 ms |
47556 KB |
Output is correct |
95 |
Correct |
149 ms |
48388 KB |
Output is correct |
96 |
Correct |
159 ms |
49152 KB |
Output is correct |
97 |
Correct |
152 ms |
49156 KB |
Output is correct |
98 |
Correct |
116 ms |
48036 KB |
Output is correct |
99 |
Correct |
152 ms |
49300 KB |
Output is correct |
100 |
Correct |
147 ms |
47564 KB |
Output is correct |
101 |
Correct |
157 ms |
47960 KB |
Output is correct |
102 |
Correct |
155 ms |
48120 KB |
Output is correct |
103 |
Correct |
114 ms |
46424 KB |
Output is correct |
104 |
Correct |
119 ms |
47332 KB |
Output is correct |
105 |
Correct |
154 ms |
47980 KB |
Output is correct |
106 |
Correct |
89 ms |
46228 KB |
Output is correct |
107 |
Correct |
78 ms |
46024 KB |
Output is correct |
108 |
Correct |
116 ms |
47100 KB |
Output is correct |
109 |
Correct |
111 ms |
45876 KB |
Output is correct |
110 |
Correct |
133 ms |
47296 KB |
Output is correct |
111 |
Correct |
147 ms |
47320 KB |
Output is correct |
112 |
Correct |
152 ms |
48584 KB |
Output is correct |
113 |
Correct |
186 ms |
49196 KB |
Output is correct |
114 |
Correct |
124 ms |
48456 KB |
Output is correct |
115 |
Correct |
162 ms |
49128 KB |
Output is correct |
116 |
Correct |
111 ms |
46384 KB |
Output is correct |
117 |
Correct |
156 ms |
49064 KB |
Output is correct |
118 |
Correct |
169 ms |
48028 KB |
Output is correct |
119 |
Correct |
120 ms |
47820 KB |
Output is correct |
120 |
Correct |
149 ms |
49152 KB |
Output is correct |
121 |
Correct |
159 ms |
49952 KB |
Output is correct |
122 |
Correct |
152 ms |
50208 KB |
Output is correct |
123 |
Correct |
145 ms |
50404 KB |
Output is correct |
124 |
Correct |
159 ms |
50392 KB |
Output is correct |
125 |
Correct |
134 ms |
49280 KB |
Output is correct |
126 |
Correct |
94 ms |
49076 KB |
Output is correct |
127 |
Correct |
116 ms |
48588 KB |
Output is correct |
128 |
Correct |
136 ms |
49660 KB |
Output is correct |
129 |
Correct |
137 ms |
50264 KB |
Output is correct |
130 |
Correct |
700 ms |
80560 KB |
Output is correct |
131 |
Correct |
519 ms |
72964 KB |
Output is correct |
132 |
Correct |
824 ms |
80600 KB |
Output is correct |
133 |
Correct |
679 ms |
79568 KB |
Output is correct |
134 |
Correct |
583 ms |
76820 KB |
Output is correct |
135 |
Correct |
636 ms |
80836 KB |
Output is correct |
136 |
Correct |
771 ms |
80252 KB |
Output is correct |
137 |
Correct |
724 ms |
80240 KB |
Output is correct |
138 |
Correct |
728 ms |
76412 KB |
Output is correct |
139 |
Correct |
902 ms |
80416 KB |
Output is correct |
140 |
Correct |
724 ms |
77460 KB |
Output is correct |
141 |
Correct |
648 ms |
80352 KB |
Output is correct |
142 |
Correct |
740 ms |
80388 KB |
Output is correct |
143 |
Correct |
862 ms |
80424 KB |
Output is correct |
144 |
Correct |
585 ms |
78384 KB |
Output is correct |
145 |
Correct |
713 ms |
80380 KB |
Output is correct |
146 |
Correct |
735 ms |
79240 KB |
Output is correct |
147 |
Correct |
736 ms |
80304 KB |
Output is correct |
148 |
Correct |
710 ms |
80300 KB |
Output is correct |
149 |
Correct |
596 ms |
80384 KB |
Output is correct |
150 |
Correct |
414 ms |
75192 KB |
Output is correct |
151 |
Correct |
528 ms |
77704 KB |
Output is correct |
152 |
Correct |
509 ms |
77668 KB |
Output is correct |
153 |
Correct |
453 ms |
79432 KB |
Output is correct |