码迷,mamicode.com
首页 >  
搜索关键字:hdu 4723 how long do    ( 68890个结果
HDU 1542 Atlantis 矩形面积并
题目来源:HDU 1542 Atlantis 题意:给你一些矩形(左下角和右上角)求面积 思路:参考here这个超赞的 一看就懂了 #include #include #include #include using namespace std; const int maxn = 210; struct node { double l, r, h; int s, val; nod...
分类:其他好文   时间:2014-05-07 08:59:09    阅读次数:395
zoj 3612 Median (splay)
题目大意: 添加和删除一个数,然后输出中位数。 简单的Splay   维护Splay上有多少个节点就可以了 #include #include #define inf 1LL<<60 #define maxn 222222 #define keyTree (ch[ch[root][1]][0]) using namespace std; typedef long...
分类:其他好文   时间:2014-05-07 07:46:42    阅读次数:405
HDU 4003 Find Metal Minaral 树上瞎搞分组背包
对于分组背包,每组选且只选一件商品的写法...
分类:其他好文   时间:2014-05-07 05:55:12    阅读次数:347
《linux 内核完全剖析》get_free_page(void)
unsigned long get_free_page(void) { register unsigned long __res asm("ax"); repeat:     __asm__("std ; repne ; scasb\n\t"         "jne 1f\n\t"         "movb $1,1(%%edi)\n\t"         "sall $12...
分类:系统相关   时间:2014-05-07 05:38:18    阅读次数:515
HDU 1711 Number Sequence(算法验证)
请不要随便指点别人该怎么做、每个人的人生都应该自己掌握、你给不了别人一切、你也不懂别人的忧伤、                                                                                                  微笑不代表快乐、哭泣不一定悲伤                不努力怎么让那些关心你的人幸福、不努...
分类:其他好文   时间:2014-05-07 05:02:04    阅读次数:263
POJ 2468 Apple Tree 树上瞎搞分组背包
昨晚Debug了好久始终找不出哪里错了,今早再一看发现自己已荣升逗比Beta 2.0 Version. 个人感觉此题为HDU 4003 的弱化版。 把每棵子树都看成一类商品,在每类商品中至多选一件。则问题转化为最基本的分组背包问题。 dp[s][c][k] c == 1时,表示在s结点不返回时走K的最大收益,c == 0时,表示在s结点重新返回时走k步的最大收益。 可以dfs从底到顶更新d...
分类:移动开发   时间:2014-05-07 04:52:22    阅读次数:500
hdu 2087 剪花布条
题目:     链接:http://acm.hdu.edu.cn/showproblem.php?pid=2087 题意:     给出字符串s1和s2,找出s1中有多少个s2。 算法:     KMP字符串匹配。 思路:     简单,看代码吧。(需要注意的就是字符串用要scanf输入) 代码: #include #include #include using namespac...
分类:其他好文   时间:2014-05-07 04:46:37    阅读次数:304
【Leetcode】String to Integer (atoi)
【Question】 Implement atoi to convert a string to an integer. Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the p...
分类:其他好文   时间:2014-05-07 04:17:18    阅读次数:259
HDU 3038 How Many Answers Are Wrong
http://acm.hdu.edu.cn/showproblem.php?pid=3038 这是一道并查集题目,这并查集感觉好难写,构思花了我很长很长时间,不过打码时间很短。考虑清楚之后明显快多了 #include #include #include #include #include #include #include #define N 200010 using names...
分类:其他好文   时间:2014-05-07 04:03:06    阅读次数:331
hdu 1358 Period
题目:     链接:http://acm.hdu.edu.cn/showproblem.php?pid=1358 题意:...
分类:其他好文   时间:2014-05-07 03:34:17    阅读次数:354
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!