# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
492704 | zhougz | Discharging (NOI20_discharging) | C++17 | 138 ms | 13928 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/**
* author: chowgz
* created: 14/03/2021 11:20:55
**/
#include <bits/stdc++.h>
using namespace std;
constexpr int MAXN = (int)1e6;
struct Line {
int m;
long long c;
long long operator()(int x) {
return (long long)m * x + c;
}
double operator^(const Line &rhs) {
return ((double)c - rhs.c) / ((double)rhs.m - m);
}
};
struct ConvexHull {
Line lines[MAXN + 1];
int l = 0, r = 0;
void operator+=(Line line) {
while (r - l >= 2 && (line ^ lines[r - 1]) <= (lines[r - 1] ^ lines[r - 2])) {
r--;
}
lines[r] = line;
r++;
컴파일 시 표준 에러 (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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |