/* 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;
}
【巴什博弈】杭电 hdu 1846 Brave Game
最新推荐文章于 2025-11-30 17:39:39 发布
本文提供了一个针对HDU在线评测系统中题目1846BraveGame的有效解决方案。通过分析输入数据特点,采用简洁的算法逻辑判断游戏胜负归属。特别注意输入处理方式以避免运行错误。
3401

被折叠的 条评论
为什么被折叠?



