QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#437320#8674. Riddle of the Sphinxmonster_hunterWA 1ms3940kbC++14934b2024-06-09 07:36:062024-06-09 07:36:08

Judging History

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

  • [2024-06-09 07:36:08]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3940kb
  • [2024-06-09 07:36:06]
  • 提交

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");
    f;
    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: 100
Accepted
time: 1ms
memory: 3884kb

input:

3
2
3
6
14

output:

0 0 1
0 1 0
0 0 1
1 1 1
1 2 3
1 2 3

result:

ok correct!

Test #2:

score: 0
Accepted
time: 1ms
memory: 3812kb

input:

1
1
1
10000
10003

output:

0 0 1
0 1 0
0 0 1
1 1 1
1 2 3
9998 1 1

result:

ok correct!

Test #3:

score: 0
Accepted
time: 0ms
memory: 3872kb

input:

3333
3333
3333
9999
0

output:

0 0 1
0 1 0
0 0 1
1 1 1
0 0 0
3333 3333 3333

result:

ok correct!

Test #4:

score: 0
Accepted
time: 0ms
memory: 3812kb

input:

711
503
712
2108
4035

output:

0 0 1
0 1 0
0 0 1
1 1 1
1 2 3
893 503 712

result:

ok correct!

Test #5:

score: -100
Wrong Answer
time: 0ms
memory: 3940kb

input:

947
365
947
2182
4443

output:

0 0 1
0 1 0
0 0 1
1 1 1
1 2 3
947 365 870
947 288 947
870 365 947

result:

wrong answer read