# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
157264 |
2019-10-10T09:12:51 Z |
atoiz |
Two Dishes (JOI19_dishes) |
C++14 |
|
6639 ms |
220700 KB |
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cassert>
#include <numeric>
#include <tuple>
#include <bitset>
#include <unordered_map>
#include <unordered_set>
#include <map>
#include <set>
#include <queue>
#include <ios>
#include <iomanip>
#include <random>
#include <chrono>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define FORA(i, a) for (auto &i : a)
#define FORB(i, a, b) for (int i = a; i >= b; --i)
#define SZ(a) ((int) a.size());
#define ALL(a) begin(a), end(a)
const int MAXN = 1000007;
const ll INF = 1e16;
int N, M;
ll A[MAXN], B[MAXN], S[MAXN], T[MAXN], P[MAXN], Q[MAXN];
vector<int> ids[MAXN];
//
// ll lazy[MAXN << 2], tree[MAXN << 2];
//
// void push(int root, int lo, int hi)
// {
// if (lo < hi) {
// tree[root << 1] = max(tree[root], tree[root << 1] + lazy[root]);
// tree[root << 1 | 1] = max(tree[root], tree[root << 1 | 1] + lazy[root]);
// lazy[root << 1] += lazy[root];
// lazy[root << 1 | 1] += lazy[root];
// } else tree[root] = -INF;
// lazy[root] = 0;
// }
//
// void add(int l, int r, ll x, int root = 1, int lo = 0, int hi = M)
// {
// // FOR(i, l, r) tree[i] += x;
// // return;
// if (r < lo || hi < l) return;
// push(root, lo, hi);
// if (l <= lo && hi <= r) {
// lazy[root] += x;
// tree[root] += x;
// return;
// }
//
// int mid = (lo + hi) >> 1;
// add(l, r, x, root << 1, lo, mid);
// add(l, r, x, root << 1 | 1, mid + 1, hi);
// }
//
// void upd(int l, int r, ll x, int root = 1, int lo = 0, int hi = M)
// {
// // FOR(i, l, r) tree[i] = max(tree[i], x);
// // return;
// if (r < lo || hi < l) return;
// push(root, lo, hi);
// if (l <= lo && hi <= r) {
// tree[root] = max(tree[root], x);
// return;
// }
//
// int mid = (lo + hi) >> 1;
// upd(l, r, x, root << 1, lo, mid);
// upd(l, r, x, root << 1 | 1, mid + 1, hi);
// }
//
// ll get(int id, int root = 1, int lo = 0, int hi = M)
// {
// // return tree[id];
// push(root, lo, hi);
// if (lo == hi) return tree[root];
//
// int mid = (lo + hi) >> 1;
// if (id <= mid) return max(tree[root], get(id, root << 1, lo, mid));
// return max(tree[root], get(id, root << 1 | 1, mid + 1, hi));
// }
ll cur_max[MAXN << 2], lazy[MAXN << 2], tree[MAXN << 2];
void push(int root, int lo, int hi)
{
if (lo < hi) {
tree[root << 1] = max(tree[root << 1] + lazy[root], tree[root]);
tree[root << 1 | 1] = max(tree[root << 1 | 1] + lazy[root], tree[root]);
cur_max[root << 1] = max(cur_max[root << 1] + lazy[root], tree[root << 1]);
cur_max[root << 1 | 1] = max(cur_max[root << 1 | 1] + lazy[root], tree[root << 1 | 1]);
lazy[root << 1] += lazy[root];
lazy[root << 1 | 1] += lazy[root];
}
tree[root] = 0;
lazy[root] = 0;
}
void add(int l, int r, ll x, int root = 1, int lo = 0, int hi = M)
{
if (r < lo || hi < l) return;
push(root, lo, hi);
if (l <= lo && hi <= r) {
cur_max[root] += x;
lazy[root] += x;
tree[root] += x;
return;
}
int mid = (lo + hi) >> 1;
add(l, r, x, root << 1, lo, mid);
add(l, r, x, root << 1 | 1, mid + 1, hi);
cur_max[root] = max(tree[root], max(cur_max[root << 1], cur_max[root << 1 | 1]));
}
void upd(int l, int r, ll x, int root = 1, int lo = 0, int hi = M)
{
if (r < lo || hi < l) return;
push(root, lo, hi);
if (l <= lo && hi <= r) {
tree[root] = max(tree[root], x);
cur_max[root] = max(cur_max[root], x);
return;
}
int mid = (lo + hi) >> 1;
upd(l, r, x, root << 1, lo, mid);
upd(l, r, x, root << 1 | 1, mid + 1, hi);
cur_max[root] = max(tree[root], max(cur_max[root << 1], cur_max[root << 1 | 1]));
}
ll get(int l, int r, int root = 1, int lo = 0, int hi = M)
{
ll ans = 0;
if (r < lo || hi < l) return ans;
push(root, lo, hi);
if (l <= lo && hi <= r) return cur_max[root];
int mid = (lo + hi) >> 1;
ans = max(ans, get(l, r, root << 1, lo, mid));
ans = max(ans, get(l, r, root << 1 | 1, mid + 1, hi));
return ans;
}
ll read()
{
ll ans = 0; bool pos = 1; register char ch = getchar();
for (; ch == ' ' || ch == '\n'; ch = getchar());
if (ch == '-') pos = 0, ch = getchar();
for (; 47 < ch && ch < 58; ch = getchar()) ans = ans * 10 + ch - 48;
return (pos ? ans : -ans);
}
int main()
{
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
N = read(), M = read();
FOR(i, 1, N) A[i] = A[i - 1] + read(), S[i] = read(), P[i] = read(); A[N + 1] = INF;
FOR(i, 1, M) B[i] = B[i - 1] + read(), T[i] = read(), Q[i] = read(); B[M + 1] = INF;
FOR(j, 1, M) ids[upper_bound(A, A + N + 1, T[j] - B[j]) - A].push_back(j);
FOR(i, 1, N + 1) {
int j = upper_bound(B, B + M + 1, S[i] - A[i]) - B - 1;
if (j >= 0) add(0, j, P[i]);
vector<int> &vec = ids[i];
FORA(id, vec) add(id, M, Q[id]);
if (0 <= j && j < M) vec.insert(lower_bound(vec.begin(), vec.end(), j + 1), j + 1);
FORA(id, vec) upd(id, M, get(0, id - 1));
// FOR(id, 1, M) tree[id] = max(tree[id], tree[id - 1]);
// FOR(j, 0, M) {
// cerr << i << ' ' << j << ": " << get(j) << endl;
// }
}
cout << get(M, M) << endl;
}
Compilation message
dishes.cpp: In function 'int main()':
dishes.cpp:28:22: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
^
dishes.cpp:171:5: note: in expansion of macro 'FOR'
FOR(i, 1, N) A[i] = A[i - 1] + read(), S[i] = read(), P[i] = read(); A[N + 1] = INF;
^~~
dishes.cpp:171:74: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
FOR(i, 1, N) A[i] = A[i - 1] + read(), S[i] = read(), P[i] = read(); A[N + 1] = INF;
^
dishes.cpp:28:22: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
^
dishes.cpp:172:5: note: in expansion of macro 'FOR'
FOR(i, 1, M) B[i] = B[i - 1] + read(), T[i] = read(), Q[i] = read(); B[M + 1] = INF;
^~~
dishes.cpp:172:74: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
FOR(i, 1, M) B[i] = B[i - 1] + read(), T[i] = read(), Q[i] = read(); B[M + 1] = INF;
^
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
701 ms |
51320 KB |
Output is correct |
2 |
Correct |
721 ms |
52236 KB |
Output is correct |
3 |
Correct |
496 ms |
47796 KB |
Output is correct |
4 |
Correct |
554 ms |
46252 KB |
Output is correct |
5 |
Correct |
23 ms |
23928 KB |
Output is correct |
6 |
Correct |
659 ms |
51128 KB |
Output is correct |
7 |
Correct |
352 ms |
41944 KB |
Output is correct |
8 |
Correct |
135 ms |
29784 KB |
Output is correct |
9 |
Correct |
511 ms |
47728 KB |
Output is correct |
10 |
Correct |
655 ms |
53144 KB |
Output is correct |
11 |
Correct |
413 ms |
47820 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23928 KB |
Output is correct |
2 |
Correct |
24 ms |
23928 KB |
Output is correct |
3 |
Correct |
30 ms |
23932 KB |
Output is correct |
4 |
Correct |
23 ms |
23932 KB |
Output is correct |
5 |
Correct |
26 ms |
24056 KB |
Output is correct |
6 |
Correct |
29 ms |
23928 KB |
Output is correct |
7 |
Correct |
24 ms |
23928 KB |
Output is correct |
8 |
Correct |
23 ms |
23928 KB |
Output is correct |
9 |
Correct |
23 ms |
23928 KB |
Output is correct |
10 |
Correct |
23 ms |
23888 KB |
Output is correct |
11 |
Correct |
23 ms |
23932 KB |
Output is correct |
12 |
Correct |
29 ms |
23932 KB |
Output is correct |
13 |
Correct |
24 ms |
23940 KB |
Output is correct |
14 |
Correct |
24 ms |
23928 KB |
Output is correct |
15 |
Correct |
24 ms |
23928 KB |
Output is correct |
16 |
Correct |
24 ms |
23928 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23928 KB |
Output is correct |
2 |
Correct |
24 ms |
23928 KB |
Output is correct |
3 |
Correct |
30 ms |
23932 KB |
Output is correct |
4 |
Correct |
23 ms |
23932 KB |
Output is correct |
5 |
Correct |
26 ms |
24056 KB |
Output is correct |
6 |
Correct |
29 ms |
23928 KB |
Output is correct |
7 |
Correct |
24 ms |
23928 KB |
Output is correct |
8 |
Correct |
23 ms |
23928 KB |
Output is correct |
9 |
Correct |
23 ms |
23928 KB |
Output is correct |
10 |
Correct |
23 ms |
23888 KB |
Output is correct |
11 |
Correct |
23 ms |
23932 KB |
Output is correct |
12 |
Correct |
29 ms |
23932 KB |
Output is correct |
13 |
Correct |
24 ms |
23940 KB |
Output is correct |
14 |
Correct |
24 ms |
23928 KB |
Output is correct |
15 |
Correct |
24 ms |
23928 KB |
Output is correct |
16 |
Correct |
24 ms |
23928 KB |
Output is correct |
17 |
Correct |
28 ms |
24276 KB |
Output is correct |
18 |
Correct |
27 ms |
24184 KB |
Output is correct |
19 |
Correct |
29 ms |
24284 KB |
Output is correct |
20 |
Correct |
28 ms |
24156 KB |
Output is correct |
21 |
Correct |
29 ms |
24312 KB |
Output is correct |
22 |
Correct |
28 ms |
24184 KB |
Output is correct |
23 |
Correct |
29 ms |
24184 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23928 KB |
Output is correct |
2 |
Correct |
24 ms |
23928 KB |
Output is correct |
3 |
Correct |
30 ms |
23932 KB |
Output is correct |
4 |
Correct |
23 ms |
23932 KB |
Output is correct |
5 |
Correct |
26 ms |
24056 KB |
Output is correct |
6 |
Correct |
29 ms |
23928 KB |
Output is correct |
7 |
Correct |
24 ms |
23928 KB |
Output is correct |
8 |
Correct |
23 ms |
23928 KB |
Output is correct |
9 |
Correct |
23 ms |
23928 KB |
Output is correct |
10 |
Correct |
23 ms |
23888 KB |
Output is correct |
11 |
Correct |
23 ms |
23932 KB |
Output is correct |
12 |
Correct |
29 ms |
23932 KB |
Output is correct |
13 |
Correct |
24 ms |
23940 KB |
Output is correct |
14 |
Correct |
24 ms |
23928 KB |
Output is correct |
15 |
Correct |
24 ms |
23928 KB |
Output is correct |
16 |
Correct |
24 ms |
23928 KB |
Output is correct |
17 |
Correct |
28 ms |
24276 KB |
Output is correct |
18 |
Correct |
27 ms |
24184 KB |
Output is correct |
19 |
Correct |
29 ms |
24284 KB |
Output is correct |
20 |
Correct |
28 ms |
24156 KB |
Output is correct |
21 |
Correct |
29 ms |
24312 KB |
Output is correct |
22 |
Correct |
28 ms |
24184 KB |
Output is correct |
23 |
Correct |
29 ms |
24184 KB |
Output is correct |
24 |
Correct |
612 ms |
53640 KB |
Output is correct |
25 |
Correct |
449 ms |
47596 KB |
Output is correct |
26 |
Correct |
639 ms |
53832 KB |
Output is correct |
27 |
Correct |
484 ms |
53100 KB |
Output is correct |
28 |
Correct |
597 ms |
50132 KB |
Output is correct |
29 |
Correct |
466 ms |
47628 KB |
Output is correct |
30 |
Correct |
998 ms |
53052 KB |
Output is correct |
31 |
Correct |
359 ms |
44212 KB |
Output is correct |
32 |
Correct |
125 ms |
34020 KB |
Output is correct |
33 |
Correct |
607 ms |
51092 KB |
Output is correct |
34 |
Correct |
844 ms |
52008 KB |
Output is correct |
35 |
Correct |
931 ms |
54052 KB |
Output is correct |
36 |
Correct |
927 ms |
53996 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23928 KB |
Output is correct |
2 |
Correct |
24 ms |
23928 KB |
Output is correct |
3 |
Correct |
30 ms |
23932 KB |
Output is correct |
4 |
Correct |
23 ms |
23932 KB |
Output is correct |
5 |
Correct |
26 ms |
24056 KB |
Output is correct |
6 |
Correct |
29 ms |
23928 KB |
Output is correct |
7 |
Correct |
24 ms |
23928 KB |
Output is correct |
8 |
Correct |
23 ms |
23928 KB |
Output is correct |
9 |
Correct |
23 ms |
23928 KB |
Output is correct |
10 |
Correct |
23 ms |
23888 KB |
Output is correct |
11 |
Correct |
23 ms |
23932 KB |
Output is correct |
12 |
Correct |
29 ms |
23932 KB |
Output is correct |
13 |
Correct |
24 ms |
23940 KB |
Output is correct |
14 |
Correct |
24 ms |
23928 KB |
Output is correct |
15 |
Correct |
24 ms |
23928 KB |
Output is correct |
16 |
Correct |
24 ms |
23928 KB |
Output is correct |
17 |
Correct |
28 ms |
24276 KB |
Output is correct |
18 |
Correct |
27 ms |
24184 KB |
Output is correct |
19 |
Correct |
29 ms |
24284 KB |
Output is correct |
20 |
Correct |
28 ms |
24156 KB |
Output is correct |
21 |
Correct |
29 ms |
24312 KB |
Output is correct |
22 |
Correct |
28 ms |
24184 KB |
Output is correct |
23 |
Correct |
29 ms |
24184 KB |
Output is correct |
24 |
Correct |
612 ms |
53640 KB |
Output is correct |
25 |
Correct |
449 ms |
47596 KB |
Output is correct |
26 |
Correct |
639 ms |
53832 KB |
Output is correct |
27 |
Correct |
484 ms |
53100 KB |
Output is correct |
28 |
Correct |
597 ms |
50132 KB |
Output is correct |
29 |
Correct |
466 ms |
47628 KB |
Output is correct |
30 |
Correct |
998 ms |
53052 KB |
Output is correct |
31 |
Correct |
359 ms |
44212 KB |
Output is correct |
32 |
Correct |
125 ms |
34020 KB |
Output is correct |
33 |
Correct |
607 ms |
51092 KB |
Output is correct |
34 |
Correct |
844 ms |
52008 KB |
Output is correct |
35 |
Correct |
931 ms |
54052 KB |
Output is correct |
36 |
Correct |
927 ms |
53996 KB |
Output is correct |
37 |
Correct |
625 ms |
53676 KB |
Output is correct |
38 |
Correct |
511 ms |
52744 KB |
Output is correct |
39 |
Correct |
713 ms |
52708 KB |
Output is correct |
40 |
Correct |
716 ms |
52472 KB |
Output is correct |
41 |
Correct |
29 ms |
23928 KB |
Output is correct |
42 |
Correct |
1062 ms |
52596 KB |
Output is correct |
43 |
Correct |
662 ms |
50480 KB |
Output is correct |
44 |
Correct |
863 ms |
51356 KB |
Output is correct |
45 |
Correct |
954 ms |
52356 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
23 ms |
23928 KB |
Output is correct |
2 |
Correct |
24 ms |
23928 KB |
Output is correct |
3 |
Correct |
30 ms |
23932 KB |
Output is correct |
4 |
Correct |
23 ms |
23932 KB |
Output is correct |
5 |
Correct |
26 ms |
24056 KB |
Output is correct |
6 |
Correct |
29 ms |
23928 KB |
Output is correct |
7 |
Correct |
24 ms |
23928 KB |
Output is correct |
8 |
Correct |
23 ms |
23928 KB |
Output is correct |
9 |
Correct |
23 ms |
23928 KB |
Output is correct |
10 |
Correct |
23 ms |
23888 KB |
Output is correct |
11 |
Correct |
23 ms |
23932 KB |
Output is correct |
12 |
Correct |
29 ms |
23932 KB |
Output is correct |
13 |
Correct |
24 ms |
23940 KB |
Output is correct |
14 |
Correct |
24 ms |
23928 KB |
Output is correct |
15 |
Correct |
24 ms |
23928 KB |
Output is correct |
16 |
Correct |
24 ms |
23928 KB |
Output is correct |
17 |
Correct |
28 ms |
24276 KB |
Output is correct |
18 |
Correct |
27 ms |
24184 KB |
Output is correct |
19 |
Correct |
29 ms |
24284 KB |
Output is correct |
20 |
Correct |
28 ms |
24156 KB |
Output is correct |
21 |
Correct |
29 ms |
24312 KB |
Output is correct |
22 |
Correct |
28 ms |
24184 KB |
Output is correct |
23 |
Correct |
29 ms |
24184 KB |
Output is correct |
24 |
Correct |
612 ms |
53640 KB |
Output is correct |
25 |
Correct |
449 ms |
47596 KB |
Output is correct |
26 |
Correct |
639 ms |
53832 KB |
Output is correct |
27 |
Correct |
484 ms |
53100 KB |
Output is correct |
28 |
Correct |
597 ms |
50132 KB |
Output is correct |
29 |
Correct |
466 ms |
47628 KB |
Output is correct |
30 |
Correct |
998 ms |
53052 KB |
Output is correct |
31 |
Correct |
359 ms |
44212 KB |
Output is correct |
32 |
Correct |
125 ms |
34020 KB |
Output is correct |
33 |
Correct |
607 ms |
51092 KB |
Output is correct |
34 |
Correct |
844 ms |
52008 KB |
Output is correct |
35 |
Correct |
931 ms |
54052 KB |
Output is correct |
36 |
Correct |
927 ms |
53996 KB |
Output is correct |
37 |
Correct |
625 ms |
53676 KB |
Output is correct |
38 |
Correct |
511 ms |
52744 KB |
Output is correct |
39 |
Correct |
713 ms |
52708 KB |
Output is correct |
40 |
Correct |
716 ms |
52472 KB |
Output is correct |
41 |
Correct |
29 ms |
23928 KB |
Output is correct |
42 |
Correct |
1062 ms |
52596 KB |
Output is correct |
43 |
Correct |
662 ms |
50480 KB |
Output is correct |
44 |
Correct |
863 ms |
51356 KB |
Output is correct |
45 |
Correct |
954 ms |
52356 KB |
Output is correct |
46 |
Correct |
3310 ms |
155924 KB |
Output is correct |
47 |
Correct |
2662 ms |
220112 KB |
Output is correct |
48 |
Correct |
3827 ms |
207624 KB |
Output is correct |
49 |
Correct |
3831 ms |
207640 KB |
Output is correct |
50 |
Correct |
6639 ms |
220700 KB |
Output is correct |
51 |
Correct |
3749 ms |
207456 KB |
Output is correct |
52 |
Correct |
4776 ms |
208752 KB |
Output is correct |
53 |
Correct |
5909 ms |
189788 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
701 ms |
51320 KB |
Output is correct |
2 |
Correct |
721 ms |
52236 KB |
Output is correct |
3 |
Correct |
496 ms |
47796 KB |
Output is correct |
4 |
Correct |
554 ms |
46252 KB |
Output is correct |
5 |
Correct |
23 ms |
23928 KB |
Output is correct |
6 |
Correct |
659 ms |
51128 KB |
Output is correct |
7 |
Correct |
352 ms |
41944 KB |
Output is correct |
8 |
Correct |
135 ms |
29784 KB |
Output is correct |
9 |
Correct |
511 ms |
47728 KB |
Output is correct |
10 |
Correct |
655 ms |
53144 KB |
Output is correct |
11 |
Correct |
413 ms |
47820 KB |
Output is correct |
12 |
Correct |
23 ms |
23928 KB |
Output is correct |
13 |
Correct |
24 ms |
23928 KB |
Output is correct |
14 |
Correct |
30 ms |
23932 KB |
Output is correct |
15 |
Correct |
23 ms |
23932 KB |
Output is correct |
16 |
Correct |
26 ms |
24056 KB |
Output is correct |
17 |
Correct |
29 ms |
23928 KB |
Output is correct |
18 |
Correct |
24 ms |
23928 KB |
Output is correct |
19 |
Correct |
23 ms |
23928 KB |
Output is correct |
20 |
Correct |
23 ms |
23928 KB |
Output is correct |
21 |
Correct |
23 ms |
23888 KB |
Output is correct |
22 |
Correct |
23 ms |
23932 KB |
Output is correct |
23 |
Correct |
29 ms |
23932 KB |
Output is correct |
24 |
Correct |
24 ms |
23940 KB |
Output is correct |
25 |
Correct |
24 ms |
23928 KB |
Output is correct |
26 |
Correct |
24 ms |
23928 KB |
Output is correct |
27 |
Correct |
24 ms |
23928 KB |
Output is correct |
28 |
Correct |
28 ms |
24276 KB |
Output is correct |
29 |
Correct |
27 ms |
24184 KB |
Output is correct |
30 |
Correct |
29 ms |
24284 KB |
Output is correct |
31 |
Correct |
28 ms |
24156 KB |
Output is correct |
32 |
Correct |
29 ms |
24312 KB |
Output is correct |
33 |
Correct |
28 ms |
24184 KB |
Output is correct |
34 |
Correct |
29 ms |
24184 KB |
Output is correct |
35 |
Correct |
612 ms |
53640 KB |
Output is correct |
36 |
Correct |
449 ms |
47596 KB |
Output is correct |
37 |
Correct |
639 ms |
53832 KB |
Output is correct |
38 |
Correct |
484 ms |
53100 KB |
Output is correct |
39 |
Correct |
597 ms |
50132 KB |
Output is correct |
40 |
Correct |
466 ms |
47628 KB |
Output is correct |
41 |
Correct |
998 ms |
53052 KB |
Output is correct |
42 |
Correct |
359 ms |
44212 KB |
Output is correct |
43 |
Correct |
125 ms |
34020 KB |
Output is correct |
44 |
Correct |
607 ms |
51092 KB |
Output is correct |
45 |
Correct |
844 ms |
52008 KB |
Output is correct |
46 |
Correct |
931 ms |
54052 KB |
Output is correct |
47 |
Correct |
927 ms |
53996 KB |
Output is correct |
48 |
Correct |
625 ms |
53676 KB |
Output is correct |
49 |
Correct |
511 ms |
52744 KB |
Output is correct |
50 |
Correct |
713 ms |
52708 KB |
Output is correct |
51 |
Correct |
716 ms |
52472 KB |
Output is correct |
52 |
Correct |
29 ms |
23928 KB |
Output is correct |
53 |
Correct |
1062 ms |
52596 KB |
Output is correct |
54 |
Correct |
662 ms |
50480 KB |
Output is correct |
55 |
Correct |
863 ms |
51356 KB |
Output is correct |
56 |
Correct |
954 ms |
52356 KB |
Output is correct |
57 |
Incorrect |
634 ms |
53892 KB |
Output isn't correct |
58 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
701 ms |
51320 KB |
Output is correct |
2 |
Correct |
721 ms |
52236 KB |
Output is correct |
3 |
Correct |
496 ms |
47796 KB |
Output is correct |
4 |
Correct |
554 ms |
46252 KB |
Output is correct |
5 |
Correct |
23 ms |
23928 KB |
Output is correct |
6 |
Correct |
659 ms |
51128 KB |
Output is correct |
7 |
Correct |
352 ms |
41944 KB |
Output is correct |
8 |
Correct |
135 ms |
29784 KB |
Output is correct |
9 |
Correct |
511 ms |
47728 KB |
Output is correct |
10 |
Correct |
655 ms |
53144 KB |
Output is correct |
11 |
Correct |
413 ms |
47820 KB |
Output is correct |
12 |
Correct |
23 ms |
23928 KB |
Output is correct |
13 |
Correct |
24 ms |
23928 KB |
Output is correct |
14 |
Correct |
30 ms |
23932 KB |
Output is correct |
15 |
Correct |
23 ms |
23932 KB |
Output is correct |
16 |
Correct |
26 ms |
24056 KB |
Output is correct |
17 |
Correct |
29 ms |
23928 KB |
Output is correct |
18 |
Correct |
24 ms |
23928 KB |
Output is correct |
19 |
Correct |
23 ms |
23928 KB |
Output is correct |
20 |
Correct |
23 ms |
23928 KB |
Output is correct |
21 |
Correct |
23 ms |
23888 KB |
Output is correct |
22 |
Correct |
23 ms |
23932 KB |
Output is correct |
23 |
Correct |
29 ms |
23932 KB |
Output is correct |
24 |
Correct |
24 ms |
23940 KB |
Output is correct |
25 |
Correct |
24 ms |
23928 KB |
Output is correct |
26 |
Correct |
24 ms |
23928 KB |
Output is correct |
27 |
Correct |
24 ms |
23928 KB |
Output is correct |
28 |
Correct |
28 ms |
24276 KB |
Output is correct |
29 |
Correct |
27 ms |
24184 KB |
Output is correct |
30 |
Correct |
29 ms |
24284 KB |
Output is correct |
31 |
Correct |
28 ms |
24156 KB |
Output is correct |
32 |
Correct |
29 ms |
24312 KB |
Output is correct |
33 |
Correct |
28 ms |
24184 KB |
Output is correct |
34 |
Correct |
29 ms |
24184 KB |
Output is correct |
35 |
Correct |
612 ms |
53640 KB |
Output is correct |
36 |
Correct |
449 ms |
47596 KB |
Output is correct |
37 |
Correct |
639 ms |
53832 KB |
Output is correct |
38 |
Correct |
484 ms |
53100 KB |
Output is correct |
39 |
Correct |
597 ms |
50132 KB |
Output is correct |
40 |
Correct |
466 ms |
47628 KB |
Output is correct |
41 |
Correct |
998 ms |
53052 KB |
Output is correct |
42 |
Correct |
359 ms |
44212 KB |
Output is correct |
43 |
Correct |
125 ms |
34020 KB |
Output is correct |
44 |
Correct |
607 ms |
51092 KB |
Output is correct |
45 |
Correct |
844 ms |
52008 KB |
Output is correct |
46 |
Correct |
931 ms |
54052 KB |
Output is correct |
47 |
Correct |
927 ms |
53996 KB |
Output is correct |
48 |
Correct |
625 ms |
53676 KB |
Output is correct |
49 |
Correct |
511 ms |
52744 KB |
Output is correct |
50 |
Correct |
713 ms |
52708 KB |
Output is correct |
51 |
Correct |
716 ms |
52472 KB |
Output is correct |
52 |
Correct |
29 ms |
23928 KB |
Output is correct |
53 |
Correct |
1062 ms |
52596 KB |
Output is correct |
54 |
Correct |
662 ms |
50480 KB |
Output is correct |
55 |
Correct |
863 ms |
51356 KB |
Output is correct |
56 |
Correct |
954 ms |
52356 KB |
Output is correct |
57 |
Correct |
3310 ms |
155924 KB |
Output is correct |
58 |
Correct |
2662 ms |
220112 KB |
Output is correct |
59 |
Correct |
3827 ms |
207624 KB |
Output is correct |
60 |
Correct |
3831 ms |
207640 KB |
Output is correct |
61 |
Correct |
6639 ms |
220700 KB |
Output is correct |
62 |
Correct |
3749 ms |
207456 KB |
Output is correct |
63 |
Correct |
4776 ms |
208752 KB |
Output is correct |
64 |
Correct |
5909 ms |
189788 KB |
Output is correct |
65 |
Incorrect |
634 ms |
53892 KB |
Output isn't correct |
66 |
Halted |
0 ms |
0 KB |
- |