Submission #632753

# Submission time Handle Problem Language Result Execution time Memory
632753 2022-08-20T17:30:00 Z Iwanttobreakfree Last supper (IOI12_supper) C++17
Compilation error
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