제출 #1053570

#제출 시각아이디문제언어결과실행 시간메모리
1053570antonTriangles (CEOI18_tri)C++17
55 / 100
1057 ms980 KiB
#include<bits/stdc++.h> #include"trilib.h" using namespace std; int N; int get_cand(int u){ int cur= 0; if(u == 0){ cur++; } for(int i = 0; i<N; i++){ if(i!=u && i!=cur && u!=cur){ if(is_clockwise(u+1, cur+1, i+1)){ cur= i; } } } return cur; } bool is_bound(int a, int b){ for(int i = 0; i<N; i++){ if(i!= a && i!=b && a!=b){ if(is_clockwise(a+1, b+1, i+1)){ return false; } } } return true; } signed main(){ N = get_n(); int res= 0; for(int i = 0; i<N; i++){ int j = get_cand(i); if(is_bound(i, j)){ 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...