# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
697384 | elkernos | Roads (CEOI20_roads) | C++17 | 189 ms | 20040 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define int long long
struct P {
int x, y;
bool operator<(const P &he) const { return make_pair(x, y) < make_pair(he.x, he.y); }
void read() { cin >> x >> y; }
};
int sweep_x;
struct S {
P one, two;
int id;
double sweep_y() const
{
if (one.x == two.x) return one.y;
return one.y + (double)(two.y - one.y) * (sweep_x - one.x) / (two.x - one.x);
}
bool operator<(const S &he) const { return sweep_y() < he.sweep_y(); }
};
struct E {
S seg;
bool is_new;
P point() const { return is_new ? seg.one : seg.two; }
bool operator<(const E &he) const { return point() < he.point(); }
};
# | 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... |