| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 852854 | anha3k25cvp | Mountains (IOI17_mountains) | C++14 | 1 ms | 604 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define dl double
#define st first
#define nd second
#define II pair <int, int>
#include "mountains.h"
using namespace std;
struct Node {
ll x, y;
bool operator <(const Node &O) const {
return x * O.y - y * O.x > 0;
}
};
int maximum_deevs(vector<int> y) {
int n = y.size();
vector <int> f(n, 1);
int ans = 0;
for (int i = 0; i < n; i ++) {
ans = max(ans, f[i]);
Node ma;
for (int j = i + 2; j < n; j ++) {
Node u = {j - 1 - i, y[j - 1] - y[i]}, v = {j - i, y[j] - y[i]};
if (j == i + 2)
ma = u;
else if (ma < u)
ma = u;
if (v < ma)
f[j] = max(f[j], f[i] + 1);
}
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
| # | 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... | ||||
