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"
#define ff first
#define ss second
#define pb push_back
#define all(x) x.begin(),x.end()
using namespace std;
signed main(){
ios_base::sync_with_stdio();
cin.tie(0);cout.tie(0);
int n=get_n();
set <int> res;
for(int i=1;i<=n;i++){
for(int j=1;j<=n;j++){
if(i==j)continue;
int clws=0,anti=0;
for(int k=1;k<=n;k++){
if(i!=k && k!=j ){
//cout<<i<<" "<<j<<" "<<k<<" "<<is_clockwise(i,j,k)<<"\n";
if(is_clockwise(i,j,k))clws++;
else anti++;
}
}
if(clws==0 or anti==0){
res.insert(i);
res.insert(j);
}
}
}
give_answer(res.size());
}
/*
*/
# | 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... |