QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#421093 | #8416. Dzielniki [B] | Kalenist | Compile Error | / | / | C++20 | 580b | 2024-05-25 12:03:58 | 2024-05-25 12:03:58 |
Judging History
answer
#include<bits/stdc++.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);}
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;
}
详细
answer.code: In function ‘long long int query(long long int)’: answer.code:8:51: error: ‘Ask’ was not declared in this scope 8 | inline ll query(ll x){return f.count(x)?f[x]:f[x]=Ask(x);} | ^~~ answer.code: In function ‘int main()’: answer.code:20:7: error: ‘GetT’ was not declared in this scope 20 | T=GetT(),bit=calc(GetN())+1; | ^~~~ answer.code:20:23: error: ‘GetN’ was not declared in this scope 20 | T=GetT(),bit=calc(GetN())+1; | ^~~~ answer.code:21:5: error: ‘GetC’ was not declared in this scope; did you mean ‘getc’? 21 | GetC(),GetQ(),mx=1ll<<bit; | ^~~~ | getc answer.code:21:12: error: ‘GetQ’ was not declared in this scope 21 | GetC(),GetQ(),mx=1ll<<bit; | ^~~~ answer.code:22:26: error: ‘Answer’ was not declared in this scope 22 | while(T--) f.clear(),Answer(dfs(0,0)); | ^~~~~~