제출 #1060064

#제출 시각아이디문제언어결과실행 시간메모리
1060064kachim2Triangles (CEOI18_tri)C++17
0 / 100
0 ms436 KiB
#include "trilib.h" #include<bits/stdc++.h> using namespace std; int n; bool is_consistant(int a, int b){ bool prv; bool isf = 1; for(int i = 1; i <= n; i++) { if(i!= a && i!=b){ if(isf){ isf = 0; prv = is_clockwise(a, b, i); }else{ if(is_clockwise(a, b, i) != prv) return 0; } } } return 1; } int main(){ n = get_n(); if(n==3) {give_answer(3); return 0;} set<int> verton; for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ if(verton.count(i) || verton.count(j)) continue; if(i!=j){ if(is_consistant(i, j)){ verton.insert(i); verton.insert(j); } } } } give_answer(verton.size()); return 0; }
#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...