
组合数学
文章平均质量分 80
wust_cyl
在非洲,瞪羚每天早上醒来时,他知道自己必须跑的比最快的狮子还快,否则就会被吃掉.狮子每天早上醒来时,他知道自己必须追上跑得最慢的瞪羚,否则就会被饿死.不管你是狮子还是瞪羚,当太阳升起时,你最好开始奔跑
展开
-
poj 3406 (勒让德定理)
Last digitTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3168 Accepted: 966DescriptionDetermine the last nonzero digit in value of expression.Inp原创 2017-08-13 20:00:48 · 588 阅读 · 0 评论 -
poj-2773(数论+容斥原理+二分)
DescriptionTwo positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all relatively prime to 2006.Now your job is ea...原创 2017-08-16 08:37:37 · 446 阅读 · 0 评论 -
2017 ACM-ICPC(西安赛区) B-Coin
问题描述: Bob has a not even coin, every time he tosses the coin, the probability that the coin's front face up is \frac{q}{p}(\frac{q}{p} \le \frac{1}{2})pq(pq≤21).The question is, when Bob tosses原创 2017-09-16 18:27:25 · 748 阅读 · 0 评论 -
SPOJ - PROOT(数论+原根)
问题描述:In the field of Cryptography, prime numbers play an important role. We are interested in a scheme called "Diffie-Hellman" key exchange which allows two communicating parties to exchange a sec原创 2017-12-05 14:37:56 · 365 阅读 · 0 评论 -
hdu 1695(欧拉公式,容斥原理||莫比乌斯反演)
GCD Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe...原创 2017-08-13 20:47:41 · 604 阅读 · 1 评论 -
贝尔数
转载博主贝尔数(来自维基百科)& Stirling数贝尔数 贝尔数以埃里克·坦普尔·贝尔(Eric Temple Bell)为名,是组合数学中的一组整数数列,开首是(OEIS的A000110数列): Bell NumberBn是基数为n的集合的划分方法的数目。集合S的一个划分是定义为S的两两不相交的非空转载 2018-02-13 20:10:21 · 3583 阅读 · 0 评论 -
hdu 1521(指数型母函数)
排列组合Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4354 Accepted Submission(s): 1857Problem Description有n种物品,并且知道每种物品的数量。要求从中选出m件物品的排列数。例如有两...原创 2017-08-13 20:34:28 · 315 阅读 · 0 评论 -
hdu 2069(母函数)
Coin Change Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Ja...原创 2017-08-13 20:20:47 · 429 阅读 · 0 评论 -
HYSBZ-2190(欧拉函数)&&hdu-2814(容斥原理)
问题描述:作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。 现在,C君希望你告诉他队伍整齐时能看到的学生人数。Input共一个数N。Output共一个数,即C君应看到的学生人数。Sample Input4Sample Output9HINT ...原创 2017-08-22 21:07:01 · 297 阅读 · 0 评论