QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#675627#6696. Three DiceAnon_chan#WA 0ms3688kbC++20554b2024-10-25 19:00:232024-10-25 19:00:23

Judging History

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

  • [2024-10-25 19:00:23]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3688kb
  • [2024-10-25 19:00:23]
  • 提交

answer

#include<bits/stdc++.h>
#define int long long 
using namespace std;
int p[]={1,4},q[]={2,3,5,6};
signed main(){
	int A,B;
	cin>>A>>B;
	for(int i=1;i<=3;i++){
		for(int j=0;j<8;j++){
			int a=0,b=0;
			int now=j;
			for(int k=1;k<=i;k++){
				a+=p[now%2];
				now/=2;
			}
			for(int j1=0;j1<=63;j1++){
				b=0;
				int now=j1;
				for(int k1=1;k1<=3-i;k1++){
					b+=q[now%4];
					now/=4;
				}
				if(a==A&&b==B){
					cout<<"Yes"<<endl;
					return 0;
				}
			}

		}
		// cout<<a<<" "<<b<<endl;
	}
	cout<<"No"<<endl;
}

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3540kb

input:

4 5

output:

Yes

result:

ok answer is YES

Test #2:

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

input:

3 0

output:

Yes

result:

ok answer is YES

Test #3:

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

input:

1 2

output:

No

result:

ok answer is NO

Test #4:

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

input:

0 0

output:

No

result:

ok answer is NO

Test #5:

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

input:

0 1

output:

No

result:

ok answer is NO

Test #6:

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

input:

0 2

output:

No

result:

ok answer is NO

Test #7:

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

input:

0 3

output:

No

result:

ok answer is NO

Test #8:

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

input:

0 4

output:

No

result:

ok answer is NO

Test #9:

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

input:

0 5

output:

No

result:

ok answer is NO

Test #10:

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

input:

0 6

output:

No

result:

wrong answer expected YES, found NO