解题报告
n和m跟木棍相交,问一人取一交点(必须是交点,且取完后去掉交点的两根木棍),最后谁赢
思路:
取最大正方形,以对角线上的交点个数判断输赢。
#include
#include
using namespace std;
int main()
{
int m,n;
while(cin>>n>>m)
{
if(n>m)
{...
分类:
其他好文 时间:
2014-07-25 11:18:01
阅读次数:
288
A.
Game With Sticks
题意:博弈题,就是给你一个n+m个棒子,n个棒子横着放,m个棒子竖着放,这样形成一个有交叉点的图子,要你每次操作能拿交叉点,相交的那2个的棒子可以拿走,直到最后不能拿走棒子的那一人输了
AC代码:
#include
int main()
{
int n,m;
scanf("%d %d",&n,&m);
n=n<m?n:m;
...
分类:
其他好文 时间:
2014-07-25 11:16:21
阅读次数:
204
After doing Ray a great favor to collect sticks for Ray, Poor Neal becomes very hungry. In return for Neal's help, Ray makes a great dinner for Neal. ...
分类:
其他好文 时间:
2014-07-21 00:32:54
阅读次数:
243
Sticks时间限制:3000ms | 内存限制:65535KB难度:5描述George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he...
分类:
其他好文 时间:
2014-07-19 11:27:30
阅读次数:
264
Colored Sticks
Time Limit: 5000MS
Memory Limit: 128000K
Total Submissions: 29736
Accepted: 7843
Description
You are given a bunch of wooden sticks. Each endpoint of...
分类:
其他好文 时间:
2014-07-19 08:08:34
阅读次数:
210
http://acm.hdu.edu.cn/showproblem.php?pid=1051
Wooden Sticks
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11319 Accepted Submission(...
分类:
其他好文 时间:
2014-07-19 02:33:36
阅读次数:
331
DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to ...
分类:
其他好文 时间:
2014-07-18 15:28:57
阅读次数:
234
Wooden Sticks
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11244 Accepted Submission(s): 4627
Problem Description
The...
分类:
其他好文 时间:
2014-07-16 11:41:32
阅读次数:
167
Wooden Sticks
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 11244 Accepted Submission(s): 4627
Problem Description
There is a pile...
分类:
其他好文 时间:
2014-07-16 09:44:20
阅读次数:
208