Codeforces Round #425 (Div. 2) - A

 

题目链接: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;
}

 

posted @ 2017-07-27 19:36  キリト  阅读(97)  评论(0编辑  收藏  举报