04 2013 档案
摘要:类似于数塔的变形,只不过是每个数下面要取的是三个数的最大值,另外注意边界。第0秒 5第1秒 4 5 6第2秒 3 4 5 6 7第3秒 2 3 4 5 6 7 8第4秒 1 2 3 4 5 6 7 8 9第5秒 0 1 2 3 4 5 6 7 8 9 10第6秒 0 1 2 3 4 5 6 7 8 9 10第7秒 .................我的代码:View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<string.h> 4 int dp[100001][12]; 5 int ma
阅读全文
摘要:转自(http://www.cnblogs.com/tanhehe/articles/2998736.html)转自(http://www.cnblogs.com/vongang/archive/2011/12/23/2299729.html)在背包九讲里面将多重背包转化为01背包,并且进行时间优化...
阅读全文
摘要:卡特兰数又称卡塔兰数,是组合数学中一个常出现在各种计数问题中出现的数列。卡特兰数前几项为 : 1, 1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796, 58786, 208012, 742900, 2674440, 9694845, 35357670, 129644790, 477638700, 1767263190, 6564120420, 24466267020, 91482563640, 343059613650, 1289904147324, 4861946401452, ... 1 #include<stdio.h> 2 #incl
阅读全文
摘要:http://acm.sdut.edu.cn/sdutoj/showproblem.php?pid=1500&cid=1147View Code 1 #include 2 #include 3 #include 4 5 struct node 6 { 7 int flag; 8 ...
阅读全文

浙公网安备 33010602011771号