# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
152408 | tfg | 최적의 팀 구성 (FXCUP4_squad) | C++17 | 2645 ms | 97328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "squad.h"
#include <vector>
#include <algorithm>
#include <cassert>
struct PT {
typedef long long T;
T x, y;
PT(T xx = 0, T yy = 0) : x(xx), y(yy){}
PT operator +(const PT &p) const { return PT(x+p.x,y+p.y); }
PT operator -(const PT &p) const { return PT(x-p.x,y-p.y); }
PT operator *(T c) const { return PT(x*c,y*c); }
T operator *(const PT &p) const { return x*p.x+y*p.y; }
T operator %(const PT &p) const { return x*p.y-y*p.x; }
// be careful using this without eps!
bool operator<(const PT &p)const { return x != p.x ? x < p.x : y < p.y; }
bool operator==(const PT &p)const{ return x == p.x && y == p.y; }
};
std::vector<PT> splitHull(const std::vector<PT> &hull) {
std::vector<PT> ans(hull.size());
for(int i = 0, j = (int) hull.size()-1, k = 0; k < (int) hull.size(); k++) {
if(hull[i] < hull[j]) {
ans[k] = hull[i++];
} else {
ans[k] = hull[j--];
}
}
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... |