随笔分类 -  组合数学

摘要:Problem DescriptionDuring summer vacation,Alice stay at home for a long time, with nothing to do. She went out and bought m pokers, tending to play po... 阅读全文
posted @ 2014-08-06 21:26 daydaycode 阅读(185) 评论(0) 推荐(0)
摘要:题目大意:众所周知冒泡排序算法多数情况下不能只扫描一遍就结束排序,而是要扫描好几遍。现在你的任务是求1~N的排列中,需要扫描K遍才能排好序的数列的个数模20100713。注意,不同于真正的冒泡排序算法,只要数列有序就立刻停止,而不用再检验一遍。估计多数人都是找规律吧,先看出递推,然后求出通项……这个... 阅读全文
posted @ 2014-07-28 18:27 daydaycode 阅读(261) 评论(0) 推荐(0)
摘要:Little BishopsA bishop is a piece used in the game of chess which is played on a board of square grids. A bishop can only move diagonally from its cur... 阅读全文
posted @ 2014-07-07 14:11 daydaycode 阅读(350) 评论(0) 推荐(0)
摘要:Description 1942Transmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A w... 阅读全文
posted @ 2014-07-04 14:02 daydaycode 阅读(435) 评论(0) 推荐(0)
摘要:以sample为例子[2,12]区间的RoundNumbers(简称RN)个数:Rn[2,12]=Rn[0,12]-Rn[0,1]即:Rn[start,finish]=Rn[0,finish]-Rn[0,start-1]所以关键是给定一个X,求出Rn[0,X]现在假设X=10100100这个X的二进... 阅读全文
posted @ 2014-06-27 12:26 daydaycode 阅读(190) 评论(0) 推荐(0)