HDU3951_Coin Game
Coin Game
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<string>
#include<queue>
#include<cstdlib>
#include<algorithm>
#include<stack>
#include<map>
#include<queue>
#include<vector>
using namespace std;
const int maxn = 1e5+100;
#define pr(x) cout << #x << " = " << x << " ";
#define prln(x) cout << #x << " = " << x <<endl;
typedef long long ll;
int main(){
#ifdef LOCAL
freopen("in.txt","r",stdin);
// freopen("out.txt","w",stdout);
#endif
int n,k, kase =0;
int t;cin >> t;
while(t--) {
cin >> n >> k;
int ok = 0;
if(k == 1){
if(n&1) ok = 0;
else ok = 1;
} else {
if(k>=n) ok = 0;
else ok = 1;
}
if(ok == 1) printf("Case %d: second\n",++kase);
else if(ok == 0) printf("Case %d: first\n",++kase);
}
return 0;
}
HDU3951_Coin Game的更多相关文章
随机推荐
- Codeforces 1093C (思维+贪心)
题面 传送门 题目大意: 有一个长n(n为偶数)的序列a 已知a满足 \(a_1≤a_2≤⋯≤a_n\) 给出一个长度为\(\frac{n}{2}\) 的序列b,定义\(b_i=a_i+a_{n-i+ ...
- CodeChef 3-Palindromes(Manacher+dp)
3-Palindromes Problem code: PALIN3 Submit All Submissions All submissions for this problem are ...
- hdu 1828 Picture(线段树轮廓线)
Picture Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Sub ...
- js本地时间格式化
var myDate = new Date(); //获取当前时间及日期 var year=myDate.getYear(); // 获取当前年份(当前年份-1900) var fyear=myDat ...
- vue 移动端列表筛选功能实现
最近兴趣所致,打算使用vant搭建一个webapp,由于需要使用列表筛选,没有找到合适组件,于是写了一个简单的功能,权当记录. 效果如下: HTML: <div class=&qu ...
- 四 shell基本命令
一 内置命令 hlep 命令 帮助 help test help -s printf 显示内置命令的语法格式 echo 用来显示一行文字 echo "hello world&quo ...
- SpringBoot中Redis的使用
转载:http://www.ityouknow.com/springboot/2016/03/06/spring-boot-redis.html Spring Boot 对常用的数据库支持外,对 No ...
- spring boot 提纲
http://tengj.top/categories/Spring-Boot%E5%B9%B2%E8%B4%A7%E7%B3%BB%E5%88%97/ http://blog.csdn.net/ca ...
- github托管代码
安装git客户端 github是服务端,要想在自己电脑上使用git我们还需要一个git客户端, windows用户请下载 http://msysgit.github.com/ mac用户请下载 htt ...
- vsftpd配置详解
匿名用户权限控制: anonymous_enable=YES #是否启用匿名用户 no_anon_password=YES #匿名用户login时不询问口令 anon_upload_enable=(y ...