답안 #632753

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
632753 2022-08-20T17:30:00 Z Iwanttobreakfree 최후의 만찬 (IOI12_supper) C++17
컴파일 오류
0 ms 0 KB
#include "advisor.h"
#include <vector>
#include <set>
#include <cmath>
using namespace std;
void ComputeAdvice(int *C, int N, int K, int M) {
    int logn=log(N)+1;
    for(int i=0;i<N;i++){
        int x=C[i];
        for(int j=0;j<logn;j++){
            if(x&1)WriteAdvice(1);
            else WriteAdvice(0);
            x/=2;
        }
    }
}
#include "advisor.h"
#include <vector>
#include <set>
#include <cmath>
using namespace std;
void ComputeAdvice(int *C, int N, int K, int M) {
    int logn=log(N)+1;
    for(int i=0;i<N;i++){
        int x=C[i];
        for(int j=0;j<logn;j++){
            if(x&1)WriteAdvice(1);
            else WriteAdvice(0);
            x/=2;
        }
    }
}

Compilation message

/usr/bin/ld: /tmp/ccS5JAiM.o: in function `main':
assistant_grader.cpp:(.text.startup+0x21e): undefined reference to `Assist(unsigned char*, int, int, int)'
/usr/bin/ld: /tmp/cc9RZwdN.o: in function `ComputeAdvice(int*, int, int, int)':
assistant.cpp:(.text+0x56): undefined reference to `WriteAdvice(unsigned char)'
/usr/bin/ld: assistant.cpp:(.text+0x73): undefined reference to `WriteAdvice(unsigned char)'
collect2: error: ld returned 1 exit status