#include <bits/stdc++.h>
using namespace std;
#define ar array
#define sz(v) int(std::size(v))
using i64 = long long;
const int N = 2.5e5+5, M = 2.5e5+5, Q = 2.5e5+5;
const int N_ = 1 << 18;
int n, m, q;
int who[M];
vector<pair<int, int>> upd_add[N], upd_rem[N];
vector<pair<int, i64>> qry[N];
int ans[Q];
struct {
i64 sum[N_ * 2];
void upd(int i, int x) {
sum[i += N_] = x;
while (i /= 2) sum[i] = sum[i * 2] + sum[i * 2 + 1];
}
i64 qry(int l, int r) {
i64 x = 0;
for (l += N_, r += N_; l <= r; l /= 2, r /= 2) {
if (l & 1) x += sum[l++];
if (~r & 1) x += sum[r--];
}
return x;
}
i64 walk(i64 x) {
int i = 0;
x--;
while (i < N_) {
if (sum[i * 2] <= x) {
x -= sum[i * 2];
i = i * 2 + 1;
} else i *= 2;
}
return i - N_;
}
} seg_s;
typedef ar<i64, 2> T;
T operator+(const T one, const T two) {
return {one[0] + two[0], max(one[1] + two[0], two[1])};
}
struct {
T info[N_ * 2];
void upd(int i, int x) {
info[i += N_] = T{x, max(0, x)};
while (i /= 2) info[i] = info[i * 2] + info[i * 2 + 1];
}
T qry(int l, int r) {
T xl{0, 0}, xr{0, 0};
for (l += N_, r += N_; l <= r; l /= 2, r /= 2) {
if (l & 1) xl = xl + info[l++];
if (~r & 1) xr = info[r--] + xr;
}
return xl + xr;
}
} seg_k;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n >> m >> q;
for (int h = 0; h < q; h++) {
int t;
cin >> t;
if (t == 1) {
int l, r, c, k;
cin >> l >> r >> c >> k, l--, r--;
who[h] = c;
upd_add[l].push_back({h, k});
upd_add[r + 1].push_back({h, 0});
} else if (t == 2) {
int l, r, k;
cin >> l >> r >> k, l--, r--;
upd_rem[l].push_back({h, k});
upd_rem[r + 1].push_back({h, 0});
} else {
int i; i64 k;
cin >> i >> k, i--;
qry[i].push_back({h, k});
}
ans[h] = -1;
}
for (int i = 0; i < n; i++) {
for (auto [h, k] : upd_add[i]) {
seg_s.upd(h, k);
seg_k.upd(h, k);
}
for (auto [h, k] : upd_rem[i]) {
seg_k.upd(h, -k);
}
for (auto [h, k] : qry[i]) {
i64 num_left = seg_k.qry(0, h)[1];
i64 total = seg_s.qry(0, h);
ans[h] = num_left < k ? 0 : who[seg_s.walk(total - num_left + k)];
}
}
for (int h = 0; h < q; h++) if (~ans[h]) cout << ans[h] << '\n';
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
29016 KB |
Output is correct |
2 |
Correct |
7 ms |
29276 KB |
Output is correct |
3 |
Correct |
7 ms |
29140 KB |
Output is correct |
4 |
Correct |
6 ms |
29272 KB |
Output is correct |
5 |
Correct |
6 ms |
29020 KB |
Output is correct |
6 |
Correct |
6 ms |
29020 KB |
Output is correct |
7 |
Correct |
7 ms |
29276 KB |
Output is correct |
8 |
Correct |
7 ms |
29276 KB |
Output is correct |
9 |
Correct |
7 ms |
29276 KB |
Output is correct |
10 |
Correct |
7 ms |
29276 KB |
Output is correct |
11 |
Correct |
6 ms |
29276 KB |
Output is correct |
12 |
Correct |
6 ms |
29276 KB |
Output is correct |
13 |
Correct |
6 ms |
29020 KB |
Output is correct |
14 |
Correct |
6 ms |
29020 KB |
Output is correct |
15 |
Correct |
7 ms |
29020 KB |
Output is correct |
16 |
Correct |
6 ms |
29020 KB |
Output is correct |
17 |
Correct |
6 ms |
29020 KB |
Output is correct |
18 |
Correct |
6 ms |
29276 KB |
Output is correct |
19 |
Correct |
6 ms |
29020 KB |
Output is correct |
20 |
Correct |
6 ms |
29276 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
29016 KB |
Output is correct |
2 |
Correct |
7 ms |
29276 KB |
Output is correct |
3 |
Correct |
7 ms |
29140 KB |
Output is correct |
4 |
Correct |
6 ms |
29272 KB |
Output is correct |
5 |
Correct |
6 ms |
29020 KB |
Output is correct |
6 |
Correct |
6 ms |
29020 KB |
Output is correct |
7 |
Correct |
7 ms |
29276 KB |
Output is correct |
8 |
Correct |
7 ms |
29276 KB |
Output is correct |
9 |
Correct |
7 ms |
29276 KB |
Output is correct |
10 |
Correct |
7 ms |
29276 KB |
Output is correct |
11 |
Correct |
6 ms |
29276 KB |
Output is correct |
12 |
Correct |
6 ms |
29276 KB |
Output is correct |
13 |
Correct |
6 ms |
29020 KB |
Output is correct |
14 |
Correct |
6 ms |
29020 KB |
Output is correct |
15 |
Correct |
7 ms |
29020 KB |
Output is correct |
16 |
Correct |
6 ms |
29020 KB |
Output is correct |
17 |
Correct |
6 ms |
29020 KB |
Output is correct |
18 |
Correct |
6 ms |
29276 KB |
Output is correct |
19 |
Correct |
6 ms |
29020 KB |
Output is correct |
20 |
Correct |
6 ms |
29276 KB |
Output is correct |
21 |
Correct |
6 ms |
29276 KB |
Output is correct |
22 |
Correct |
6 ms |
29260 KB |
Output is correct |
23 |
Correct |
6 ms |
29276 KB |
Output is correct |
24 |
Correct |
7 ms |
29276 KB |
Output is correct |
25 |
Correct |
6 ms |
29016 KB |
Output is correct |
26 |
Correct |
6 ms |
29276 KB |
Output is correct |
27 |
Correct |
6 ms |
29276 KB |
Output is correct |
28 |
Correct |
6 ms |
29276 KB |
Output is correct |
29 |
Correct |
7 ms |
29276 KB |
Output is correct |
30 |
Correct |
6 ms |
29276 KB |
Output is correct |
31 |
Correct |
6 ms |
29276 KB |
Output is correct |
32 |
Correct |
6 ms |
29284 KB |
Output is correct |
33 |
Correct |
6 ms |
29020 KB |
Output is correct |
34 |
Correct |
6 ms |
29020 KB |
Output is correct |
35 |
Correct |
6 ms |
29020 KB |
Output is correct |
36 |
Correct |
6 ms |
29020 KB |
Output is correct |
37 |
Correct |
6 ms |
29020 KB |
Output is correct |
38 |
Correct |
6 ms |
29276 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
41 ms |
31836 KB |
Output is correct |
2 |
Correct |
48 ms |
32088 KB |
Output is correct |
3 |
Correct |
41 ms |
29012 KB |
Output is correct |
4 |
Correct |
50 ms |
31912 KB |
Output is correct |
5 |
Correct |
44 ms |
31828 KB |
Output is correct |
6 |
Correct |
45 ms |
32028 KB |
Output is correct |
7 |
Correct |
24 ms |
30544 KB |
Output is correct |
8 |
Correct |
27 ms |
30948 KB |
Output is correct |
9 |
Correct |
40 ms |
31824 KB |
Output is correct |
10 |
Correct |
41 ms |
32068 KB |
Output is correct |
11 |
Correct |
43 ms |
30300 KB |
Output is correct |
12 |
Correct |
42 ms |
31824 KB |
Output is correct |
13 |
Correct |
36 ms |
31324 KB |
Output is correct |
14 |
Correct |
42 ms |
31852 KB |
Output is correct |
15 |
Correct |
43 ms |
31320 KB |
Output is correct |
16 |
Correct |
43 ms |
31580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
213 ms |
41624 KB |
Output is correct |
2 |
Correct |
152 ms |
39252 KB |
Output is correct |
3 |
Correct |
248 ms |
42724 KB |
Output is correct |
4 |
Correct |
184 ms |
39504 KB |
Output is correct |
5 |
Correct |
172 ms |
39096 KB |
Output is correct |
6 |
Correct |
250 ms |
42532 KB |
Output is correct |
7 |
Correct |
88 ms |
37540 KB |
Output is correct |
8 |
Correct |
91 ms |
36544 KB |
Output is correct |
9 |
Correct |
263 ms |
41140 KB |
Output is correct |
10 |
Correct |
228 ms |
41292 KB |
Output is correct |
11 |
Correct |
276 ms |
41904 KB |
Output is correct |
12 |
Correct |
219 ms |
42584 KB |
Output is correct |
13 |
Correct |
236 ms |
42064 KB |
Output is correct |
14 |
Correct |
244 ms |
42468 KB |
Output is correct |
15 |
Correct |
245 ms |
42468 KB |
Output is correct |
16 |
Correct |
240 ms |
42724 KB |
Output is correct |
17 |
Correct |
269 ms |
42488 KB |
Output is correct |
18 |
Correct |
235 ms |
42068 KB |
Output is correct |
19 |
Correct |
237 ms |
42604 KB |
Output is correct |
20 |
Correct |
224 ms |
42320 KB |
Output is correct |
21 |
Correct |
254 ms |
42580 KB |
Output is correct |
22 |
Correct |
261 ms |
42560 KB |
Output is correct |
23 |
Correct |
228 ms |
42356 KB |
Output is correct |
24 |
Correct |
229 ms |
42440 KB |
Output is correct |
25 |
Correct |
155 ms |
38992 KB |
Output is correct |
26 |
Correct |
187 ms |
39300 KB |
Output is correct |
27 |
Correct |
179 ms |
41304 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
29016 KB |
Output is correct |
2 |
Correct |
7 ms |
29276 KB |
Output is correct |
3 |
Correct |
7 ms |
29140 KB |
Output is correct |
4 |
Correct |
6 ms |
29272 KB |
Output is correct |
5 |
Correct |
6 ms |
29020 KB |
Output is correct |
6 |
Correct |
6 ms |
29020 KB |
Output is correct |
7 |
Correct |
7 ms |
29276 KB |
Output is correct |
8 |
Correct |
7 ms |
29276 KB |
Output is correct |
9 |
Correct |
7 ms |
29276 KB |
Output is correct |
10 |
Correct |
7 ms |
29276 KB |
Output is correct |
11 |
Correct |
6 ms |
29276 KB |
Output is correct |
12 |
Correct |
6 ms |
29276 KB |
Output is correct |
13 |
Correct |
6 ms |
29020 KB |
Output is correct |
14 |
Correct |
6 ms |
29020 KB |
Output is correct |
15 |
Correct |
7 ms |
29020 KB |
Output is correct |
16 |
Correct |
6 ms |
29020 KB |
Output is correct |
17 |
Correct |
6 ms |
29020 KB |
Output is correct |
18 |
Correct |
6 ms |
29276 KB |
Output is correct |
19 |
Correct |
6 ms |
29020 KB |
Output is correct |
20 |
Correct |
6 ms |
29276 KB |
Output is correct |
21 |
Correct |
41 ms |
31836 KB |
Output is correct |
22 |
Correct |
48 ms |
32088 KB |
Output is correct |
23 |
Correct |
41 ms |
29012 KB |
Output is correct |
24 |
Correct |
50 ms |
31912 KB |
Output is correct |
25 |
Correct |
44 ms |
31828 KB |
Output is correct |
26 |
Correct |
45 ms |
32028 KB |
Output is correct |
27 |
Correct |
24 ms |
30544 KB |
Output is correct |
28 |
Correct |
27 ms |
30948 KB |
Output is correct |
29 |
Correct |
40 ms |
31824 KB |
Output is correct |
30 |
Correct |
41 ms |
32068 KB |
Output is correct |
31 |
Correct |
43 ms |
30300 KB |
Output is correct |
32 |
Correct |
42 ms |
31824 KB |
Output is correct |
33 |
Correct |
36 ms |
31324 KB |
Output is correct |
34 |
Correct |
42 ms |
31852 KB |
Output is correct |
35 |
Correct |
43 ms |
31320 KB |
Output is correct |
36 |
Correct |
43 ms |
31580 KB |
Output is correct |
37 |
Correct |
44 ms |
32084 KB |
Output is correct |
38 |
Correct |
35 ms |
31320 KB |
Output is correct |
39 |
Correct |
21 ms |
30380 KB |
Output is correct |
40 |
Correct |
25 ms |
30624 KB |
Output is correct |
41 |
Correct |
41 ms |
32084 KB |
Output is correct |
42 |
Correct |
43 ms |
32084 KB |
Output is correct |
43 |
Correct |
50 ms |
31948 KB |
Output is correct |
44 |
Correct |
45 ms |
32012 KB |
Output is correct |
45 |
Correct |
45 ms |
32024 KB |
Output is correct |
46 |
Correct |
42 ms |
31952 KB |
Output is correct |
47 |
Correct |
29 ms |
30672 KB |
Output is correct |
48 |
Correct |
36 ms |
31064 KB |
Output is correct |
49 |
Correct |
34 ms |
31264 KB |
Output is correct |
50 |
Correct |
36 ms |
31576 KB |
Output is correct |
51 |
Correct |
43 ms |
32080 KB |
Output is correct |
52 |
Correct |
42 ms |
32092 KB |
Output is correct |
53 |
Correct |
37 ms |
31068 KB |
Output is correct |
54 |
Correct |
42 ms |
31580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
42 ms |
28252 KB |
Output is correct |
2 |
Correct |
45 ms |
31552 KB |
Output is correct |
3 |
Correct |
50 ms |
27724 KB |
Output is correct |
4 |
Correct |
35 ms |
31056 KB |
Output is correct |
5 |
Correct |
43 ms |
31480 KB |
Output is correct |
6 |
Correct |
49 ms |
31628 KB |
Output is correct |
7 |
Correct |
28 ms |
30576 KB |
Output is correct |
8 |
Correct |
27 ms |
30416 KB |
Output is correct |
9 |
Correct |
37 ms |
30804 KB |
Output is correct |
10 |
Correct |
30 ms |
30556 KB |
Output is correct |
11 |
Correct |
41 ms |
30996 KB |
Output is correct |
12 |
Correct |
41 ms |
31060 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
29016 KB |
Output is correct |
2 |
Correct |
7 ms |
29276 KB |
Output is correct |
3 |
Correct |
7 ms |
29140 KB |
Output is correct |
4 |
Correct |
6 ms |
29272 KB |
Output is correct |
5 |
Correct |
6 ms |
29020 KB |
Output is correct |
6 |
Correct |
6 ms |
29020 KB |
Output is correct |
7 |
Correct |
7 ms |
29276 KB |
Output is correct |
8 |
Correct |
7 ms |
29276 KB |
Output is correct |
9 |
Correct |
7 ms |
29276 KB |
Output is correct |
10 |
Correct |
7 ms |
29276 KB |
Output is correct |
11 |
Correct |
6 ms |
29276 KB |
Output is correct |
12 |
Correct |
6 ms |
29276 KB |
Output is correct |
13 |
Correct |
6 ms |
29020 KB |
Output is correct |
14 |
Correct |
6 ms |
29020 KB |
Output is correct |
15 |
Correct |
7 ms |
29020 KB |
Output is correct |
16 |
Correct |
6 ms |
29020 KB |
Output is correct |
17 |
Correct |
6 ms |
29020 KB |
Output is correct |
18 |
Correct |
6 ms |
29276 KB |
Output is correct |
19 |
Correct |
6 ms |
29020 KB |
Output is correct |
20 |
Correct |
6 ms |
29276 KB |
Output is correct |
21 |
Correct |
6 ms |
29276 KB |
Output is correct |
22 |
Correct |
6 ms |
29260 KB |
Output is correct |
23 |
Correct |
6 ms |
29276 KB |
Output is correct |
24 |
Correct |
7 ms |
29276 KB |
Output is correct |
25 |
Correct |
6 ms |
29016 KB |
Output is correct |
26 |
Correct |
6 ms |
29276 KB |
Output is correct |
27 |
Correct |
6 ms |
29276 KB |
Output is correct |
28 |
Correct |
6 ms |
29276 KB |
Output is correct |
29 |
Correct |
7 ms |
29276 KB |
Output is correct |
30 |
Correct |
6 ms |
29276 KB |
Output is correct |
31 |
Correct |
6 ms |
29276 KB |
Output is correct |
32 |
Correct |
6 ms |
29284 KB |
Output is correct |
33 |
Correct |
6 ms |
29020 KB |
Output is correct |
34 |
Correct |
6 ms |
29020 KB |
Output is correct |
35 |
Correct |
6 ms |
29020 KB |
Output is correct |
36 |
Correct |
6 ms |
29020 KB |
Output is correct |
37 |
Correct |
6 ms |
29020 KB |
Output is correct |
38 |
Correct |
6 ms |
29276 KB |
Output is correct |
39 |
Correct |
41 ms |
31836 KB |
Output is correct |
40 |
Correct |
48 ms |
32088 KB |
Output is correct |
41 |
Correct |
41 ms |
29012 KB |
Output is correct |
42 |
Correct |
50 ms |
31912 KB |
Output is correct |
43 |
Correct |
44 ms |
31828 KB |
Output is correct |
44 |
Correct |
45 ms |
32028 KB |
Output is correct |
45 |
Correct |
24 ms |
30544 KB |
Output is correct |
46 |
Correct |
27 ms |
30948 KB |
Output is correct |
47 |
Correct |
40 ms |
31824 KB |
Output is correct |
48 |
Correct |
41 ms |
32068 KB |
Output is correct |
49 |
Correct |
43 ms |
30300 KB |
Output is correct |
50 |
Correct |
42 ms |
31824 KB |
Output is correct |
51 |
Correct |
36 ms |
31324 KB |
Output is correct |
52 |
Correct |
42 ms |
31852 KB |
Output is correct |
53 |
Correct |
43 ms |
31320 KB |
Output is correct |
54 |
Correct |
43 ms |
31580 KB |
Output is correct |
55 |
Correct |
44 ms |
32084 KB |
Output is correct |
56 |
Correct |
35 ms |
31320 KB |
Output is correct |
57 |
Correct |
21 ms |
30380 KB |
Output is correct |
58 |
Correct |
25 ms |
30624 KB |
Output is correct |
59 |
Correct |
41 ms |
32084 KB |
Output is correct |
60 |
Correct |
43 ms |
32084 KB |
Output is correct |
61 |
Correct |
50 ms |
31948 KB |
Output is correct |
62 |
Correct |
45 ms |
32012 KB |
Output is correct |
63 |
Correct |
45 ms |
32024 KB |
Output is correct |
64 |
Correct |
42 ms |
31952 KB |
Output is correct |
65 |
Correct |
29 ms |
30672 KB |
Output is correct |
66 |
Correct |
36 ms |
31064 KB |
Output is correct |
67 |
Correct |
34 ms |
31264 KB |
Output is correct |
68 |
Correct |
36 ms |
31576 KB |
Output is correct |
69 |
Correct |
43 ms |
32080 KB |
Output is correct |
70 |
Correct |
42 ms |
32092 KB |
Output is correct |
71 |
Correct |
37 ms |
31068 KB |
Output is correct |
72 |
Correct |
42 ms |
31580 KB |
Output is correct |
73 |
Correct |
42 ms |
28252 KB |
Output is correct |
74 |
Correct |
45 ms |
31552 KB |
Output is correct |
75 |
Correct |
50 ms |
27724 KB |
Output is correct |
76 |
Correct |
35 ms |
31056 KB |
Output is correct |
77 |
Correct |
43 ms |
31480 KB |
Output is correct |
78 |
Correct |
49 ms |
31628 KB |
Output is correct |
79 |
Correct |
28 ms |
30576 KB |
Output is correct |
80 |
Correct |
27 ms |
30416 KB |
Output is correct |
81 |
Correct |
37 ms |
30804 KB |
Output is correct |
82 |
Correct |
30 ms |
30556 KB |
Output is correct |
83 |
Correct |
41 ms |
30996 KB |
Output is correct |
84 |
Correct |
41 ms |
31060 KB |
Output is correct |
85 |
Correct |
44 ms |
31572 KB |
Output is correct |
86 |
Correct |
46 ms |
32084 KB |
Output is correct |
87 |
Correct |
40 ms |
31580 KB |
Output is correct |
88 |
Correct |
60 ms |
31984 KB |
Output is correct |
89 |
Correct |
33 ms |
31064 KB |
Output is correct |
90 |
Correct |
46 ms |
31840 KB |
Output is correct |
91 |
Correct |
38 ms |
31380 KB |
Output is correct |
92 |
Correct |
35 ms |
31316 KB |
Output is correct |
93 |
Correct |
45 ms |
32080 KB |
Output is correct |
94 |
Correct |
45 ms |
32080 KB |
Output is correct |
95 |
Correct |
43 ms |
31824 KB |
Output is correct |
96 |
Correct |
46 ms |
32084 KB |
Output is correct |
97 |
Correct |
47 ms |
32084 KB |
Output is correct |
98 |
Correct |
40 ms |
31572 KB |
Output is correct |
99 |
Correct |
32 ms |
30636 KB |
Output is correct |
100 |
Correct |
34 ms |
30800 KB |
Output is correct |
101 |
Correct |
44 ms |
31364 KB |
Output is correct |
102 |
Correct |
42 ms |
31712 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
6 ms |
29016 KB |
Output is correct |
2 |
Correct |
7 ms |
29276 KB |
Output is correct |
3 |
Correct |
7 ms |
29140 KB |
Output is correct |
4 |
Correct |
6 ms |
29272 KB |
Output is correct |
5 |
Correct |
6 ms |
29020 KB |
Output is correct |
6 |
Correct |
6 ms |
29020 KB |
Output is correct |
7 |
Correct |
7 ms |
29276 KB |
Output is correct |
8 |
Correct |
7 ms |
29276 KB |
Output is correct |
9 |
Correct |
7 ms |
29276 KB |
Output is correct |
10 |
Correct |
7 ms |
29276 KB |
Output is correct |
11 |
Correct |
6 ms |
29276 KB |
Output is correct |
12 |
Correct |
6 ms |
29276 KB |
Output is correct |
13 |
Correct |
6 ms |
29020 KB |
Output is correct |
14 |
Correct |
6 ms |
29020 KB |
Output is correct |
15 |
Correct |
7 ms |
29020 KB |
Output is correct |
16 |
Correct |
6 ms |
29020 KB |
Output is correct |
17 |
Correct |
6 ms |
29020 KB |
Output is correct |
18 |
Correct |
6 ms |
29276 KB |
Output is correct |
19 |
Correct |
6 ms |
29020 KB |
Output is correct |
20 |
Correct |
6 ms |
29276 KB |
Output is correct |
21 |
Correct |
6 ms |
29276 KB |
Output is correct |
22 |
Correct |
6 ms |
29260 KB |
Output is correct |
23 |
Correct |
6 ms |
29276 KB |
Output is correct |
24 |
Correct |
7 ms |
29276 KB |
Output is correct |
25 |
Correct |
6 ms |
29016 KB |
Output is correct |
26 |
Correct |
6 ms |
29276 KB |
Output is correct |
27 |
Correct |
6 ms |
29276 KB |
Output is correct |
28 |
Correct |
6 ms |
29276 KB |
Output is correct |
29 |
Correct |
7 ms |
29276 KB |
Output is correct |
30 |
Correct |
6 ms |
29276 KB |
Output is correct |
31 |
Correct |
6 ms |
29276 KB |
Output is correct |
32 |
Correct |
6 ms |
29284 KB |
Output is correct |
33 |
Correct |
6 ms |
29020 KB |
Output is correct |
34 |
Correct |
6 ms |
29020 KB |
Output is correct |
35 |
Correct |
6 ms |
29020 KB |
Output is correct |
36 |
Correct |
6 ms |
29020 KB |
Output is correct |
37 |
Correct |
6 ms |
29020 KB |
Output is correct |
38 |
Correct |
6 ms |
29276 KB |
Output is correct |
39 |
Correct |
41 ms |
31836 KB |
Output is correct |
40 |
Correct |
48 ms |
32088 KB |
Output is correct |
41 |
Correct |
41 ms |
29012 KB |
Output is correct |
42 |
Correct |
50 ms |
31912 KB |
Output is correct |
43 |
Correct |
44 ms |
31828 KB |
Output is correct |
44 |
Correct |
45 ms |
32028 KB |
Output is correct |
45 |
Correct |
24 ms |
30544 KB |
Output is correct |
46 |
Correct |
27 ms |
30948 KB |
Output is correct |
47 |
Correct |
40 ms |
31824 KB |
Output is correct |
48 |
Correct |
41 ms |
32068 KB |
Output is correct |
49 |
Correct |
43 ms |
30300 KB |
Output is correct |
50 |
Correct |
42 ms |
31824 KB |
Output is correct |
51 |
Correct |
36 ms |
31324 KB |
Output is correct |
52 |
Correct |
42 ms |
31852 KB |
Output is correct |
53 |
Correct |
43 ms |
31320 KB |
Output is correct |
54 |
Correct |
43 ms |
31580 KB |
Output is correct |
55 |
Correct |
213 ms |
41624 KB |
Output is correct |
56 |
Correct |
152 ms |
39252 KB |
Output is correct |
57 |
Correct |
248 ms |
42724 KB |
Output is correct |
58 |
Correct |
184 ms |
39504 KB |
Output is correct |
59 |
Correct |
172 ms |
39096 KB |
Output is correct |
60 |
Correct |
250 ms |
42532 KB |
Output is correct |
61 |
Correct |
88 ms |
37540 KB |
Output is correct |
62 |
Correct |
91 ms |
36544 KB |
Output is correct |
63 |
Correct |
263 ms |
41140 KB |
Output is correct |
64 |
Correct |
228 ms |
41292 KB |
Output is correct |
65 |
Correct |
276 ms |
41904 KB |
Output is correct |
66 |
Correct |
219 ms |
42584 KB |
Output is correct |
67 |
Correct |
236 ms |
42064 KB |
Output is correct |
68 |
Correct |
244 ms |
42468 KB |
Output is correct |
69 |
Correct |
245 ms |
42468 KB |
Output is correct |
70 |
Correct |
240 ms |
42724 KB |
Output is correct |
71 |
Correct |
269 ms |
42488 KB |
Output is correct |
72 |
Correct |
235 ms |
42068 KB |
Output is correct |
73 |
Correct |
237 ms |
42604 KB |
Output is correct |
74 |
Correct |
224 ms |
42320 KB |
Output is correct |
75 |
Correct |
254 ms |
42580 KB |
Output is correct |
76 |
Correct |
261 ms |
42560 KB |
Output is correct |
77 |
Correct |
228 ms |
42356 KB |
Output is correct |
78 |
Correct |
229 ms |
42440 KB |
Output is correct |
79 |
Correct |
155 ms |
38992 KB |
Output is correct |
80 |
Correct |
187 ms |
39300 KB |
Output is correct |
81 |
Correct |
179 ms |
41304 KB |
Output is correct |
82 |
Correct |
44 ms |
32084 KB |
Output is correct |
83 |
Correct |
35 ms |
31320 KB |
Output is correct |
84 |
Correct |
21 ms |
30380 KB |
Output is correct |
85 |
Correct |
25 ms |
30624 KB |
Output is correct |
86 |
Correct |
41 ms |
32084 KB |
Output is correct |
87 |
Correct |
43 ms |
32084 KB |
Output is correct |
88 |
Correct |
50 ms |
31948 KB |
Output is correct |
89 |
Correct |
45 ms |
32012 KB |
Output is correct |
90 |
Correct |
45 ms |
32024 KB |
Output is correct |
91 |
Correct |
42 ms |
31952 KB |
Output is correct |
92 |
Correct |
29 ms |
30672 KB |
Output is correct |
93 |
Correct |
36 ms |
31064 KB |
Output is correct |
94 |
Correct |
34 ms |
31264 KB |
Output is correct |
95 |
Correct |
36 ms |
31576 KB |
Output is correct |
96 |
Correct |
43 ms |
32080 KB |
Output is correct |
97 |
Correct |
42 ms |
32092 KB |
Output is correct |
98 |
Correct |
37 ms |
31068 KB |
Output is correct |
99 |
Correct |
42 ms |
31580 KB |
Output is correct |
100 |
Correct |
42 ms |
28252 KB |
Output is correct |
101 |
Correct |
45 ms |
31552 KB |
Output is correct |
102 |
Correct |
50 ms |
27724 KB |
Output is correct |
103 |
Correct |
35 ms |
31056 KB |
Output is correct |
104 |
Correct |
43 ms |
31480 KB |
Output is correct |
105 |
Correct |
49 ms |
31628 KB |
Output is correct |
106 |
Correct |
28 ms |
30576 KB |
Output is correct |
107 |
Correct |
27 ms |
30416 KB |
Output is correct |
108 |
Correct |
37 ms |
30804 KB |
Output is correct |
109 |
Correct |
30 ms |
30556 KB |
Output is correct |
110 |
Correct |
41 ms |
30996 KB |
Output is correct |
111 |
Correct |
41 ms |
31060 KB |
Output is correct |
112 |
Correct |
44 ms |
31572 KB |
Output is correct |
113 |
Correct |
46 ms |
32084 KB |
Output is correct |
114 |
Correct |
40 ms |
31580 KB |
Output is correct |
115 |
Correct |
60 ms |
31984 KB |
Output is correct |
116 |
Correct |
33 ms |
31064 KB |
Output is correct |
117 |
Correct |
46 ms |
31840 KB |
Output is correct |
118 |
Correct |
38 ms |
31380 KB |
Output is correct |
119 |
Correct |
35 ms |
31316 KB |
Output is correct |
120 |
Correct |
45 ms |
32080 KB |
Output is correct |
121 |
Correct |
45 ms |
32080 KB |
Output is correct |
122 |
Correct |
43 ms |
31824 KB |
Output is correct |
123 |
Correct |
46 ms |
32084 KB |
Output is correct |
124 |
Correct |
47 ms |
32084 KB |
Output is correct |
125 |
Correct |
40 ms |
31572 KB |
Output is correct |
126 |
Correct |
32 ms |
30636 KB |
Output is correct |
127 |
Correct |
34 ms |
30800 KB |
Output is correct |
128 |
Correct |
44 ms |
31364 KB |
Output is correct |
129 |
Correct |
42 ms |
31712 KB |
Output is correct |
130 |
Correct |
240 ms |
42804 KB |
Output is correct |
131 |
Correct |
155 ms |
39320 KB |
Output is correct |
132 |
Correct |
293 ms |
42888 KB |
Output is correct |
133 |
Correct |
217 ms |
42064 KB |
Output is correct |
134 |
Correct |
202 ms |
41044 KB |
Output is correct |
135 |
Correct |
243 ms |
42576 KB |
Output is correct |
136 |
Correct |
271 ms |
41668 KB |
Output is correct |
137 |
Correct |
221 ms |
41552 KB |
Output is correct |
138 |
Correct |
207 ms |
41812 KB |
Output is correct |
139 |
Correct |
242 ms |
42940 KB |
Output is correct |
140 |
Correct |
280 ms |
42456 KB |
Output is correct |
141 |
Correct |
232 ms |
42744 KB |
Output is correct |
142 |
Correct |
261 ms |
42668 KB |
Output is correct |
143 |
Correct |
229 ms |
42576 KB |
Output is correct |
144 |
Correct |
250 ms |
42236 KB |
Output is correct |
145 |
Correct |
244 ms |
42724 KB |
Output is correct |
146 |
Correct |
241 ms |
42580 KB |
Output is correct |
147 |
Correct |
268 ms |
42900 KB |
Output is correct |
148 |
Correct |
253 ms |
42732 KB |
Output is correct |
149 |
Correct |
227 ms |
42580 KB |
Output is correct |
150 |
Correct |
120 ms |
37664 KB |
Output is correct |
151 |
Correct |
183 ms |
39428 KB |
Output is correct |
152 |
Correct |
188 ms |
39504 KB |
Output is correct |
153 |
Correct |
185 ms |
41296 KB |
Output is correct |