Submission #1060046

#TimeUsernameProblemLanguageResultExecution timeMemory
1060046kachim2Triangles (CEOI18_tri)C++17
0 / 100
0 ms412 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){ 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...