<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>排列组合 on 111qqz's blog</title><link>https://111qqz.com/en/tags/%E6%8E%92%E5%88%97%E7%BB%84%E5%90%88/</link><description>Recent content in 排列组合 on 111qqz's blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2015-2026 111qqz</copyright><lastBuildDate>Thu, 13 Apr 2017 07:24:41 +0000</lastBuildDate><atom:link href="https://111qqz.com/en/tags/%E6%8E%92%E5%88%97%E7%BB%84%E5%90%88/index.xml" rel="self" type="application/rss+xml"/><item><title>leetcode 60. Permutation Sequence (求第k个排列)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-60-permutation-sequence/</link><pubDate>Thu, 13 Apr 2017 07:24:41 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-60-permutation-sequence/</guid><description>&lt;p&gt;The set &lt;code&gt;[1,2,3,…,_n_]&lt;/code&gt; contains a total of &lt;em&gt;n&lt;/em&gt;! unique permutations.&lt;/p&gt;
&lt;p&gt;By listing and labeling all of the permutations in order,
We get the following sequence (ie, for &lt;em&gt;n&lt;/em&gt; = 3):&lt;/p&gt;</description></item><item><title>leetcode 47. Permutations II (生成全排列，有重复元素)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-47-permutations-ii/</link><pubDate>Thu, 13 Apr 2017 07:14:03 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-47-permutations-ii/</guid><description>&lt;p&gt;Given a collection of numbers that might contain duplicates, return all possible unique permutations.__&lt;/p&gt;
&lt;p&gt;思路：和&lt;a href="https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-46-permutations/" &gt;leet code 46&lt;/a&gt; 类似，最后用set去个重即可。。&lt;/p&gt;</description></item><item><title>leetcode 46. Permutations (生成全排列，无重复元素)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-46-permutations/</link><pubDate>Thu, 13 Apr 2017 06:59:43 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-46-permutations/</guid><description>&lt;p&gt;Given a collection of &lt;strong&gt;distinct&lt;/strong&gt; numbers, return all possible permutations.&lt;/p&gt;
&lt;p&gt;思路：调用n-1次 &lt;a href="https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-31-next-permutation-in-place/" &gt;leetcode 31 解题报告&lt;/a&gt; 中提到的算法即可。。。&lt;/p&gt;</description></item><item><title>leetcode 31. Next Permutation (in-place 生成下一个全排列)</title><link>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-31-next-permutation-in-place/</link><pubDate>Thu, 13 Apr 2017 06:47:55 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2017/2017-04-13-leetcode-31-next-permutation-in-place/</guid><description>&lt;p&gt;Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.&lt;/p&gt;
&lt;p&gt;If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).&lt;/p&gt;</description></item><item><title>hdu 2049 不容易系列之(4)——考新郎 (错排公式，注意精度)</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-07-27-hdu-2049/</link><pubDate>Wed, 27 Jul 2016 12:06:46 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-07-27-hdu-2049/</guid><description>&lt;p&gt;&lt;a href="http://acm.hdu.edu.cn/showproblem.php?pid=2049" target="_blank" rel="noreferrer"&gt;hdu 2049 题目链接&lt;/a&gt;
题意：n个妹子和n个汉子对应。。然后让每个汉子取选一个妹子，不能重复，问恰好有m个汉子选错妹子的可能的方案数。&lt;/p&gt;</description></item><item><title>hdu 2048 神、上帝以及老天爷 (错排公式)</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-07-27-hdu-2048/</link><pubDate>Wed, 27 Jul 2016 08:18:13 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-07-27-hdu-2048/</guid><description>&lt;p&gt;&lt;a href="http://acm.hdu.edu.cn/showproblem.php?pid=2048" target="_blank" rel="noreferrer"&gt;hdu2048 题目链接&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;题意:n个人不放回的从一个有n个每个人对应id的卡片的盒子取一张卡片，取的正好和自己的对应就算中奖。求所有人都没有中奖的概率。&lt;/p&gt;</description></item><item><title>bzoj1600 [Usaco2008 Oct]建造栅栏 （排列组合）</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-03-31-bzoj1600-usaco2008-octe5bbbae980a0e6a085e6a08f-efbc88e68e92e58897e7bb84e59088efbc89/</link><pubDate>Thu, 31 Mar 2016 11:12:49 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-03-31-bzoj1600-usaco2008-octe5bbbae980a0e6a085e6a08f-efbc88e68e92e58897e7bb84e59088efbc89/</guid><description>&lt;p&gt;勤奋的Farmer John想要建造一个四面的栅栏来关住牛们。他有一块长为n（4&amp;lt;=n&amp;lt;=2500）的木板，他想把这块本板切成4块。这四块小木板可以是任何一个长度只要Farmer John能够把它们围成一个合理的四边形。他能够切出多少种不同的合理方案。注意： *只要大木板的切割点不同就当成是不同的方案（像全排列那样），不要担心另外的特殊情况，go ahead。 *栅栏的面积要大于0. *输出保证答案在longint范围内。 *整块木板都要用完。&lt;/p&gt;</description></item><item><title>bc #77 div 2 B ||hdu 5651 xiaoxin juju needs help (排列组合，逆元)</title><link>https://111qqz.com/en/post/acm-icpc/2016/2016-03-27-hdu-5651/</link><pubDate>Sun, 27 Mar 2016 02:33:27 +0000</pubDate><guid>https://111qqz.com/en/post/acm-icpc/2016/2016-03-27-hdu-5651/</guid><description>&lt;p&gt;&lt;a href="http://acm.hdu.edu.cn/showproblem.php?pid=5651" target="_blank" rel="noreferrer"&gt;题目链接&lt;/a&gt;
题意；给出一个字符串，只由小写字母组成，可以任意排列，但是不能减少字符，问最多能得到多少个回文串，答案9+7&lt;/p&gt;</description></item></channel></rss>