![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Combinatorial Enumeration
Feynman1999
理论都是灰色的,而生活之树常青^_^
展开
-
POJ 3252(数位DP || 组合数)
DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other names) i原创 2017-08-04 11:50:00 · 785 阅读 · 0 评论 -
17AHU排位赛3 A题 (逆康托展开)
problem输入两个整数n和k,询问1~n的所有排列中,按字典序升序排在第k位的排列是什么Input输入两个整数n,k(2<=n<=18,1<=k<=n!)Output输出n个整数,表示字典序排在第k位的那个排列。Input3 4Output2 3 1 Limitation1s 256MBHintn=3的时候,所有的排列按照字典序升序排列如下: [1,2,3] [1,3,2] [2,1,3]原创 2017-08-25 19:12:39 · 328 阅读 · 0 评论 -
POJ 1850 组合编号
problemTransmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A well known system is that one where a number is associa原创 2017-07-28 17:10:30 · 298 阅读 · 0 评论 -
HDU - 5917(Ramsey定理)
Problem DescriptionLong long ago, there was a prosperous kingdom which consisted of n cities and every two cites were connected by an undirected road.However, one day a big monster attacked th原创 2017-08-05 17:22:18 · 706 阅读 · 0 评论 -
Ramsey定理
一、完全图:所有顶点间两两相连构成的图,N阶完全图有C(n,2)条边,如下图:二、思考:是否能够对一个K5完全图,仅仅使用蓝色或者红色给其10条边染色,st无论每条边染成何种颜色,总可以找到一个纯蓝色的K3或者一个纯红色的K3?一个反例:如果是对一个K6完全图,就是经典的友谊定理,在至少6人中,或者有3人,他们互相认识原创 2017-08-05 16:59:43 · 16697 阅读 · 0 评论 -
HDU 1205(鸽巢原理)
HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。 Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0Output对于每组数据,输出一原创 2017-08-02 13:15:20 · 411 阅读 · 0 评论 -
poj 2356(鸽巢原理)
DescriptionThe input contains N natural (i.e. positive integer) numbers ( N <= 10000 ). Each of that numbers is not greater than 15000. This numbers are not necessarily different (so it may happen原创 2017-08-02 11:46:52 · 460 阅读 · 0 评论 -
UVa 10207 (组合数的高精度计算)
problemIn this particular problem, TheUnreal Tournamentis a tournament, which consists of only two teams. Letthese two teams be Abahoni and Mohamedan. They play in between them notmore than 2n原创 2017-07-31 21:16:02 · 922 阅读 · 0 评论 -
全排列的两种常见方法(递归,STL)
零、全排列 从n个不同元素中任取m(m≤n)个元素,按照一定的顺序排列起来,叫做从n个不同元素中取出m个元素的一个排列。当m=n时所有的排列情况叫全排列。一、递归方法(非字典序)(dfs) 当我们要统计全排列的情况时,最直接的就是枚举,数一数,为了高效的计数,比如123的全排列,我们通常先固定第一个位置上的数“1”,然后后面可以是2,3或者3,2;然原创 2017-02-21 21:11:22 · 1152 阅读 · 0 评论