# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
5167 | cki86201 | 초록색 삼각형 (YDX13_green) | C++98 | 1028 ms | 79628 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#include<algorithm>
#include<math.h>
#include<vector>
typedef long long ll;
const double PI = 3.141592653589793238;
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];}
int main()
{
scanf("%d",&n);
std::vector <int> v(n*10000);
if(n<=2)return printf("0")&0;
int i, j;
for(i=1;i<=n;i++)scanf("%d%d",x+i,y+i);
for(i=1;i<=n;i++)ord[i] = i;
double ans = 0;
for(i=1;i<=n;i++){
for(j=1;j<=n;j++)an[j] = atan2(y[j] - y[i], x[j] - x[i]);
std::sort(ord+1,ord+1+n,comp);
ll now[2] = {0,0};
int t = 1;
double na = 0;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |