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<bits/stdc++.h>
#include "trilib.h"
using namespace std;
int n;
bool is_clockw(int i, int j, int k) {
return is_clockwise(i+1, j+1, k+1);
}
bool is_on_convex_hull(int i) {
int mx = i == 0 ? 1 : 0;
for(int j = 0; j<n; j++) {
if(j == i || j == mx) continue;
if(is_clockw(i, mx, j)) mx = j;
}
for(int j = 0; j<n; j++) {
if(j == i || j == mx) continue;
if(is_clockw(i, mx, j)) return false;
}
return true;
}
int32_t main() {
n = get_n();
int ans = 0;
for(int i = 0; i<n; i++) {
ans += is_on_convex_hull(i);
}
give_answer(ans);
return 0;
}
# | 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... |