QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#421093#8416. Dzielniki [B]KalenistCompile Error//C++20580b2024-05-25 12:03:582024-05-25 12:03:58

Judging History

你现在查看的是最新测评结果

  • [2024-05-25 12:03:58]
  • 评测
  • [2024-05-25 12:03:58]
  • 提交

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;
}

Details

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));
      |                          ^~~~~~