제출 #398345

#제출 시각아이디문제언어결과실행 시간메모리
398345kevinxiehkGame (IOI14_game)C++17
컴파일 에러
0 ms0 KiB
#ifdef __cplusplus
extern "C" {
#endif
void initialize(int n);
int hasEdge(int u, int v);
#ifdef __cplusplus
}
#endif

// TODO: global variables can be declared here
int count[1505],target[1505],n;
void initialize(int N) {
  // TODO: implementation
  n=N;
  for(int i=0;i<N;i++)count[i]=0;
}
int max(int a,int b){
    if(a>b)return a;
    return b;
}
int hasEdge(int u, int v) {
  // TODO: implementation
  count[max(u,v)]++;
  if(count[max(u,v)]==max(u,v))return 1;
  return 0;
}

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

/tmp/ccA2qITH.o: In function `main':
grader.cpp:(.text.startup+0x14): undefined reference to `initialize(int)'
grader.cpp:(.text.startup+0x51): undefined reference to `hasEdge(int, int)'
collect2: error: ld returned 1 exit status