제출 #259782

#제출 시각아이디문제언어결과실행 시간메모리
259782MKopchevTriangles (CEOI18_tri)C++14
35 / 100
13 ms384 KiB
#include "trilib.h" #include<bits/stdc++.h> using namespace std; int n; /* int get_n() { cin>>n; } bool is_clockwise(int i,int j,int k) { cout<<i<<" "<<j<<" "<<k<<" -> "; int ret; cin>>ret; return ret; } void give_answer(int sz) { cout<<sz<<endl; } */ set<int> hull; int main() { n=get_n(); for(int i=1;i<=n;i++) for(int j=i+1;j<=n;j++) { bool in[2]={0,0}; for(int k=1;k<=n;k++) if(k!=i&&k!=j) { in[is_clockwise(i,j,k)]=1; if(in[0]&&in[1])break; } if(in[0]==0||in[1]==0) { hull.insert(i); hull.insert(j); } } give_answer(hull.size()); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

tri.cpp: In function 'int main()':
tri.cpp:34:13: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
             for(int k=1;k<=n;k++)
             ^~~
tri.cpp:42:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
                 if(in[0]==0||in[1]==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...