计数&组合数学
文章平均质量分 80
algzjh
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
CF816B-Karen and Coffee
B. Karen and Coffeetime limit per test2.5 seconds memory limit per test512 megabytes inputstandard input outputstandard output To stay woke and attentive during classes, Karen needs some coffee!Kar原创 2017-06-18 08:27:54 · 1331 阅读 · 0 评论 -
CF850B-Arpa and a list of numbers
B. Arpa and a list of numberstime limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Arpa has found a list containing n numbers. He calls a list ba原创 2017-09-05 21:54:32 · 544 阅读 · 0 评论 -
AtCoder Regular Contest 082-E-ConvexScore
E - ConvexScoreTime limit : 2sec / Memory limit : 256MBScore : 700 pointsProblem Statement You are given N points (xi,yi) located on a two-dimensional plane. Consider a subset S of the N points that f转载 2017-09-04 21:36:37 · 1002 阅读 · 0 评论 -
有关计数问题的dp
1、划分数 有nn个无区别的物品,将它们划分成不超过mm组,求出划分方法数模MM的余数。 dp[i][j]dp[i][j]表示jj的ii划分的总数 考虑nn的mm划分ai(∑i=1mai=n)a_i(\sum\limits_{i=1}^{m}a_i=n),如果对于每个ii都有ai>0a_i>0,那么ai−1{a_i-1}就对应了n−mn-m的mm划分。另外,如果存在ai=0a_i=0,那么这就原创 2017-08-26 15:30:21 · 1041 阅读 · 0 评论 -
FZU2282-Wand
WandN wizards are attending a meeting. Everyone has his own magic wand. N magic wands was put in a line, numbered from 1 to n(Wand_i owned by wizard_i). After the meeting, n wizards will take a wand on原创 2017-08-22 10:08:42 · 573 阅读 · 0 评论 -
四种方法求解Fibonacci数列
第一种方法:记忆化搜索特点:同样的工作只做一次,克服了递归的不足之处#include#includeusing namespace std;typedef long long LL;LL f[100];LL dp(int i){ if(f[i]!=-1) return f[i]; else return f[i]=dp(i-1)+dp(i-2);}in原创 2016-09-02 00:39:17 · 946 阅读 · 0 评论 -
2016弱校联盟十一专场10.7(12点场)-D. Blocks
D. BlocksTime Limit: 1000msCase Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: MainSubmit StatusFont Size: + -Pan原创 2016-10-07 16:00:46 · 579 阅读 · 0 评论 -
2017"百度之星"程序设计大赛 - 初赛-小小粉丝度度熊
小小粉丝度度熊Accepts: 1075 Submissions: 5191 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description度度熊喜欢着喵哈哈村的大明星——星星小姐。为什么度度熊会喜欢星星小姐呢?首先星星小姐笑起来非常动人,其次星星小姐唱歌原创 2017-08-13 21:15:53 · 488 阅读 · 0 评论 -
HDU6129-Just do it
Just do itTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1205 Accepted Submission(s): 704Problem Description There is a nonnegative inte原创 2017-08-18 15:45:29 · 411 阅读 · 0 评论 -
HDU6103-Kirinriki
KirinrikiTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1204 Accepted Submission(s): 475Problem Description We define the distance of two原创 2017-08-11 15:19:13 · 534 阅读 · 0 评论 -
POJ3320-Jessica's Reading Problem
Jessica’s Reading ProblemTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 13113 Accepted: 4508 DescriptionJessica’s a very lovely girl wooed by lots of boys. Recently she has a原创 2017-08-11 11:31:14 · 416 阅读 · 0 评论 -
POJ3061-Subsequence
SubsequenceTime Limit: 1000MS Memory Limit: 65536K Total Submissions: 15943 Accepted: 6750 DescriptionA sequence of N positive integers (10 < N < 100 000), each of them less than or equal原创 2017-08-11 10:48:44 · 390 阅读 · 0 评论 -
HDU6143-Killer Names
Killer NamesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 369 Accepted Submission(s): 191Problem Description Galen Marek, codenamed Star原创 2017-08-17 21:32:50 · 1014 阅读 · 0 评论 -
HDU1029-Ignatius and the Princess IV
Ignatius and the Princess IVTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32767 K (Java/Others) Total Submission(s): 34150 Accepted Submission(s): 14867Problem Description “OK, you原创 2017-08-16 17:49:04 · 601 阅读 · 0 评论 -
CF831C-Jury Marks
C. Jury Markstime limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Polycarp watched TV-show where k jury members one by one rated a participant b原创 2017-07-14 10:48:13 · 1067 阅读 · 0 评论 -
二进制状态压缩
1、取出nnn在二进制表示下的第kkk位(n>>k)&1 2、取出nnn在二进制表示下的第0∼k−10∼k−10\sim k-1位(后kkk位)n&((1<<k)-1) 3、第kkk位取反n^(1<<k) 4、第kkk位赋一n|(1<<k) 5、第kkk位赋零n&(~(1<<k))数学技巧∀k∈[0,3...转载 2018-09-08 22:32:10 · 545 阅读 · 0 评论
分享