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;
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#define N 55
int d[N][N][N],c[2],ans;
int main(){
int n,i,j,k;
n=get_n();
for(i=1;i<=n;i++)for(j=i+1;j<=n;j++)for(k=j+1;k<=n;k++){
if(k==i||k==j)continue;
d[i][j][k]=d[j][k][i]=d[k][i][j]=is_clockwise(i,j,k);
d[i][k][j]=d[k][j][i]=d[j][i][k]=!d[i][j][k];
}
for(i=1;i<=n;i++)for(j=i+1;j<=n;j++){
c[0]=c[1]=0;
for(k=1;k<=n;k++){
if(k==i||k==j)continue;
c[d[i][j][k]]++;
}
if(!c[0]||!c[1])ans++;
}
give_answer(ans);
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... |