QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#618491 | #6696. Three Dice | xiaofanger | WA | 0ms | 3648kb | C++17 | 784b | 2024-10-06 22:47:28 | 2024-10-06 22:47:28 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
void solve() {
int A , B; cin >> A >> B;
for(int i = 1 ; i <= 6 ; i++){
for(int j = 1 ; j <= 6 ; j++){
for(int k = 1 ; k <= 6 ; k++){
int h = 0 , b = 0;
if(i == 1 || i == 4) h += i;
if(j == 1 || j == 4) h += j;
if(k == 1 || k == 4) h += k;
if(i != 1 && i != 4) b += i;
if(j != 1 && j != 4) b += j;
if(k != 1 && k != 4) b += k;
if(h == A || b == B){
cout << "Yes\n";
return;
}
}
}
}
cout << "No\n";
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int __ = 1;
//cin >> __;
while(__--){
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3628kb
input:
4 5
output:
Yes
result:
ok answer is YES
Test #2:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
3 0
output:
Yes
result:
ok answer is YES
Test #3:
score: -100
Wrong Answer
time: 0ms
memory: 3552kb
input:
1 2
output:
Yes
result:
wrong answer expected NO, found YES