码迷,mamicode.com
首页 >  
搜索关键字:hdu 4565 so easy    ( 46279个结果
hdu 1102 Constructing Roads
题目:         链接:点击打开链接 题意:         求需要修建的公路的最短长度。 算法: 思路:         prim最小生成树 代码: #include #include #include using namespace std; #define MAX 100000000 #define MAXN 110 int map[MAXN][MAXN]; int ...
分类:其他好文   时间:2014-06-07 01:49:07    阅读次数:213
Euler_problem_18 for python
如下所示 给出2个解法 def euler_problem_18_1():     """     this problem spend my half-day but noting to finished ,so bad     """     rows = '''     3     7 4     2 4 6     100 5 9 3     '''     ...
分类:编程语言   时间:2014-06-07 01:28:18    阅读次数:261
LeetCode: Sort Colors [075]
【题目】 Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers 0, 1, and 2 to represent the color red, white, and...
分类:其他好文   时间:2014-06-07 01:17:49    阅读次数:269
hdu1242
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1242 题目: Rescue Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 14614    Accepted Subm...
分类:其他好文   时间:2014-06-05 11:57:25    阅读次数:288
HDU 1890 Robotic Sort 伸展树的区间反转与延迟标记
延迟标记像极了线段书,不再多说。 区间反转在树伸展到位之后,也变成了简单的递归交换左右儿子。 愈发感觉到伸展树简直太漂亮了,伸展操作更是诱惑到不行 ,总之数据结构太有魅力了。 比较简单,就直接上模板了。 #include #include #include #include #include #include #include #include #include #pr...
分类:其他好文   时间:2014-06-05 08:33:14    阅读次数:190
hdu 1016 Prime Ring Problem (dfs)
一切见注释。 #include #include #include #include using namespace std; bool vis[22]; int n; int ans[22]; int top; bool isprime(int x)//判断素数 { for(int i=2;i<x;i++) if(x%i==0)return false; ...
分类:其他好文   时间:2014-06-05 08:26:47    阅读次数:201
树状DP入门
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1520 题目大意:给定一棵关系树,每个节点有个权值,子节点和父节点不能同时选,问最后能选的最大价值是多少? 解题思路:树形DP入门题。由于子节点与父节点不能同时选,有人可能会用贪心思想,二者选其一肯定最优。其实不然,有可能父节点和子节点都不选,而要选子孙节点。不过只要再往深点想下,就可以得出...
分类:其他好文   时间:2014-06-05 07:40:29    阅读次数:255
lxc-config: error while loading shared libraries: liblxc.so.1
很多的开源软件在安装过程中会出现找不到动态库的问题我在ubuntu12.04安装lxc时,没有出现这问题,但在centos6.5的时候出现了这问题fix:#find / -name  liblxc.so.1#echo "/usr/local/lib/" >> /etc/ld.so.conf#ldconfig...
分类:其他好文   时间:2014-06-05 06:23:02    阅读次数:243
hdu 4832 百度之星初赛二B
把横的和竖的分开考虑 //#pragma comment(linker, "/STACK:102400000,102400000") #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace...
分类:其他好文   时间:2014-06-05 06:04:58    阅读次数:238
hdu 2647 Reward
Reward Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3554    Accepted Submission(s): 1077 Problem Description Dandelion's uncle i...
分类:其他好文   时间:2014-06-05 05:59:34    阅读次数:203
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!