제출 #853508

#제출 시각아이디문제언어결과실행 시간메모리
853508_uros9게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include "game.h"
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;

const long long longlongmax=9223372036854775807;
const int modul=998244353;
const long long mod = 1e9 + 7;

vector<int> poj(2000,0);
int n;
void initialize(int nn){
    n=nn;
    for(int i=0; i<n; i++)
        poj[i]=0;
}

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

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

game.cpp:18:6: error: ambiguating new declaration of 'bool hasEdge(int, int)'
   18 | bool hasEdge(int u,int v){
      |      ^~~~~~~
In file included from game.cpp:1:
game.h:5:5: note: old declaration 'int hasEdge(int, int)'
    5 | int hasEdge(int u, int v);
      |     ^~~~~~~