码迷,mamicode.com
首页 >  
搜索关键字:sticks    ( 387个结果
Codeforces Round #425 A
Sasha and Sticks 题意:n根棍子,每次拿走k根,当不足k根的时候不能拿,输,判断先手能否赢 思路:(n/k)&1,直接判断能经行奇数次取木棍还是偶数 AC代码: ...
分类:其他好文   时间:2017-07-26 21:46:34    阅读次数:172
Codeforces Round #425 (Div. 2) Problem A Sasha and Sticks
It's one more school day now. Sasha doesn't like classes and is always bored at them. So, each day he invents some game and plays in it alone or with ...
分类:其他好文   时间:2017-07-25 19:37:55    阅读次数:159
Codeforces Round #425 (Div.2)
A、Sasha and Sticks 题意:有两个人,每次轮流从n个棒子中抽出k个,直到剩余不足k个棒子。Sasha先抽。如果Sasha抽取的多,则输出YES,否则输出NO。 思路:n/k为奇数时,Sasha获胜。 1 #include<iostream> 2 #include<cstdio> 3 ...
分类:其他好文   时间:2017-07-25 10:21:14    阅读次数:166
POJ 2653 Pick-up sticks(几何)
Pick-up sticks Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 13377 Accepted: 5039 Description Stan has n sticks of various length. He thr ...
分类:其他好文   时间:2017-07-23 00:51:48    阅读次数:183
poj 1065 wooden sticks
题目大意: 一些树枝,每个树枝有长度和重量,如果下一次加工的树枝长度和重量都不小于当前树枝,那么下一次加工不消耗,反之,下一次加工消耗为1 求如何排序才能使加工完这些树枝的消耗最小,求最小消耗 思路: dp+排序 按照长度从小到大排序,然后看在该序列下,重量有多少个不下降子序列,不下降子序列的个数就 ...
分类:其他好文   时间:2017-07-22 18:08:31    阅读次数:108
Pick-up sticks
Pick-up sticks Stan has n sticks of various length. He throws them one at a time on the floor in a random way. After finishing throwing, Stan tries to ...
分类:其他好文   时间:2017-07-15 19:46:56    阅读次数:211
HDU 1051 Wooden Sticks 贪心||DP
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22000 Accepted Submission(s): 8851 ...
分类:其他好文   时间:2017-07-12 01:05:12    阅读次数:221
POJ1065 Wooden Sticks
Wooden Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 23403 Accepted: 10053 Description There is a pile of n wooden sticks. The len ...
分类:其他好文   时间:2017-07-01 20:50:12    阅读次数:217
POJ2653 Pick-up sticks(线段相交)
题目链接: http://poj.org/problem?id=2653 题目描述: Pick-up sticks Description Stan has n sticks of various length. He throws them one at a time on the floor i ...
分类:其他好文   时间:2017-06-14 02:14:17    阅读次数:298
题解:UESTC1218 Pick The Sticks
题意:选择长度为ai,价值为vi金条覆盖长度为L的区域,使总价值最大,只要金条重心在区域内即可。 1<=N<=1000;1<=L<=2000;1<=ai<=2000;1<=vi<=109. 共1~100组数据,10000MS 注意:0/1背包的简单变形:显然最多有2次机会让金条在长度变为一半的情况下 ...
分类:其他好文   时间:2017-06-12 00:46:32    阅读次数:133
387条   上一页 1 ... 9 10 11 12 13 ... 39 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!