Poj2992Divisors 组合数求因子的个数

摘要: Divisors Description Your task in this problem is to determine the number of divisors of Cnk. Just for fun -- or do you need any special reason for su 阅读全文
posted @ 2016-08-17 10:58 disppr 阅读(219) 评论(0) 推荐(0) 编辑

Poj1011 Sticks 小木棍dfs搜索

摘要: Sticks Description George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return st 阅读全文
posted @ 2016-08-13 15:17 disppr 阅读(766) 评论(0) 推荐(3) 编辑

Codeforces Round #367 (Div. 2) D. Vasiliy's Multiset stl+位运算解法

摘要: D. Vasiliy's Multiset time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Author has gone ou 阅读全文
posted @ 2016-08-13 13:50 disppr 阅读(208) 评论(0) 推荐(0) 编辑

阶乘的最右边的非零位的值

摘要: 阶乘问题 题目描述 也许你早就知道阶乘的含义,N阶乘是由1到N相乘而产生,如: 12! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 x 11 x 12 = 479,001,600 12的阶乘最右边的非零位为6。 写一个程序,计算N(1<=N<=50,000,00 阅读全文
posted @ 2016-08-11 19:34 disppr 阅读(1278) 评论(1) 推荐(0) 编辑

Eular质数筛法模板

摘要: hihoCoder有一期专门讲解Eular质数筛法, 传送门 阅读全文
posted @ 2016-08-04 21:43 disppr 阅读(179) 评论(0) 推荐(0) 编辑

邮票问题

摘要: 【回溯】邮票问题 题目描述 设有已知面额的邮票m种,每种有n张。问:用总数不超过n张的邮票进行组合,能组合的邮票中可以连续出现面额数最多有多少(1<=m<=100,1<=n<=100,1<=邮票面额<=255) 输入 第一行:n和m的值,中间有一空格隔开 第二行:m种邮票的面额,每个数中间用一空格隔 阅读全文
posted @ 2016-08-04 16:00 disppr 阅读(414) 评论(0) 推荐(0) 编辑

UVA 10534 Wavio Sequence

摘要: Wavio Sequence Wavio is a sequence of integers. It has some interesting properties. Wavio is of odd length i.e. L= 2n+ 1. The rst (n+ 1) integers of W 阅读全文
posted @ 2016-07-31 17:05 disppr 阅读(220) 评论(0) 推荐(0) 编辑

uva111 History Grading

摘要: History Grading History Grading Description Background Many problems in Computer Science involve maximizing some measure according to constraints. Con 阅读全文
posted @ 2016-07-31 16:57 disppr 阅读(147) 评论(0) 推荐(0) 编辑

UVA 10100Longest Match

摘要: Longest Match A newly opened detective agency is struggling with their limited intelligence to find out a secret information passing technique among i 阅读全文
posted @ 2016-07-31 16:51 disppr 阅读(241) 评论(0) 推荐(0) 编辑

UVA 147Dollars

摘要: B - Dollars Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu B - Dollars Description New Zealand currency consists of $100, $50, $20, $1 阅读全文
posted @ 2016-07-31 16:39 disppr 阅读(140) 评论(0) 推荐(0) 编辑

归并排序模板

摘要: #include #include const int MAXN = 100002; using namespace std; int array[MAXN], array2[MAXN]; void Merge(int low, int high){ int i = low; int mid = (low + high)/2; int j = mid+1; ... 阅读全文
posted @ 2016-07-31 16:14 disppr 阅读(167) 评论(0) 推荐(0) 编辑

找礼物(find)

摘要: 找礼物(find) 题目描述 新 年到了,你的好友和你(共K个人)的周围满是礼物,你让你的好友先拿,但是每个人只能拿当前离自己最近的礼物[当然如果有并列的多个礼物离你的距离相等 (精确到小数点后四位,所有运算均为去尾),这些礼物就都属于这个人]。现在你们所在的位置是原点(0,0),每个礼物的位置用坐 阅读全文
posted @ 2016-07-31 11:25 disppr 阅读(386) 评论(0) 推荐(0) 编辑

水流(water)dfs

摘要: 水流(water) 题目描述 全球气候变暖,小镇A面临水灾,于是你必须买一些泵把水抽走。泵的抽水能力可以认为是无穷大,但你必须把泵放在合适的位置,从而能使所有的水能流到泵里。 小镇可以认为是N×M的矩阵,矩阵里的每个单元格都是一个a~z小写字母,该小写字母表示该格子的高度,字母大的表示该单元格比较高 阅读全文
posted @ 2016-07-31 09:12 disppr 阅读(411) 评论(0) 推荐(0) 编辑

细菌(disease) 位运算

摘要: 细菌(disease) 题目描述 近期,农场出现了D(1≤D≤15)种细菌。John要从他的N(1≤N≤1000)头奶牛中尽可能多地选些产奶,但是如果选中的奶牛携带了超过K(1≤K≤D)种不同细菌,所生产的奶就不合格。请你帮助John计算出最多可以选择多少头奶牛。 近期,农场出现了D(1≤D≤15) 阅读全文
posted @ 2016-07-30 17:04 disppr 阅读(377) 评论(0) 推荐(0) 编辑

单词接龙

摘要: 单词接龙 (NOIP提高组2000) 描述 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定 一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合部分合为一部分,例如 beast 和 astonish,如果接成 阅读全文
posted @ 2016-07-30 16:50 disppr 阅读(318) 评论(0) 推荐(0) 编辑