제출 #115194

#제출 시각아이디문제언어결과실행 시간메모리
115194ly20Game (IOI14_game)C++14
0 / 100
2 ms384 KiB
#include<bits/stdc++.h> using namespace std; #include "game.h" const int MAXN=1510,MAXL=13; int v[MAXN][MAXN],v1[MAXL]; void initialize(int n) { for(int i=1;i<=n;i++) { for(int j=i;j<=n;j++) { int k; for(int l=0;l<MAXL;l++) { if((1<<l)&j!=(1<<l)&i) { k=l; break; } } v1[k]++; v[i][j]=k;v[j][i]=k; } } } int hasEdge(int a,int b) { if(v1[v[a][b]]==1) { return 1; } else { v1[v[a][b]]--; return 0; } }

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

game.cpp: In function 'void initialize(int)':
game.cpp:15:16: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
     if((1<<l)&j!=(1<<l)&i)
               ~^~~~~~~~
game.cpp:21:8: warning: 'k' may be used uninitialized in this function [-Wmaybe-uninitialized]
    v1[k]++;
    ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...