QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#445893#8416. Dzielniki [B]GotoHiotoriCompile Error//C++17541b2024-06-16 16:46:272024-06-16 16:46:27

Judging History

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

  • [2024-06-16 16:46:27]
  • 评测
  • [2024-06-16 16:46:27]
  • 提交

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

Details

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){
      |            ^