码迷,mamicode.com
首页 >  
搜索关键字:pick-up sticks    ( 418个结果
POJ 2653 Pick-up sticks (判断线段相交)
Pick-up sticksTime Limit:3000MSMemory Limit:65536KTotal Submissions:10330Accepted:3833DescriptionStan has n sticks of various length. He throws them o...
分类:其他好文   时间:2015-04-03 09:15:01    阅读次数:174
[ISSUE] Pick Stone
源引自己的github.iohttp://awarrior.github.io/pick-stone/DescribeTwo players would like to pick up some from one heap of stones. Assume the quantity of ston...
分类:其他好文   时间:2015-03-30 12:53:31    阅读次数:138
变更RHEL(Red Hat Enterprise Linux 5.8)更新源使之自动更新
HP 4411s Install Red Hat Enterprise Linux 5.8)pick up from http://blog.chinaunix.net/uid-423637-id-3387338.htmlcd /etc/yum.repos.d/cp rhel-debuginfo.r...
分类:系统相关   时间:2015-03-29 14:53:50    阅读次数:339
Codeforces 525C Ilya and Sticks
题意:给你n条线段,问你这些线段可以组成的矩形和最大是多少。每条线段可以-1,。解题思路:贪心.解题代码: 1 // File Name: d.cpp 2 // Author: darkdream 3 // Created Time: 2015年03月27日 星期五 16时05分31秒 4 ...
分类:其他好文   时间:2015-03-27 21:59:38    阅读次数:177
hdu 1455 Sticks DFS 又是一个花样剪枝 ,累觉不爱
Problem Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he had originally and how long they were origin...
分类:其他好文   时间:2015-03-20 11:05:11    阅读次数:129
hdu Wooden Sticks
这题是暴力加贪心,算是一道水题吧!只要把l和w从小到大排个序就行了。。。#include"iostream"#include"stdio.h"#include"string.h"#include"cmath"#include"algorithm"#include"queue"#define mx 1...
分类:其他好文   时间:2015-03-19 23:47:50    阅读次数:117
POJ 1011 Sticks dfs,剪枝 难度:2
http://poj.org/problem?id=1011要把所给的集合分成几个集合,每个集合相加之和ans相等,且ans最小,因为这个和ans只在[1,64*50]内,所以可以用dfs一试首先ans需要满足两个条件1.可以被总集合的和sum整除 2.是总集合的某个子集的和 对于条件1,可以通过试...
分类:其他好文   时间:2015-03-19 06:11:49    阅读次数:108
uva 10003 Cutting Sticks (DP)
uva 10003 Cutting SticksDescription你的任务是替一家叫Analog Cutting Machinery (ACM)的公司切割木棍。切割木棍的成本是根据木棍的长度而定。而且切割木棍的时候每次只切一段。很显然的,不同切割的顺序会有不同的成本。例如:有一根长10公尺的木棍必须在第2、4、7公尺的地方切割。这个时候就有几种选择了。你可以选择先切2公尺的地方,然后切4公尺的地...
分类:其他好文   时间:2015-03-11 21:46:01    阅读次数:154
poj2513——判断是否为欧拉图(并查集,trie树)
POJ 2513 Colored Sticks欧拉回路判定,并查集,trie树Time Limit:5000MSMemory Limit:128000KTotal Submissions:31621Accepted:8370DescriptionYou are given a bunch of w....
分类:其他好文   时间:2015-03-11 21:19:21    阅读次数:151
UVA 10003 - Cutting Sticks (区间DP)
题意:把一根木棍按给定的n个点切下去,每次切的花费为切的那段木棍的长度,求最小花费。 区间DP 和POJ 3253-Fence Repair相似,POJ那题不是给定切割点,而是给定了需要切成的长度,所以可以用哈夫曼编码贪心做 // Accepted C++ 0.112 #include #include #include #include using namespace std; int l...
分类:其他好文   时间:2015-03-10 17:17:44    阅读次数:148
418条   上一页 1 ... 27 28 29 30 31 ... 42 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!