Submission #917938

#TimeUsernameProblemLanguageResultExecution timeMemory
917938PM1Triangles (CEOI18_tri)C++17
Compilation error
0 ms0 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; }

Compilation message (stderr)

tri.cpp: In function 'int main()':
tri.cpp:10:3: error: expected ',' or ';' before 'while'
   10 |   while(!mark[p]){
      |   ^~~~~