Submission #376762

#TimeUsernameProblemLanguageResultExecution timeMemory
376762daniel920712Cake 3 (JOI19_cake3)C++14
Compilation error
0 ms0 KiB
#include "minerals.h"
#include <vector>
#include <stdio.h>
//using namespace std;
int ans[86005]={0};
bool have[86005];
int cha[86005];
void Solve(int N)
{
    int x=0,y,i,j,now=1;
    for(i=1;i<=2*N;i++)
    {
        y=Query(i);
        if(y-x==0)
        {
            cha[now++]=i;
            have[i]=1;
        }
        x=y;
    }

    for(i=1;i<=2*N;i++)
    {
        Query(i);
        if(have[i]==0) cha[now++]=i;
    }

    for(i=0;i<16;i++)
    {
        for(j=1;j<=N;j++) if(j&(1<<i)) x=Query(cha[j]);
        for(j=1;j<=N;j++)
        {
            y=Query(cha[j+N]);
            if(y-x==0) ans[j]+=(1<<i);
            x=y;
        }
        for(j=1;j<=N;j++) if(j&(1<<i)) x=Query(cha[j]);
    }
    for(i=1;i<=N;i++)
    {
        Answer(cha[i+N],cha[ans[i]]);
    }
}

Compilation message (stderr)

cake3.cpp:1:10: fatal error: minerals.h: No such file or directory
    1 | #include "minerals.h"
      |          ^~~~~~~~~~~~
compilation terminated.