QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#684882 | #6696. Three Dice | nageing | WA | 0ms | 3784kb | C++20 | 767b | 2024-10-28 16:22:07 | 2024-10-28 16:22:08 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
void solve() {
int a, b;
cin >> a >> b;
vector<int> A = {1, 4}, B = {2, 3, 5, 6};
for (int i = 0; i < 2; i ++) {
for (int j = 0; j < 4; j ++) {
for (int k = j; k < 4; k ++) {
if (a == A[i] && b == B[j] + B[k]) {
cout << "Yes\n";
return;
}
}
}
}
for (int i = 0; i < 4; i ++) {
for (int j = 0; j < 2; j ++) {
for (int k = j; k < 2; k ++) {
if (a == A[j] + A[k] && b == B[i]) {
cout << "Yes\n";
return;
}
}
}
}
cout << "No\n";
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
int t = 1;
//cin >> t;
while (t --) {
solve();
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3740kb
input:
4 5
output:
Yes
result:
ok answer is YES
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3784kb
input:
3 0
output:
No
result:
wrong answer expected YES, found NO