/*************************************
* author: marvinthang *
* created: 08.05.2023 09:11:18 *
*************************************/
#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--; )
#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 << '}'; }
// end of template
const int MAX = 2.5e5 + 5;
int N, M, Q;
void init(void) {
cin >> N >> M >> Q;
}
int res[MAX], val[MAX];
vector <pair <int, int>> updateAt[MAX];
vector <pair <int, long long>> queriestAt[MAX];
struct Node {
long long sum_p, sum, cnt, zt, zv;
Node(int v = 0) {
sum_p = cnt = zv = max(v, 0);
sum = v;
zt = max(0, -v);
}
Node operator + (const Node &other) const {
Node res;
res.sum_p = sum_p + other.sum_p;
res.sum = sum + other.sum;
if (cnt >= other.zt) res.cnt = cnt + other.sum;
else res.cnt = other.cnt;
if (zt >= other.zt - sum) {
res.zt = zt;
res.zv = zv + other.sum;
} else {
res.zt = other.zt - sum;
res.zv = sum + other.zv;
}
return res;
}
} st[MAX << 2];
void update(int i, int l, int r, int p, int v) {
if (r - l == 1) {
st[i] = v;
return;
}
int m = l + r >> 1;
if (p < m) update(i << 1, l, m, p, v);
else update(i << 1 | 1, m, r, p, v);
st[i] = st[i << 1] + st[i << 1 | 1];
}
long long getSumP(int i, int l, int r, int p) {
if (l >= p) return 0;
if (r <= p) return st[i].sum_p;
int m = l + r >> 1;
if (p <= m) return getSumP(i << 1, l, m, p);
return st[i << 1].sum_p + getSumP(i << 1 | 1, m, r, p);
}
Node get(int i, int l, int r, int p) {
if (l >= p) return 0;
if (r <= p) return st[i];
int m = l + r >> 1;
if (p <= m) return get(i << 1, l, m, p);
return st[i << 1] + get(i << 1 | 1, m, r, p);
}
int getPos(long long val) {
int i = 1, l = 0, r = Q;
while (true) {
if (r - l == 1) return l;
int m = l + r >> 1;
if (val <= st[i << 1].sum_p) i = i << 1, r = m;
else {
val -= st[i << 1].sum_p;
i = i << 1 | 1;
l = m;
}
}
return -1;
}
void process(void) {
memset(res, -1, sizeof(res));
REP(i, Q) {
long long op, l, r, c, k; cin >> op >> l >> r;
if (op == 1) {
cin >> c >> k;
val[i] = c;
updateAt[l].emplace_back(i, k);
updateAt[r + 1].emplace_back(i, 0);
} else if (op == 2) {
cin >> k;
updateAt[l].emplace_back(i, -k);
updateAt[r + 1].emplace_back(i, 0);
} else queriestAt[l].emplace_back(i, r);
}
FORE(t, 1, N) {
for (auto [i, v]: updateAt[t]) update(1, 0, Q, i, v);
for (auto [i, v]: queriestAt[t]) {
long long p = get(1, 0, Q, i).cnt;
if (p < v) res[i] = 0;
else res[i] = val[getPos(getSumP(1, 0, Q, i) - p + v)];
}
}
REP(i, Q) if (res[i] >= 0) cout << res[i] << '\n';
}
int main(void) {
ios_base::sync_with_stdio(false); cin.tie(nullptr); // cout.tie(nullptr);
file("C");
init();
process();
cerr << "Time elapsed: " << TIME << " s.\n";
return (0^0);
}
Compilation message
foodcourt.cpp: In function 'void update(int, int, int, int, int)':
foodcourt.cpp:86:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
86 | int m = l + r >> 1;
| ~~^~~
foodcourt.cpp: In function 'long long int getSumP(int, int, int, int)':
foodcourt.cpp:95:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
95 | int m = l + r >> 1;
| ~~^~~
foodcourt.cpp: In function 'Node get(int, int, int, int)':
foodcourt.cpp:103:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
103 | int m = l + r >> 1;
| ~~^~~
foodcourt.cpp: In function 'int getPos(long long int)':
foodcourt.cpp:112:13: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
112 | int m = l + r >> 1;
| ~~^~~
foodcourt.cpp: In function 'int main()':
foodcourt.cpp:30:61: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:151:2: note: in expansion of macro 'file'
151 | file("C");
| ^~~~
foodcourt.cpp:30:94: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | #define file(name) if (fopen(name".inp", "r")) { freopen(name".inp", "r", stdin); freopen(name".out", "w", stdout); }
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
foodcourt.cpp:151:2: note: in expansion of macro 'file'
151 | file("C");
| ^~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
52204 KB |
Output is correct |
2 |
Correct |
26 ms |
52228 KB |
Output is correct |
3 |
Correct |
25 ms |
52220 KB |
Output is correct |
4 |
Correct |
25 ms |
52180 KB |
Output is correct |
5 |
Correct |
25 ms |
52300 KB |
Output is correct |
6 |
Correct |
29 ms |
52188 KB |
Output is correct |
7 |
Correct |
26 ms |
52172 KB |
Output is correct |
8 |
Correct |
25 ms |
52172 KB |
Output is correct |
9 |
Correct |
25 ms |
52264 KB |
Output is correct |
10 |
Correct |
25 ms |
52280 KB |
Output is correct |
11 |
Correct |
25 ms |
52232 KB |
Output is correct |
12 |
Correct |
25 ms |
52244 KB |
Output is correct |
13 |
Correct |
25 ms |
52180 KB |
Output is correct |
14 |
Correct |
24 ms |
52252 KB |
Output is correct |
15 |
Correct |
24 ms |
52204 KB |
Output is correct |
16 |
Correct |
25 ms |
52244 KB |
Output is correct |
17 |
Correct |
25 ms |
52180 KB |
Output is correct |
18 |
Correct |
25 ms |
52308 KB |
Output is correct |
19 |
Correct |
24 ms |
52200 KB |
Output is correct |
20 |
Correct |
27 ms |
52240 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
52204 KB |
Output is correct |
2 |
Correct |
26 ms |
52228 KB |
Output is correct |
3 |
Correct |
25 ms |
52220 KB |
Output is correct |
4 |
Correct |
25 ms |
52180 KB |
Output is correct |
5 |
Correct |
25 ms |
52300 KB |
Output is correct |
6 |
Correct |
29 ms |
52188 KB |
Output is correct |
7 |
Correct |
26 ms |
52172 KB |
Output is correct |
8 |
Correct |
25 ms |
52172 KB |
Output is correct |
9 |
Correct |
25 ms |
52264 KB |
Output is correct |
10 |
Correct |
25 ms |
52280 KB |
Output is correct |
11 |
Correct |
25 ms |
52232 KB |
Output is correct |
12 |
Correct |
25 ms |
52244 KB |
Output is correct |
13 |
Correct |
25 ms |
52180 KB |
Output is correct |
14 |
Correct |
24 ms |
52252 KB |
Output is correct |
15 |
Correct |
24 ms |
52204 KB |
Output is correct |
16 |
Correct |
25 ms |
52244 KB |
Output is correct |
17 |
Correct |
25 ms |
52180 KB |
Output is correct |
18 |
Correct |
25 ms |
52308 KB |
Output is correct |
19 |
Correct |
24 ms |
52200 KB |
Output is correct |
20 |
Correct |
27 ms |
52240 KB |
Output is correct |
21 |
Correct |
25 ms |
52180 KB |
Output is correct |
22 |
Correct |
30 ms |
52308 KB |
Output is correct |
23 |
Correct |
25 ms |
52180 KB |
Output is correct |
24 |
Correct |
29 ms |
52224 KB |
Output is correct |
25 |
Correct |
27 ms |
52236 KB |
Output is correct |
26 |
Correct |
25 ms |
52172 KB |
Output is correct |
27 |
Correct |
26 ms |
52264 KB |
Output is correct |
28 |
Correct |
25 ms |
52232 KB |
Output is correct |
29 |
Correct |
25 ms |
52260 KB |
Output is correct |
30 |
Correct |
29 ms |
52232 KB |
Output is correct |
31 |
Correct |
27 ms |
52224 KB |
Output is correct |
32 |
Correct |
26 ms |
52280 KB |
Output is correct |
33 |
Correct |
25 ms |
52188 KB |
Output is correct |
34 |
Correct |
25 ms |
52268 KB |
Output is correct |
35 |
Correct |
24 ms |
52244 KB |
Output is correct |
36 |
Correct |
26 ms |
52244 KB |
Output is correct |
37 |
Correct |
26 ms |
52180 KB |
Output is correct |
38 |
Correct |
26 ms |
52232 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
99 ms |
55912 KB |
Output is correct |
2 |
Correct |
85 ms |
55912 KB |
Output is correct |
3 |
Correct |
85 ms |
55896 KB |
Output is correct |
4 |
Correct |
84 ms |
55908 KB |
Output is correct |
5 |
Correct |
84 ms |
55956 KB |
Output is correct |
6 |
Correct |
84 ms |
55884 KB |
Output is correct |
7 |
Correct |
48 ms |
54488 KB |
Output is correct |
8 |
Correct |
50 ms |
54464 KB |
Output is correct |
9 |
Correct |
83 ms |
55780 KB |
Output is correct |
10 |
Correct |
88 ms |
55960 KB |
Output is correct |
11 |
Correct |
83 ms |
55956 KB |
Output is correct |
12 |
Correct |
91 ms |
56060 KB |
Output is correct |
13 |
Correct |
83 ms |
55244 KB |
Output is correct |
14 |
Correct |
85 ms |
55804 KB |
Output is correct |
15 |
Correct |
81 ms |
55776 KB |
Output is correct |
16 |
Correct |
89 ms |
55976 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
345 ms |
66612 KB |
Output is correct |
2 |
Correct |
311 ms |
63820 KB |
Output is correct |
3 |
Correct |
396 ms |
68176 KB |
Output is correct |
4 |
Correct |
268 ms |
64200 KB |
Output is correct |
5 |
Correct |
269 ms |
63932 KB |
Output is correct |
6 |
Correct |
387 ms |
68204 KB |
Output is correct |
7 |
Correct |
145 ms |
61572 KB |
Output is correct |
8 |
Correct |
150 ms |
61640 KB |
Output is correct |
9 |
Correct |
347 ms |
68096 KB |
Output is correct |
10 |
Correct |
350 ms |
68240 KB |
Output is correct |
11 |
Correct |
391 ms |
67616 KB |
Output is correct |
12 |
Correct |
441 ms |
68168 KB |
Output is correct |
13 |
Correct |
401 ms |
67776 KB |
Output is correct |
14 |
Correct |
430 ms |
68136 KB |
Output is correct |
15 |
Correct |
426 ms |
67996 KB |
Output is correct |
16 |
Correct |
420 ms |
68052 KB |
Output is correct |
17 |
Correct |
414 ms |
68044 KB |
Output is correct |
18 |
Correct |
429 ms |
67916 KB |
Output is correct |
19 |
Correct |
411 ms |
68072 KB |
Output is correct |
20 |
Correct |
414 ms |
67828 KB |
Output is correct |
21 |
Correct |
434 ms |
68104 KB |
Output is correct |
22 |
Correct |
403 ms |
67916 KB |
Output is correct |
23 |
Correct |
409 ms |
67992 KB |
Output is correct |
24 |
Correct |
402 ms |
67984 KB |
Output is correct |
25 |
Correct |
303 ms |
65740 KB |
Output is correct |
26 |
Correct |
302 ms |
65984 KB |
Output is correct |
27 |
Correct |
297 ms |
67216 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
52204 KB |
Output is correct |
2 |
Correct |
26 ms |
52228 KB |
Output is correct |
3 |
Correct |
25 ms |
52220 KB |
Output is correct |
4 |
Correct |
25 ms |
52180 KB |
Output is correct |
5 |
Correct |
25 ms |
52300 KB |
Output is correct |
6 |
Correct |
29 ms |
52188 KB |
Output is correct |
7 |
Correct |
26 ms |
52172 KB |
Output is correct |
8 |
Correct |
25 ms |
52172 KB |
Output is correct |
9 |
Correct |
25 ms |
52264 KB |
Output is correct |
10 |
Correct |
25 ms |
52280 KB |
Output is correct |
11 |
Correct |
25 ms |
52232 KB |
Output is correct |
12 |
Correct |
25 ms |
52244 KB |
Output is correct |
13 |
Correct |
25 ms |
52180 KB |
Output is correct |
14 |
Correct |
24 ms |
52252 KB |
Output is correct |
15 |
Correct |
24 ms |
52204 KB |
Output is correct |
16 |
Correct |
25 ms |
52244 KB |
Output is correct |
17 |
Correct |
25 ms |
52180 KB |
Output is correct |
18 |
Correct |
25 ms |
52308 KB |
Output is correct |
19 |
Correct |
24 ms |
52200 KB |
Output is correct |
20 |
Correct |
27 ms |
52240 KB |
Output is correct |
21 |
Correct |
99 ms |
55912 KB |
Output is correct |
22 |
Correct |
85 ms |
55912 KB |
Output is correct |
23 |
Correct |
85 ms |
55896 KB |
Output is correct |
24 |
Correct |
84 ms |
55908 KB |
Output is correct |
25 |
Correct |
84 ms |
55956 KB |
Output is correct |
26 |
Correct |
84 ms |
55884 KB |
Output is correct |
27 |
Correct |
48 ms |
54488 KB |
Output is correct |
28 |
Correct |
50 ms |
54464 KB |
Output is correct |
29 |
Correct |
83 ms |
55780 KB |
Output is correct |
30 |
Correct |
88 ms |
55960 KB |
Output is correct |
31 |
Correct |
83 ms |
55956 KB |
Output is correct |
32 |
Correct |
91 ms |
56060 KB |
Output is correct |
33 |
Correct |
83 ms |
55244 KB |
Output is correct |
34 |
Correct |
85 ms |
55804 KB |
Output is correct |
35 |
Correct |
81 ms |
55776 KB |
Output is correct |
36 |
Correct |
89 ms |
55976 KB |
Output is correct |
37 |
Correct |
82 ms |
55384 KB |
Output is correct |
38 |
Correct |
79 ms |
55200 KB |
Output is correct |
39 |
Correct |
52 ms |
53964 KB |
Output is correct |
40 |
Correct |
53 ms |
54372 KB |
Output is correct |
41 |
Correct |
85 ms |
55700 KB |
Output is correct |
42 |
Correct |
93 ms |
55760 KB |
Output is correct |
43 |
Correct |
92 ms |
55752 KB |
Output is correct |
44 |
Correct |
97 ms |
55744 KB |
Output is correct |
45 |
Correct |
94 ms |
55776 KB |
Output is correct |
46 |
Correct |
104 ms |
55808 KB |
Output is correct |
47 |
Correct |
60 ms |
54660 KB |
Output is correct |
48 |
Correct |
88 ms |
55188 KB |
Output is correct |
49 |
Correct |
74 ms |
54708 KB |
Output is correct |
50 |
Correct |
78 ms |
55300 KB |
Output is correct |
51 |
Correct |
90 ms |
55828 KB |
Output is correct |
52 |
Correct |
105 ms |
55880 KB |
Output is correct |
53 |
Correct |
78 ms |
55184 KB |
Output is correct |
54 |
Correct |
94 ms |
55964 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
93 ms |
56104 KB |
Output is correct |
2 |
Correct |
99 ms |
56340 KB |
Output is correct |
3 |
Correct |
95 ms |
56524 KB |
Output is correct |
4 |
Correct |
75 ms |
55244 KB |
Output is correct |
5 |
Correct |
86 ms |
55816 KB |
Output is correct |
6 |
Correct |
99 ms |
56456 KB |
Output is correct |
7 |
Correct |
58 ms |
54844 KB |
Output is correct |
8 |
Correct |
54 ms |
54740 KB |
Output is correct |
9 |
Correct |
73 ms |
55504 KB |
Output is correct |
10 |
Correct |
65 ms |
54736 KB |
Output is correct |
11 |
Correct |
85 ms |
55776 KB |
Output is correct |
12 |
Correct |
86 ms |
55752 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
52204 KB |
Output is correct |
2 |
Correct |
26 ms |
52228 KB |
Output is correct |
3 |
Correct |
25 ms |
52220 KB |
Output is correct |
4 |
Correct |
25 ms |
52180 KB |
Output is correct |
5 |
Correct |
25 ms |
52300 KB |
Output is correct |
6 |
Correct |
29 ms |
52188 KB |
Output is correct |
7 |
Correct |
26 ms |
52172 KB |
Output is correct |
8 |
Correct |
25 ms |
52172 KB |
Output is correct |
9 |
Correct |
25 ms |
52264 KB |
Output is correct |
10 |
Correct |
25 ms |
52280 KB |
Output is correct |
11 |
Correct |
25 ms |
52232 KB |
Output is correct |
12 |
Correct |
25 ms |
52244 KB |
Output is correct |
13 |
Correct |
25 ms |
52180 KB |
Output is correct |
14 |
Correct |
24 ms |
52252 KB |
Output is correct |
15 |
Correct |
24 ms |
52204 KB |
Output is correct |
16 |
Correct |
25 ms |
52244 KB |
Output is correct |
17 |
Correct |
25 ms |
52180 KB |
Output is correct |
18 |
Correct |
25 ms |
52308 KB |
Output is correct |
19 |
Correct |
24 ms |
52200 KB |
Output is correct |
20 |
Correct |
27 ms |
52240 KB |
Output is correct |
21 |
Correct |
25 ms |
52180 KB |
Output is correct |
22 |
Correct |
30 ms |
52308 KB |
Output is correct |
23 |
Correct |
25 ms |
52180 KB |
Output is correct |
24 |
Correct |
29 ms |
52224 KB |
Output is correct |
25 |
Correct |
27 ms |
52236 KB |
Output is correct |
26 |
Correct |
25 ms |
52172 KB |
Output is correct |
27 |
Correct |
26 ms |
52264 KB |
Output is correct |
28 |
Correct |
25 ms |
52232 KB |
Output is correct |
29 |
Correct |
25 ms |
52260 KB |
Output is correct |
30 |
Correct |
29 ms |
52232 KB |
Output is correct |
31 |
Correct |
27 ms |
52224 KB |
Output is correct |
32 |
Correct |
26 ms |
52280 KB |
Output is correct |
33 |
Correct |
25 ms |
52188 KB |
Output is correct |
34 |
Correct |
25 ms |
52268 KB |
Output is correct |
35 |
Correct |
24 ms |
52244 KB |
Output is correct |
36 |
Correct |
26 ms |
52244 KB |
Output is correct |
37 |
Correct |
26 ms |
52180 KB |
Output is correct |
38 |
Correct |
26 ms |
52232 KB |
Output is correct |
39 |
Correct |
99 ms |
55912 KB |
Output is correct |
40 |
Correct |
85 ms |
55912 KB |
Output is correct |
41 |
Correct |
85 ms |
55896 KB |
Output is correct |
42 |
Correct |
84 ms |
55908 KB |
Output is correct |
43 |
Correct |
84 ms |
55956 KB |
Output is correct |
44 |
Correct |
84 ms |
55884 KB |
Output is correct |
45 |
Correct |
48 ms |
54488 KB |
Output is correct |
46 |
Correct |
50 ms |
54464 KB |
Output is correct |
47 |
Correct |
83 ms |
55780 KB |
Output is correct |
48 |
Correct |
88 ms |
55960 KB |
Output is correct |
49 |
Correct |
83 ms |
55956 KB |
Output is correct |
50 |
Correct |
91 ms |
56060 KB |
Output is correct |
51 |
Correct |
83 ms |
55244 KB |
Output is correct |
52 |
Correct |
85 ms |
55804 KB |
Output is correct |
53 |
Correct |
81 ms |
55776 KB |
Output is correct |
54 |
Correct |
89 ms |
55976 KB |
Output is correct |
55 |
Correct |
82 ms |
55384 KB |
Output is correct |
56 |
Correct |
79 ms |
55200 KB |
Output is correct |
57 |
Correct |
52 ms |
53964 KB |
Output is correct |
58 |
Correct |
53 ms |
54372 KB |
Output is correct |
59 |
Correct |
85 ms |
55700 KB |
Output is correct |
60 |
Correct |
93 ms |
55760 KB |
Output is correct |
61 |
Correct |
92 ms |
55752 KB |
Output is correct |
62 |
Correct |
97 ms |
55744 KB |
Output is correct |
63 |
Correct |
94 ms |
55776 KB |
Output is correct |
64 |
Correct |
104 ms |
55808 KB |
Output is correct |
65 |
Correct |
60 ms |
54660 KB |
Output is correct |
66 |
Correct |
88 ms |
55188 KB |
Output is correct |
67 |
Correct |
74 ms |
54708 KB |
Output is correct |
68 |
Correct |
78 ms |
55300 KB |
Output is correct |
69 |
Correct |
90 ms |
55828 KB |
Output is correct |
70 |
Correct |
105 ms |
55880 KB |
Output is correct |
71 |
Correct |
78 ms |
55184 KB |
Output is correct |
72 |
Correct |
94 ms |
55964 KB |
Output is correct |
73 |
Correct |
93 ms |
56104 KB |
Output is correct |
74 |
Correct |
99 ms |
56340 KB |
Output is correct |
75 |
Correct |
95 ms |
56524 KB |
Output is correct |
76 |
Correct |
75 ms |
55244 KB |
Output is correct |
77 |
Correct |
86 ms |
55816 KB |
Output is correct |
78 |
Correct |
99 ms |
56456 KB |
Output is correct |
79 |
Correct |
58 ms |
54844 KB |
Output is correct |
80 |
Correct |
54 ms |
54740 KB |
Output is correct |
81 |
Correct |
73 ms |
55504 KB |
Output is correct |
82 |
Correct |
65 ms |
54736 KB |
Output is correct |
83 |
Correct |
85 ms |
55776 KB |
Output is correct |
84 |
Correct |
86 ms |
55752 KB |
Output is correct |
85 |
Correct |
97 ms |
55928 KB |
Output is correct |
86 |
Correct |
109 ms |
56284 KB |
Output is correct |
87 |
Correct |
92 ms |
55864 KB |
Output is correct |
88 |
Correct |
110 ms |
56456 KB |
Output is correct |
89 |
Correct |
79 ms |
54924 KB |
Output is correct |
90 |
Correct |
102 ms |
56356 KB |
Output is correct |
91 |
Correct |
85 ms |
55464 KB |
Output is correct |
92 |
Correct |
84 ms |
55268 KB |
Output is correct |
93 |
Correct |
102 ms |
56372 KB |
Output is correct |
94 |
Correct |
112 ms |
56268 KB |
Output is correct |
95 |
Correct |
101 ms |
56236 KB |
Output is correct |
96 |
Correct |
106 ms |
56272 KB |
Output is correct |
97 |
Correct |
112 ms |
56244 KB |
Output is correct |
98 |
Correct |
90 ms |
55612 KB |
Output is correct |
99 |
Correct |
67 ms |
55164 KB |
Output is correct |
100 |
Correct |
76 ms |
54980 KB |
Output is correct |
101 |
Correct |
88 ms |
55716 KB |
Output is correct |
102 |
Correct |
90 ms |
56140 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
52204 KB |
Output is correct |
2 |
Correct |
26 ms |
52228 KB |
Output is correct |
3 |
Correct |
25 ms |
52220 KB |
Output is correct |
4 |
Correct |
25 ms |
52180 KB |
Output is correct |
5 |
Correct |
25 ms |
52300 KB |
Output is correct |
6 |
Correct |
29 ms |
52188 KB |
Output is correct |
7 |
Correct |
26 ms |
52172 KB |
Output is correct |
8 |
Correct |
25 ms |
52172 KB |
Output is correct |
9 |
Correct |
25 ms |
52264 KB |
Output is correct |
10 |
Correct |
25 ms |
52280 KB |
Output is correct |
11 |
Correct |
25 ms |
52232 KB |
Output is correct |
12 |
Correct |
25 ms |
52244 KB |
Output is correct |
13 |
Correct |
25 ms |
52180 KB |
Output is correct |
14 |
Correct |
24 ms |
52252 KB |
Output is correct |
15 |
Correct |
24 ms |
52204 KB |
Output is correct |
16 |
Correct |
25 ms |
52244 KB |
Output is correct |
17 |
Correct |
25 ms |
52180 KB |
Output is correct |
18 |
Correct |
25 ms |
52308 KB |
Output is correct |
19 |
Correct |
24 ms |
52200 KB |
Output is correct |
20 |
Correct |
27 ms |
52240 KB |
Output is correct |
21 |
Correct |
25 ms |
52180 KB |
Output is correct |
22 |
Correct |
30 ms |
52308 KB |
Output is correct |
23 |
Correct |
25 ms |
52180 KB |
Output is correct |
24 |
Correct |
29 ms |
52224 KB |
Output is correct |
25 |
Correct |
27 ms |
52236 KB |
Output is correct |
26 |
Correct |
25 ms |
52172 KB |
Output is correct |
27 |
Correct |
26 ms |
52264 KB |
Output is correct |
28 |
Correct |
25 ms |
52232 KB |
Output is correct |
29 |
Correct |
25 ms |
52260 KB |
Output is correct |
30 |
Correct |
29 ms |
52232 KB |
Output is correct |
31 |
Correct |
27 ms |
52224 KB |
Output is correct |
32 |
Correct |
26 ms |
52280 KB |
Output is correct |
33 |
Correct |
25 ms |
52188 KB |
Output is correct |
34 |
Correct |
25 ms |
52268 KB |
Output is correct |
35 |
Correct |
24 ms |
52244 KB |
Output is correct |
36 |
Correct |
26 ms |
52244 KB |
Output is correct |
37 |
Correct |
26 ms |
52180 KB |
Output is correct |
38 |
Correct |
26 ms |
52232 KB |
Output is correct |
39 |
Correct |
99 ms |
55912 KB |
Output is correct |
40 |
Correct |
85 ms |
55912 KB |
Output is correct |
41 |
Correct |
85 ms |
55896 KB |
Output is correct |
42 |
Correct |
84 ms |
55908 KB |
Output is correct |
43 |
Correct |
84 ms |
55956 KB |
Output is correct |
44 |
Correct |
84 ms |
55884 KB |
Output is correct |
45 |
Correct |
48 ms |
54488 KB |
Output is correct |
46 |
Correct |
50 ms |
54464 KB |
Output is correct |
47 |
Correct |
83 ms |
55780 KB |
Output is correct |
48 |
Correct |
88 ms |
55960 KB |
Output is correct |
49 |
Correct |
83 ms |
55956 KB |
Output is correct |
50 |
Correct |
91 ms |
56060 KB |
Output is correct |
51 |
Correct |
83 ms |
55244 KB |
Output is correct |
52 |
Correct |
85 ms |
55804 KB |
Output is correct |
53 |
Correct |
81 ms |
55776 KB |
Output is correct |
54 |
Correct |
89 ms |
55976 KB |
Output is correct |
55 |
Correct |
345 ms |
66612 KB |
Output is correct |
56 |
Correct |
311 ms |
63820 KB |
Output is correct |
57 |
Correct |
396 ms |
68176 KB |
Output is correct |
58 |
Correct |
268 ms |
64200 KB |
Output is correct |
59 |
Correct |
269 ms |
63932 KB |
Output is correct |
60 |
Correct |
387 ms |
68204 KB |
Output is correct |
61 |
Correct |
145 ms |
61572 KB |
Output is correct |
62 |
Correct |
150 ms |
61640 KB |
Output is correct |
63 |
Correct |
347 ms |
68096 KB |
Output is correct |
64 |
Correct |
350 ms |
68240 KB |
Output is correct |
65 |
Correct |
391 ms |
67616 KB |
Output is correct |
66 |
Correct |
441 ms |
68168 KB |
Output is correct |
67 |
Correct |
401 ms |
67776 KB |
Output is correct |
68 |
Correct |
430 ms |
68136 KB |
Output is correct |
69 |
Correct |
426 ms |
67996 KB |
Output is correct |
70 |
Correct |
420 ms |
68052 KB |
Output is correct |
71 |
Correct |
414 ms |
68044 KB |
Output is correct |
72 |
Correct |
429 ms |
67916 KB |
Output is correct |
73 |
Correct |
411 ms |
68072 KB |
Output is correct |
74 |
Correct |
414 ms |
67828 KB |
Output is correct |
75 |
Correct |
434 ms |
68104 KB |
Output is correct |
76 |
Correct |
403 ms |
67916 KB |
Output is correct |
77 |
Correct |
409 ms |
67992 KB |
Output is correct |
78 |
Correct |
402 ms |
67984 KB |
Output is correct |
79 |
Correct |
303 ms |
65740 KB |
Output is correct |
80 |
Correct |
302 ms |
65984 KB |
Output is correct |
81 |
Correct |
297 ms |
67216 KB |
Output is correct |
82 |
Correct |
82 ms |
55384 KB |
Output is correct |
83 |
Correct |
79 ms |
55200 KB |
Output is correct |
84 |
Correct |
52 ms |
53964 KB |
Output is correct |
85 |
Correct |
53 ms |
54372 KB |
Output is correct |
86 |
Correct |
85 ms |
55700 KB |
Output is correct |
87 |
Correct |
93 ms |
55760 KB |
Output is correct |
88 |
Correct |
92 ms |
55752 KB |
Output is correct |
89 |
Correct |
97 ms |
55744 KB |
Output is correct |
90 |
Correct |
94 ms |
55776 KB |
Output is correct |
91 |
Correct |
104 ms |
55808 KB |
Output is correct |
92 |
Correct |
60 ms |
54660 KB |
Output is correct |
93 |
Correct |
88 ms |
55188 KB |
Output is correct |
94 |
Correct |
74 ms |
54708 KB |
Output is correct |
95 |
Correct |
78 ms |
55300 KB |
Output is correct |
96 |
Correct |
90 ms |
55828 KB |
Output is correct |
97 |
Correct |
105 ms |
55880 KB |
Output is correct |
98 |
Correct |
78 ms |
55184 KB |
Output is correct |
99 |
Correct |
94 ms |
55964 KB |
Output is correct |
100 |
Correct |
93 ms |
56104 KB |
Output is correct |
101 |
Correct |
99 ms |
56340 KB |
Output is correct |
102 |
Correct |
95 ms |
56524 KB |
Output is correct |
103 |
Correct |
75 ms |
55244 KB |
Output is correct |
104 |
Correct |
86 ms |
55816 KB |
Output is correct |
105 |
Correct |
99 ms |
56456 KB |
Output is correct |
106 |
Correct |
58 ms |
54844 KB |
Output is correct |
107 |
Correct |
54 ms |
54740 KB |
Output is correct |
108 |
Correct |
73 ms |
55504 KB |
Output is correct |
109 |
Correct |
65 ms |
54736 KB |
Output is correct |
110 |
Correct |
85 ms |
55776 KB |
Output is correct |
111 |
Correct |
86 ms |
55752 KB |
Output is correct |
112 |
Correct |
97 ms |
55928 KB |
Output is correct |
113 |
Correct |
109 ms |
56284 KB |
Output is correct |
114 |
Correct |
92 ms |
55864 KB |
Output is correct |
115 |
Correct |
110 ms |
56456 KB |
Output is correct |
116 |
Correct |
79 ms |
54924 KB |
Output is correct |
117 |
Correct |
102 ms |
56356 KB |
Output is correct |
118 |
Correct |
85 ms |
55464 KB |
Output is correct |
119 |
Correct |
84 ms |
55268 KB |
Output is correct |
120 |
Correct |
102 ms |
56372 KB |
Output is correct |
121 |
Correct |
112 ms |
56268 KB |
Output is correct |
122 |
Correct |
101 ms |
56236 KB |
Output is correct |
123 |
Correct |
106 ms |
56272 KB |
Output is correct |
124 |
Correct |
112 ms |
56244 KB |
Output is correct |
125 |
Correct |
90 ms |
55612 KB |
Output is correct |
126 |
Correct |
67 ms |
55164 KB |
Output is correct |
127 |
Correct |
76 ms |
54980 KB |
Output is correct |
128 |
Correct |
88 ms |
55716 KB |
Output is correct |
129 |
Correct |
90 ms |
56140 KB |
Output is correct |
130 |
Correct |
411 ms |
68724 KB |
Output is correct |
131 |
Correct |
280 ms |
64140 KB |
Output is correct |
132 |
Correct |
391 ms |
68608 KB |
Output is correct |
133 |
Correct |
363 ms |
68172 KB |
Output is correct |
134 |
Correct |
321 ms |
66616 KB |
Output is correct |
135 |
Correct |
373 ms |
68964 KB |
Output is correct |
136 |
Correct |
351 ms |
69028 KB |
Output is correct |
137 |
Correct |
358 ms |
69196 KB |
Output is correct |
138 |
Correct |
384 ms |
68144 KB |
Output is correct |
139 |
Correct |
365 ms |
68672 KB |
Output is correct |
140 |
Correct |
397 ms |
68172 KB |
Output is correct |
141 |
Correct |
459 ms |
68596 KB |
Output is correct |
142 |
Correct |
412 ms |
68556 KB |
Output is correct |
143 |
Correct |
474 ms |
68592 KB |
Output is correct |
144 |
Correct |
443 ms |
68428 KB |
Output is correct |
145 |
Correct |
394 ms |
68728 KB |
Output is correct |
146 |
Correct |
390 ms |
68440 KB |
Output is correct |
147 |
Correct |
423 ms |
68556 KB |
Output is correct |
148 |
Correct |
423 ms |
68488 KB |
Output is correct |
149 |
Correct |
412 ms |
68504 KB |
Output is correct |
150 |
Correct |
209 ms |
64240 KB |
Output is correct |
151 |
Correct |
331 ms |
66656 KB |
Output is correct |
152 |
Correct |
321 ms |
66652 KB |
Output is correct |
153 |
Correct |
316 ms |
68076 KB |
Output is correct |