제출 #425040

#제출 시각아이디문제언어결과실행 시간메모리
425040A_DTriangles (CEOI18_tri)C++14
35 / 100
401 ms284 KiB
#include <bits/stdc++.h> #include "trilib.h" using namespace std; int nn; bool ok(int i,int j) { int cnt=0; for(int k=1;k<=nn;k++){ if(k==i||k==j)continue; int b=is_clockwise(i,j,k); cnt|=(1<<b); } return cnt<3; } void solve() { nn=get_n(); int ans=0; for(int i=1;i<=nn;i++){ for(int j=i+1;j<=nn;j++){ if(i==j)continue; if(ok(i,j))ans+=1; } } give_answer(ans); } main() { int t=1; while(t--)solve(); //cin>>t; }

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

tri.cpp:27:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   27 | main()
      | ^~~~
#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...