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 + ;
const int INF = 0x3f3f3f3f;
const int mod = 1e9 + ; 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 % ? "YES\n" : "NO\n");
}
return ;
}
Codeforces Round #425 (Div. 2) - A的更多相关文章
- Codeforces Round #425 (Div. 2)C
题目连接:http://codeforces.com/contest/832/problem/C C. Strange Radiation time limit per test 3 seconds ...
- Codeforces Round #425 (Div. 2)
A 题意:给你n根棍子,两个人每次拿m根你,你先拿,如果该谁拿的时候棍子数<m,这人就输,对手就赢,问你第一个拿的人能赢吗 代码: #include<stdio.h>#define ...
- Codeforces Round #425 (Div. 2) Problem D Misha, Grisha and Underground (Codeforces 832D) - 树链剖分 - 树状数组
Misha and Grisha are funny boys, so they like to use new underground. The underground has n stations ...
- Codeforces Round #425 (Div. 2) Problem C Strange Radiation (Codeforces 832C) - 二分答案 - 数论
n people are standing on a coordinate axis in points with positive integer coordinates strictly less ...
- Codeforces Round #425 (Div. 2) Problem B Petya and Exam (Codeforces 832B) - 暴力
It's hard times now. Today Petya needs to score 100 points on Informatics exam. The tasks seem easy ...
- Codeforces Round #425 (Div. 2) Problem A Sasha and Sticks (Codeforces 832A)
It's one more school day now. Sasha doesn't like classes and is always bored at them. So, each day h ...
- Codeforces Round #425 (Div. 2) B. Petya and Exam(字符串模拟 水)
题目链接:http://codeforces.com/contest/832/problem/B B. Petya and Exam time limit per test 2 seconds mem ...
- Codeforces Round #425 (Div. 2))——A题&&B题&&D题
A. Sasha and Sticks 题目链接:http://codeforces.com/contest/832/problem/A 题目意思:n个棍,双方每次取k个,取得多次数的人获胜,Sash ...
- Codeforces Round #425 (Div. 2) B - Petya and Exam
地址:http://codeforces.com/contest/832/problem/B 题目: B. Petya and Exam time limit per test 2 seconds m ...
- Codeforces Round #425 (Div. 2) C - Strange Radiation
地址:http://codeforces.com/contest/832/problem/C 题目: C. Strange Radiation time limit per test 3 second ...
随机推荐
- 使用清华大学提供的 Anaconda 镜像下载 Python 软件包
使用清华大学提供的 Anaconda 镜像下载 Python 软件包 pip install -i http://pypi.tuna.tsinghua.edu.cn/simple tensorflow ...
- spring-boot-devtools热加载不起作用
在开发过程中,希望修改时能够及时更新修改,即热加载,但是spring-boot-devtools不起作用.这主要是两个原因导致. 一.spring-boot-maven-plugin插件没有配置,如下 ...
- FCC成都社区·前端周刊 第 2 期
01. Propel:JS的科学计算框架 Propel 是一种 JavaScript 科学计算框架,类似于 Python 中的科学计算库 NumPy,也就是说利用 JS 也可以进行机器学习啦.Prop ...
- 一台电脑多个git使用 push 时候出现denied
http://my.oschina.net/silentboy/blog/220158 当一台电脑上多个git account 的时候, 出现如下问题, $ git push origin maste ...
- 最近使用的两个工具 winscp和xshell
最近在编译MONO源码时用到了这两个工具,感觉挺好,记录备忘 WINSCP 长这样 用于可视化的查看和操作远程服务器上的文件 xshell用于命令行下操作远程服务器,服务器的同学好多在用这个.命令行是 ...
- 【C++进阶:移位运算符的用法】
数据在计算机中以补码存储 移位运算符:<< 左移运算符 >> 右移运算符 一丶 << 左移运算符 移位规则:左边抛弃,右边补零 int num=10; num& ...
- R 时间戳转化
转 http://stackoverflow.com/questions/1962278/dealing-with-timestamps-in-r You want the (standard) PO ...
- log4j 不输出mybatis的sql
有可能导入多个日志工具jar,导致mybatis不知道使用哪种日志.修改你的mybatis配置,添加setting,指定日志类型为log4j. <configuration> <!- ...
- 抓包工具tcpdump用法说明--2
第一招: 通俗的说,tcpdump是一个抓包工具,用于抓取互联网上传输的数据包.形象的说,tcpdump就好比是国家海关,驻扎在出入境的咽喉要道,凡是要入境和出境的集装箱,海关人员总要打开箱子,看看里 ...
- ABI与API的区别
ABI是定义二进制级别的,两个模块的接口 比如一个二进制模块想要调用另外一个二进制模块提供的功能,它需要知道怎样通过汇编语言(即机器指令)去调用,以及怎样传递相应的参数和返回值(通过寄存器还是栈内存, ...