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<bits/stdc++.h>
using namespace std;
int n;
bool is_consistant(int a, int b){
bool prv;
bool isf = 1;
for(int i = 1; i <= n; i++)
{
if(i!= a && i!=b){
if(isf){
isf = 0;
prv = is_clockwise(a, b, i);
}else{
if(is_clockwise(a, b, i) != prv) return 0;
}
}
}
return 1;
}
int main(){
n = get_n();
if(n==3) {give_answer(3); return 0;}
set<int> verton;
for(int i = 1; i <= n; i++){
for(int j = 1; j <= n; j++){
//if(verton.count(i) || verton.count(j)) continue;
if(i!=j){
if(is_consistant(i, j)){
verton.insert(i);
verton.insert(j);
}
}
}
}
give_answer(verton.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... |