- 博客(7)
- 资源 (16)
- 收藏
- 关注
原创 SRM 626 D1L1: FixedDiceGameDiv1,贝叶斯公式,dp
题目:http://community.topcoder.com/stat?c=problem_statement&pm=13239&rd=15859 用到了概率论中的贝叶斯公式,而贝叶斯公式中需要用到的概率需要用dp方法求解。 代码: #include #include #include #include #include #include #include #in
2014-06-30 11:04:08 1403
原创 SRM 622 D1L1: BuildingRoutes,shortest path
题目:http://community.topcoder.com/stat?c=problem_statement&pm=13193&rd=15855 开始的想法是求出所有的最短路径,但求两点之间所有的最短路径算法实现起来很麻烦。比较巧妙的方法是先求出两点之间的最短距离,再判断指定的边是否是两点之间最短路径的边。 代码: #include #include #include #
2014-06-18 13:57:43 680
原创 SRM 622 D2L3: Subsets, math, backtrack
题目:http://community.topcoder.com/stat?c=problem_statement&pm=10554&rd=15855 符合条件的集中非1的元素个数是很少的,可以用回溯加剪枝,实际运行速度很快。 代码: #include #include #include #include #include #include #include
2014-06-17 23:29:50 885
原创 SRM 621 D2L3: MixingColors, math
题目:http://community.topcoder.com/stat?c=problem_statement&pm=10409&rd=15854 利用高斯消元求线性空间的基,也就是求矩阵的秩。 代码: #include #include #include #include #include #include #include #include #include
2014-06-16 20:35:56 929
原创 SRM 620 D1L2: CandidatesSelection, Greedy
题目:http://community.topcoder.com/stat?c=problem_statement&pm=13144&rd=15853 代码:
2014-06-16 16:08:16 963
原创 SRM 620 D2L3: RandomGraph, dp
题目:http://community.topcoder.com/stat?c=problem_statement&pm=13143&rd=15853 参考:http://apps.topcoder.com/wiki/display/tc/SRM+620 又是一道关于概率的题目,考虑dp方法,关键是找准突破口,将题目条件的“至少有一个大于4的连通图”转换为“所有连通图都小于等于3”。
2014-06-15 16:43:45 999
Advanced Bash-Scripting Guide 读书笔记
2013-07-17
UnxUpdates.zip
2013-07-11
TopCoder: SmartWordToy
2013-06-02
CSAPP: malloc lab 文档及解答
2013-05-15
CSAPP: shell lab 解答
2013-05-07
CSAPP_cachelab Part A解答
2013-05-04
CSAPP_buflab 解答详细过程(内含源程序包及文档)
2013-04-23
CSAPP bomb lab内容加解答
2013-04-22
严蔚敏版数据结构算法C语言实现
2013-04-17
c语言常见算法
2011-12-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人