제출 #585108

#제출 시각아이디문제언어결과실행 시간메모리
585108krit3379Triangles (CEOI18_tri)C++17
15 / 100
2 ms724 KiB
#include<bits/stdc++.h> #include"trilib.h" using namespace std; #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #define N 55 int d[N][N][N],c[2]; int main(){ int n,i,j,k,ans; n=get_n(); assert(n<=50); for(i=1;i<=n;i++)for(j=i+1;j<=n;j++)for(k=1;k<=n;k++){ if(k==i||k==j)continue; d[i][j][k]=is_clockwise(i,j,k); } for(i=1;i<=n;i++)for(j=i+1;j<=n;j++){ c[0]=c[1]=0; for(k=1;k<=n;k++){ if(k==i||k==j)continue; c[d[i][j][k]]++; } if(!c[0]||!c[1])ans++; } give_answer(ans); return 0; }

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

tri.cpp: In function 'int main()':
tri.cpp:26:16: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
   26 |     give_answer(ans);
      |     ~~~~~~~~~~~^~~~~
#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...