제출 #1006456

#제출 시각아이디문제언어결과실행 시간메모리
1006456makanhulia게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
#include "game.h"
using namespace std;
// #define int long long
// #define ld long double
// #define fi first
// #define se second
// #define pb push_back
// #define pii pair<int, int>
// #define piii pair<pair<int, int>, pair<int, int>>
// #define pip pair<int, pair<int, int>>
int n;
int freq[1505];
void initialize(int x)
{
    n = x;
}
bool hasEdge(int u, int v)
{
    freq[u]++;
    freq[v]++;
    if (freq[u] == n - 1 || freq[v] == n - 1)
    {
        return true;
    }
    else
        return false;
}
// signed main()
// {
//     ios_base::sync_with_stdio(false);
//     // cin.tie(NULL);
//     cout.tie(NULL);
// }

컴파일 시 표준 에러 (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:2:
game.h:5:5: note: old declaration 'int hasEdge(int, int)'
    5 | int hasEdge(int u, int v);
      |     ^~~~~~~