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 main() {
int N = get_n();
vector <int> cand, hull;
hull.push_back(1);
for(int i = 2; i <= N; i++) {
cand.push_back(i);
}
sort(cand.begin(), cand.end(), [&](const int &a, const int &b) {
return is_clockwise(1, a, b) == false;
});
for(auto p : cand) {
while(hull.size() >= 2 and is_clockwise(hull[hull.size() - 2], hull.back(), p) == true) {
hull.pop_back();
}
hull.push_back(p);
}
give_answer(hull.size());
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... |