您的位置:首页 > 其它

【巴什博弈】杭电 hdu 1846 Brave Game

2012-03-04 10:58 417 查看
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.

URL   : http://acm.hdu.edu.cn/showproblem.php?pid=1846 Name  : 1846 Brave Game

Date  : Sunday, March 4, 2012
Time Stage : half an hour

Result:
5463555	2012-03-04 10:46:05	Accepted	1846
0MS	216K	1030 B
C++	pyy

5463546	2012-03-04 10:45:10	Output Limit Exceeded	1846
140MS	188K	1043 B
C++	pyy

5463515	2012-03-04 10:42:43	Wrong Answer	1846
0MS	216K	1043 B
C++	pyy

Test Data :

Review :
while (scanf(“%d”, &tcase) != EOF)是会WA的。
while (scanf(“%d”, &tcase) , tcase)是会OLE的。
//----------------------------------------------------------------------------*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <vector>

#include <algorithm>
#include <iostream>

using namespace std ;

#define MEM(a, v)		memset (a, v, sizeof (a))	// a for address, v for value
#define max(x, y)		((x) > (y) ? (x) : (y))
#define min(x, y)		((x) < (y) ? (x) : (y))

#define INF		(0x3f3f3f3f)
#define MAXN	(15)
#define MAXE	(MAXN*MAXN)

#define DB	/##/
#define LL __int64

int main()
{
int tcase, m, n ;
scanf("%d", &tcase) ;
{
while (tcase--)
{
scanf("%d%d", &n, &m) ;
if (n%(m+1))
printf ("first\n") ;
else
printf ("second\n") ;
}
}
return 0;
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: