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 "trilib.h"
#include <iostream>
using namespace std;
/*
A convex hull is a set of points p[1], p[2], .... p[k] such that for every point for every i, and for every point q
not equal to p[i] or p[i+1], p[i], p[i+1] and q are in clockwise order
*/
int main()
{
int n = get_n();
bool flag;
int res = 0;
for(int i = 1; i <= n; i++)
{
for(int j = 1; j <= n; j++)
{
if(i == j) continue;
flag = 1;
for(int k = 1; k <= n; k++)
{
if(k == i || k == j) continue;
flag &= is_clockwise(i, j, k);
if(!flag) break;
}
if(flag)
{
res++;
break;
}
}
}
give_answer(res);
}
# | 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... |