QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#671239 | #6696. Three Dice | Schoolbag | WA | 0ms | 3552kb | C++20 | 1.4kb | 2024-10-24 11:56:16 | 2024-10-24 11:56:16 |
Judging History
answer
#include <algorithm>
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef map<int, int> mii;
typedef unordered_map<int, int> umii;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
typedef vector<int> vi;
typedef vector<vector<int>> vc;
typedef vector<long long> vl;
typedef vector<vector<long long>> vll;
typedef __int128_t int128;
#define rep(x, y, z) for(int x = (y); x <= (z); x++)
#define per(x, y ,z) for(int x = (y); x >= (z); x--)
#define yes cout << "Yes\n"
#define no cout << "No\n"
//#define int long long
//const int N = 1e5 + 5;
//const int mod = 1e9 + 7;
//const ll inf = 1e18;
void solve(){
int n, m; cin >> n >> m;
set<int> s;
s.insert(2), s.insert(4);
rep(a, 1, 6){
rep(b, 1, 6){
rep(c, 1, 6){
int cnt1 = 0, cnt2 = 0;
if(s.count(a)) cnt1 += a;
else cnt2 += a;
if(s.count(b)) cnt1 += b;
else cnt2 += b;
if(s.count(c)) cnt1 += c;
else cnt2 += c;
if(cnt1 == n and cnt2 == m){
yes;
return;
}
}
}
}
no;
}
signed main(){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int __ = 1; //cin >> __;
while(__--){
solve();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3548kb
input:
4 5
output:
Yes
result:
ok answer is YES
Test #2:
score: -100
Wrong Answer
time: 0ms
memory: 3552kb
input:
3 0
output:
No
result:
wrong answer expected YES, found NO