제출 #709796

#제출 시각아이디문제언어결과실행 시간메모리
709796raysh07게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include "game.h" #include "bits/stdc++.h" using namespace std; const int N = 1569; int edges[N]; int n; void initialize(int nn){ n = nn; } int hasEdge(int u, int v){ if (u>v) swap(u, v); cnt[u]++; return cnt[u] == (n - u); }

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

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:14:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   14 |     if (u>v) swap(u, v);  cnt[u]++;
      |     ^~
game.cpp:14:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   14 |     if (u>v) swap(u, v);  cnt[u]++;
      |                           ^~~
game.cpp:14:27: error: 'cnt' was not declared in this scope; did you mean 'int'?
   14 |     if (u>v) swap(u, v);  cnt[u]++;
      |                           ^~~
      |                           int