zoukankan      html  css  js  c++  java
  • 【河南省多校脸萌第六场 A】巴什博弈?

    【链接】http://acm.nyist.me/JudgeOnline/problem.php?cid=1013&pid=5


    【题意】


    在这里写题意

    【题解】


    0..a-1 YES
    a..a+a-1 NO
    a+a..a+a+b YES
    ...

    【错的次数】


    0

    【反思】


    在这了写反思

    【代码】

    #include <cstdio>
    #include <iostream>
    #include <algorithm>
    #include <cstring>
    #include <vector>
    #include <map>
    #include <queue>
    #include <iomanip>
    #include <set>
    #include <cstdlib>
    #include <cmath>
    #include <bitset>
    using namespace std;
    #define lson l,m,rt<<1
    #define rson m+1,r,rt<<1|1
    #define LL long long
    #define rep1(i,a,b) for (int i = a;i <= b;i++)
    #define rep2(i,a,b) for (int i = a;i >= b;i--)
    #define mp make_pair
    #define pb emplace_back
    #define fi first
    #define se second
    #define ld long double
    #define ms(x,y) memset(x,y,sizeof x)
    #define ri(x) scanf("%d",&x)
    #define rl(x) scanf("%lld",&x)
    #define rs(x) scanf("%s",x)
    #define rf(x) scnaf("%lf",&x)
    #define oi(x) printf("%d",x)
    #define ol(x) printf("%lld",x)
    #define oc putchar(' ')
    #define os(x) printf(x)
    #define all(x) x.begin(),x.end()
    #define Open() freopen("F:\rush.txt","r",stdin)
    #define Close() ios::sync_with_stdio(0)
    #define sz(x) ((int) x.size())
    #define ld long double
     
    typedef pair<int, int> pii;
    typedef pair<LL, LL> pll;
     
    //mt19937 myrand(time(0));
    //int get_rand(int n){return myrand()%n + 1;}
    const int dx[9] = { 0,1,-1,0,0,-1,-1,1,1 };
    const int dy[9] = { 0,0,0,-1,1,-1,1,-1,1 };
    const double pi = acos(-1.0);
    const int N = 110;
     
    LL a, b,n;
     
    int main() {
        //Open();
        //Close();
        while (~rl(n)) {
            rl(a), rl(b);
            if (n <= a - 1) {
                puts("YES");
                continue;
            }
            else {
                //n >= a
                n -= a;
                n %= (a + b);
                if (n <= a - 1) {
                    puts("NO");
                }
                else
                    puts("YES");
            }
        }
        return 0;
    }


  • 相关阅读:
    PC-CSS-默认字体样式
    PC--CSS维护
    PC--CSS技巧
    PC--CSS优化
    PC--CSS命名
    PC--CSS常识
    Base64与MIME和UTF-7
    Base64算法与多版本加密技术
    Base64算法与MD5加密原理
    log4j的使用
  • 原文地址:https://www.cnblogs.com/AWCXV/p/7626056.html
Copyright © 2011-2022 走看看