码迷,mamicode.com
首页 >  
搜索关键字:zcc loves codefires    ( 818个结果
hdu 5265 pog loves szh II
......
分类:其他好文   时间:2015-06-09 23:46:08    阅读次数:192
hdu 5265 pog loves szh II
题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5265pog loves szh IIDescriptionPog and Szh are playing games.There is a sequence with n numbers, Pog wil...
分类:其他好文   时间:2015-06-09 21:36:18    阅读次数:104
ACM学习历程—HDU5265 pog loves szh II(策略 && 贪心 && 排序)
DescriptionPog and Szh are playing games.There is a sequence with $n$ numbers, Pog will choose a number A from the sequence. Szh will choose an anothe...
分类:编程语言   时间:2015-06-09 19:46:19    阅读次数:128
HDU 5266 pog loves szh III
题意:给出一棵树,1为根节点,求一段区间内所有点的最近公共祖先。解法:用一棵线段树维护区间LCA。LCA是dp做法。dp[i][j]表示点i的第2^j个祖先是谁,转移方程为dp[i][j] = dp[dp[i][j - 1]][j - 1],初始的dp[i][0]可以用一次dfs求得,这样可以用lo...
分类:其他好文   时间:2015-06-09 15:40:44    阅读次数:121
HDU 5265 pog loves szh II
pog loves szh IITime Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1169Accepted Submission(s): 332Pro...
分类:其他好文   时间:2015-06-09 06:09:45    阅读次数:136
HDU 5266 pog loves szh III ( LCA + SegTree||RMQ )
pog loves szh IIITime Limit: 12000/6000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 470Accepted Submission(s): 97P...
分类:其他好文   时间:2015-06-09 06:06:23    阅读次数:104
HDU5266---pog loves szh III (线段树+LCA)
题意:N个点的有向树, Q次询问, 每次询问区间[L, R]内所有点的LCA。大致做法:线段树每个点保存它的孩子的LCA值, 对于每一次询问只需要 在线段树查询即可。 1 #include 2 using namespace std; 3 const int MAXN = 3e5+10; ...
分类:其他好文   时间:2015-06-08 23:09:00    阅读次数:257
hdu 5265 pog loves szh II STL
pog loves szh IITime Limit: 20 SecMemory Limit: 256 MB题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5265Descriptionpog在与szh玩游戏,首先pog找到了一个包含n个数的序列,然后他在...
分类:其他好文   时间:2015-06-08 23:06:56    阅读次数:158
HDU5265——贪心——pog loves szh II
Problem DescriptionPog and Szh are playing games.There is a sequence with $n$ numbers, Pog will choose a number A from the sequence. Szh will choose a...
分类:其他好文   时间:2015-06-08 21:11:30    阅读次数:195
bestcoder#43 1002 在数组中找两个数的和取模的最大值 二分
bestcoder#43 1002 在数组中找两个数的和取模的最大值 二分pog loves szh IIAccepts: 97Submissions: 834Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 65536/65536 K (Jav...
分类:编程语言   时间:2015-06-08 19:23:08    阅读次数:180
818条   上一页 1 ... 58 59 60 61 62 ... 82 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!