#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Nmax = 1e6 + 5;
const ll inf = 1e18;
struct restrictie
{
int x, y, add;
};
vector<restrictie> R[Nmax];
int n, m;
namespace rd
{
const int bsize = 1<<16;
char buffer[bsize+2];
int cursor;
static void refresh()
{
fread(buffer, 1, bsize, stdin), cursor = 0;
}
template <typename T>
static void read(T &x)
{
x = 0;
bool sgn = 0;
while(!isdigit(buffer[cursor]))
{
sgn |= (buffer[cursor] == '-');
++cursor;
if(cursor == bsize) refresh();
}
while(isdigit(buffer[cursor]))
{
x = x * 10 + buffer[cursor] - '0';
++cursor;
if(cursor == bsize) refresh();
}
if(sgn) x *= (-1);
}
}
void read_and_init()
{
rd :: refresh();
rd :: read(n); rd :: read(m);
int i;
vector<ll> A(n+1), B(m+1), S(n+1), T(m+1);
vector<int> P(n+1), Q(m+1), T1(n+1), T2(m+1);
for(i=1; i<=n; ++i) rd :: read(A[i]), rd :: read(S[i]), rd :: read(P[i]);
for(i=1; i<=m; ++i) rd :: read(B[i]), rd :: read(T[i]), rd :: read(Q[i]);
for(i=1; i<=n; ++i) A[i] += A[i-1];
for(i=1; i<=m; ++i) B[i] += B[i-1];
for(i=1; i<=n; ++i)
T1[i] = upper_bound(B.begin(), B.end(), S[i] - A[i]) - B.begin() - 1;
for(i=1; i<=m; ++i)
T2[i] = upper_bound(A.begin(), A.end(), T[i] - B[i]) - A.begin() - 1;
for(i=1; i<=n; ++i)
R[i].push_back({ 0, T1[i], P[i] });
for(i=1; i<=m; ++i)
R[T2[i]+1].push_back({ i, m, Q[i] });
}
#define left_son ((node<<1))
#define right_son ((node<<1)|1)
#define mid ((st+dr)>>1)
namespace aint
{
static ll mx[Nmax<<2], mn[Nmax<<2], val[Nmax<<2], add[Nmax<<2];
static vector<int> split;
static void propag(int node)
{
if(val[node] != inf)
{
mx[left_son] = mn[left_son] = mx[right_son] = mn[right_son] = val[node];
val[left_son] = val[right_son] = val[node];
val[node] = inf;
add[left_son] = add[right_son] = 0;
}
if(add[node])
{
mx[left_son] += add[node];
mn[left_son] += add[node];
mx[right_son] += add[node];
mn[right_son] += add[node];
add[left_son] += add[node];
add[right_son] += add[node];
add[node] = 0;
}
}
static void refresh(int node)
{
mx[node] = max(mx[left_son], mx[right_son]);
mn[node] = min(mn[left_son], mn[right_son]);
}
static ll query(int node, int st, int dr, int pos)
{
if(st == dr) return mx[node];
propag(node);
if(pos <= mid) return query(left_son, st, mid, pos);
else return query(right_son, mid+1, dr, pos);
}
static void Maxim(int node, int st, int dr, int Left, int Right, ll x)
{
if(Left <= st && dr <= Right)
{
if(mn[node] >= x) return;
if(mx[node] <= x)
{
mx[node] = mn[node] = x;
val[node] = x;
add[node] = 0;
return;
}
propag(node);
Maxim(left_son, st, mid, Left, Right, x);
Maxim(right_son, mid+1, dr, Left, Right, x);
refresh(node);
return;
}
propag(node);
if(Left <= mid) Maxim(left_son, st, mid, Left, Right, x);
if(mid < Right) Maxim(right_son, mid+1, dr, Left, Right, x);
refresh(node);
}
void Add(int node, int st, int dr, int Left, int Right, ll delta)
{
if(Left <= st && dr <= Right)
{
add[node] += delta;
mx[node] += delta;
mn[node] += delta;
return;
}
propag(node);
if(Left <= mid) Add(left_son, st, mid, Left, Right, delta);
if(mid < Right) Add(right_son, mid+1, dr, Left, Right, delta);
refresh(node);
}
static void maximize()
{
int i;
ll M = -inf;
for(i=1; i<split.size()-1; ++i)
{
M = max(M, query(1, 0, m, split[i] - 1));
Maxim(1, 0, m, split[i], split[i+1]-1, M);
}
}
static void update(vector<restrictie> &v)
{
split.clear();
split.push_back(0);
split.push_back(m+1);
for(auto &it : v)
if(it.x <= it.y)
{
split.push_back(it.x);
split.push_back(it.y+1);
}
sort(split.begin(), split.end());
split.erase( unique(split.begin(), split.end()), split.end() );
vector<ll> s(split.size(), 0);
for(auto &it : v)
if(it.x <= it.y)
{
s[lower_bound(split.begin(), split.end(), it.x) - split.begin()] += it.add;
s[upper_bound(split.begin(), split.end(), it.y) - split.begin()] -= it.add;
}
ll sum = 0;
int i;
for(i=0; i<split.size()-1; ++i)
{
sum += s[i];
Add(1, 0, m, split[i], split[i+1]-1, sum);
}
}
static void init()
{
int i;
for(i=1; i<=4*(m+1); ++i)
add[i] = 0, mx[i] = mn[i] = 0, val[i] = inf;
split.push_back(0);
split.push_back(m+1);
}
static ll query(int pos)
{
return query(1, 0, m, pos);
}
}
void solve()
{
aint :: init();
int i;
for(i=1; i<=n+1; ++i)
{
aint :: maximize();
aint :: update(R[i]);
// for(int j=0; j<=m; ++j)
// cerr << aint :: query(j) << ' ';
// cerr << '\n';
}
cout << aint :: query(m) << '\n';
}
int main()
{
// freopen("input", "r", stdin);
read_and_init();
solve();
return 0;
}
Compilation message
dishes.cpp: In function 'void aint::maximize()':
dishes.cpp:186:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=1; i<split.size()-1; ++i)
~^~~~~~~~~~~~~~~
dishes.cpp: In function 'void aint::update(std::vector<restrictie>&)':
dishes.cpp:221:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=0; i<split.size()-1; ++i)
~^~~~~~~~~~~~~~~
dishes.cpp: In function 'void rd::refresh()':
dishes.cpp:27:39: warning: ignoring return value of 'size_t fread(void*, size_t, size_t, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
fread(buffer, 1, bsize, stdin), cursor = 0;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
382 ms |
58076 KB |
Output is correct |
2 |
Correct |
318 ms |
58228 KB |
Output is correct |
3 |
Correct |
197 ms |
61248 KB |
Output is correct |
4 |
Correct |
233 ms |
56412 KB |
Output is correct |
5 |
Correct |
25 ms |
23808 KB |
Output is correct |
6 |
Correct |
310 ms |
57148 KB |
Output is correct |
7 |
Correct |
144 ms |
61700 KB |
Output is correct |
8 |
Correct |
93 ms |
41772 KB |
Output is correct |
9 |
Correct |
262 ms |
75464 KB |
Output is correct |
10 |
Correct |
333 ms |
62508 KB |
Output is correct |
11 |
Correct |
238 ms |
69100 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
23808 KB |
Output is correct |
2 |
Correct |
27 ms |
23772 KB |
Output is correct |
3 |
Correct |
27 ms |
23808 KB |
Output is correct |
4 |
Correct |
25 ms |
23808 KB |
Output is correct |
5 |
Correct |
24 ms |
23808 KB |
Output is correct |
6 |
Correct |
24 ms |
23808 KB |
Output is correct |
7 |
Correct |
27 ms |
23808 KB |
Output is correct |
8 |
Correct |
31 ms |
23800 KB |
Output is correct |
9 |
Correct |
23 ms |
23808 KB |
Output is correct |
10 |
Correct |
27 ms |
23800 KB |
Output is correct |
11 |
Correct |
24 ms |
23808 KB |
Output is correct |
12 |
Correct |
27 ms |
23808 KB |
Output is correct |
13 |
Correct |
28 ms |
23928 KB |
Output is correct |
14 |
Correct |
25 ms |
23936 KB |
Output is correct |
15 |
Correct |
22 ms |
23800 KB |
Output is correct |
16 |
Correct |
27 ms |
23808 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
23808 KB |
Output is correct |
2 |
Correct |
27 ms |
23772 KB |
Output is correct |
3 |
Correct |
27 ms |
23808 KB |
Output is correct |
4 |
Correct |
25 ms |
23808 KB |
Output is correct |
5 |
Correct |
24 ms |
23808 KB |
Output is correct |
6 |
Correct |
24 ms |
23808 KB |
Output is correct |
7 |
Correct |
27 ms |
23808 KB |
Output is correct |
8 |
Correct |
31 ms |
23800 KB |
Output is correct |
9 |
Correct |
23 ms |
23808 KB |
Output is correct |
10 |
Correct |
27 ms |
23800 KB |
Output is correct |
11 |
Correct |
24 ms |
23808 KB |
Output is correct |
12 |
Correct |
27 ms |
23808 KB |
Output is correct |
13 |
Correct |
28 ms |
23928 KB |
Output is correct |
14 |
Correct |
25 ms |
23936 KB |
Output is correct |
15 |
Correct |
22 ms |
23800 KB |
Output is correct |
16 |
Correct |
27 ms |
23808 KB |
Output is correct |
17 |
Correct |
29 ms |
24428 KB |
Output is correct |
18 |
Correct |
25 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24320 KB |
Output is correct |
20 |
Correct |
34 ms |
24448 KB |
Output is correct |
21 |
Correct |
35 ms |
24576 KB |
Output is correct |
22 |
Correct |
28 ms |
24312 KB |
Output is correct |
23 |
Correct |
31 ms |
24312 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
23808 KB |
Output is correct |
2 |
Correct |
27 ms |
23772 KB |
Output is correct |
3 |
Correct |
27 ms |
23808 KB |
Output is correct |
4 |
Correct |
25 ms |
23808 KB |
Output is correct |
5 |
Correct |
24 ms |
23808 KB |
Output is correct |
6 |
Correct |
24 ms |
23808 KB |
Output is correct |
7 |
Correct |
27 ms |
23808 KB |
Output is correct |
8 |
Correct |
31 ms |
23800 KB |
Output is correct |
9 |
Correct |
23 ms |
23808 KB |
Output is correct |
10 |
Correct |
27 ms |
23800 KB |
Output is correct |
11 |
Correct |
24 ms |
23808 KB |
Output is correct |
12 |
Correct |
27 ms |
23808 KB |
Output is correct |
13 |
Correct |
28 ms |
23928 KB |
Output is correct |
14 |
Correct |
25 ms |
23936 KB |
Output is correct |
15 |
Correct |
22 ms |
23800 KB |
Output is correct |
16 |
Correct |
27 ms |
23808 KB |
Output is correct |
17 |
Correct |
29 ms |
24428 KB |
Output is correct |
18 |
Correct |
25 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24320 KB |
Output is correct |
20 |
Correct |
34 ms |
24448 KB |
Output is correct |
21 |
Correct |
35 ms |
24576 KB |
Output is correct |
22 |
Correct |
28 ms |
24312 KB |
Output is correct |
23 |
Correct |
31 ms |
24312 KB |
Output is correct |
24 |
Correct |
441 ms |
59740 KB |
Output is correct |
25 |
Correct |
293 ms |
71728 KB |
Output is correct |
26 |
Correct |
358 ms |
70196 KB |
Output is correct |
27 |
Correct |
288 ms |
66020 KB |
Output is correct |
28 |
Correct |
522 ms |
71212 KB |
Output is correct |
29 |
Correct |
235 ms |
72580 KB |
Output is correct |
30 |
Correct |
1197 ms |
68776 KB |
Output is correct |
31 |
Correct |
226 ms |
58348 KB |
Output is correct |
32 |
Correct |
78 ms |
40056 KB |
Output is correct |
33 |
Correct |
525 ms |
67880 KB |
Output is correct |
34 |
Correct |
902 ms |
68176 KB |
Output is correct |
35 |
Correct |
1256 ms |
62424 KB |
Output is correct |
36 |
Correct |
1114 ms |
62504 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
23808 KB |
Output is correct |
2 |
Correct |
27 ms |
23772 KB |
Output is correct |
3 |
Correct |
27 ms |
23808 KB |
Output is correct |
4 |
Correct |
25 ms |
23808 KB |
Output is correct |
5 |
Correct |
24 ms |
23808 KB |
Output is correct |
6 |
Correct |
24 ms |
23808 KB |
Output is correct |
7 |
Correct |
27 ms |
23808 KB |
Output is correct |
8 |
Correct |
31 ms |
23800 KB |
Output is correct |
9 |
Correct |
23 ms |
23808 KB |
Output is correct |
10 |
Correct |
27 ms |
23800 KB |
Output is correct |
11 |
Correct |
24 ms |
23808 KB |
Output is correct |
12 |
Correct |
27 ms |
23808 KB |
Output is correct |
13 |
Correct |
28 ms |
23928 KB |
Output is correct |
14 |
Correct |
25 ms |
23936 KB |
Output is correct |
15 |
Correct |
22 ms |
23800 KB |
Output is correct |
16 |
Correct |
27 ms |
23808 KB |
Output is correct |
17 |
Correct |
29 ms |
24428 KB |
Output is correct |
18 |
Correct |
25 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24320 KB |
Output is correct |
20 |
Correct |
34 ms |
24448 KB |
Output is correct |
21 |
Correct |
35 ms |
24576 KB |
Output is correct |
22 |
Correct |
28 ms |
24312 KB |
Output is correct |
23 |
Correct |
31 ms |
24312 KB |
Output is correct |
24 |
Correct |
441 ms |
59740 KB |
Output is correct |
25 |
Correct |
293 ms |
71728 KB |
Output is correct |
26 |
Correct |
358 ms |
70196 KB |
Output is correct |
27 |
Correct |
288 ms |
66020 KB |
Output is correct |
28 |
Correct |
522 ms |
71212 KB |
Output is correct |
29 |
Correct |
235 ms |
72580 KB |
Output is correct |
30 |
Correct |
1197 ms |
68776 KB |
Output is correct |
31 |
Correct |
226 ms |
58348 KB |
Output is correct |
32 |
Correct |
78 ms |
40056 KB |
Output is correct |
33 |
Correct |
525 ms |
67880 KB |
Output is correct |
34 |
Correct |
902 ms |
68176 KB |
Output is correct |
35 |
Correct |
1256 ms |
62424 KB |
Output is correct |
36 |
Correct |
1114 ms |
62504 KB |
Output is correct |
37 |
Correct |
342 ms |
73136 KB |
Output is correct |
38 |
Correct |
312 ms |
68904 KB |
Output is correct |
39 |
Correct |
338 ms |
66348 KB |
Output is correct |
40 |
Correct |
334 ms |
66276 KB |
Output is correct |
41 |
Correct |
24 ms |
23808 KB |
Output is correct |
42 |
Correct |
1214 ms |
71916 KB |
Output is correct |
43 |
Correct |
645 ms |
70812 KB |
Output is correct |
44 |
Correct |
897 ms |
70944 KB |
Output is correct |
45 |
Correct |
1124 ms |
65400 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
25 ms |
23808 KB |
Output is correct |
2 |
Correct |
27 ms |
23772 KB |
Output is correct |
3 |
Correct |
27 ms |
23808 KB |
Output is correct |
4 |
Correct |
25 ms |
23808 KB |
Output is correct |
5 |
Correct |
24 ms |
23808 KB |
Output is correct |
6 |
Correct |
24 ms |
23808 KB |
Output is correct |
7 |
Correct |
27 ms |
23808 KB |
Output is correct |
8 |
Correct |
31 ms |
23800 KB |
Output is correct |
9 |
Correct |
23 ms |
23808 KB |
Output is correct |
10 |
Correct |
27 ms |
23800 KB |
Output is correct |
11 |
Correct |
24 ms |
23808 KB |
Output is correct |
12 |
Correct |
27 ms |
23808 KB |
Output is correct |
13 |
Correct |
28 ms |
23928 KB |
Output is correct |
14 |
Correct |
25 ms |
23936 KB |
Output is correct |
15 |
Correct |
22 ms |
23800 KB |
Output is correct |
16 |
Correct |
27 ms |
23808 KB |
Output is correct |
17 |
Correct |
29 ms |
24428 KB |
Output is correct |
18 |
Correct |
25 ms |
24320 KB |
Output is correct |
19 |
Correct |
27 ms |
24320 KB |
Output is correct |
20 |
Correct |
34 ms |
24448 KB |
Output is correct |
21 |
Correct |
35 ms |
24576 KB |
Output is correct |
22 |
Correct |
28 ms |
24312 KB |
Output is correct |
23 |
Correct |
31 ms |
24312 KB |
Output is correct |
24 |
Correct |
441 ms |
59740 KB |
Output is correct |
25 |
Correct |
293 ms |
71728 KB |
Output is correct |
26 |
Correct |
358 ms |
70196 KB |
Output is correct |
27 |
Correct |
288 ms |
66020 KB |
Output is correct |
28 |
Correct |
522 ms |
71212 KB |
Output is correct |
29 |
Correct |
235 ms |
72580 KB |
Output is correct |
30 |
Correct |
1197 ms |
68776 KB |
Output is correct |
31 |
Correct |
226 ms |
58348 KB |
Output is correct |
32 |
Correct |
78 ms |
40056 KB |
Output is correct |
33 |
Correct |
525 ms |
67880 KB |
Output is correct |
34 |
Correct |
902 ms |
68176 KB |
Output is correct |
35 |
Correct |
1256 ms |
62424 KB |
Output is correct |
36 |
Correct |
1114 ms |
62504 KB |
Output is correct |
37 |
Correct |
342 ms |
73136 KB |
Output is correct |
38 |
Correct |
312 ms |
68904 KB |
Output is correct |
39 |
Correct |
338 ms |
66348 KB |
Output is correct |
40 |
Correct |
334 ms |
66276 KB |
Output is correct |
41 |
Correct |
24 ms |
23808 KB |
Output is correct |
42 |
Correct |
1214 ms |
71916 KB |
Output is correct |
43 |
Correct |
645 ms |
70812 KB |
Output is correct |
44 |
Correct |
897 ms |
70944 KB |
Output is correct |
45 |
Correct |
1124 ms |
65400 KB |
Output is correct |
46 |
Correct |
1781 ms |
270324 KB |
Output is correct |
47 |
Correct |
1539 ms |
250368 KB |
Output is correct |
48 |
Correct |
1626 ms |
236928 KB |
Output is correct |
49 |
Correct |
2065 ms |
237012 KB |
Output is correct |
50 |
Correct |
7892 ms |
264680 KB |
Output is correct |
51 |
Correct |
4407 ms |
257744 KB |
Output is correct |
52 |
Correct |
5101 ms |
248124 KB |
Output is correct |
53 |
Correct |
7965 ms |
233580 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
382 ms |
58076 KB |
Output is correct |
2 |
Correct |
318 ms |
58228 KB |
Output is correct |
3 |
Correct |
197 ms |
61248 KB |
Output is correct |
4 |
Correct |
233 ms |
56412 KB |
Output is correct |
5 |
Correct |
25 ms |
23808 KB |
Output is correct |
6 |
Correct |
310 ms |
57148 KB |
Output is correct |
7 |
Correct |
144 ms |
61700 KB |
Output is correct |
8 |
Correct |
93 ms |
41772 KB |
Output is correct |
9 |
Correct |
262 ms |
75464 KB |
Output is correct |
10 |
Correct |
333 ms |
62508 KB |
Output is correct |
11 |
Correct |
238 ms |
69100 KB |
Output is correct |
12 |
Correct |
25 ms |
23808 KB |
Output is correct |
13 |
Correct |
27 ms |
23772 KB |
Output is correct |
14 |
Correct |
27 ms |
23808 KB |
Output is correct |
15 |
Correct |
25 ms |
23808 KB |
Output is correct |
16 |
Correct |
24 ms |
23808 KB |
Output is correct |
17 |
Correct |
24 ms |
23808 KB |
Output is correct |
18 |
Correct |
27 ms |
23808 KB |
Output is correct |
19 |
Correct |
31 ms |
23800 KB |
Output is correct |
20 |
Correct |
23 ms |
23808 KB |
Output is correct |
21 |
Correct |
27 ms |
23800 KB |
Output is correct |
22 |
Correct |
24 ms |
23808 KB |
Output is correct |
23 |
Correct |
27 ms |
23808 KB |
Output is correct |
24 |
Correct |
28 ms |
23928 KB |
Output is correct |
25 |
Correct |
25 ms |
23936 KB |
Output is correct |
26 |
Correct |
22 ms |
23800 KB |
Output is correct |
27 |
Correct |
27 ms |
23808 KB |
Output is correct |
28 |
Correct |
29 ms |
24428 KB |
Output is correct |
29 |
Correct |
25 ms |
24320 KB |
Output is correct |
30 |
Correct |
27 ms |
24320 KB |
Output is correct |
31 |
Correct |
34 ms |
24448 KB |
Output is correct |
32 |
Correct |
35 ms |
24576 KB |
Output is correct |
33 |
Correct |
28 ms |
24312 KB |
Output is correct |
34 |
Correct |
31 ms |
24312 KB |
Output is correct |
35 |
Correct |
441 ms |
59740 KB |
Output is correct |
36 |
Correct |
293 ms |
71728 KB |
Output is correct |
37 |
Correct |
358 ms |
70196 KB |
Output is correct |
38 |
Correct |
288 ms |
66020 KB |
Output is correct |
39 |
Correct |
522 ms |
71212 KB |
Output is correct |
40 |
Correct |
235 ms |
72580 KB |
Output is correct |
41 |
Correct |
1197 ms |
68776 KB |
Output is correct |
42 |
Correct |
226 ms |
58348 KB |
Output is correct |
43 |
Correct |
78 ms |
40056 KB |
Output is correct |
44 |
Correct |
525 ms |
67880 KB |
Output is correct |
45 |
Correct |
902 ms |
68176 KB |
Output is correct |
46 |
Correct |
1256 ms |
62424 KB |
Output is correct |
47 |
Correct |
1114 ms |
62504 KB |
Output is correct |
48 |
Correct |
342 ms |
73136 KB |
Output is correct |
49 |
Correct |
312 ms |
68904 KB |
Output is correct |
50 |
Correct |
338 ms |
66348 KB |
Output is correct |
51 |
Correct |
334 ms |
66276 KB |
Output is correct |
52 |
Correct |
24 ms |
23808 KB |
Output is correct |
53 |
Correct |
1214 ms |
71916 KB |
Output is correct |
54 |
Correct |
645 ms |
70812 KB |
Output is correct |
55 |
Correct |
897 ms |
70944 KB |
Output is correct |
56 |
Correct |
1124 ms |
65400 KB |
Output is correct |
57 |
Correct |
314 ms |
73532 KB |
Output is correct |
58 |
Correct |
342 ms |
69412 KB |
Output is correct |
59 |
Correct |
349 ms |
67244 KB |
Output is correct |
60 |
Correct |
355 ms |
67240 KB |
Output is correct |
61 |
Correct |
849 ms |
68908 KB |
Output is correct |
62 |
Correct |
24 ms |
23808 KB |
Output is correct |
63 |
Correct |
1267 ms |
72184 KB |
Output is correct |
64 |
Correct |
680 ms |
69992 KB |
Output is correct |
65 |
Correct |
1041 ms |
72424 KB |
Output is correct |
66 |
Correct |
1108 ms |
65708 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
382 ms |
58076 KB |
Output is correct |
2 |
Correct |
318 ms |
58228 KB |
Output is correct |
3 |
Correct |
197 ms |
61248 KB |
Output is correct |
4 |
Correct |
233 ms |
56412 KB |
Output is correct |
5 |
Correct |
25 ms |
23808 KB |
Output is correct |
6 |
Correct |
310 ms |
57148 KB |
Output is correct |
7 |
Correct |
144 ms |
61700 KB |
Output is correct |
8 |
Correct |
93 ms |
41772 KB |
Output is correct |
9 |
Correct |
262 ms |
75464 KB |
Output is correct |
10 |
Correct |
333 ms |
62508 KB |
Output is correct |
11 |
Correct |
238 ms |
69100 KB |
Output is correct |
12 |
Correct |
25 ms |
23808 KB |
Output is correct |
13 |
Correct |
27 ms |
23772 KB |
Output is correct |
14 |
Correct |
27 ms |
23808 KB |
Output is correct |
15 |
Correct |
25 ms |
23808 KB |
Output is correct |
16 |
Correct |
24 ms |
23808 KB |
Output is correct |
17 |
Correct |
24 ms |
23808 KB |
Output is correct |
18 |
Correct |
27 ms |
23808 KB |
Output is correct |
19 |
Correct |
31 ms |
23800 KB |
Output is correct |
20 |
Correct |
23 ms |
23808 KB |
Output is correct |
21 |
Correct |
27 ms |
23800 KB |
Output is correct |
22 |
Correct |
24 ms |
23808 KB |
Output is correct |
23 |
Correct |
27 ms |
23808 KB |
Output is correct |
24 |
Correct |
28 ms |
23928 KB |
Output is correct |
25 |
Correct |
25 ms |
23936 KB |
Output is correct |
26 |
Correct |
22 ms |
23800 KB |
Output is correct |
27 |
Correct |
27 ms |
23808 KB |
Output is correct |
28 |
Correct |
29 ms |
24428 KB |
Output is correct |
29 |
Correct |
25 ms |
24320 KB |
Output is correct |
30 |
Correct |
27 ms |
24320 KB |
Output is correct |
31 |
Correct |
34 ms |
24448 KB |
Output is correct |
32 |
Correct |
35 ms |
24576 KB |
Output is correct |
33 |
Correct |
28 ms |
24312 KB |
Output is correct |
34 |
Correct |
31 ms |
24312 KB |
Output is correct |
35 |
Correct |
441 ms |
59740 KB |
Output is correct |
36 |
Correct |
293 ms |
71728 KB |
Output is correct |
37 |
Correct |
358 ms |
70196 KB |
Output is correct |
38 |
Correct |
288 ms |
66020 KB |
Output is correct |
39 |
Correct |
522 ms |
71212 KB |
Output is correct |
40 |
Correct |
235 ms |
72580 KB |
Output is correct |
41 |
Correct |
1197 ms |
68776 KB |
Output is correct |
42 |
Correct |
226 ms |
58348 KB |
Output is correct |
43 |
Correct |
78 ms |
40056 KB |
Output is correct |
44 |
Correct |
525 ms |
67880 KB |
Output is correct |
45 |
Correct |
902 ms |
68176 KB |
Output is correct |
46 |
Correct |
1256 ms |
62424 KB |
Output is correct |
47 |
Correct |
1114 ms |
62504 KB |
Output is correct |
48 |
Correct |
342 ms |
73136 KB |
Output is correct |
49 |
Correct |
312 ms |
68904 KB |
Output is correct |
50 |
Correct |
338 ms |
66348 KB |
Output is correct |
51 |
Correct |
334 ms |
66276 KB |
Output is correct |
52 |
Correct |
24 ms |
23808 KB |
Output is correct |
53 |
Correct |
1214 ms |
71916 KB |
Output is correct |
54 |
Correct |
645 ms |
70812 KB |
Output is correct |
55 |
Correct |
897 ms |
70944 KB |
Output is correct |
56 |
Correct |
1124 ms |
65400 KB |
Output is correct |
57 |
Correct |
1781 ms |
270324 KB |
Output is correct |
58 |
Correct |
1539 ms |
250368 KB |
Output is correct |
59 |
Correct |
1626 ms |
236928 KB |
Output is correct |
60 |
Correct |
2065 ms |
237012 KB |
Output is correct |
61 |
Correct |
7892 ms |
264680 KB |
Output is correct |
62 |
Correct |
4407 ms |
257744 KB |
Output is correct |
63 |
Correct |
5101 ms |
248124 KB |
Output is correct |
64 |
Correct |
7965 ms |
233580 KB |
Output is correct |
65 |
Correct |
314 ms |
73532 KB |
Output is correct |
66 |
Correct |
342 ms |
69412 KB |
Output is correct |
67 |
Correct |
349 ms |
67244 KB |
Output is correct |
68 |
Correct |
355 ms |
67240 KB |
Output is correct |
69 |
Correct |
849 ms |
68908 KB |
Output is correct |
70 |
Correct |
24 ms |
23808 KB |
Output is correct |
71 |
Correct |
1267 ms |
72184 KB |
Output is correct |
72 |
Correct |
680 ms |
69992 KB |
Output is correct |
73 |
Correct |
1041 ms |
72424 KB |
Output is correct |
74 |
Correct |
1108 ms |
65708 KB |
Output is correct |
75 |
Correct |
1871 ms |
272076 KB |
Output is correct |
76 |
Correct |
1697 ms |
252368 KB |
Output is correct |
77 |
Correct |
1970 ms |
239408 KB |
Output is correct |
78 |
Correct |
1739 ms |
239432 KB |
Output is correct |
79 |
Correct |
8368 ms |
265224 KB |
Output is correct |
80 |
Correct |
4461 ms |
250200 KB |
Output is correct |
81 |
Correct |
5818 ms |
265112 KB |
Output is correct |
82 |
Correct |
8170 ms |
233044 KB |
Output is correct |
83 |
Correct |
7390 ms |
253628 KB |
Output is correct |