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的更多相关文章
随机推荐
- JavaScript中函数带与不带括号的区别
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- c# 添加数据
/// <summary> /// 新增一条省份记录 /// </summary> /// <param name="model"></p ...
- HTML5:Canvas-绘制图形
到本文的最后,你将学会如何绘制矩形,三角形,直线,圆弧和曲线,变得熟悉这些基本的形状.绘制物体到Canvas前,需掌握路径,我们看看到底怎么做. 栅格 在我们开始画图之前,我们需要了解一下画布栅格(c ...
- jenkins持续集成(一): 在Linux下的安装与配置
撸了今年阿里.网易和美团的面试,我有一个重要发现.......>>> 前提: 安装了JDK,并配置好环境变量:JAVA_HOME 安装了Maven,并配置好环境变量:MAVEN_HO ...
- 解决js ajax跨越请求 Access control allow origin 异常
// 解决跨越请求的问题 response.setHeader("Access-Control-Allow-Origin", "*");
- Jmeter —— Test Fragment (测试片段)
Test Fragment(测试片段) 1. 概念 JMeter中的Test Fragent:是控制器上一种特殊的线程组:它在测试树上与线程组处于同一个层级.但是使用的时候需要和Include ...
- Properties工具类学习
Properties类学习 1.定义 Properties,java.utils包下的一个工具类,主要用于读取Java的配置文件.各种语言都有自己所支持的配置文件,配置文件中很多变量是经常变动的. 这 ...
- Hadoop中的排序和连接
MapReduce的全排序 主要是为了保证分区排序,即第一个分区的最后一个Key值小于第二个分区的第一个Key值 与普通的排序仅仅多一个自定义分区类MyPartitioner见自己所写的实验 (设置一 ...
- oracle for loop
我们在Oracle存储过程中需要遍历一张表,应该怎样做.我想大多少的人第一个念头就是Cursor. 比如: create or replace procedure StudyCursor( resul ...
- Django学习——collectstatic错误
Error fetching command 'collectstatic': You're using the staticfiles app without having set the STAT ...