随笔分类 -  组合数学

ZOJ3557 How Many Sets II( Lucas定理)
摘要:转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudHow Many Sets IITime Limit:2 Seconds Memory Limit:65536 KBGiven a setS= {1, 2, ...,n}, numbermandp, yo... 阅读全文

posted @ 2015-08-16 01:09 xyiyy 阅读(421) 评论(0) 推荐(0)

ZOJ3556 How Many Sets I(容斥)
摘要:转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudHow Many Sets ITime Limit:2 Seconds Memory Limit:65536 KBGive a set S, |S| =n, then how many ordered s... 阅读全文

posted @ 2015-08-16 01:05 xyiyy 阅读(249) 评论(0) 推荐(0)

codeforces 336D Vasily the Bear and Beautiful Strings(组合数学)
摘要:转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudVasily the Bear and Beautiful StringsVasily the Bear lovesbeautifulstrings. Stringsisbeautifulif it me... 阅读全文

posted @ 2015-04-06 23:46 xyiyy 阅读(281) 评论(0) 推荐(0)

codeforces 340E Iahub and Permutations(错排or容斥)
摘要:转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudIahub and PermutationsIahub is so happy about inventing bubble sort graphs that he's staying all day l... 阅读全文

posted @ 2015-03-30 00:46 xyiyy 阅读(493) 评论(0) 推荐(0)

[uva11916] Emoogle Grid (离散对数)
摘要:转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraud Emoogle GridYou have to color an MxN ( 1M, N108) two dimensional grid. You will be provided K ( 2K108... 阅读全文

posted @ 2014-12-12 19:47 xyiyy 阅读(302) 评论(0) 推荐(0)

UVA 10253 Series-Parallel Networks (树形dp)
摘要:转载请注明出处:http://www.cnblogs.com/fraud/ ——by fraudSeries-Parallel NetworksInput: standard inputOutput: standard outputTime Limit: 5 secondsMemory Limit:... 阅读全文

posted @ 2014-11-17 13:03 xyiyy 阅读(358) 评论(0) 推荐(0)

UVALive 4123 Glenbow Museum (组合数学)
摘要:转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud易得,当n为奇数或者n 2 using namespace std; 3 typedef long long ll; 4 ll C[1010][5]; 5 ll ans[1010]; 6 int mai... 阅读全文

posted @ 2014-11-15 15:54 xyiyy 阅读(184) 评论(0) 推荐(0)

UVA11806Cheerleaders(容斥)
摘要:转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud题目意思:在m行n列的矩形网格中放k个相同的石子,问有多少中方法?每个格子最多放一个石子,所有石子都要用完,并且第一行,最后一行,第一列,最后一列都必须有石子。分析:容斥入门水题设第一行不放石子为事件A... 阅读全文

posted @ 2014-11-08 23:33 xyiyy 阅读(188) 评论(0) 推荐(0)

UVA11538Chess Queen(组合数学推公式)
摘要:转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud题目意思:在n*m的棋盘中放置两个不同的皇后,使得两者能够相互攻击,共有多少种放置方法?考虑将其分为1.相同行列 2.相同对角线上1.先放其中一个子,有n*m种放置方法,剩下一个子对于任意一种方法都有(... 阅读全文

posted @ 2014-11-08 23:17 xyiyy 阅读(284) 评论(0) 推荐(0)

导航