제출 #1006425

#제출 시각아이디문제언어결과실행 시간메모리
1006425devariaota게임 (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.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){
    if(freq[u] == n - 2 || freq[v] == n - 2){
        cout << "yes" << endl; 
    }
    else cout << "no" << endl; 
    freq[u]++; freq[v]++; 
} 
// signed main(){
//     ios_base::sync_with_stdio(false); 
//     cin.tie(NULL); 
//     cout.tie(NULL); 
    
// }

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

game.cpp: In function 'bool hasEdge(long long int, long long int)':
game.cpp:22:1: warning: no return statement in function returning non-void [-Wreturn-type]
   22 | }
      | ^
/usr/bin/ld: /tmp/ccN32PwJ.o: in function `main':
grader.cpp:(.text.startup+0x2a): undefined reference to `initialize(int)'
/usr/bin/ld: grader.cpp:(.text.startup+0x94): undefined reference to `hasEdge(int, int)'
collect2: error: ld returned 1 exit status