Submission #1051454

#TimeUsernameProblemLanguageResultExecution timeMemory
1051454antonTriangles (CEOI18_tri)C++17
35 / 100
772 ms1448 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...