
算法
文章平均质量分 62
adb87
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
分治法求最大连续和
给出一个长度为n的序列,求连续最大和。递归求解是分别求出位于左半部分和右半部份的最优解。合并是找起点在左边的,终点在右边的最优解,并和左右部分最优的进行比较。代码如下。时间复杂度o(NlogN)int maxsum(int *A, int x, int y){ int middle, value, L, R, mmax; if(y-x == 1原创 2017-06-23 11:24:56 · 547 阅读 · 0 评论 -
[转载链接]如何生成均匀随机排列(等概率生成排列)
http://www.cppblog.com/csu-yx-2013/archive/2013/10/09/166565.html随机化算法转载 2017-07-04 23:59:59 · 405 阅读 · 0 评论 -
codeforces984B Minesweeper
One day Alex decided to remember childhood when computers were not too powerful and lots of people played only default games. Alex enjoyed playing Minesweeper that time. He imagined that he saved worl...原创 2018-05-19 13:05:57 · 240 阅读 · 0 评论