#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 << 19;
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 |
8 ms |
33372 KB |
Output is correct |
2 |
Correct |
7 ms |
33372 KB |
Output is correct |
3 |
Correct |
7 ms |
33372 KB |
Output is correct |
4 |
Correct |
7 ms |
33372 KB |
Output is correct |
5 |
Correct |
6 ms |
33368 KB |
Output is correct |
6 |
Correct |
7 ms |
33380 KB |
Output is correct |
7 |
Correct |
7 ms |
33372 KB |
Output is correct |
8 |
Correct |
8 ms |
33304 KB |
Output is correct |
9 |
Correct |
7 ms |
33372 KB |
Output is correct |
10 |
Correct |
7 ms |
33372 KB |
Output is correct |
11 |
Correct |
8 ms |
33368 KB |
Output is correct |
12 |
Correct |
7 ms |
33372 KB |
Output is correct |
13 |
Correct |
8 ms |
33368 KB |
Output is correct |
14 |
Correct |
6 ms |
33400 KB |
Output is correct |
15 |
Correct |
6 ms |
33212 KB |
Output is correct |
16 |
Correct |
7 ms |
33372 KB |
Output is correct |
17 |
Correct |
7 ms |
33368 KB |
Output is correct |
18 |
Correct |
7 ms |
33368 KB |
Output is correct |
19 |
Correct |
7 ms |
33372 KB |
Output is correct |
20 |
Correct |
7 ms |
33372 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
33372 KB |
Output is correct |
2 |
Correct |
7 ms |
33372 KB |
Output is correct |
3 |
Correct |
7 ms |
33372 KB |
Output is correct |
4 |
Correct |
7 ms |
33372 KB |
Output is correct |
5 |
Correct |
6 ms |
33368 KB |
Output is correct |
6 |
Correct |
7 ms |
33380 KB |
Output is correct |
7 |
Correct |
7 ms |
33372 KB |
Output is correct |
8 |
Correct |
8 ms |
33304 KB |
Output is correct |
9 |
Correct |
7 ms |
33372 KB |
Output is correct |
10 |
Correct |
7 ms |
33372 KB |
Output is correct |
11 |
Correct |
8 ms |
33368 KB |
Output is correct |
12 |
Correct |
7 ms |
33372 KB |
Output is correct |
13 |
Correct |
8 ms |
33368 KB |
Output is correct |
14 |
Correct |
6 ms |
33400 KB |
Output is correct |
15 |
Correct |
6 ms |
33212 KB |
Output is correct |
16 |
Correct |
7 ms |
33372 KB |
Output is correct |
17 |
Correct |
7 ms |
33368 KB |
Output is correct |
18 |
Correct |
7 ms |
33368 KB |
Output is correct |
19 |
Correct |
7 ms |
33372 KB |
Output is correct |
20 |
Correct |
7 ms |
33372 KB |
Output is correct |
21 |
Correct |
7 ms |
33372 KB |
Output is correct |
22 |
Correct |
8 ms |
33628 KB |
Output is correct |
23 |
Correct |
7 ms |
33368 KB |
Output is correct |
24 |
Correct |
7 ms |
33372 KB |
Output is correct |
25 |
Correct |
6 ms |
33372 KB |
Output is correct |
26 |
Correct |
6 ms |
33392 KB |
Output is correct |
27 |
Correct |
7 ms |
33372 KB |
Output is correct |
28 |
Correct |
7 ms |
33440 KB |
Output is correct |
29 |
Correct |
7 ms |
33384 KB |
Output is correct |
30 |
Correct |
7 ms |
33372 KB |
Output is correct |
31 |
Correct |
7 ms |
33224 KB |
Output is correct |
32 |
Correct |
7 ms |
33372 KB |
Output is correct |
33 |
Correct |
6 ms |
33372 KB |
Output is correct |
34 |
Correct |
7 ms |
33368 KB |
Output is correct |
35 |
Correct |
7 ms |
33372 KB |
Output is correct |
36 |
Correct |
7 ms |
33628 KB |
Output is correct |
37 |
Correct |
7 ms |
33372 KB |
Output is correct |
38 |
Correct |
7 ms |
33372 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
43 ms |
37204 KB |
Output is correct |
2 |
Correct |
45 ms |
37384 KB |
Output is correct |
3 |
Correct |
44 ms |
32132 KB |
Output is correct |
4 |
Correct |
44 ms |
37308 KB |
Output is correct |
5 |
Correct |
54 ms |
37792 KB |
Output is correct |
6 |
Correct |
48 ms |
37196 KB |
Output is correct |
7 |
Correct |
25 ms |
35688 KB |
Output is correct |
8 |
Correct |
26 ms |
35404 KB |
Output is correct |
9 |
Correct |
45 ms |
37380 KB |
Output is correct |
10 |
Correct |
46 ms |
37168 KB |
Output is correct |
11 |
Correct |
44 ms |
33596 KB |
Output is correct |
12 |
Correct |
44 ms |
37408 KB |
Output is correct |
13 |
Correct |
38 ms |
36548 KB |
Output is correct |
14 |
Correct |
48 ms |
37124 KB |
Output is correct |
15 |
Correct |
42 ms |
36696 KB |
Output is correct |
16 |
Correct |
53 ms |
36944 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
224 ms |
55768 KB |
Output is correct |
2 |
Correct |
171 ms |
51508 KB |
Output is correct |
3 |
Correct |
256 ms |
57936 KB |
Output is correct |
4 |
Correct |
199 ms |
51880 KB |
Output is correct |
5 |
Correct |
165 ms |
51596 KB |
Output is correct |
6 |
Correct |
270 ms |
58328 KB |
Output is correct |
7 |
Correct |
96 ms |
51136 KB |
Output is correct |
8 |
Correct |
95 ms |
50232 KB |
Output is correct |
9 |
Correct |
263 ms |
56660 KB |
Output is correct |
10 |
Correct |
253 ms |
56732 KB |
Output is correct |
11 |
Correct |
218 ms |
55892 KB |
Output is correct |
12 |
Correct |
262 ms |
58076 KB |
Output is correct |
13 |
Correct |
256 ms |
57968 KB |
Output is correct |
14 |
Correct |
241 ms |
58236 KB |
Output is correct |
15 |
Correct |
243 ms |
57936 KB |
Output is correct |
16 |
Correct |
259 ms |
57944 KB |
Output is correct |
17 |
Correct |
268 ms |
57812 KB |
Output is correct |
18 |
Correct |
261 ms |
57984 KB |
Output is correct |
19 |
Correct |
239 ms |
58452 KB |
Output is correct |
20 |
Correct |
263 ms |
57948 KB |
Output is correct |
21 |
Correct |
244 ms |
57936 KB |
Output is correct |
22 |
Correct |
263 ms |
57920 KB |
Output is correct |
23 |
Correct |
235 ms |
57916 KB |
Output is correct |
24 |
Correct |
270 ms |
57884 KB |
Output is correct |
25 |
Correct |
156 ms |
54104 KB |
Output is correct |
26 |
Correct |
195 ms |
54328 KB |
Output is correct |
27 |
Correct |
194 ms |
56620 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
33372 KB |
Output is correct |
2 |
Correct |
7 ms |
33372 KB |
Output is correct |
3 |
Correct |
7 ms |
33372 KB |
Output is correct |
4 |
Correct |
7 ms |
33372 KB |
Output is correct |
5 |
Correct |
6 ms |
33368 KB |
Output is correct |
6 |
Correct |
7 ms |
33380 KB |
Output is correct |
7 |
Correct |
7 ms |
33372 KB |
Output is correct |
8 |
Correct |
8 ms |
33304 KB |
Output is correct |
9 |
Correct |
7 ms |
33372 KB |
Output is correct |
10 |
Correct |
7 ms |
33372 KB |
Output is correct |
11 |
Correct |
8 ms |
33368 KB |
Output is correct |
12 |
Correct |
7 ms |
33372 KB |
Output is correct |
13 |
Correct |
8 ms |
33368 KB |
Output is correct |
14 |
Correct |
6 ms |
33400 KB |
Output is correct |
15 |
Correct |
6 ms |
33212 KB |
Output is correct |
16 |
Correct |
7 ms |
33372 KB |
Output is correct |
17 |
Correct |
7 ms |
33368 KB |
Output is correct |
18 |
Correct |
7 ms |
33368 KB |
Output is correct |
19 |
Correct |
7 ms |
33372 KB |
Output is correct |
20 |
Correct |
7 ms |
33372 KB |
Output is correct |
21 |
Correct |
43 ms |
37204 KB |
Output is correct |
22 |
Correct |
45 ms |
37384 KB |
Output is correct |
23 |
Correct |
44 ms |
32132 KB |
Output is correct |
24 |
Correct |
44 ms |
37308 KB |
Output is correct |
25 |
Correct |
54 ms |
37792 KB |
Output is correct |
26 |
Correct |
48 ms |
37196 KB |
Output is correct |
27 |
Correct |
25 ms |
35688 KB |
Output is correct |
28 |
Correct |
26 ms |
35404 KB |
Output is correct |
29 |
Correct |
45 ms |
37380 KB |
Output is correct |
30 |
Correct |
46 ms |
37168 KB |
Output is correct |
31 |
Correct |
44 ms |
33596 KB |
Output is correct |
32 |
Correct |
44 ms |
37408 KB |
Output is correct |
33 |
Correct |
38 ms |
36548 KB |
Output is correct |
34 |
Correct |
48 ms |
37124 KB |
Output is correct |
35 |
Correct |
42 ms |
36696 KB |
Output is correct |
36 |
Correct |
53 ms |
36944 KB |
Output is correct |
37 |
Correct |
41 ms |
36700 KB |
Output is correct |
38 |
Correct |
41 ms |
36468 KB |
Output is correct |
39 |
Correct |
22 ms |
34988 KB |
Output is correct |
40 |
Correct |
26 ms |
35228 KB |
Output is correct |
41 |
Correct |
44 ms |
37212 KB |
Output is correct |
42 |
Correct |
55 ms |
37200 KB |
Output is correct |
43 |
Correct |
49 ms |
37208 KB |
Output is correct |
44 |
Correct |
44 ms |
37084 KB |
Output is correct |
45 |
Correct |
45 ms |
37064 KB |
Output is correct |
46 |
Correct |
46 ms |
37116 KB |
Output is correct |
47 |
Correct |
31 ms |
35780 KB |
Output is correct |
48 |
Correct |
49 ms |
36320 KB |
Output is correct |
49 |
Correct |
36 ms |
36124 KB |
Output is correct |
50 |
Correct |
39 ms |
36644 KB |
Output is correct |
51 |
Correct |
47 ms |
37204 KB |
Output is correct |
52 |
Correct |
48 ms |
37204 KB |
Output is correct |
53 |
Correct |
38 ms |
36180 KB |
Output is correct |
54 |
Correct |
47 ms |
36952 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
45 ms |
33360 KB |
Output is correct |
2 |
Correct |
61 ms |
37296 KB |
Output is correct |
3 |
Correct |
57 ms |
33024 KB |
Output is correct |
4 |
Correct |
37 ms |
36188 KB |
Output is correct |
5 |
Correct |
42 ms |
36948 KB |
Output is correct |
6 |
Correct |
50 ms |
37360 KB |
Output is correct |
7 |
Correct |
29 ms |
35704 KB |
Output is correct |
8 |
Correct |
28 ms |
35792 KB |
Output is correct |
9 |
Correct |
38 ms |
36488 KB |
Output is correct |
10 |
Correct |
35 ms |
35668 KB |
Output is correct |
11 |
Correct |
44 ms |
36684 KB |
Output is correct |
12 |
Correct |
43 ms |
36700 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
33372 KB |
Output is correct |
2 |
Correct |
7 ms |
33372 KB |
Output is correct |
3 |
Correct |
7 ms |
33372 KB |
Output is correct |
4 |
Correct |
7 ms |
33372 KB |
Output is correct |
5 |
Correct |
6 ms |
33368 KB |
Output is correct |
6 |
Correct |
7 ms |
33380 KB |
Output is correct |
7 |
Correct |
7 ms |
33372 KB |
Output is correct |
8 |
Correct |
8 ms |
33304 KB |
Output is correct |
9 |
Correct |
7 ms |
33372 KB |
Output is correct |
10 |
Correct |
7 ms |
33372 KB |
Output is correct |
11 |
Correct |
8 ms |
33368 KB |
Output is correct |
12 |
Correct |
7 ms |
33372 KB |
Output is correct |
13 |
Correct |
8 ms |
33368 KB |
Output is correct |
14 |
Correct |
6 ms |
33400 KB |
Output is correct |
15 |
Correct |
6 ms |
33212 KB |
Output is correct |
16 |
Correct |
7 ms |
33372 KB |
Output is correct |
17 |
Correct |
7 ms |
33368 KB |
Output is correct |
18 |
Correct |
7 ms |
33368 KB |
Output is correct |
19 |
Correct |
7 ms |
33372 KB |
Output is correct |
20 |
Correct |
7 ms |
33372 KB |
Output is correct |
21 |
Correct |
7 ms |
33372 KB |
Output is correct |
22 |
Correct |
8 ms |
33628 KB |
Output is correct |
23 |
Correct |
7 ms |
33368 KB |
Output is correct |
24 |
Correct |
7 ms |
33372 KB |
Output is correct |
25 |
Correct |
6 ms |
33372 KB |
Output is correct |
26 |
Correct |
6 ms |
33392 KB |
Output is correct |
27 |
Correct |
7 ms |
33372 KB |
Output is correct |
28 |
Correct |
7 ms |
33440 KB |
Output is correct |
29 |
Correct |
7 ms |
33384 KB |
Output is correct |
30 |
Correct |
7 ms |
33372 KB |
Output is correct |
31 |
Correct |
7 ms |
33224 KB |
Output is correct |
32 |
Correct |
7 ms |
33372 KB |
Output is correct |
33 |
Correct |
6 ms |
33372 KB |
Output is correct |
34 |
Correct |
7 ms |
33368 KB |
Output is correct |
35 |
Correct |
7 ms |
33372 KB |
Output is correct |
36 |
Correct |
7 ms |
33628 KB |
Output is correct |
37 |
Correct |
7 ms |
33372 KB |
Output is correct |
38 |
Correct |
7 ms |
33372 KB |
Output is correct |
39 |
Correct |
43 ms |
37204 KB |
Output is correct |
40 |
Correct |
45 ms |
37384 KB |
Output is correct |
41 |
Correct |
44 ms |
32132 KB |
Output is correct |
42 |
Correct |
44 ms |
37308 KB |
Output is correct |
43 |
Correct |
54 ms |
37792 KB |
Output is correct |
44 |
Correct |
48 ms |
37196 KB |
Output is correct |
45 |
Correct |
25 ms |
35688 KB |
Output is correct |
46 |
Correct |
26 ms |
35404 KB |
Output is correct |
47 |
Correct |
45 ms |
37380 KB |
Output is correct |
48 |
Correct |
46 ms |
37168 KB |
Output is correct |
49 |
Correct |
44 ms |
33596 KB |
Output is correct |
50 |
Correct |
44 ms |
37408 KB |
Output is correct |
51 |
Correct |
38 ms |
36548 KB |
Output is correct |
52 |
Correct |
48 ms |
37124 KB |
Output is correct |
53 |
Correct |
42 ms |
36696 KB |
Output is correct |
54 |
Correct |
53 ms |
36944 KB |
Output is correct |
55 |
Correct |
41 ms |
36700 KB |
Output is correct |
56 |
Correct |
41 ms |
36468 KB |
Output is correct |
57 |
Correct |
22 ms |
34988 KB |
Output is correct |
58 |
Correct |
26 ms |
35228 KB |
Output is correct |
59 |
Correct |
44 ms |
37212 KB |
Output is correct |
60 |
Correct |
55 ms |
37200 KB |
Output is correct |
61 |
Correct |
49 ms |
37208 KB |
Output is correct |
62 |
Correct |
44 ms |
37084 KB |
Output is correct |
63 |
Correct |
45 ms |
37064 KB |
Output is correct |
64 |
Correct |
46 ms |
37116 KB |
Output is correct |
65 |
Correct |
31 ms |
35780 KB |
Output is correct |
66 |
Correct |
49 ms |
36320 KB |
Output is correct |
67 |
Correct |
36 ms |
36124 KB |
Output is correct |
68 |
Correct |
39 ms |
36644 KB |
Output is correct |
69 |
Correct |
47 ms |
37204 KB |
Output is correct |
70 |
Correct |
48 ms |
37204 KB |
Output is correct |
71 |
Correct |
38 ms |
36180 KB |
Output is correct |
72 |
Correct |
47 ms |
36952 KB |
Output is correct |
73 |
Correct |
45 ms |
33360 KB |
Output is correct |
74 |
Correct |
61 ms |
37296 KB |
Output is correct |
75 |
Correct |
57 ms |
33024 KB |
Output is correct |
76 |
Correct |
37 ms |
36188 KB |
Output is correct |
77 |
Correct |
42 ms |
36948 KB |
Output is correct |
78 |
Correct |
50 ms |
37360 KB |
Output is correct |
79 |
Correct |
29 ms |
35704 KB |
Output is correct |
80 |
Correct |
28 ms |
35792 KB |
Output is correct |
81 |
Correct |
38 ms |
36488 KB |
Output is correct |
82 |
Correct |
35 ms |
35668 KB |
Output is correct |
83 |
Correct |
44 ms |
36684 KB |
Output is correct |
84 |
Correct |
43 ms |
36700 KB |
Output is correct |
85 |
Correct |
49 ms |
37360 KB |
Output is correct |
86 |
Correct |
48 ms |
37692 KB |
Output is correct |
87 |
Correct |
46 ms |
37264 KB |
Output is correct |
88 |
Correct |
50 ms |
37704 KB |
Output is correct |
89 |
Correct |
35 ms |
36444 KB |
Output is correct |
90 |
Correct |
56 ms |
37796 KB |
Output is correct |
91 |
Correct |
40 ms |
36952 KB |
Output is correct |
92 |
Correct |
38 ms |
36696 KB |
Output is correct |
93 |
Correct |
63 ms |
37840 KB |
Output is correct |
94 |
Correct |
48 ms |
37720 KB |
Output is correct |
95 |
Correct |
52 ms |
37456 KB |
Output is correct |
96 |
Correct |
50 ms |
37732 KB |
Output is correct |
97 |
Correct |
51 ms |
37756 KB |
Output is correct |
98 |
Correct |
43 ms |
37064 KB |
Output is correct |
99 |
Correct |
34 ms |
36292 KB |
Output is correct |
100 |
Correct |
34 ms |
36180 KB |
Output is correct |
101 |
Correct |
45 ms |
36692 KB |
Output is correct |
102 |
Correct |
54 ms |
37460 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
8 ms |
33372 KB |
Output is correct |
2 |
Correct |
7 ms |
33372 KB |
Output is correct |
3 |
Correct |
7 ms |
33372 KB |
Output is correct |
4 |
Correct |
7 ms |
33372 KB |
Output is correct |
5 |
Correct |
6 ms |
33368 KB |
Output is correct |
6 |
Correct |
7 ms |
33380 KB |
Output is correct |
7 |
Correct |
7 ms |
33372 KB |
Output is correct |
8 |
Correct |
8 ms |
33304 KB |
Output is correct |
9 |
Correct |
7 ms |
33372 KB |
Output is correct |
10 |
Correct |
7 ms |
33372 KB |
Output is correct |
11 |
Correct |
8 ms |
33368 KB |
Output is correct |
12 |
Correct |
7 ms |
33372 KB |
Output is correct |
13 |
Correct |
8 ms |
33368 KB |
Output is correct |
14 |
Correct |
6 ms |
33400 KB |
Output is correct |
15 |
Correct |
6 ms |
33212 KB |
Output is correct |
16 |
Correct |
7 ms |
33372 KB |
Output is correct |
17 |
Correct |
7 ms |
33368 KB |
Output is correct |
18 |
Correct |
7 ms |
33368 KB |
Output is correct |
19 |
Correct |
7 ms |
33372 KB |
Output is correct |
20 |
Correct |
7 ms |
33372 KB |
Output is correct |
21 |
Correct |
7 ms |
33372 KB |
Output is correct |
22 |
Correct |
8 ms |
33628 KB |
Output is correct |
23 |
Correct |
7 ms |
33368 KB |
Output is correct |
24 |
Correct |
7 ms |
33372 KB |
Output is correct |
25 |
Correct |
6 ms |
33372 KB |
Output is correct |
26 |
Correct |
6 ms |
33392 KB |
Output is correct |
27 |
Correct |
7 ms |
33372 KB |
Output is correct |
28 |
Correct |
7 ms |
33440 KB |
Output is correct |
29 |
Correct |
7 ms |
33384 KB |
Output is correct |
30 |
Correct |
7 ms |
33372 KB |
Output is correct |
31 |
Correct |
7 ms |
33224 KB |
Output is correct |
32 |
Correct |
7 ms |
33372 KB |
Output is correct |
33 |
Correct |
6 ms |
33372 KB |
Output is correct |
34 |
Correct |
7 ms |
33368 KB |
Output is correct |
35 |
Correct |
7 ms |
33372 KB |
Output is correct |
36 |
Correct |
7 ms |
33628 KB |
Output is correct |
37 |
Correct |
7 ms |
33372 KB |
Output is correct |
38 |
Correct |
7 ms |
33372 KB |
Output is correct |
39 |
Correct |
43 ms |
37204 KB |
Output is correct |
40 |
Correct |
45 ms |
37384 KB |
Output is correct |
41 |
Correct |
44 ms |
32132 KB |
Output is correct |
42 |
Correct |
44 ms |
37308 KB |
Output is correct |
43 |
Correct |
54 ms |
37792 KB |
Output is correct |
44 |
Correct |
48 ms |
37196 KB |
Output is correct |
45 |
Correct |
25 ms |
35688 KB |
Output is correct |
46 |
Correct |
26 ms |
35404 KB |
Output is correct |
47 |
Correct |
45 ms |
37380 KB |
Output is correct |
48 |
Correct |
46 ms |
37168 KB |
Output is correct |
49 |
Correct |
44 ms |
33596 KB |
Output is correct |
50 |
Correct |
44 ms |
37408 KB |
Output is correct |
51 |
Correct |
38 ms |
36548 KB |
Output is correct |
52 |
Correct |
48 ms |
37124 KB |
Output is correct |
53 |
Correct |
42 ms |
36696 KB |
Output is correct |
54 |
Correct |
53 ms |
36944 KB |
Output is correct |
55 |
Correct |
224 ms |
55768 KB |
Output is correct |
56 |
Correct |
171 ms |
51508 KB |
Output is correct |
57 |
Correct |
256 ms |
57936 KB |
Output is correct |
58 |
Correct |
199 ms |
51880 KB |
Output is correct |
59 |
Correct |
165 ms |
51596 KB |
Output is correct |
60 |
Correct |
270 ms |
58328 KB |
Output is correct |
61 |
Correct |
96 ms |
51136 KB |
Output is correct |
62 |
Correct |
95 ms |
50232 KB |
Output is correct |
63 |
Correct |
263 ms |
56660 KB |
Output is correct |
64 |
Correct |
253 ms |
56732 KB |
Output is correct |
65 |
Correct |
218 ms |
55892 KB |
Output is correct |
66 |
Correct |
262 ms |
58076 KB |
Output is correct |
67 |
Correct |
256 ms |
57968 KB |
Output is correct |
68 |
Correct |
241 ms |
58236 KB |
Output is correct |
69 |
Correct |
243 ms |
57936 KB |
Output is correct |
70 |
Correct |
259 ms |
57944 KB |
Output is correct |
71 |
Correct |
268 ms |
57812 KB |
Output is correct |
72 |
Correct |
261 ms |
57984 KB |
Output is correct |
73 |
Correct |
239 ms |
58452 KB |
Output is correct |
74 |
Correct |
263 ms |
57948 KB |
Output is correct |
75 |
Correct |
244 ms |
57936 KB |
Output is correct |
76 |
Correct |
263 ms |
57920 KB |
Output is correct |
77 |
Correct |
235 ms |
57916 KB |
Output is correct |
78 |
Correct |
270 ms |
57884 KB |
Output is correct |
79 |
Correct |
156 ms |
54104 KB |
Output is correct |
80 |
Correct |
195 ms |
54328 KB |
Output is correct |
81 |
Correct |
194 ms |
56620 KB |
Output is correct |
82 |
Correct |
41 ms |
36700 KB |
Output is correct |
83 |
Correct |
41 ms |
36468 KB |
Output is correct |
84 |
Correct |
22 ms |
34988 KB |
Output is correct |
85 |
Correct |
26 ms |
35228 KB |
Output is correct |
86 |
Correct |
44 ms |
37212 KB |
Output is correct |
87 |
Correct |
55 ms |
37200 KB |
Output is correct |
88 |
Correct |
49 ms |
37208 KB |
Output is correct |
89 |
Correct |
44 ms |
37084 KB |
Output is correct |
90 |
Correct |
45 ms |
37064 KB |
Output is correct |
91 |
Correct |
46 ms |
37116 KB |
Output is correct |
92 |
Correct |
31 ms |
35780 KB |
Output is correct |
93 |
Correct |
49 ms |
36320 KB |
Output is correct |
94 |
Correct |
36 ms |
36124 KB |
Output is correct |
95 |
Correct |
39 ms |
36644 KB |
Output is correct |
96 |
Correct |
47 ms |
37204 KB |
Output is correct |
97 |
Correct |
48 ms |
37204 KB |
Output is correct |
98 |
Correct |
38 ms |
36180 KB |
Output is correct |
99 |
Correct |
47 ms |
36952 KB |
Output is correct |
100 |
Correct |
45 ms |
33360 KB |
Output is correct |
101 |
Correct |
61 ms |
37296 KB |
Output is correct |
102 |
Correct |
57 ms |
33024 KB |
Output is correct |
103 |
Correct |
37 ms |
36188 KB |
Output is correct |
104 |
Correct |
42 ms |
36948 KB |
Output is correct |
105 |
Correct |
50 ms |
37360 KB |
Output is correct |
106 |
Correct |
29 ms |
35704 KB |
Output is correct |
107 |
Correct |
28 ms |
35792 KB |
Output is correct |
108 |
Correct |
38 ms |
36488 KB |
Output is correct |
109 |
Correct |
35 ms |
35668 KB |
Output is correct |
110 |
Correct |
44 ms |
36684 KB |
Output is correct |
111 |
Correct |
43 ms |
36700 KB |
Output is correct |
112 |
Correct |
49 ms |
37360 KB |
Output is correct |
113 |
Correct |
48 ms |
37692 KB |
Output is correct |
114 |
Correct |
46 ms |
37264 KB |
Output is correct |
115 |
Correct |
50 ms |
37704 KB |
Output is correct |
116 |
Correct |
35 ms |
36444 KB |
Output is correct |
117 |
Correct |
56 ms |
37796 KB |
Output is correct |
118 |
Correct |
40 ms |
36952 KB |
Output is correct |
119 |
Correct |
38 ms |
36696 KB |
Output is correct |
120 |
Correct |
63 ms |
37840 KB |
Output is correct |
121 |
Correct |
48 ms |
37720 KB |
Output is correct |
122 |
Correct |
52 ms |
37456 KB |
Output is correct |
123 |
Correct |
50 ms |
37732 KB |
Output is correct |
124 |
Correct |
51 ms |
37756 KB |
Output is correct |
125 |
Correct |
43 ms |
37064 KB |
Output is correct |
126 |
Correct |
34 ms |
36292 KB |
Output is correct |
127 |
Correct |
34 ms |
36180 KB |
Output is correct |
128 |
Correct |
45 ms |
36692 KB |
Output is correct |
129 |
Correct |
54 ms |
37460 KB |
Output is correct |
130 |
Correct |
256 ms |
58520 KB |
Output is correct |
131 |
Correct |
191 ms |
51900 KB |
Output is correct |
132 |
Correct |
253 ms |
58428 KB |
Output is correct |
133 |
Correct |
226 ms |
58060 KB |
Output is correct |
134 |
Correct |
203 ms |
56404 KB |
Output is correct |
135 |
Correct |
248 ms |
58964 KB |
Output is correct |
136 |
Correct |
248 ms |
57708 KB |
Output is correct |
137 |
Correct |
239 ms |
57680 KB |
Output is correct |
138 |
Correct |
227 ms |
56656 KB |
Output is correct |
139 |
Correct |
258 ms |
58676 KB |
Output is correct |
140 |
Correct |
259 ms |
58472 KB |
Output is correct |
141 |
Correct |
239 ms |
58448 KB |
Output is correct |
142 |
Correct |
236 ms |
58444 KB |
Output is correct |
143 |
Correct |
247 ms |
58452 KB |
Output is correct |
144 |
Correct |
258 ms |
58660 KB |
Output is correct |
145 |
Correct |
243 ms |
58700 KB |
Output is correct |
146 |
Correct |
280 ms |
58484 KB |
Output is correct |
147 |
Correct |
265 ms |
58592 KB |
Output is correct |
148 |
Correct |
257 ms |
58524 KB |
Output is correct |
149 |
Correct |
246 ms |
58436 KB |
Output is correct |
150 |
Correct |
141 ms |
52740 KB |
Output is correct |
151 |
Correct |
163 ms |
54868 KB |
Output is correct |
152 |
Correct |
169 ms |
55012 KB |
Output is correct |
153 |
Correct |
189 ms |
57428 KB |
Output is correct |