码迷,mamicode.com
首页 >  
搜索关键字:sticks    ( 387个结果
hdu1455 Sticks 深搜 强剪枝
题意:给多组数据,每组数据代表一些小木棍,能否将它们全部用完组成(尽量)多个相同长度的长棍,并输出长棍的长度...
分类:其他好文   时间:2014-07-26 17:24:32    阅读次数:493
poj2513Colored Sticks(欧拉通路+字典树+并查集)
Description You are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoin...
分类:其他好文   时间:2014-07-26 15:24:43    阅读次数:294
Codeforces Round #258 (Div. 2) A. Game With Sticks(数学题)
Codeforces Round #258 (Div. 2) A. Game With Sticks(数学题)...
分类:其他好文   时间:2014-07-26 15:21:26    阅读次数:205
Codeforces Round #258
A.Game With Sticks 就发现选定一个点之后,会删除相应的行列,即n-1,m-1,所以只需要看min(n,m)是基是偶#include #include #include using namespace std;int n, m;int main(){#ifdef LOCAL ...
分类:其他好文   时间:2014-07-26 14:00:25    阅读次数:226
A. Game With Sticks
其实就会找出xy最小的一个,再判断奇偶就OK #include #include using namespace std; int main(){     int x,y;     while(cin>>x>>y){         int t=x>y?y:x;         if(t%2==0)             printf("Malvika\n");       ...
分类:其他好文   时间:2014-07-26 03:02:56    阅读次数:197
Codeforces Round #258 (Div. 2)-(A,B,C,D,E)
A:Game With Sticks 水题。。。每次操作,都会拿走一个横行,一个竖行。 所以一共会操作min(横行,竖行)次。 #include #include #include #include #include #include #include #include #pragma comment(linker, "/STACK:1024000000,1024000000") using...
分类:其他好文   时间:2014-07-26 02:44:06    阅读次数:278
HDU 1518 Square
Sticks Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description George took sticks o...
分类:其他好文   时间:2014-07-26 02:37:36    阅读次数:179
HDU 1455 Sticks
Sticks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6019    Accepted Submission(s): 1699 Problem Description George took sticks...
分类:其他好文   时间:2014-07-26 02:34:56    阅读次数:199
Codeforces Round #258 (Div. 2)[ABCD]
Codeforces Round #258 (Div. 2)[ABCD] ACM 题目地址:Codeforces Round #258 (Div. 2) A - Game With Sticks 题意:  Akshat and Malvika两人玩一个游戏,横竖n,m根木棒排成#型,每次取走一个交点,交点相关的横竖两条木棒要去掉,Akshat先手,给出n,m问谁赢...
分类:其他好文   时间:2014-07-26 02:28:56    阅读次数:233
【找规律】CodeForce #258 Problem A——Game With Sticks
来源:点击打开链接 很简单,找规律。 每去掉一个点,点的总数量就减去n+m-1,然后看谁最先减到没有点可减,就可以了。 #include #include using namespace std; int main() { int n,m; cin>>n>>m; int totalpoint=n*m; int count=0; while(totalpoint>0) { ...
分类:其他好文   时间:2014-07-26 02:18:56    阅读次数:202
387条   上一页 1 ... 34 35 36 37 38 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!