Submission #1022780

# Submission time Handle Problem Language Result Execution time Memory
1022780 2024-07-14T05:09:24 Z vjudge1 Last supper (IOI12_supper) C++17
Compilation error
0 ms 0 KB
#include "advisor.h"
#include<bits/stdc++.h>
using namespace std;
bitset<500100>onf;
void RADV(int y,int bt){
    for(int i=0;i<bt;i++)
        WriteAdvice(y&1<<i);
}
void ComputeAdvice(int *C, int N, int K, int M) {
    vector<int>nxt(N),lst(N,N),plat(K);
    iota(plat.begin(),plat.end(),0);
    C[N]=N;
    for(int i=N;i--;)
        nxt[i]=lst[C[i]],
        lst[C[i]]=i;
    set<pair<int,int>> st;
    for(auto i:plat)onf[i]=1,
        st.insert({lst[i],i});
    int df=log2(2*K+1);
    for(int i=0;i<N;i++){
        if(onf[C[i]])continue;
        onf[C[i]]=1;
        auto[x,y]=*--st.end();
        st.erase({x,y});
        st.insert({nxt[i],y});
        onf[C[x]]=0;
        RADV(y,df);
    }
}



    

Compilation message

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