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();
int res = 0;
for (int i = 0; i<n; i++){
for (int j = i+1; j<n; j++){
bool proti = false;
bool po = false;
for (int k = 0; k<n; k++){
if (i == k || j == k) continue;
if (is_clockwise(i+1,j+1,k+1)){
po = true;
} else {
proti = true;
}
if (po && proti) break;
}
if(!po || !proti) res++;
}
}
if (n <= 3){
cout << n << endl;
} else {
cout << res << 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... |