QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#445893 | #8416. Dzielniki [B] | GotoHiotori | Compile Error | / | / | C++17 | 541b | 2024-06-16 16:46:27 | 2024-06-16 16:46:27 |
Judging History
answer
#include<stdio.h>
#include"dzilib.h"
typedef long long ll;
ll work(ll y,int k){
if(k==57)return (1ll<<k)-y;
int a=Ask(x+y),b=Ask(x+y+(1ll<<k));
ll x;
if(a%(k+1)==0){
for(int i=k+2;i<=58;++i)
if(b%i==0){
x=work(y|1ll<<k,k+1);
if(~x)return x;
break;
}
}
if(b%(k+1)==0){
for(int i=k+2;i<=58;++i)
if(a%i==0){
x=work(y,k+1);
if(~x)return x;
break;
}
}
return -1;
}
int main(){
int t=GetT(),n=GetN();ll q=GetQ(),c=GetC();
for(;t--;Answer(work(114514,0)));
return 0;
}
详细
answer.code: In function ‘ll work(ll, int)’: answer.code:6:19: error: ‘x’ was not declared in this scope 6 | int a=Ask(x+y),b=Ask(x+y+(1ll<<k)); | ^ answer.code:10:28: error: ‘b’ was not declared in this scope 10 | if(b%i==0){ | ^ answer.code:16:12: error: ‘b’ was not declared in this scope 16 | if(b%(k+1)==0){ | ^