#include<bits/stdc++.h>
using namespace std;
#define vec vector
#define int long long
struct SegNode {
int tot = 0;
int rem = 0;
int pot = 0;
/// Other should always be the right node
SegNode merge(SegNode other) {
int er = min(other.pot, rem);
return {tot + other.tot, other.rem + rem - er, pot + other.pot - er};
}
};
struct SegTree {
vec<SegNode> data;
int n;
SegTree(int in) {
n = 1;
while(n < in) n *= 2;
data = vec<SegNode>(n*2);
}
SegNode query(int l, int r, int i = 1, int ll = 0, int rr = -1) {
if(rr == -1) rr = n;
if(rr <= l || ll >= r) return {};
if(ll >= l && rr <= r) return data[i];
int m = (ll+rr)/2;
return query(l, r, i*2, ll, m).merge(query(l, r, i*2 + 1, m, rr));
}
void set(int i, SegNode val) {
i += n;
data[i] = val;
while(i>1) {
i /= 2;
data[i] = data[i*2].merge(data[i*2+1]);
}
}
int get_kth(int k, int i = 1) {
if(k >= data[i].tot) return n+1;
if(i * 2 >= data.size()) {
return i-n;
}
if(k < data[i*2].tot) return get_kth(k, i*2);
return get_kth(k-data[i*2].tot, i*2+1);
}
};
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m, q;
cin >> n >> m >> q;
vec<int> ans(q, -1);
vec<int> vals(q, -1);
vec<vec<pair<int, int>>> quer(n);
vec<vec<pair<int, SegNode>>> ls(n);
vec<vec<int>> rs(n);
for(int i = 0; i<q; i++) {
int qt;
cin >> qt;
if(qt == 1) {
int l, r, c, k;
cin >> l >> r >> c >> k;
ls[l-1].push_back({i, {k, k, 0}});
rs[r-1].push_back(i);
vals[i] = c;
}
else if(qt == 2) {
int l, r, k;
cin >> l >> r >> k;
ls[l-1].push_back({i, {0, 0, k}});
rs[r-1].push_back(i);
}
else {
assert(qt == 3);
int a, b;
cin >> a >> b;
quer[a-1].push_back({i, b-1});
}
}
SegTree st(q);
for(int i = 0; i<n; i++) {
for(auto [t, sn] : ls[i]) {
st.set(t, sn);
}
for(auto [t, j] : quer[i]) {
SegNode res = st.query(0, t+1);
int er = res.tot - res.rem;
//cerr << "ER: " << er << '\n';
//cerr << "J: " << j << '\n';
int vt = st.get_kth(er+j);
//cerr << "TOT: " << res.tot << '\n';
//cerr << "VT: " << vt << '\n';
if(vt > t) {
ans[t] = 0;
}
else {
assert(vals[vt] != -1);
ans[t] = vals[vt];
}
}
for(int t : rs[i]) {
st.set(t, {});
}
}
for(int i = 0; i<q; i++) {
if(ans[i] == -1) continue;
cout << ans[i] << '\n';
}
}
Compilation message
foodcourt.cpp: In member function 'long long int SegTree::get_kth(long long int, long long int)':
foodcourt.cpp:52:12: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<SegNode>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
52 | if(i * 2 >= data.size()) {
| ~~~~~~^~~~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
604 KB |
Output is correct |
2 |
Correct |
1 ms |
860 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
1 ms |
860 KB |
Output is correct |
8 |
Correct |
1 ms |
860 KB |
Output is correct |
9 |
Correct |
1 ms |
860 KB |
Output is correct |
10 |
Correct |
1 ms |
860 KB |
Output is correct |
11 |
Correct |
1 ms |
860 KB |
Output is correct |
12 |
Correct |
1 ms |
860 KB |
Output is correct |
13 |
Correct |
1 ms |
604 KB |
Output is correct |
14 |
Correct |
1 ms |
860 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
860 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
668 KB |
Output is correct |
19 |
Correct |
1 ms |
684 KB |
Output is correct |
20 |
Correct |
1 ms |
860 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
604 KB |
Output is correct |
2 |
Correct |
1 ms |
860 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
1 ms |
860 KB |
Output is correct |
8 |
Correct |
1 ms |
860 KB |
Output is correct |
9 |
Correct |
1 ms |
860 KB |
Output is correct |
10 |
Correct |
1 ms |
860 KB |
Output is correct |
11 |
Correct |
1 ms |
860 KB |
Output is correct |
12 |
Correct |
1 ms |
860 KB |
Output is correct |
13 |
Correct |
1 ms |
604 KB |
Output is correct |
14 |
Correct |
1 ms |
860 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
860 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
668 KB |
Output is correct |
19 |
Correct |
1 ms |
684 KB |
Output is correct |
20 |
Correct |
1 ms |
860 KB |
Output is correct |
21 |
Correct |
2 ms |
860 KB |
Output is correct |
22 |
Correct |
2 ms |
860 KB |
Output is correct |
23 |
Correct |
2 ms |
728 KB |
Output is correct |
24 |
Correct |
1 ms |
860 KB |
Output is correct |
25 |
Correct |
1 ms |
600 KB |
Output is correct |
26 |
Correct |
1 ms |
604 KB |
Output is correct |
27 |
Correct |
1 ms |
720 KB |
Output is correct |
28 |
Correct |
1 ms |
860 KB |
Output is correct |
29 |
Correct |
1 ms |
856 KB |
Output is correct |
30 |
Correct |
1 ms |
860 KB |
Output is correct |
31 |
Correct |
1 ms |
860 KB |
Output is correct |
32 |
Correct |
1 ms |
860 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
860 KB |
Output is correct |
35 |
Correct |
1 ms |
604 KB |
Output is correct |
36 |
Correct |
1 ms |
860 KB |
Output is correct |
37 |
Correct |
1 ms |
604 KB |
Output is correct |
38 |
Correct |
1 ms |
860 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
45 ms |
13872 KB |
Output is correct |
2 |
Correct |
37 ms |
13976 KB |
Output is correct |
3 |
Correct |
43 ms |
13652 KB |
Output is correct |
4 |
Correct |
35 ms |
13656 KB |
Output is correct |
5 |
Correct |
36 ms |
14108 KB |
Output is correct |
6 |
Correct |
36 ms |
13916 KB |
Output is correct |
7 |
Correct |
22 ms |
8036 KB |
Output is correct |
8 |
Correct |
21 ms |
8024 KB |
Output is correct |
9 |
Correct |
39 ms |
13916 KB |
Output is correct |
10 |
Correct |
39 ms |
13908 KB |
Output is correct |
11 |
Correct |
41 ms |
13936 KB |
Output is correct |
12 |
Correct |
36 ms |
14004 KB |
Output is correct |
13 |
Correct |
37 ms |
11600 KB |
Output is correct |
14 |
Correct |
35 ms |
13648 KB |
Output is correct |
15 |
Correct |
34 ms |
12636 KB |
Output is correct |
16 |
Correct |
45 ms |
14164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
191 ms |
50000 KB |
Output is correct |
2 |
Correct |
129 ms |
43604 KB |
Output is correct |
3 |
Correct |
199 ms |
53588 KB |
Output is correct |
4 |
Correct |
138 ms |
47696 KB |
Output is correct |
5 |
Correct |
127 ms |
43596 KB |
Output is correct |
6 |
Correct |
221 ms |
54356 KB |
Output is correct |
7 |
Correct |
97 ms |
32056 KB |
Output is correct |
8 |
Correct |
91 ms |
31152 KB |
Output is correct |
9 |
Correct |
183 ms |
52308 KB |
Output is correct |
10 |
Correct |
207 ms |
52516 KB |
Output is correct |
11 |
Correct |
189 ms |
54172 KB |
Output is correct |
12 |
Correct |
200 ms |
54232 KB |
Output is correct |
13 |
Correct |
167 ms |
54096 KB |
Output is correct |
14 |
Correct |
165 ms |
54148 KB |
Output is correct |
15 |
Correct |
175 ms |
54100 KB |
Output is correct |
16 |
Correct |
186 ms |
54096 KB |
Output is correct |
17 |
Correct |
189 ms |
54052 KB |
Output is correct |
18 |
Correct |
168 ms |
54096 KB |
Output is correct |
19 |
Correct |
184 ms |
54220 KB |
Output is correct |
20 |
Correct |
224 ms |
54160 KB |
Output is correct |
21 |
Correct |
186 ms |
54224 KB |
Output is correct |
22 |
Correct |
180 ms |
54096 KB |
Output is correct |
23 |
Correct |
181 ms |
54096 KB |
Output is correct |
24 |
Correct |
186 ms |
54100 KB |
Output is correct |
25 |
Correct |
142 ms |
49280 KB |
Output is correct |
26 |
Correct |
157 ms |
54120 KB |
Output is correct |
27 |
Correct |
161 ms |
55716 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
604 KB |
Output is correct |
2 |
Correct |
1 ms |
860 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
1 ms |
860 KB |
Output is correct |
8 |
Correct |
1 ms |
860 KB |
Output is correct |
9 |
Correct |
1 ms |
860 KB |
Output is correct |
10 |
Correct |
1 ms |
860 KB |
Output is correct |
11 |
Correct |
1 ms |
860 KB |
Output is correct |
12 |
Correct |
1 ms |
860 KB |
Output is correct |
13 |
Correct |
1 ms |
604 KB |
Output is correct |
14 |
Correct |
1 ms |
860 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
860 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
668 KB |
Output is correct |
19 |
Correct |
1 ms |
684 KB |
Output is correct |
20 |
Correct |
1 ms |
860 KB |
Output is correct |
21 |
Correct |
45 ms |
13872 KB |
Output is correct |
22 |
Correct |
37 ms |
13976 KB |
Output is correct |
23 |
Correct |
43 ms |
13652 KB |
Output is correct |
24 |
Correct |
35 ms |
13656 KB |
Output is correct |
25 |
Correct |
36 ms |
14108 KB |
Output is correct |
26 |
Correct |
36 ms |
13916 KB |
Output is correct |
27 |
Correct |
22 ms |
8036 KB |
Output is correct |
28 |
Correct |
21 ms |
8024 KB |
Output is correct |
29 |
Correct |
39 ms |
13916 KB |
Output is correct |
30 |
Correct |
39 ms |
13908 KB |
Output is correct |
31 |
Correct |
41 ms |
13936 KB |
Output is correct |
32 |
Correct |
36 ms |
14004 KB |
Output is correct |
33 |
Correct |
37 ms |
11600 KB |
Output is correct |
34 |
Correct |
35 ms |
13648 KB |
Output is correct |
35 |
Correct |
34 ms |
12636 KB |
Output is correct |
36 |
Correct |
45 ms |
14164 KB |
Output is correct |
37 |
Correct |
35 ms |
12636 KB |
Output is correct |
38 |
Correct |
30 ms |
12120 KB |
Output is correct |
39 |
Correct |
18 ms |
7024 KB |
Output is correct |
40 |
Correct |
24 ms |
7840 KB |
Output is correct |
41 |
Correct |
41 ms |
13908 KB |
Output is correct |
42 |
Correct |
36 ms |
13856 KB |
Output is correct |
43 |
Correct |
48 ms |
13800 KB |
Output is correct |
44 |
Correct |
38 ms |
13652 KB |
Output is correct |
45 |
Correct |
41 ms |
13648 KB |
Output is correct |
46 |
Correct |
44 ms |
13780 KB |
Output is correct |
47 |
Correct |
30 ms |
12336 KB |
Output is correct |
48 |
Correct |
27 ms |
13792 KB |
Output is correct |
49 |
Correct |
29 ms |
10844 KB |
Output is correct |
50 |
Correct |
36 ms |
12892 KB |
Output is correct |
51 |
Correct |
40 ms |
13916 KB |
Output is correct |
52 |
Correct |
34 ms |
13904 KB |
Output is correct |
53 |
Correct |
27 ms |
12372 KB |
Output is correct |
54 |
Correct |
42 ms |
14164 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
36 ms |
13044 KB |
Output is correct |
2 |
Correct |
45 ms |
13140 KB |
Output is correct |
3 |
Correct |
45 ms |
13908 KB |
Output is correct |
4 |
Correct |
29 ms |
11868 KB |
Output is correct |
5 |
Correct |
34 ms |
12880 KB |
Output is correct |
6 |
Correct |
45 ms |
13908 KB |
Output is correct |
7 |
Correct |
23 ms |
7452 KB |
Output is correct |
8 |
Correct |
25 ms |
7300 KB |
Output is correct |
9 |
Correct |
33 ms |
13020 KB |
Output is correct |
10 |
Correct |
28 ms |
11612 KB |
Output is correct |
11 |
Correct |
36 ms |
13396 KB |
Output is correct |
12 |
Correct |
34 ms |
13364 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
604 KB |
Output is correct |
2 |
Correct |
1 ms |
860 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
1 ms |
860 KB |
Output is correct |
8 |
Correct |
1 ms |
860 KB |
Output is correct |
9 |
Correct |
1 ms |
860 KB |
Output is correct |
10 |
Correct |
1 ms |
860 KB |
Output is correct |
11 |
Correct |
1 ms |
860 KB |
Output is correct |
12 |
Correct |
1 ms |
860 KB |
Output is correct |
13 |
Correct |
1 ms |
604 KB |
Output is correct |
14 |
Correct |
1 ms |
860 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
860 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
668 KB |
Output is correct |
19 |
Correct |
1 ms |
684 KB |
Output is correct |
20 |
Correct |
1 ms |
860 KB |
Output is correct |
21 |
Correct |
2 ms |
860 KB |
Output is correct |
22 |
Correct |
2 ms |
860 KB |
Output is correct |
23 |
Correct |
2 ms |
728 KB |
Output is correct |
24 |
Correct |
1 ms |
860 KB |
Output is correct |
25 |
Correct |
1 ms |
600 KB |
Output is correct |
26 |
Correct |
1 ms |
604 KB |
Output is correct |
27 |
Correct |
1 ms |
720 KB |
Output is correct |
28 |
Correct |
1 ms |
860 KB |
Output is correct |
29 |
Correct |
1 ms |
856 KB |
Output is correct |
30 |
Correct |
1 ms |
860 KB |
Output is correct |
31 |
Correct |
1 ms |
860 KB |
Output is correct |
32 |
Correct |
1 ms |
860 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
860 KB |
Output is correct |
35 |
Correct |
1 ms |
604 KB |
Output is correct |
36 |
Correct |
1 ms |
860 KB |
Output is correct |
37 |
Correct |
1 ms |
604 KB |
Output is correct |
38 |
Correct |
1 ms |
860 KB |
Output is correct |
39 |
Correct |
45 ms |
13872 KB |
Output is correct |
40 |
Correct |
37 ms |
13976 KB |
Output is correct |
41 |
Correct |
43 ms |
13652 KB |
Output is correct |
42 |
Correct |
35 ms |
13656 KB |
Output is correct |
43 |
Correct |
36 ms |
14108 KB |
Output is correct |
44 |
Correct |
36 ms |
13916 KB |
Output is correct |
45 |
Correct |
22 ms |
8036 KB |
Output is correct |
46 |
Correct |
21 ms |
8024 KB |
Output is correct |
47 |
Correct |
39 ms |
13916 KB |
Output is correct |
48 |
Correct |
39 ms |
13908 KB |
Output is correct |
49 |
Correct |
41 ms |
13936 KB |
Output is correct |
50 |
Correct |
36 ms |
14004 KB |
Output is correct |
51 |
Correct |
37 ms |
11600 KB |
Output is correct |
52 |
Correct |
35 ms |
13648 KB |
Output is correct |
53 |
Correct |
34 ms |
12636 KB |
Output is correct |
54 |
Correct |
45 ms |
14164 KB |
Output is correct |
55 |
Correct |
35 ms |
12636 KB |
Output is correct |
56 |
Correct |
30 ms |
12120 KB |
Output is correct |
57 |
Correct |
18 ms |
7024 KB |
Output is correct |
58 |
Correct |
24 ms |
7840 KB |
Output is correct |
59 |
Correct |
41 ms |
13908 KB |
Output is correct |
60 |
Correct |
36 ms |
13856 KB |
Output is correct |
61 |
Correct |
48 ms |
13800 KB |
Output is correct |
62 |
Correct |
38 ms |
13652 KB |
Output is correct |
63 |
Correct |
41 ms |
13648 KB |
Output is correct |
64 |
Correct |
44 ms |
13780 KB |
Output is correct |
65 |
Correct |
30 ms |
12336 KB |
Output is correct |
66 |
Correct |
27 ms |
13792 KB |
Output is correct |
67 |
Correct |
29 ms |
10844 KB |
Output is correct |
68 |
Correct |
36 ms |
12892 KB |
Output is correct |
69 |
Correct |
40 ms |
13916 KB |
Output is correct |
70 |
Correct |
34 ms |
13904 KB |
Output is correct |
71 |
Correct |
27 ms |
12372 KB |
Output is correct |
72 |
Correct |
42 ms |
14164 KB |
Output is correct |
73 |
Correct |
36 ms |
13044 KB |
Output is correct |
74 |
Correct |
45 ms |
13140 KB |
Output is correct |
75 |
Correct |
45 ms |
13908 KB |
Output is correct |
76 |
Correct |
29 ms |
11868 KB |
Output is correct |
77 |
Correct |
34 ms |
12880 KB |
Output is correct |
78 |
Correct |
45 ms |
13908 KB |
Output is correct |
79 |
Correct |
23 ms |
7452 KB |
Output is correct |
80 |
Correct |
25 ms |
7300 KB |
Output is correct |
81 |
Correct |
33 ms |
13020 KB |
Output is correct |
82 |
Correct |
28 ms |
11612 KB |
Output is correct |
83 |
Correct |
36 ms |
13396 KB |
Output is correct |
84 |
Correct |
34 ms |
13364 KB |
Output is correct |
85 |
Correct |
43 ms |
12628 KB |
Output is correct |
86 |
Correct |
42 ms |
14164 KB |
Output is correct |
87 |
Correct |
37 ms |
13392 KB |
Output is correct |
88 |
Correct |
42 ms |
14316 KB |
Output is correct |
89 |
Correct |
28 ms |
11204 KB |
Output is correct |
90 |
Correct |
40 ms |
14164 KB |
Output is correct |
91 |
Correct |
32 ms |
11612 KB |
Output is correct |
92 |
Correct |
25 ms |
11356 KB |
Output is correct |
93 |
Correct |
37 ms |
14164 KB |
Output is correct |
94 |
Correct |
43 ms |
14256 KB |
Output is correct |
95 |
Correct |
35 ms |
13652 KB |
Output is correct |
96 |
Correct |
39 ms |
14164 KB |
Output is correct |
97 |
Correct |
42 ms |
14300 KB |
Output is correct |
98 |
Correct |
33 ms |
11924 KB |
Output is correct |
99 |
Correct |
27 ms |
13096 KB |
Output is correct |
100 |
Correct |
25 ms |
12376 KB |
Output is correct |
101 |
Correct |
32 ms |
14160 KB |
Output is correct |
102 |
Correct |
30 ms |
14680 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
604 KB |
Output is correct |
2 |
Correct |
1 ms |
860 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
1 ms |
860 KB |
Output is correct |
5 |
Correct |
1 ms |
604 KB |
Output is correct |
6 |
Correct |
1 ms |
604 KB |
Output is correct |
7 |
Correct |
1 ms |
860 KB |
Output is correct |
8 |
Correct |
1 ms |
860 KB |
Output is correct |
9 |
Correct |
1 ms |
860 KB |
Output is correct |
10 |
Correct |
1 ms |
860 KB |
Output is correct |
11 |
Correct |
1 ms |
860 KB |
Output is correct |
12 |
Correct |
1 ms |
860 KB |
Output is correct |
13 |
Correct |
1 ms |
604 KB |
Output is correct |
14 |
Correct |
1 ms |
860 KB |
Output is correct |
15 |
Correct |
1 ms |
604 KB |
Output is correct |
16 |
Correct |
1 ms |
860 KB |
Output is correct |
17 |
Correct |
1 ms |
604 KB |
Output is correct |
18 |
Correct |
1 ms |
668 KB |
Output is correct |
19 |
Correct |
1 ms |
684 KB |
Output is correct |
20 |
Correct |
1 ms |
860 KB |
Output is correct |
21 |
Correct |
2 ms |
860 KB |
Output is correct |
22 |
Correct |
2 ms |
860 KB |
Output is correct |
23 |
Correct |
2 ms |
728 KB |
Output is correct |
24 |
Correct |
1 ms |
860 KB |
Output is correct |
25 |
Correct |
1 ms |
600 KB |
Output is correct |
26 |
Correct |
1 ms |
604 KB |
Output is correct |
27 |
Correct |
1 ms |
720 KB |
Output is correct |
28 |
Correct |
1 ms |
860 KB |
Output is correct |
29 |
Correct |
1 ms |
856 KB |
Output is correct |
30 |
Correct |
1 ms |
860 KB |
Output is correct |
31 |
Correct |
1 ms |
860 KB |
Output is correct |
32 |
Correct |
1 ms |
860 KB |
Output is correct |
33 |
Correct |
1 ms |
604 KB |
Output is correct |
34 |
Correct |
1 ms |
860 KB |
Output is correct |
35 |
Correct |
1 ms |
604 KB |
Output is correct |
36 |
Correct |
1 ms |
860 KB |
Output is correct |
37 |
Correct |
1 ms |
604 KB |
Output is correct |
38 |
Correct |
1 ms |
860 KB |
Output is correct |
39 |
Correct |
45 ms |
13872 KB |
Output is correct |
40 |
Correct |
37 ms |
13976 KB |
Output is correct |
41 |
Correct |
43 ms |
13652 KB |
Output is correct |
42 |
Correct |
35 ms |
13656 KB |
Output is correct |
43 |
Correct |
36 ms |
14108 KB |
Output is correct |
44 |
Correct |
36 ms |
13916 KB |
Output is correct |
45 |
Correct |
22 ms |
8036 KB |
Output is correct |
46 |
Correct |
21 ms |
8024 KB |
Output is correct |
47 |
Correct |
39 ms |
13916 KB |
Output is correct |
48 |
Correct |
39 ms |
13908 KB |
Output is correct |
49 |
Correct |
41 ms |
13936 KB |
Output is correct |
50 |
Correct |
36 ms |
14004 KB |
Output is correct |
51 |
Correct |
37 ms |
11600 KB |
Output is correct |
52 |
Correct |
35 ms |
13648 KB |
Output is correct |
53 |
Correct |
34 ms |
12636 KB |
Output is correct |
54 |
Correct |
45 ms |
14164 KB |
Output is correct |
55 |
Correct |
191 ms |
50000 KB |
Output is correct |
56 |
Correct |
129 ms |
43604 KB |
Output is correct |
57 |
Correct |
199 ms |
53588 KB |
Output is correct |
58 |
Correct |
138 ms |
47696 KB |
Output is correct |
59 |
Correct |
127 ms |
43596 KB |
Output is correct |
60 |
Correct |
221 ms |
54356 KB |
Output is correct |
61 |
Correct |
97 ms |
32056 KB |
Output is correct |
62 |
Correct |
91 ms |
31152 KB |
Output is correct |
63 |
Correct |
183 ms |
52308 KB |
Output is correct |
64 |
Correct |
207 ms |
52516 KB |
Output is correct |
65 |
Correct |
189 ms |
54172 KB |
Output is correct |
66 |
Correct |
200 ms |
54232 KB |
Output is correct |
67 |
Correct |
167 ms |
54096 KB |
Output is correct |
68 |
Correct |
165 ms |
54148 KB |
Output is correct |
69 |
Correct |
175 ms |
54100 KB |
Output is correct |
70 |
Correct |
186 ms |
54096 KB |
Output is correct |
71 |
Correct |
189 ms |
54052 KB |
Output is correct |
72 |
Correct |
168 ms |
54096 KB |
Output is correct |
73 |
Correct |
184 ms |
54220 KB |
Output is correct |
74 |
Correct |
224 ms |
54160 KB |
Output is correct |
75 |
Correct |
186 ms |
54224 KB |
Output is correct |
76 |
Correct |
180 ms |
54096 KB |
Output is correct |
77 |
Correct |
181 ms |
54096 KB |
Output is correct |
78 |
Correct |
186 ms |
54100 KB |
Output is correct |
79 |
Correct |
142 ms |
49280 KB |
Output is correct |
80 |
Correct |
157 ms |
54120 KB |
Output is correct |
81 |
Correct |
161 ms |
55716 KB |
Output is correct |
82 |
Correct |
35 ms |
12636 KB |
Output is correct |
83 |
Correct |
30 ms |
12120 KB |
Output is correct |
84 |
Correct |
18 ms |
7024 KB |
Output is correct |
85 |
Correct |
24 ms |
7840 KB |
Output is correct |
86 |
Correct |
41 ms |
13908 KB |
Output is correct |
87 |
Correct |
36 ms |
13856 KB |
Output is correct |
88 |
Correct |
48 ms |
13800 KB |
Output is correct |
89 |
Correct |
38 ms |
13652 KB |
Output is correct |
90 |
Correct |
41 ms |
13648 KB |
Output is correct |
91 |
Correct |
44 ms |
13780 KB |
Output is correct |
92 |
Correct |
30 ms |
12336 KB |
Output is correct |
93 |
Correct |
27 ms |
13792 KB |
Output is correct |
94 |
Correct |
29 ms |
10844 KB |
Output is correct |
95 |
Correct |
36 ms |
12892 KB |
Output is correct |
96 |
Correct |
40 ms |
13916 KB |
Output is correct |
97 |
Correct |
34 ms |
13904 KB |
Output is correct |
98 |
Correct |
27 ms |
12372 KB |
Output is correct |
99 |
Correct |
42 ms |
14164 KB |
Output is correct |
100 |
Correct |
36 ms |
13044 KB |
Output is correct |
101 |
Correct |
45 ms |
13140 KB |
Output is correct |
102 |
Correct |
45 ms |
13908 KB |
Output is correct |
103 |
Correct |
29 ms |
11868 KB |
Output is correct |
104 |
Correct |
34 ms |
12880 KB |
Output is correct |
105 |
Correct |
45 ms |
13908 KB |
Output is correct |
106 |
Correct |
23 ms |
7452 KB |
Output is correct |
107 |
Correct |
25 ms |
7300 KB |
Output is correct |
108 |
Correct |
33 ms |
13020 KB |
Output is correct |
109 |
Correct |
28 ms |
11612 KB |
Output is correct |
110 |
Correct |
36 ms |
13396 KB |
Output is correct |
111 |
Correct |
34 ms |
13364 KB |
Output is correct |
112 |
Correct |
43 ms |
12628 KB |
Output is correct |
113 |
Correct |
42 ms |
14164 KB |
Output is correct |
114 |
Correct |
37 ms |
13392 KB |
Output is correct |
115 |
Correct |
42 ms |
14316 KB |
Output is correct |
116 |
Correct |
28 ms |
11204 KB |
Output is correct |
117 |
Correct |
40 ms |
14164 KB |
Output is correct |
118 |
Correct |
32 ms |
11612 KB |
Output is correct |
119 |
Correct |
25 ms |
11356 KB |
Output is correct |
120 |
Correct |
37 ms |
14164 KB |
Output is correct |
121 |
Correct |
43 ms |
14256 KB |
Output is correct |
122 |
Correct |
35 ms |
13652 KB |
Output is correct |
123 |
Correct |
39 ms |
14164 KB |
Output is correct |
124 |
Correct |
42 ms |
14300 KB |
Output is correct |
125 |
Correct |
33 ms |
11924 KB |
Output is correct |
126 |
Correct |
27 ms |
13096 KB |
Output is correct |
127 |
Correct |
25 ms |
12376 KB |
Output is correct |
128 |
Correct |
32 ms |
14160 KB |
Output is correct |
129 |
Correct |
30 ms |
14680 KB |
Output is correct |
130 |
Correct |
204 ms |
53904 KB |
Output is correct |
131 |
Correct |
132 ms |
43348 KB |
Output is correct |
132 |
Correct |
187 ms |
54356 KB |
Output is correct |
133 |
Correct |
177 ms |
53252 KB |
Output is correct |
134 |
Correct |
180 ms |
50764 KB |
Output is correct |
135 |
Correct |
211 ms |
55200 KB |
Output is correct |
136 |
Correct |
197 ms |
53360 KB |
Output is correct |
137 |
Correct |
182 ms |
53332 KB |
Output is correct |
138 |
Correct |
192 ms |
55076 KB |
Output is correct |
139 |
Correct |
186 ms |
54864 KB |
Output is correct |
140 |
Correct |
179 ms |
54864 KB |
Output is correct |
141 |
Correct |
219 ms |
54748 KB |
Output is correct |
142 |
Correct |
177 ms |
54864 KB |
Output is correct |
143 |
Correct |
204 ms |
54608 KB |
Output is correct |
144 |
Correct |
182 ms |
54908 KB |
Output is correct |
145 |
Correct |
222 ms |
54768 KB |
Output is correct |
146 |
Correct |
208 ms |
54864 KB |
Output is correct |
147 |
Correct |
192 ms |
54640 KB |
Output is correct |
148 |
Correct |
195 ms |
54692 KB |
Output is correct |
149 |
Correct |
202 ms |
54612 KB |
Output is correct |
150 |
Correct |
117 ms |
50952 KB |
Output is correct |
151 |
Correct |
132 ms |
54696 KB |
Output is correct |
152 |
Correct |
140 ms |
54824 KB |
Output is correct |
153 |
Correct |
163 ms |
56488 KB |
Output is correct |