답안 #64000

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
64000 2018-08-03T08:11:06 Z antimirage Homecoming (BOI18_homecoming) C++17
컴파일 오류
0 ms 0 KB
#ifndef __HOMECOMING_H
#define __HOMECOMING_H
#include <cstdio>
#include <cassert>

long long solve(int N, int K, int *A, int *B);

int main() {
  int T; assert(scanf("%d", &T) == 1);
  for(int t = 0; t < T; t++) {
    int N, K; assert(scanf("%d%d", &N, &K) == 2);
    int *A = new int[N];
    int *B = new int[N];
    for(int i = 0; i < N; i++) assert(scanf("%d", &A[i]) == 1);
    for(int i = 0; i < N; i++) assert(scanf("%d", &B[i]) == 1);
    printf("%lld\n", solve(N, K, A, B));
    delete[] A;
    delete[] B;
  }
  return 0;
}
#endif

Compilation message

/tmp/ccXSfIjc.o: In function `main':
homecoming.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc0ynIhP.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/cc0ynIhP.o: In function `main':
grader.cpp:(.text.startup+0xff): undefined reference to `solve(int, int, int*, int*)'
/tmp/ccXSfIjc.o: In function `main':
homecoming.cpp:(.text.startup+0x116): undefined reference to `solve(int, int, int*, int*)'
collect2: error: ld returned 1 exit status