Submission #5186

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
51862014-02-14 00:16:56cki86201초록색 삼각형 (YDX13_green)C++98
1 / 1
420 ms1448 KiB
#include<stdio.h>
#include<algorithm>
#include<math.h>
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];}
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;
if(u == 3){
ll tmp = (ll)(x[2]-x[3])*(y[1]-y[3]) - (ll)(x[1]-x[3])*(y[2]-y[3]);
if(tmp < 0)tmp = -tmp;
return (double)tmp;
}
double ret = 0;
int i;
for(i=1;i<=u;i++)ord[i] = i;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...