/*************************************
* author: marvinthang *
* created: 10.03.2024 09:09:50 *
*************************************/
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define left ___left
#define right ___right
#define TIME (1.0 * clock() / CLOCKS_PER_SEC)
#define MASK(i) (1LL << (i))
#define BIT(x, i) ((x) >> (i) & 1)
#define __builtin_popcount __builtin_popcountll
#define ALL(v) (v).begin(), (v).end()
#define REP(i, n) for (int i = 0, _n = (n); i < _n; ++i)
#define REPD(i, n) for (int i = (n); i-- > 0; )
#define FOR(i, a, b) for (int i = (a), _b = (b); i < _b; ++i)
#define FORD(i, b, a) for (int i = (b), _a = (a); --i >= _a; )
#define FORE(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i)
#define FORDE(i, b, a) for (int i = (b), _a = (a); i >= _a; --i)
#define scan_op(...) istream & operator >> (istream &in, __VA_ARGS__ &u)
#define print_op(...) ostream & operator << (ostream &out, const __VA_ARGS__ &u)
#ifdef LOCAL
#include "debug.h"
#else
#define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
#define DB(...) 23
#define db(...) 23
#define debug(...) 23
#endif
template <class U, class V> scan_op(pair <U, V>) { return in >> u.first >> u.second; }
template <class T> scan_op(vector <T>) { for (size_t i = 0; i < u.size(); ++i) in >> u[i]; return in; }
template <class U, class V> print_op(pair <U, V>) { return out << '(' << u.first << ", " << u.second << ')'; }
template <size_t i, class T> ostream & print_tuple_utils(ostream &out, const T &tup) { if constexpr(i == tuple_size<T>::value) return out << ")"; else return print_tuple_utils<i + 1, T>(out << (i ? ", " : "(") << get<i>(tup), tup); }
template <class ...U> print_op(tuple<U...>) { return print_tuple_utils<0, tuple<U...>>(out, u); }
template <class Con, class = decltype(begin(declval<Con>()))> typename enable_if <!is_same<Con, string>::value, ostream&>::type operator << (ostream &out, const Con &con) { out << '{'; for (__typeof(con.begin()) it = con.begin(); it != con.end(); ++it) out << (it == con.begin() ? "" : ", ") << *it; return out << '}'; }
template <class InIter, class OutIter> void compress(InIter first, InIter last, OutIter result) { vector <__typeof(*first)> v(first, last); sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end()); while (first != last) { *result = lower_bound(v.begin(), v.end(), *first) - v.begin(); ++first; ++result; } }
// end of template
void process(void) {
int n, d; cin >> n >> d;
vector <int> x(n), a(n), b(n);
REP(i, n) cin >> x[i] >> a[i] >> b[i];
x.push_back(d);
vector <int> val(ALL(x)); sort(ALL(val)); val.erase(unique(ALL(val)), val.end());
for (int &x: x) x = lower_bound(ALL(val), x) - val.begin();
vector <int> idx(n);
iota(ALL(idx), 0);
sort(ALL(idx), [&] (int x, int y) { return b[x] > b[y]; });
int sz = val.size();
vector <long long> st(n * 4 + 23), lazy(n * 4 + 23);
function<void(int, int, int)> build = [&] (int i, int l, int r) {
if (r - l == 1) {
st[i] = val[l];
return;
}
int m = l + r >> 1;
build(i << 1, l, m);
build(i << 1 | 1, m, r);
st[i] = max(st[i << 1], st[i << 1 | 1]);
};
function<void(int, int, int, int, int, int)> update = [&] (int i, int l, int r, int u, int v, int val) {
if (l >= v || r <= u) return;
if (u <= l && r <= v) {
st[i] += val;
lazy[i] += val;
return;
}
int m = l + r >> 1;
update(i << 1, l, m, u, v, val);
update(i << 1 | 1, m, r, u, v, val);
st[i] = max(st[i << 1], st[i << 1 | 1]) + lazy[i];
};
build(1, 0, sz);
long long res = d;
for (int i: idx) {
update(1, 0, sz, x[i] + 1, sz, -a[i]);
if (st[1] <= b[i]) res = min(res, st[1]);
}
cout << max(0LL, res) << '\n';
}
int main(void) {
ios_base::sync_with_stdio(false); cin.tie(nullptr); // cout.tie(nullptr);
file("FUEL");
// int t; cin >> t; while (t--)
process();
// cerr << "Time elapsed: " << TIME << " s.\n";
return (0^0);
}
Compilation message
FuelStation.cpp: In lambda function:
FuelStation.cpp:64:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
64 | int m = l + r >> 1;
| ~~^~~
FuelStation.cpp: In lambda function:
FuelStation.cpp:76:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
76 | int m = l + r >> 1;
| ~~^~~
FuelStation.cpp: In function 'int main()':
FuelStation.cpp:31:61: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
FuelStation.cpp:92:2: note: in expansion of macro 'file'
92 | file("FUEL");
| ^~~~
FuelStation.cpp:31:94: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
FuelStation.cpp:92:2: note: in expansion of macro 'file'
92 | file("FUEL");
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
460 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
195 ms |
33540 KB |
Output is correct |
2 |
Correct |
211 ms |
33468 KB |
Output is correct |
3 |
Correct |
194 ms |
33212 KB |
Output is correct |
4 |
Correct |
151 ms |
34248 KB |
Output is correct |
5 |
Correct |
158 ms |
33828 KB |
Output is correct |
6 |
Correct |
193 ms |
32740 KB |
Output is correct |
7 |
Correct |
196 ms |
32916 KB |
Output is correct |
8 |
Correct |
152 ms |
33464 KB |
Output is correct |
9 |
Correct |
195 ms |
34140 KB |
Output is correct |
10 |
Correct |
148 ms |
32956 KB |
Output is correct |
11 |
Correct |
191 ms |
32748 KB |
Output is correct |
12 |
Correct |
156 ms |
34400 KB |
Output is correct |
13 |
Correct |
194 ms |
32928 KB |
Output is correct |
14 |
Correct |
200 ms |
33536 KB |
Output is correct |
15 |
Correct |
153 ms |
34648 KB |
Output is correct |
16 |
Correct |
194 ms |
33976 KB |
Output is correct |
17 |
Correct |
152 ms |
34020 KB |
Output is correct |
18 |
Correct |
196 ms |
33468 KB |
Output is correct |
19 |
Correct |
154 ms |
34236 KB |
Output is correct |
20 |
Correct |
192 ms |
33464 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
7 ms |
1372 KB |
Output is correct |
3 |
Correct |
7 ms |
1372 KB |
Output is correct |
4 |
Correct |
7 ms |
1596 KB |
Output is correct |
5 |
Correct |
7 ms |
1368 KB |
Output is correct |
6 |
Correct |
7 ms |
1368 KB |
Output is correct |
7 |
Correct |
7 ms |
1624 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
460 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
6 ms |
1372 KB |
Output is correct |
15 |
Correct |
6 ms |
1452 KB |
Output is correct |
16 |
Correct |
6 ms |
1372 KB |
Output is correct |
17 |
Correct |
6 ms |
1372 KB |
Output is correct |
18 |
Correct |
6 ms |
1452 KB |
Output is correct |
19 |
Correct |
5 ms |
1260 KB |
Output is correct |
20 |
Correct |
6 ms |
1372 KB |
Output is correct |
21 |
Correct |
6 ms |
1372 KB |
Output is correct |
22 |
Correct |
6 ms |
1372 KB |
Output is correct |
23 |
Correct |
5 ms |
1372 KB |
Output is correct |
24 |
Correct |
5 ms |
1236 KB |
Output is correct |
25 |
Correct |
6 ms |
1372 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
7 ms |
1372 KB |
Output is correct |
3 |
Correct |
7 ms |
1372 KB |
Output is correct |
4 |
Correct |
7 ms |
1596 KB |
Output is correct |
5 |
Correct |
7 ms |
1368 KB |
Output is correct |
6 |
Correct |
7 ms |
1368 KB |
Output is correct |
7 |
Correct |
7 ms |
1624 KB |
Output is correct |
8 |
Correct |
1 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
460 KB |
Output is correct |
10 |
Correct |
0 ms |
348 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
348 KB |
Output is correct |
14 |
Correct |
6 ms |
1372 KB |
Output is correct |
15 |
Correct |
6 ms |
1452 KB |
Output is correct |
16 |
Correct |
6 ms |
1372 KB |
Output is correct |
17 |
Correct |
6 ms |
1372 KB |
Output is correct |
18 |
Correct |
6 ms |
1452 KB |
Output is correct |
19 |
Correct |
5 ms |
1260 KB |
Output is correct |
20 |
Correct |
6 ms |
1372 KB |
Output is correct |
21 |
Correct |
6 ms |
1372 KB |
Output is correct |
22 |
Correct |
6 ms |
1372 KB |
Output is correct |
23 |
Correct |
5 ms |
1372 KB |
Output is correct |
24 |
Correct |
5 ms |
1236 KB |
Output is correct |
25 |
Correct |
6 ms |
1372 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
150 ms |
29404 KB |
Output is correct |
28 |
Correct |
192 ms |
29184 KB |
Output is correct |
29 |
Correct |
184 ms |
28856 KB |
Output is correct |
30 |
Correct |
185 ms |
28648 KB |
Output is correct |
31 |
Correct |
194 ms |
29488 KB |
Output is correct |
32 |
Correct |
195 ms |
30424 KB |
Output is correct |
33 |
Correct |
0 ms |
348 KB |
Output is correct |
34 |
Correct |
1 ms |
348 KB |
Output is correct |
35 |
Correct |
0 ms |
456 KB |
Output is correct |
36 |
Correct |
0 ms |
348 KB |
Output is correct |
37 |
Correct |
0 ms |
348 KB |
Output is correct |
38 |
Correct |
1 ms |
600 KB |
Output is correct |
39 |
Correct |
157 ms |
30172 KB |
Output is correct |
40 |
Correct |
162 ms |
29276 KB |
Output is correct |
41 |
Correct |
162 ms |
29372 KB |
Output is correct |
42 |
Correct |
155 ms |
29280 KB |
Output is correct |
43 |
Correct |
189 ms |
29632 KB |
Output is correct |
44 |
Correct |
168 ms |
28688 KB |
Output is correct |
45 |
Correct |
165 ms |
28524 KB |
Output is correct |
46 |
Correct |
154 ms |
29420 KB |
Output is correct |
47 |
Correct |
143 ms |
31676 KB |
Output is correct |
48 |
Correct |
143 ms |
30952 KB |
Output is correct |
49 |
Correct |
165 ms |
28608 KB |
Output is correct |
50 |
Correct |
152 ms |
29884 KB |
Output is correct |
51 |
Correct |
160 ms |
29112 KB |
Output is correct |
52 |
Correct |
145 ms |
28880 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
460 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
1 ms |
348 KB |
Output is correct |
17 |
Correct |
0 ms |
348 KB |
Output is correct |
18 |
Correct |
1 ms |
456 KB |
Output is correct |
19 |
Correct |
1 ms |
604 KB |
Output is correct |
20 |
Correct |
0 ms |
348 KB |
Output is correct |
21 |
Correct |
0 ms |
348 KB |
Output is correct |
22 |
Correct |
0 ms |
460 KB |
Output is correct |
23 |
Correct |
0 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
348 KB |
Output is correct |
25 |
Correct |
1 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
0 ms |
344 KB |
Output is correct |
30 |
Correct |
0 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
460 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
0 ms |
344 KB |
Output is correct |
17 |
Correct |
7 ms |
1372 KB |
Output is correct |
18 |
Correct |
7 ms |
1372 KB |
Output is correct |
19 |
Correct |
7 ms |
1596 KB |
Output is correct |
20 |
Correct |
7 ms |
1368 KB |
Output is correct |
21 |
Correct |
7 ms |
1368 KB |
Output is correct |
22 |
Correct |
7 ms |
1624 KB |
Output is correct |
23 |
Correct |
1 ms |
348 KB |
Output is correct |
24 |
Correct |
0 ms |
460 KB |
Output is correct |
25 |
Correct |
0 ms |
348 KB |
Output is correct |
26 |
Correct |
0 ms |
348 KB |
Output is correct |
27 |
Correct |
0 ms |
348 KB |
Output is correct |
28 |
Correct |
0 ms |
348 KB |
Output is correct |
29 |
Correct |
6 ms |
1372 KB |
Output is correct |
30 |
Correct |
6 ms |
1452 KB |
Output is correct |
31 |
Correct |
6 ms |
1372 KB |
Output is correct |
32 |
Correct |
6 ms |
1372 KB |
Output is correct |
33 |
Correct |
6 ms |
1452 KB |
Output is correct |
34 |
Correct |
5 ms |
1260 KB |
Output is correct |
35 |
Correct |
6 ms |
1372 KB |
Output is correct |
36 |
Correct |
6 ms |
1372 KB |
Output is correct |
37 |
Correct |
6 ms |
1372 KB |
Output is correct |
38 |
Correct |
5 ms |
1372 KB |
Output is correct |
39 |
Correct |
5 ms |
1236 KB |
Output is correct |
40 |
Correct |
6 ms |
1372 KB |
Output is correct |
41 |
Correct |
0 ms |
348 KB |
Output is correct |
42 |
Correct |
5 ms |
1368 KB |
Output is correct |
43 |
Correct |
9 ms |
1628 KB |
Output is correct |
44 |
Correct |
7 ms |
1448 KB |
Output is correct |
45 |
Correct |
7 ms |
1588 KB |
Output is correct |
46 |
Correct |
9 ms |
1372 KB |
Output is correct |
47 |
Correct |
8 ms |
1376 KB |
Output is correct |
48 |
Correct |
0 ms |
344 KB |
Output is correct |
49 |
Correct |
0 ms |
344 KB |
Output is correct |
50 |
Correct |
1 ms |
348 KB |
Output is correct |
51 |
Correct |
1 ms |
456 KB |
Output is correct |
52 |
Correct |
1 ms |
348 KB |
Output is correct |
53 |
Correct |
0 ms |
456 KB |
Output is correct |
54 |
Correct |
7 ms |
1372 KB |
Output is correct |
55 |
Correct |
8 ms |
1372 KB |
Output is correct |
56 |
Correct |
7 ms |
1448 KB |
Output is correct |
57 |
Correct |
7 ms |
1372 KB |
Output is correct |
58 |
Correct |
8 ms |
1376 KB |
Output is correct |
59 |
Correct |
5 ms |
1372 KB |
Output is correct |
60 |
Correct |
6 ms |
1488 KB |
Output is correct |
61 |
Correct |
6 ms |
1368 KB |
Output is correct |
62 |
Correct |
5 ms |
1372 KB |
Output is correct |
63 |
Correct |
6 ms |
1368 KB |
Output is correct |
64 |
Correct |
8 ms |
1488 KB |
Output is correct |
65 |
Correct |
6 ms |
1368 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
1 ms |
348 KB |
Output is correct |
5 |
Correct |
1 ms |
348 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
0 ms |
348 KB |
Output is correct |
9 |
Correct |
0 ms |
348 KB |
Output is correct |
10 |
Correct |
1 ms |
344 KB |
Output is correct |
11 |
Correct |
0 ms |
348 KB |
Output is correct |
12 |
Correct |
0 ms |
348 KB |
Output is correct |
13 |
Correct |
0 ms |
460 KB |
Output is correct |
14 |
Correct |
0 ms |
348 KB |
Output is correct |
15 |
Correct |
1 ms |
348 KB |
Output is correct |
16 |
Correct |
195 ms |
33540 KB |
Output is correct |
17 |
Correct |
211 ms |
33468 KB |
Output is correct |
18 |
Correct |
194 ms |
33212 KB |
Output is correct |
19 |
Correct |
151 ms |
34248 KB |
Output is correct |
20 |
Correct |
158 ms |
33828 KB |
Output is correct |
21 |
Correct |
193 ms |
32740 KB |
Output is correct |
22 |
Correct |
196 ms |
32916 KB |
Output is correct |
23 |
Correct |
152 ms |
33464 KB |
Output is correct |
24 |
Correct |
195 ms |
34140 KB |
Output is correct |
25 |
Correct |
148 ms |
32956 KB |
Output is correct |
26 |
Correct |
191 ms |
32748 KB |
Output is correct |
27 |
Correct |
156 ms |
34400 KB |
Output is correct |
28 |
Correct |
194 ms |
32928 KB |
Output is correct |
29 |
Correct |
200 ms |
33536 KB |
Output is correct |
30 |
Correct |
153 ms |
34648 KB |
Output is correct |
31 |
Correct |
194 ms |
33976 KB |
Output is correct |
32 |
Correct |
152 ms |
34020 KB |
Output is correct |
33 |
Correct |
196 ms |
33468 KB |
Output is correct |
34 |
Correct |
154 ms |
34236 KB |
Output is correct |
35 |
Correct |
192 ms |
33464 KB |
Output is correct |
36 |
Correct |
0 ms |
344 KB |
Output is correct |
37 |
Correct |
7 ms |
1372 KB |
Output is correct |
38 |
Correct |
7 ms |
1372 KB |
Output is correct |
39 |
Correct |
7 ms |
1596 KB |
Output is correct |
40 |
Correct |
7 ms |
1368 KB |
Output is correct |
41 |
Correct |
7 ms |
1368 KB |
Output is correct |
42 |
Correct |
7 ms |
1624 KB |
Output is correct |
43 |
Correct |
1 ms |
348 KB |
Output is correct |
44 |
Correct |
0 ms |
460 KB |
Output is correct |
45 |
Correct |
0 ms |
348 KB |
Output is correct |
46 |
Correct |
0 ms |
348 KB |
Output is correct |
47 |
Correct |
0 ms |
348 KB |
Output is correct |
48 |
Correct |
0 ms |
348 KB |
Output is correct |
49 |
Correct |
6 ms |
1372 KB |
Output is correct |
50 |
Correct |
6 ms |
1452 KB |
Output is correct |
51 |
Correct |
6 ms |
1372 KB |
Output is correct |
52 |
Correct |
6 ms |
1372 KB |
Output is correct |
53 |
Correct |
6 ms |
1452 KB |
Output is correct |
54 |
Correct |
5 ms |
1260 KB |
Output is correct |
55 |
Correct |
6 ms |
1372 KB |
Output is correct |
56 |
Correct |
6 ms |
1372 KB |
Output is correct |
57 |
Correct |
6 ms |
1372 KB |
Output is correct |
58 |
Correct |
5 ms |
1372 KB |
Output is correct |
59 |
Correct |
5 ms |
1236 KB |
Output is correct |
60 |
Correct |
6 ms |
1372 KB |
Output is correct |
61 |
Correct |
0 ms |
348 KB |
Output is correct |
62 |
Correct |
150 ms |
29404 KB |
Output is correct |
63 |
Correct |
192 ms |
29184 KB |
Output is correct |
64 |
Correct |
184 ms |
28856 KB |
Output is correct |
65 |
Correct |
185 ms |
28648 KB |
Output is correct |
66 |
Correct |
194 ms |
29488 KB |
Output is correct |
67 |
Correct |
195 ms |
30424 KB |
Output is correct |
68 |
Correct |
0 ms |
348 KB |
Output is correct |
69 |
Correct |
1 ms |
348 KB |
Output is correct |
70 |
Correct |
0 ms |
456 KB |
Output is correct |
71 |
Correct |
0 ms |
348 KB |
Output is correct |
72 |
Correct |
0 ms |
348 KB |
Output is correct |
73 |
Correct |
1 ms |
600 KB |
Output is correct |
74 |
Correct |
157 ms |
30172 KB |
Output is correct |
75 |
Correct |
162 ms |
29276 KB |
Output is correct |
76 |
Correct |
162 ms |
29372 KB |
Output is correct |
77 |
Correct |
155 ms |
29280 KB |
Output is correct |
78 |
Correct |
189 ms |
29632 KB |
Output is correct |
79 |
Correct |
168 ms |
28688 KB |
Output is correct |
80 |
Correct |
165 ms |
28524 KB |
Output is correct |
81 |
Correct |
154 ms |
29420 KB |
Output is correct |
82 |
Correct |
143 ms |
31676 KB |
Output is correct |
83 |
Correct |
143 ms |
30952 KB |
Output is correct |
84 |
Correct |
165 ms |
28608 KB |
Output is correct |
85 |
Correct |
152 ms |
29884 KB |
Output is correct |
86 |
Correct |
160 ms |
29112 KB |
Output is correct |
87 |
Correct |
145 ms |
28880 KB |
Output is correct |
88 |
Correct |
1 ms |
348 KB |
Output is correct |
89 |
Correct |
0 ms |
348 KB |
Output is correct |
90 |
Correct |
1 ms |
456 KB |
Output is correct |
91 |
Correct |
1 ms |
604 KB |
Output is correct |
92 |
Correct |
0 ms |
348 KB |
Output is correct |
93 |
Correct |
0 ms |
348 KB |
Output is correct |
94 |
Correct |
0 ms |
460 KB |
Output is correct |
95 |
Correct |
0 ms |
348 KB |
Output is correct |
96 |
Correct |
0 ms |
348 KB |
Output is correct |
97 |
Correct |
1 ms |
348 KB |
Output is correct |
98 |
Correct |
0 ms |
348 KB |
Output is correct |
99 |
Correct |
0 ms |
348 KB |
Output is correct |
100 |
Correct |
0 ms |
348 KB |
Output is correct |
101 |
Correct |
0 ms |
344 KB |
Output is correct |
102 |
Correct |
0 ms |
344 KB |
Output is correct |
103 |
Correct |
0 ms |
348 KB |
Output is correct |
104 |
Correct |
5 ms |
1368 KB |
Output is correct |
105 |
Correct |
9 ms |
1628 KB |
Output is correct |
106 |
Correct |
7 ms |
1448 KB |
Output is correct |
107 |
Correct |
7 ms |
1588 KB |
Output is correct |
108 |
Correct |
9 ms |
1372 KB |
Output is correct |
109 |
Correct |
8 ms |
1376 KB |
Output is correct |
110 |
Correct |
0 ms |
344 KB |
Output is correct |
111 |
Correct |
0 ms |
344 KB |
Output is correct |
112 |
Correct |
1 ms |
348 KB |
Output is correct |
113 |
Correct |
1 ms |
456 KB |
Output is correct |
114 |
Correct |
1 ms |
348 KB |
Output is correct |
115 |
Correct |
0 ms |
456 KB |
Output is correct |
116 |
Correct |
7 ms |
1372 KB |
Output is correct |
117 |
Correct |
8 ms |
1372 KB |
Output is correct |
118 |
Correct |
7 ms |
1448 KB |
Output is correct |
119 |
Correct |
7 ms |
1372 KB |
Output is correct |
120 |
Correct |
8 ms |
1376 KB |
Output is correct |
121 |
Correct |
5 ms |
1372 KB |
Output is correct |
122 |
Correct |
6 ms |
1488 KB |
Output is correct |
123 |
Correct |
6 ms |
1368 KB |
Output is correct |
124 |
Correct |
5 ms |
1372 KB |
Output is correct |
125 |
Correct |
6 ms |
1368 KB |
Output is correct |
126 |
Correct |
8 ms |
1488 KB |
Output is correct |
127 |
Correct |
6 ms |
1368 KB |
Output is correct |
128 |
Correct |
0 ms |
348 KB |
Output is correct |
129 |
Correct |
221 ms |
32744 KB |
Output is correct |
130 |
Correct |
324 ms |
33040 KB |
Output is correct |
131 |
Correct |
299 ms |
35008 KB |
Output is correct |
132 |
Correct |
291 ms |
33208 KB |
Output is correct |
133 |
Correct |
296 ms |
33216 KB |
Output is correct |
134 |
Correct |
307 ms |
33860 KB |
Output is correct |
135 |
Correct |
1 ms |
592 KB |
Output is correct |
136 |
Correct |
0 ms |
344 KB |
Output is correct |
137 |
Correct |
1 ms |
348 KB |
Output is correct |
138 |
Correct |
1 ms |
348 KB |
Output is correct |
139 |
Correct |
1 ms |
348 KB |
Output is correct |
140 |
Correct |
0 ms |
348 KB |
Output is correct |
141 |
Correct |
344 ms |
33896 KB |
Output is correct |
142 |
Correct |
307 ms |
33524 KB |
Output is correct |
143 |
Correct |
308 ms |
33724 KB |
Output is correct |
144 |
Correct |
294 ms |
33812 KB |
Output is correct |
145 |
Correct |
313 ms |
33892 KB |
Output is correct |
146 |
Correct |
271 ms |
31932 KB |
Output is correct |
147 |
Correct |
274 ms |
32696 KB |
Output is correct |
148 |
Correct |
272 ms |
32352 KB |
Output is correct |
149 |
Correct |
227 ms |
33116 KB |
Output is correct |
150 |
Correct |
157 ms |
33388 KB |
Output is correct |
151 |
Correct |
151 ms |
33508 KB |
Output is correct |
152 |
Correct |
212 ms |
32956 KB |
Output is correct |
153 |
Correct |
179 ms |
33000 KB |
Output is correct |
154 |
Correct |
179 ms |
32956 KB |
Output is correct |
155 |
Correct |
222 ms |
33216 KB |
Output is correct |