QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#675627 | #6696. Three Dice | Anon_chan# | WA | 0ms | 3688kb | C++20 | 554b | 2024-10-25 19:00:23 | 2024-10-25 19:00:23 |
Judging History
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