제출 #709797

#제출 시각아이디문제언어결과실행 시간메모리
709797raysh07Game (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);  
    edges[u]++;
    
    return cnt[u] == (n - u);
}

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

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:17:12: error: 'cnt' was not declared in this scope; did you mean 'int'?
   17 |     return cnt[u] == (n - u);
      |            ^~~
      |            int