题目链接:http://codeforces.com/contest/832/problem/A

题意:有n个棍子,两个人轮流取这些棍子,每个人每次只能去恰好k个棍子(不足k个则不能取),问先手取的棍子数目是否比后手多?

思路:水题。

#define _CRT_SECURE_NO_DEPRECATE
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<time.h>
#include<cmath>
using namespace std;
typedef long long int LL;
const int MAXN = 3e5 + 24;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;

int main(){
//#ifdef kirito
//    freopen("in.txt", "r", stdin);
//    freopen("out.txt", "w", stdout);
//#endif
    LL n, k;
    while (~scanf("%I64d%I64d",&n,&k)){
        LL res = n / k;
        printf(res % 2 ? "YES\n" : "NO\n");
    }
    return 0;
}

 

相关文章:

  • 2021-06-03
  • 2021-11-12
  • 2021-12-19
  • 2021-09-01
  • 2021-09-24
  • 2021-10-16
  • 2021-07-03
  • 2021-12-22
猜你喜欢
  • 2022-12-23
  • 2021-05-29
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案