码迷,mamicode.com
首页 >  
搜索关键字:cutting sticks    ( 605个结果
暑训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
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
poj1011 Sticks DFS+回溯
DFS+回溯...
分类:其他好文   时间:2014-06-27 09:39:33    阅读次数:154
The Bundle Of The Herb Can Be Placed In Paper Bags
They can usually be purchased in three sizes: £ 5, £ 1 and a half pound bags. I even saw them to buy on eBay. Many companies are cutting Tekpak bag of...
分类:其他好文   时间:2014-06-16 09:23:39    阅读次数:443
NYOJ 293 Sticks 【深搜】+【剪枝】
这是一道让人泪奔的题,它深刻的说明了什么是剪枝,哪怕是再小的一个细节,一旦递归规模增大都会引发巨大的时间消耗,真是神题~ Sticks 时间限制:3000 ms  |  内存限制:65535 KB 难度:5 描述George took sticks of the same length and cut them randomly until all part...
分类:其他好文   时间:2014-06-15 12:18:43    阅读次数:174
[DP] Rod-cutting problem
给一个长度为 n 的杆子,切成小段卖出去,价格根据小段的长度不同而不同。下面是一个例子我们要通过切成小段卖出尽可能高的总价钱。问题是:How to decompose the problem?Decomposition 的第一步是:第一刀切在哪?可以切在最左边(等于整根卖出去);可以切在位置1,位置...
分类:其他好文   时间:2014-06-10 16:43:26    阅读次数:345
POJ2513-Colored Sticks
/*思路:类似图论中“一笔画”问题,两根木棒的相连接的端点是一样的颜色,(a,b)--(b,c)--(c, d)....方法:trie树+并查集, 利用trie树建立字符串和某一个节点的映射,并将这些和字符串构成映射的节点建成图, 用并查集判断图的连通*/ 1 #include 2 #includ....
分类:其他好文   时间:2014-06-08 21:46:18    阅读次数:330
605条   上一页 1 ... 58 59 60 61 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!