제출 #159914

#제출 시각아이디문제언어결과실행 시간메모리
159914rama_pang게임 (IOI14_game)C++14
15 / 100
23 ms380 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; int N, components; bitset<1500> adj[1500], cur; void initialize(int n) { N = n; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { adj[i][j] = 1; } } } int hasEdge(int u, int v) { adj[u][v] = 0; adj[v][u] = 0; cur = adj[0]; for (int i = 1; i < N; i++) { if ((cur & adj[i]).count() > 0) cur |= adj[i]; if (cur.count() == N) return 0; } adj[u][v] = 1; adj[v][u] = 1; return 1; }

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

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:23:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (cur.count() == N) return 0;
             ~~~~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...