摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1036#include #include #include #include #include #include #include using namespace std;const int maxn = 505;int m,n;int dp[maxn][maxn][2];int leftsum[maxn][maxn],upsum[maxn][maxn];int main(){ //freopen("E:\\acm\\input.txt","r" 阅读全文
posted @ 2013-09-05 22:09 等待最好的两个人 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1033#include #include #include #include #include #include #include using namespace std;const int maxe = 50000;const int maxn = 105;const int INF = 0x3f3f3f;int dp[maxn][maxn]; //dp[i][j]表示字符串中从i到j最少要添加的字母个数。int main(){ //freopen("E:\\acm\\. 阅读全文
posted @ 2013-09-05 19:28 等待最好的两个人 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://lightoj.com/volume_showproblem.php?problem=1032#include #include #include #include #include #include #include using namespace std;const int maxn = 33;const int INF = 0x3f3f3f;long long dp[maxn];int sum[9] = {0,0,0,1,1,1,2,4,4};long long int N;inline long long res(int i){ return (1>T.. 阅读全文
posted @ 2013-09-05 19:01 等待最好的两个人 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4293#include#include#include#includeusing namespace std;const int maxn = 506;int G[maxn][maxn];int dp[maxn]; //dp[i]表示前i个人,最大有多少个人没撒谎。int main(){ //freopen("E:\\acm\\input.txt","r",stdin); int N; while(cin>>N){ memset(G,0,sizeo 阅读全文
posted @ 2013-09-05 00:03 等待最好的两个人 阅读(335) 评论(0) 推荐(0) 编辑