| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 108909 | PeppaPig | Mountains (IOI17_mountains) | C++14 | 56 ms | 14328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "mountains.h"
#include <bits/stdc++.h>
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
const int N = 2e3+5;
int n, dp[N][N];
int maximum_deevs(vector<int> y) {
n = y.size();
for(int r = 0; r < n; r++) {
dp[r][r] = 1;
int high = r, cnt = 0;
for(int l = r-1; ~l; l--) {
pii vec1(high - l, y[high] - y[l]);
pii vec2(r - l, y[r] - y[l]);
if(1ll * vec1.x * vec2.y >= 1ll * vec1.y * vec2.x) {
cnt += dp[l+1][high-1];
high = l;
}
dp[l][r] = max(dp[l][r-1], dp[l][high-1] + cnt + 1);
}
}
return dp[0][n-1];
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
