码迷,mamicode.com
首页 >  
搜索关键字:pick-up sticks    ( 418个结果
暑训day1解题报告
A -Painting the sticks因为不能覆盖涂/涂两次,所以就数数有几个三个一块儿就行了。#includeint a[100],ans ;int main(){ int n , t = 0 ; while (scanf("%d",&n)!=EOF) { for (...
分类:其他好文   时间:2014-07-16 20:37:36    阅读次数:317
HDU 1051 Wooden Sticks (贪心)
HDU 1051 Wooden Sticks (贪心)...
分类:其他好文   时间:2014-07-16 17:29:56    阅读次数:204
solution
DAY1A UVAlive 3937 painting the sticks给你一些木棒,按照给定的颜色序列染色,每次最多可以染连续的3块(每块的颜色可以不一样),每块可以由任意多个连续木棒组成,求最少步数。题目里有说不允许覆盖染色吗?统计不同的颜色块的个数,除以3并向上取整就是答案了。。B UVa...
分类:其他好文   时间:2014-07-14 00:04:32    阅读次数:249
poj 1011 Sticks ,剪枝神题
木棒 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 118943 Accepted: 27429 Description 乔治拿来一组等长的木棒,将它们随机地砍断,使得每一节木棍的长度都不超过50个长度单位。然后他又想把这些木棍恢复到为裁截前的状态,但忘记了初始时有多少木棒以及木棒的初始长度。请你设计一个程序,帮助乔治...
分类:其他好文   时间:2014-07-13 15:45:01    阅读次数:253
NYOJ-248 BUYING FEED
BUYING FEED 时间限制:3000 ms  |  内存限制:65535 KB 难度:4 描述 Farmer John needs to travel to town to pick up K (1 D*K cents. The county feed lot has N (1 location X_i (0 < X_i John as much as F_i (1 A...
分类:其他好文   时间:2014-07-12 20:27:31    阅读次数:263
hdu 1051 Wooden Sticks
简单贪心。 将所给数据从小到大进行排序,将所给零件的两数据均小于另一个零件的两数据,看做一个集合。 最后输出集合个数。#include #include #include #include #include using namespace std; struct www { int x,y; }s[5005]; int yy[5005],a,b; bool cmp(www q,w...
分类:其他好文   时间:2014-07-12 19:01:39    阅读次数:208
POJ 2513 Colored Sticks
欧拉通路+并查集+字典树 题意是说 木棍两头有颜色,怎么排让它连成一串。颜色相同可以接起来。 最开始想用map水过去,一直TLE。怒点字典树天赋……花了一上午。 字典树不多介绍,我的节点开小了,CE好几次,才想起 “There is no more than 250000 sticks.” “A word is a sequence of lowercas...
分类:其他好文   时间:2014-07-08 17:22:26    阅读次数:180
计算几何-hdoj-1147-Pick-up sticks
Pick-up sticks Problem Description 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 find the top sticks,...
分类:其他好文   时间:2014-07-02 15:29:53    阅读次数:295
You Can Use Bags To Extend The Life Of Dry Foods
Weekly golfers will find a bag that gives them enough space to do a lot of tees, balls, sticks, and whatever he deems necessary for the golf course. P...
分类:其他好文   时间:2014-06-30 20:52:39    阅读次数:258
【POJ】2513 Colored Sticks
字典树+并查集。 1 #include 2 #include 3 #include 4 5 #define MAXN 500005 6 #define MAXL 11 7 #define TRIEN 26 8 9 typedef struct Trie { 10 ...
分类:其他好文   时间:2014-06-30 12:36:50    阅读次数:224
418条   上一页 1 ... 39 40 41 42 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!