# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
5188 | cki86201 | 초록색 삼각형 (YDX13_green) | C++98 | 424 ms | 1448 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<stdio.h>
#include<algorithm>
#include<math.h>
typedef long long ll;
const double PI = 3.14159265358979;
int x[2020], y[2020], ord[2020];
double an[2020];
int n;
bool comp(const int &a,const int &b){return an[a] < an[b];}
inline ll ccw(int a,int b,int c)
{
return (ll)(x[b]-x[a]) * (y[c]-y[a]) - (ll)(x[c]-x[a]) * (y[b]-y[a]);
}
double solve(int u)
{
if(u<=2)return 0;
double ret = 0;
int i;
for(i=1;i<=u;i++)ord[i] = i;
for(i=1;i<=u;i++)an[i] = atan2(y[i] - y[u], x[i] - x[u]);
std::sort(ord+1,ord+1+u,comp);
int t = (ord[1] == u)?2:1;
ll now[2] = {0,0};
for(i=1;i<=u;i++){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |