Submission #917941

#TimeUsernameProblemLanguageResultExecution timeMemory
917941PM1Triangles (CEOI18_tri)C++17
0 / 100
3037 ms348 KiB
#include <bits/stdc++.h> #include "trilib.h" using namespace std; const int mxn=5e2+5; int n,mark[mxn],ans=1e9; int main(){ n=get_n(); for(int p=1;p<=n;p++){ int res=0; while(!mark[p]){ mark[p]=1; res++; int x=(p==1)?2:1; for(int i=1;i<=n;i++){ if(i!=p && i!=x){ bool y=is_clockwise(p,x,i); if(!y) x=i; } } p=x; } memset(mark,0,sizeof mark); ans=min(ans,res); } give_answer(ans); 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...