QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#437318#8674. Riddle of the Sphinxmonster_hunterTL 0ms0kbC++14926b2024-06-09 07:35:202024-06-09 07:35:20

Judging History

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

  • [2024-06-09 07:35:20]
  • 评测
  • 测评结果:TL
  • 用时:0ms
  • 内存:0kb
  • [2024-06-09 07:35:20]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define f fflush(stdout)
LL n,i,j,k,m,x,y;
LL a,b,c;
bool flag1=false,flag2=false,flag3=false;
int main(){
    printf("0 0 1\n");
    f;
    scanf("%lld",&a);
    printf("0 1 0\n");
    f;
    scanf("%lld",&b);
    printf("0 0 1\n");
    f;
    scanf("%lld",&c);
    printf("1 1 1\n");
    scanf("%lld",&x);
    if(x==a+b+c){
    	printf("0 0 0\n");
    	f;
    	scanf("%lld",&x);
    	printf("%lld %lld %lld\n",a,b,c);
	}
	else{
		printf("1 2 3\n");
		f;
		scanf("%lld",&y);
		if(y-x!=b+2*c) flag1=true;
		if(y-2*x!=c-a) flag2=true;
		if(3*x-y!=b+2*a) flag3=true;
		if(flag1==true && flag2==true){
			printf("%lld %lld %lld\n",a,b,x-a-b);
		}
		if(flag1==true && flag3==true){
			printf("%lld %lld %lld\n",a,x-a-c,c);
		}
		if(flag2==true && flag3==true){
			printf("%lld %lld %lld\n",x-b-c,b,c);
		}
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Time Limit Exceeded

input:

3
2
3

output:

0 0 1
0 1 0
0 0 1

result: