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
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
题目大意: 一些树枝,每个树枝有长度和重量,如果下一次加工的树枝长度和重量都不小于当前树枝,那么下一次加工不消耗,反之,下一次加工消耗为1 求如何排序才能使加工完这些树枝的消耗最小,求最小消耗 思路: dp+排序 按照长度从小到大排序,然后看在该序列下,重量有多少个不下降子序列,不下降子序列的个数就 ...
分类:
其他好文 时间:
2017-07-22 18:08:31
阅读次数:
108
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
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
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
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) and cal ...
分类:
编程语言 时间:
2017-06-24 15:34:24
阅读次数:
288
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) and cal ...
分类:
其他好文 时间:
2017-06-20 13:30:36
阅读次数:
125
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) and cal ...
分类:
其他好文 时间:
2017-06-18 13:27:33
阅读次数:
219
题目链接: 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