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 N;
signed main(){
N = get_n();
vector<vector<int>> count_above(N, vector<int> (N));
for(int i = 0; i<N; i++){
for(int j = 0; j<N; j++){
for(int k = 0; k<N; k++){
if(i!=j && i!=k && j!=k){
if(is_clockwise(i+1, j+1, k+1)){
count_above[i][j] ++;
}
}
}
}
}
int res= 0;
for(int i = 0; i<N; i++){
for(int j = 0; j<N; j++){
if(i!=j){
if(count_above[i][j] == N-2){
res++;
}
}
}
}
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... |