QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#671239#6696. Three DiceSchoolbagWA 0ms3552kbC++201.4kb2024-10-24 11:56:162024-10-24 11:56:16

Judging History

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

  • [2024-10-24 11:56:16]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3552kb
  • [2024-10-24 11:56:16]
  • 提交

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;
}

详细

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