제출 #884301

#제출 시각아이디문제언어결과실행 시간메모리
884301StefanL2005Game (IOI14_game)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "game.h"
using namespace std;

vector<int> Nr;

void initialize(int n)
{
    Nr = vector<int> (n, 0);
}

int hasEdge(int u, v)
{
    if (Nr[u]++ == n - 1 || Nr[v]++ = n - 1)
        return 1;
    return 0;
}

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

game.cpp:12:20: error: 'v' has not been declared
   12 | int hasEdge(int u, v)
      |                    ^
game.cpp: In function 'int hasEdge(int, int)':
game.cpp:14:20: error: 'n' was not declared in this scope
   14 |     if (Nr[u]++ == n - 1 || Nr[v]++ = n - 1)
      |                    ^
game.cpp:14:32: error: 'v' was not declared in this scope
   14 |     if (Nr[u]++ == n - 1 || Nr[v]++ = n - 1)
      |                                ^