QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#421090 | #8416. Dzielniki [B] | Kalenist | Compile Error | / | / | C++20 | 685b | 2024-05-25 12:02:37 | 2024-05-25 12:02:38 |
Judging History
answer
#include<bits/stdc++.h>
#include"dzilib.h"
#define ll long long
using namespace std;
int T,bit;
ll mx;
map<ll,ll> f;
inline int calc(ll x){return 63-__builtin_clzll(x);}
int getT();
ll getN();
ll getC();
ll Ask(ll x);
int getQ();
void Answer(ll x);
inline ll query(ll x){return f.count(x)?f[x]:f[x]=Ask(x);}
inline ll dfs(ll x,int nw)
{
if(nw == bit) return x;
ll res=0;
if(query(mx-x)%(nw+1) == 0) res|=dfs(x,nw+1);
if(query(mx-x-(1ll<<nw))%(nw+1) == 0) res|=dfs(x+(1ll<<nw),nw+1);
return res;
}
int main()
{
T=getT(),bit=calc(getN())+1;
getC(),getQ(),mx=1ll<<bit;
while(T--) f.clear(),Answer(dfs(0,0));
return 0;
}
详细
/usr/bin/ld: /tmp/cc3S0LuH.o: in function `main': answer.code:(.text.startup+0x2b): undefined reference to `getT()' /usr/bin/ld: answer.code:(.text.startup+0x36): undefined reference to `getN()' /usr/bin/ld: answer.code:(.text.startup+0x48): undefined reference to `getC()' /usr/bin/ld: answer.code:(.text.startup+0x4d): undefined reference to `getQ()' collect2: error: ld returned 1 exit status