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 <iostream>
#include "trilib.h"
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
#define rep(i,a,b) for(int i = a; i < b; i++)
#define pb push_back
int n;
bool hull(int a, int b) {
rep(c, 1, n + 1) {
if (c == a || c == b) continue;
if (!is_clockwise(a, b, c)) return false;
}
return true;
}
int main()
{
n = get_n();
set<int> h;
rep(i, 1, n + 1) {
rep(j, i + 1, n + 1) {
if (hull(i, j) || hull(j, i)) {h.insert(i); h.insert(j);}
}
}
cout << h.size() << endl;
}
# | 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... |