#include <bits/stdc++.h>
#define int long long
using namespace std;
struct Point {
int x, y, val;
};
const int M = 1 << 20, N = 2 * M, T = 20, INF = 1e18 + 42;
int maxi[N], tag[N];
void applyOp(int i, int add) {
tag[i] += add;
maxi[i] += add;
}
void propage(int i) {
applyOp(i*2, tag[i]);
applyOp(i*2+1, tag[i]);
tag[i] = 0;
}
void setVal(int i, int deb, int fin, int pos, int val) {
if(pos < deb || fin <= pos)
return;
if(fin - deb == 1) {
maxi[i] = val;
return;
}
propage(i);
int mid = ((deb + fin) >> 1);
setVal(i*2, deb, mid, pos, val);
setVal(i*2+1, mid, fin, pos, val);
maxi[i] = max(maxi[i*2], maxi[i*2+1]);
}
int update(int i, int deb, int fin, int l, int r, int add) {
if(r <= deb || fin <= l)
return -2*INF;
if(l <= deb && fin <= r) {
applyOp(i, add);
return maxi[i];
}
propage(i);
int mid = ((deb + fin) >> 1),
ans = max(update(i*2, deb, mid, l, r, add),
update(i*2+1, mid, fin, l, r, add));
maxi[i] = max(maxi[i*2], maxi[i*2+1]);
return ans;
}
vector<int> lig[M];
vector<Point> point;
int score = 0, ans = 0, sz[2], value[N], a[2][M], t[2][M], pt[2][M], pos[2][M], dp[T][T];
void solve() {
score = ans = 0;
point.clear();
for(int i = 0; i < M; i++)
lig[i].clear();
for(int i = 0; i < N; i++)
tag[i] = 0, maxi[i] = -INF, value[i] = -INF;
for(int i = 0; i < 2; i++)
for(int j = 1; j <= sz[i]; j++)
a[i][j] += a[i][j-1];
a[0][sz[0]+1] = a[1][sz[1]+1] = INF;
/*
for(int i = 0; i <= sz[0]; i++)
for(int j = 0; j <= sz[1]; j++)
dp[i][j] = -INF;
dp[0][0] = 0;
for(int i = 0; i <= sz[0]; i++)
for(int j = 0; j <= sz[1]; j++) {
if(a[0][i+1] + a[1][j] <= t[0][i+1]) {
dp[i+1][j] = max(dp[i+1][j], dp[i][j] + pt[0][i+1]);
} else {
dp[i+1][j] = max(dp[i+1][j], dp[i][j]);
}
if(a[0][i] + a[1][j+1] <= t[1][j+1]) {
dp[i][j+1] = max(dp[i][j+1], dp[i][j] + pt[1][j+1]);
} else {
dp[i][j+1] = max(dp[i][j+1], dp[i][j]);
}
}*/
for(int i = 0; i < 2; i++)
for(int j = 1; j <= sz[i]; j++)
pos[i][j] = (int)(upper_bound(a[1-i], a[1-i] + sz[1-i] + 1, t[i][j] - a[i][j]) - a[1-i]) - 1;
for(int j = 0; j <= sz[0]; j++)
if(pos[0][j] != -1)
point.push_back({j, pos[0][j], pt[0][j]});
for(int j = 1; j <= sz[1]; j++) {
if(pos[1][j] != -1) {
score += pt[1][j];
if(pos[1][j] != sz[0])
point.push_back({pos[1][j]+1, j-1, -pt[1][j]});
}
}
/*
for(int i = 0; i < (int)point.size(); i++)
lig[point[i].x].push_back(i);
*/
point.push_back({sz[0], sz[1], 0});
sort(point.begin(), point.end(),
[](Point p1, Point p2) {
if(p1.x == p2.x)
return p1.y < p2.y;
return p1.x > p2.x;
});
for(int i = 1; i < (int)point.size(); i++)
if(point[i].x == point[i-1].x && point[i].y == point[i-1].y) {
point[i-1].x = point[i-1].y = -1;
point[i].val += point[i-1].val;
point[i-1].val = 0;
}
/*
for(int i = 0; i < (int)point.size(); i++) {
if(point[i].x != -1) {
for(int j = 0; j < i; j++) {
if(point[j].y >= point[i].y) {
int c = value[j];
for(int k = j; k < i; k++)
if(point[k].y >= point[j].y)
c += point[k].val;
value[i] = max(value[i], c);
}
}
if(point[i].x == sz[0])
value[i] = 0;
if(point[i].x == 0 && point[i].y == 0)
ans = value[i];
//cout << value[i] << ' ';
}
}*/
for(int i = 0; i < (int)point.size(); i++) {
if(point[i].x != -1) {
int val = update(1, 0, M, point[i].y, M, 0);
if(point[i].x == sz[0])
val = 0;
setVal(1, 0, M, point[i].y, val);
update(1, 0, M, 0, point[i].y+1, point[i].val);
if(point[i].x == 0 && point[i].y == 0)
ans = val;
}
}
//cout << '\n';
cout << ans + score << '\n';
/*
for(int x = sz[0]; x >= 0; x--) {
for(int id : lig[x]) {
Point p = point[id];
value[id] = update(1, 0, M, p.y, sz[0]+1, 0);
if(p.x == 0 && p.y == 0)
ans = value[id];
}
for(int id : lig[x]) {
Point p = point[id];
int pre = update(1, 0, M, p.y, p.y+1, 0);
update(1, 0, M, p.y, p.y+1, value[id] - pre);
}
for(int id : lig[x]) {
Point p = point[id];
update(1, 0, M, 0, p.y+1, p.val);
}
for(int i = 0; i <= sz[0]; i++)
cout << update(1, 0, M, i, i+1, 0) << ' ';
cout << '\n' << '\n';
}*/
/*
cout << '\n';
cout << ans << ' ' << score << '\n';*/
//cout << ans + score << '\n';
//cout << dp[sz[0]][sz[1]] << '\n';
/*
if(dp[sz[0]][sz[1]] != ans + score) {
cout << "Differ\n";
for(Point p : point)
cout << p.x << ' ' << p.y << ' ' << p.val << '\n';
cout << '\n';
for(int i = 0; i < 2; i++) {
for(int j = 1; j <= sz[i]; j++)
cout << pos[i][j] << ' ';
cout << '\n';
}
cout << '\n';
cout << ans << ' ' << score << '\n';
cout << dp[sz[0]][sz[1]] << ' ' << ans + score << '\n';
cout << sz[0] << ' ' << sz[1] << '\n';
for(int i = 0; i < 2; i++)
for(int j = 1; j <= sz[i]; j++)
cout << a[i][j] << ' ' << t[i][j] << ' ' << pt[i][j] << '\n';
cout << '\n' << '\n';
}*/
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> sz[0] >> sz[1];
for(int i = 0; i < 2; i++)
for(int j = 1; j <= sz[i]; j++)
cin >> a[i][j] >> t[i][j] >> pt[i][j];
solve();
/*
for(int x = 0; x < 1000000; x++) {
srand(time(0) + x);
sz[0] = sz[1] = 10;
for(int i = 0; i < 2; i++)
for(int j = 1; j <= sz[i]; j++) {
a[i][j] = (rand() % 10) + 1;
t[i][j] = (rand() % 20) + 1;
pt[i][j] = (rand() % 2000000000) - 1000000000;
}
solve();
}*/
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
370 ms |
109180 KB |
Output is correct |
2 |
Correct |
327 ms |
110144 KB |
Output is correct |
3 |
Correct |
250 ms |
106352 KB |
Output is correct |
4 |
Correct |
244 ms |
106160 KB |
Output is correct |
5 |
Correct |
29 ms |
74236 KB |
Output is correct |
6 |
Correct |
327 ms |
112284 KB |
Output is correct |
7 |
Correct |
86 ms |
87188 KB |
Output is correct |
8 |
Correct |
223 ms |
93748 KB |
Output is correct |
9 |
Correct |
255 ms |
100224 KB |
Output is correct |
10 |
Correct |
324 ms |
106500 KB |
Output is correct |
11 |
Correct |
251 ms |
100788 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
74208 KB |
Output is correct |
2 |
Correct |
29 ms |
74160 KB |
Output is correct |
3 |
Correct |
29 ms |
74252 KB |
Output is correct |
4 |
Correct |
30 ms |
74192 KB |
Output is correct |
5 |
Correct |
29 ms |
74196 KB |
Output is correct |
6 |
Correct |
30 ms |
74176 KB |
Output is correct |
7 |
Correct |
30 ms |
74256 KB |
Output is correct |
8 |
Correct |
30 ms |
74180 KB |
Output is correct |
9 |
Correct |
30 ms |
74196 KB |
Output is correct |
10 |
Correct |
30 ms |
74184 KB |
Output is correct |
11 |
Correct |
31 ms |
74136 KB |
Output is correct |
12 |
Correct |
30 ms |
74216 KB |
Output is correct |
13 |
Correct |
30 ms |
74204 KB |
Output is correct |
14 |
Correct |
31 ms |
74256 KB |
Output is correct |
15 |
Correct |
31 ms |
74256 KB |
Output is correct |
16 |
Correct |
31 ms |
74140 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
74208 KB |
Output is correct |
2 |
Correct |
29 ms |
74160 KB |
Output is correct |
3 |
Correct |
29 ms |
74252 KB |
Output is correct |
4 |
Correct |
30 ms |
74192 KB |
Output is correct |
5 |
Correct |
29 ms |
74196 KB |
Output is correct |
6 |
Correct |
30 ms |
74176 KB |
Output is correct |
7 |
Correct |
30 ms |
74256 KB |
Output is correct |
8 |
Correct |
30 ms |
74180 KB |
Output is correct |
9 |
Correct |
30 ms |
74196 KB |
Output is correct |
10 |
Correct |
30 ms |
74184 KB |
Output is correct |
11 |
Correct |
31 ms |
74136 KB |
Output is correct |
12 |
Correct |
30 ms |
74216 KB |
Output is correct |
13 |
Correct |
30 ms |
74204 KB |
Output is correct |
14 |
Correct |
31 ms |
74256 KB |
Output is correct |
15 |
Correct |
31 ms |
74256 KB |
Output is correct |
16 |
Correct |
31 ms |
74140 KB |
Output is correct |
17 |
Correct |
33 ms |
74452 KB |
Output is correct |
18 |
Correct |
34 ms |
74596 KB |
Output is correct |
19 |
Correct |
35 ms |
74612 KB |
Output is correct |
20 |
Correct |
36 ms |
74532 KB |
Output is correct |
21 |
Correct |
35 ms |
74580 KB |
Output is correct |
22 |
Correct |
34 ms |
74476 KB |
Output is correct |
23 |
Correct |
37 ms |
74572 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
74208 KB |
Output is correct |
2 |
Correct |
29 ms |
74160 KB |
Output is correct |
3 |
Correct |
29 ms |
74252 KB |
Output is correct |
4 |
Correct |
30 ms |
74192 KB |
Output is correct |
5 |
Correct |
29 ms |
74196 KB |
Output is correct |
6 |
Correct |
30 ms |
74176 KB |
Output is correct |
7 |
Correct |
30 ms |
74256 KB |
Output is correct |
8 |
Correct |
30 ms |
74180 KB |
Output is correct |
9 |
Correct |
30 ms |
74196 KB |
Output is correct |
10 |
Correct |
30 ms |
74184 KB |
Output is correct |
11 |
Correct |
31 ms |
74136 KB |
Output is correct |
12 |
Correct |
30 ms |
74216 KB |
Output is correct |
13 |
Correct |
30 ms |
74204 KB |
Output is correct |
14 |
Correct |
31 ms |
74256 KB |
Output is correct |
15 |
Correct |
31 ms |
74256 KB |
Output is correct |
16 |
Correct |
31 ms |
74140 KB |
Output is correct |
17 |
Correct |
33 ms |
74452 KB |
Output is correct |
18 |
Correct |
34 ms |
74596 KB |
Output is correct |
19 |
Correct |
35 ms |
74612 KB |
Output is correct |
20 |
Correct |
36 ms |
74532 KB |
Output is correct |
21 |
Correct |
35 ms |
74580 KB |
Output is correct |
22 |
Correct |
34 ms |
74476 KB |
Output is correct |
23 |
Correct |
37 ms |
74572 KB |
Output is correct |
24 |
Correct |
227 ms |
101724 KB |
Output is correct |
25 |
Correct |
319 ms |
109708 KB |
Output is correct |
26 |
Correct |
265 ms |
103640 KB |
Output is correct |
27 |
Correct |
319 ms |
109816 KB |
Output is correct |
28 |
Correct |
321 ms |
103776 KB |
Output is correct |
29 |
Correct |
236 ms |
104268 KB |
Output is correct |
30 |
Correct |
488 ms |
109808 KB |
Output is correct |
31 |
Correct |
137 ms |
88840 KB |
Output is correct |
32 |
Correct |
191 ms |
91984 KB |
Output is correct |
33 |
Correct |
302 ms |
103228 KB |
Output is correct |
34 |
Correct |
429 ms |
109412 KB |
Output is correct |
35 |
Correct |
455 ms |
103480 KB |
Output is correct |
36 |
Correct |
459 ms |
103464 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
74208 KB |
Output is correct |
2 |
Correct |
29 ms |
74160 KB |
Output is correct |
3 |
Correct |
29 ms |
74252 KB |
Output is correct |
4 |
Correct |
30 ms |
74192 KB |
Output is correct |
5 |
Correct |
29 ms |
74196 KB |
Output is correct |
6 |
Correct |
30 ms |
74176 KB |
Output is correct |
7 |
Correct |
30 ms |
74256 KB |
Output is correct |
8 |
Correct |
30 ms |
74180 KB |
Output is correct |
9 |
Correct |
30 ms |
74196 KB |
Output is correct |
10 |
Correct |
30 ms |
74184 KB |
Output is correct |
11 |
Correct |
31 ms |
74136 KB |
Output is correct |
12 |
Correct |
30 ms |
74216 KB |
Output is correct |
13 |
Correct |
30 ms |
74204 KB |
Output is correct |
14 |
Correct |
31 ms |
74256 KB |
Output is correct |
15 |
Correct |
31 ms |
74256 KB |
Output is correct |
16 |
Correct |
31 ms |
74140 KB |
Output is correct |
17 |
Correct |
33 ms |
74452 KB |
Output is correct |
18 |
Correct |
34 ms |
74596 KB |
Output is correct |
19 |
Correct |
35 ms |
74612 KB |
Output is correct |
20 |
Correct |
36 ms |
74532 KB |
Output is correct |
21 |
Correct |
35 ms |
74580 KB |
Output is correct |
22 |
Correct |
34 ms |
74476 KB |
Output is correct |
23 |
Correct |
37 ms |
74572 KB |
Output is correct |
24 |
Correct |
227 ms |
101724 KB |
Output is correct |
25 |
Correct |
319 ms |
109708 KB |
Output is correct |
26 |
Correct |
265 ms |
103640 KB |
Output is correct |
27 |
Correct |
319 ms |
109816 KB |
Output is correct |
28 |
Correct |
321 ms |
103776 KB |
Output is correct |
29 |
Correct |
236 ms |
104268 KB |
Output is correct |
30 |
Correct |
488 ms |
109808 KB |
Output is correct |
31 |
Correct |
137 ms |
88840 KB |
Output is correct |
32 |
Correct |
191 ms |
91984 KB |
Output is correct |
33 |
Correct |
302 ms |
103228 KB |
Output is correct |
34 |
Correct |
429 ms |
109412 KB |
Output is correct |
35 |
Correct |
455 ms |
103480 KB |
Output is correct |
36 |
Correct |
459 ms |
103464 KB |
Output is correct |
37 |
Correct |
271 ms |
106660 KB |
Output is correct |
38 |
Correct |
335 ms |
112840 KB |
Output is correct |
39 |
Correct |
305 ms |
110212 KB |
Output is correct |
40 |
Correct |
315 ms |
110140 KB |
Output is correct |
41 |
Correct |
29 ms |
74188 KB |
Output is correct |
42 |
Correct |
497 ms |
113032 KB |
Output is correct |
43 |
Correct |
317 ms |
106208 KB |
Output is correct |
44 |
Correct |
439 ms |
112492 KB |
Output is correct |
45 |
Correct |
466 ms |
106528 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
30 ms |
74208 KB |
Output is correct |
2 |
Correct |
29 ms |
74160 KB |
Output is correct |
3 |
Correct |
29 ms |
74252 KB |
Output is correct |
4 |
Correct |
30 ms |
74192 KB |
Output is correct |
5 |
Correct |
29 ms |
74196 KB |
Output is correct |
6 |
Correct |
30 ms |
74176 KB |
Output is correct |
7 |
Correct |
30 ms |
74256 KB |
Output is correct |
8 |
Correct |
30 ms |
74180 KB |
Output is correct |
9 |
Correct |
30 ms |
74196 KB |
Output is correct |
10 |
Correct |
30 ms |
74184 KB |
Output is correct |
11 |
Correct |
31 ms |
74136 KB |
Output is correct |
12 |
Correct |
30 ms |
74216 KB |
Output is correct |
13 |
Correct |
30 ms |
74204 KB |
Output is correct |
14 |
Correct |
31 ms |
74256 KB |
Output is correct |
15 |
Correct |
31 ms |
74256 KB |
Output is correct |
16 |
Correct |
31 ms |
74140 KB |
Output is correct |
17 |
Correct |
33 ms |
74452 KB |
Output is correct |
18 |
Correct |
34 ms |
74596 KB |
Output is correct |
19 |
Correct |
35 ms |
74612 KB |
Output is correct |
20 |
Correct |
36 ms |
74532 KB |
Output is correct |
21 |
Correct |
35 ms |
74580 KB |
Output is correct |
22 |
Correct |
34 ms |
74476 KB |
Output is correct |
23 |
Correct |
37 ms |
74572 KB |
Output is correct |
24 |
Correct |
227 ms |
101724 KB |
Output is correct |
25 |
Correct |
319 ms |
109708 KB |
Output is correct |
26 |
Correct |
265 ms |
103640 KB |
Output is correct |
27 |
Correct |
319 ms |
109816 KB |
Output is correct |
28 |
Correct |
321 ms |
103776 KB |
Output is correct |
29 |
Correct |
236 ms |
104268 KB |
Output is correct |
30 |
Correct |
488 ms |
109808 KB |
Output is correct |
31 |
Correct |
137 ms |
88840 KB |
Output is correct |
32 |
Correct |
191 ms |
91984 KB |
Output is correct |
33 |
Correct |
302 ms |
103228 KB |
Output is correct |
34 |
Correct |
429 ms |
109412 KB |
Output is correct |
35 |
Correct |
455 ms |
103480 KB |
Output is correct |
36 |
Correct |
459 ms |
103464 KB |
Output is correct |
37 |
Correct |
271 ms |
106660 KB |
Output is correct |
38 |
Correct |
335 ms |
112840 KB |
Output is correct |
39 |
Correct |
305 ms |
110212 KB |
Output is correct |
40 |
Correct |
315 ms |
110140 KB |
Output is correct |
41 |
Correct |
29 ms |
74188 KB |
Output is correct |
42 |
Correct |
497 ms |
113032 KB |
Output is correct |
43 |
Correct |
317 ms |
106208 KB |
Output is correct |
44 |
Correct |
439 ms |
112492 KB |
Output is correct |
45 |
Correct |
466 ms |
106528 KB |
Output is correct |
46 |
Correct |
1278 ms |
164576 KB |
Output is correct |
47 |
Correct |
1617 ms |
212808 KB |
Output is correct |
48 |
Correct |
1535 ms |
205568 KB |
Output is correct |
49 |
Correct |
1501 ms |
205216 KB |
Output is correct |
50 |
Correct |
2943 ms |
210140 KB |
Output is correct |
51 |
Correct |
1715 ms |
181696 KB |
Output is correct |
52 |
Correct |
2320 ms |
204120 KB |
Output is correct |
53 |
Correct |
2729 ms |
198112 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
370 ms |
109180 KB |
Output is correct |
2 |
Correct |
327 ms |
110144 KB |
Output is correct |
3 |
Correct |
250 ms |
106352 KB |
Output is correct |
4 |
Correct |
244 ms |
106160 KB |
Output is correct |
5 |
Correct |
29 ms |
74236 KB |
Output is correct |
6 |
Correct |
327 ms |
112284 KB |
Output is correct |
7 |
Correct |
86 ms |
87188 KB |
Output is correct |
8 |
Correct |
223 ms |
93748 KB |
Output is correct |
9 |
Correct |
255 ms |
100224 KB |
Output is correct |
10 |
Correct |
324 ms |
106500 KB |
Output is correct |
11 |
Correct |
251 ms |
100788 KB |
Output is correct |
12 |
Correct |
30 ms |
74208 KB |
Output is correct |
13 |
Correct |
29 ms |
74160 KB |
Output is correct |
14 |
Correct |
29 ms |
74252 KB |
Output is correct |
15 |
Correct |
30 ms |
74192 KB |
Output is correct |
16 |
Correct |
29 ms |
74196 KB |
Output is correct |
17 |
Correct |
30 ms |
74176 KB |
Output is correct |
18 |
Correct |
30 ms |
74256 KB |
Output is correct |
19 |
Correct |
30 ms |
74180 KB |
Output is correct |
20 |
Correct |
30 ms |
74196 KB |
Output is correct |
21 |
Correct |
30 ms |
74184 KB |
Output is correct |
22 |
Correct |
31 ms |
74136 KB |
Output is correct |
23 |
Correct |
30 ms |
74216 KB |
Output is correct |
24 |
Correct |
30 ms |
74204 KB |
Output is correct |
25 |
Correct |
31 ms |
74256 KB |
Output is correct |
26 |
Correct |
31 ms |
74256 KB |
Output is correct |
27 |
Correct |
31 ms |
74140 KB |
Output is correct |
28 |
Correct |
33 ms |
74452 KB |
Output is correct |
29 |
Correct |
34 ms |
74596 KB |
Output is correct |
30 |
Correct |
35 ms |
74612 KB |
Output is correct |
31 |
Correct |
36 ms |
74532 KB |
Output is correct |
32 |
Correct |
35 ms |
74580 KB |
Output is correct |
33 |
Correct |
34 ms |
74476 KB |
Output is correct |
34 |
Correct |
37 ms |
74572 KB |
Output is correct |
35 |
Correct |
227 ms |
101724 KB |
Output is correct |
36 |
Correct |
319 ms |
109708 KB |
Output is correct |
37 |
Correct |
265 ms |
103640 KB |
Output is correct |
38 |
Correct |
319 ms |
109816 KB |
Output is correct |
39 |
Correct |
321 ms |
103776 KB |
Output is correct |
40 |
Correct |
236 ms |
104268 KB |
Output is correct |
41 |
Correct |
488 ms |
109808 KB |
Output is correct |
42 |
Correct |
137 ms |
88840 KB |
Output is correct |
43 |
Correct |
191 ms |
91984 KB |
Output is correct |
44 |
Correct |
302 ms |
103228 KB |
Output is correct |
45 |
Correct |
429 ms |
109412 KB |
Output is correct |
46 |
Correct |
455 ms |
103480 KB |
Output is correct |
47 |
Correct |
459 ms |
103464 KB |
Output is correct |
48 |
Correct |
271 ms |
106660 KB |
Output is correct |
49 |
Correct |
335 ms |
112840 KB |
Output is correct |
50 |
Correct |
305 ms |
110212 KB |
Output is correct |
51 |
Correct |
315 ms |
110140 KB |
Output is correct |
52 |
Correct |
29 ms |
74188 KB |
Output is correct |
53 |
Correct |
497 ms |
113032 KB |
Output is correct |
54 |
Correct |
317 ms |
106208 KB |
Output is correct |
55 |
Correct |
439 ms |
112492 KB |
Output is correct |
56 |
Correct |
466 ms |
106528 KB |
Output is correct |
57 |
Correct |
282 ms |
98748 KB |
Output is correct |
58 |
Correct |
370 ms |
113360 KB |
Output is correct |
59 |
Correct |
311 ms |
111168 KB |
Output is correct |
60 |
Correct |
315 ms |
111236 KB |
Output is correct |
61 |
Correct |
506 ms |
109896 KB |
Output is correct |
62 |
Correct |
35 ms |
74196 KB |
Output is correct |
63 |
Correct |
496 ms |
113124 KB |
Output is correct |
64 |
Correct |
341 ms |
106204 KB |
Output is correct |
65 |
Correct |
445 ms |
112572 KB |
Output is correct |
66 |
Correct |
473 ms |
106744 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
370 ms |
109180 KB |
Output is correct |
2 |
Correct |
327 ms |
110144 KB |
Output is correct |
3 |
Correct |
250 ms |
106352 KB |
Output is correct |
4 |
Correct |
244 ms |
106160 KB |
Output is correct |
5 |
Correct |
29 ms |
74236 KB |
Output is correct |
6 |
Correct |
327 ms |
112284 KB |
Output is correct |
7 |
Correct |
86 ms |
87188 KB |
Output is correct |
8 |
Correct |
223 ms |
93748 KB |
Output is correct |
9 |
Correct |
255 ms |
100224 KB |
Output is correct |
10 |
Correct |
324 ms |
106500 KB |
Output is correct |
11 |
Correct |
251 ms |
100788 KB |
Output is correct |
12 |
Correct |
30 ms |
74208 KB |
Output is correct |
13 |
Correct |
29 ms |
74160 KB |
Output is correct |
14 |
Correct |
29 ms |
74252 KB |
Output is correct |
15 |
Correct |
30 ms |
74192 KB |
Output is correct |
16 |
Correct |
29 ms |
74196 KB |
Output is correct |
17 |
Correct |
30 ms |
74176 KB |
Output is correct |
18 |
Correct |
30 ms |
74256 KB |
Output is correct |
19 |
Correct |
30 ms |
74180 KB |
Output is correct |
20 |
Correct |
30 ms |
74196 KB |
Output is correct |
21 |
Correct |
30 ms |
74184 KB |
Output is correct |
22 |
Correct |
31 ms |
74136 KB |
Output is correct |
23 |
Correct |
30 ms |
74216 KB |
Output is correct |
24 |
Correct |
30 ms |
74204 KB |
Output is correct |
25 |
Correct |
31 ms |
74256 KB |
Output is correct |
26 |
Correct |
31 ms |
74256 KB |
Output is correct |
27 |
Correct |
31 ms |
74140 KB |
Output is correct |
28 |
Correct |
33 ms |
74452 KB |
Output is correct |
29 |
Correct |
34 ms |
74596 KB |
Output is correct |
30 |
Correct |
35 ms |
74612 KB |
Output is correct |
31 |
Correct |
36 ms |
74532 KB |
Output is correct |
32 |
Correct |
35 ms |
74580 KB |
Output is correct |
33 |
Correct |
34 ms |
74476 KB |
Output is correct |
34 |
Correct |
37 ms |
74572 KB |
Output is correct |
35 |
Correct |
227 ms |
101724 KB |
Output is correct |
36 |
Correct |
319 ms |
109708 KB |
Output is correct |
37 |
Correct |
265 ms |
103640 KB |
Output is correct |
38 |
Correct |
319 ms |
109816 KB |
Output is correct |
39 |
Correct |
321 ms |
103776 KB |
Output is correct |
40 |
Correct |
236 ms |
104268 KB |
Output is correct |
41 |
Correct |
488 ms |
109808 KB |
Output is correct |
42 |
Correct |
137 ms |
88840 KB |
Output is correct |
43 |
Correct |
191 ms |
91984 KB |
Output is correct |
44 |
Correct |
302 ms |
103228 KB |
Output is correct |
45 |
Correct |
429 ms |
109412 KB |
Output is correct |
46 |
Correct |
455 ms |
103480 KB |
Output is correct |
47 |
Correct |
459 ms |
103464 KB |
Output is correct |
48 |
Correct |
271 ms |
106660 KB |
Output is correct |
49 |
Correct |
335 ms |
112840 KB |
Output is correct |
50 |
Correct |
305 ms |
110212 KB |
Output is correct |
51 |
Correct |
315 ms |
110140 KB |
Output is correct |
52 |
Correct |
29 ms |
74188 KB |
Output is correct |
53 |
Correct |
497 ms |
113032 KB |
Output is correct |
54 |
Correct |
317 ms |
106208 KB |
Output is correct |
55 |
Correct |
439 ms |
112492 KB |
Output is correct |
56 |
Correct |
466 ms |
106528 KB |
Output is correct |
57 |
Correct |
1278 ms |
164576 KB |
Output is correct |
58 |
Correct |
1617 ms |
212808 KB |
Output is correct |
59 |
Correct |
1535 ms |
205568 KB |
Output is correct |
60 |
Correct |
1501 ms |
205216 KB |
Output is correct |
61 |
Correct |
2943 ms |
210140 KB |
Output is correct |
62 |
Correct |
1715 ms |
181696 KB |
Output is correct |
63 |
Correct |
2320 ms |
204120 KB |
Output is correct |
64 |
Correct |
2729 ms |
198112 KB |
Output is correct |
65 |
Correct |
282 ms |
98748 KB |
Output is correct |
66 |
Correct |
370 ms |
113360 KB |
Output is correct |
67 |
Correct |
311 ms |
111168 KB |
Output is correct |
68 |
Correct |
315 ms |
111236 KB |
Output is correct |
69 |
Correct |
506 ms |
109896 KB |
Output is correct |
70 |
Correct |
35 ms |
74196 KB |
Output is correct |
71 |
Correct |
496 ms |
113124 KB |
Output is correct |
72 |
Correct |
341 ms |
106204 KB |
Output is correct |
73 |
Correct |
445 ms |
112572 KB |
Output is correct |
74 |
Correct |
473 ms |
106744 KB |
Output is correct |
75 |
Correct |
1333 ms |
233300 KB |
Output is correct |
76 |
Correct |
1696 ms |
257812 KB |
Output is correct |
77 |
Correct |
1567 ms |
244928 KB |
Output is correct |
78 |
Correct |
1535 ms |
244568 KB |
Output is correct |
79 |
Correct |
3044 ms |
250968 KB |
Output is correct |
80 |
Correct |
1793 ms |
222444 KB |
Output is correct |
81 |
Correct |
2252 ms |
240104 KB |
Output is correct |
82 |
Correct |
2786 ms |
221792 KB |
Output is correct |
83 |
Correct |
2853 ms |
239036 KB |
Output is correct |