04 2014 档案

摘要:题目来源:http://acm.nyist.net/JudgeOnline/problem.php?pid=435题目大意:在一个n*m的方格中可以放入2*1 和 (2*2中缺一个1*1)的方格,求刚好放满的方案数,不能重叠/*** 状态压缩DP, 和POJ 3555题类似,不过稍微复杂一点,... 阅读全文
posted @ 2014-04-10 19:05 YaLing 阅读(169) 评论(0) 推荐(0) 编辑
摘要:题目来源:http://acm.hdu.edu.cn/showproblem.php?pid=3555题目大意:给出一个数N,在[1, N]中找出有多少个数字含有连续的“49”,是一道简单的数位DP, 可以拿来做模板……#include #include #include using namespace std;typedef __int64 LL;LL digits[30];LL dp[30][10][2];// len表示当前在第几位,pre表示前一位数字是多少,flag表示是否含有49,// limit表示当前位的数字是否有限制, [0,9] OR [0,digits[len]]; LL 阅读全文
posted @ 2014-04-10 15:51 YaLing 阅读(132) 评论(0) 推荐(0) 编辑
摘要:题目来源: http://poj.org/problem?id=2411题目大意:给一个h*w的方格,现给出1*2和2*1的两种小方块,求出把h*w方格铺满的不同方案数(1#include#include#include#include#include#include#includeusing namespace std;int h, w;long long dp[12][2100];void dfs(int r, int c, int cur, int lst) { if(r == 1) { // if r == 1 only have two state if(c ==... 阅读全文
posted @ 2014-04-10 10:58 YaLing 阅读(148) 评论(0) 推荐(0) 编辑
摘要:将博客搬至CSDN将博客搬至CSDN 阅读全文
posted @ 2014-04-09 07:50 YaLing 阅读(93) 评论(0) 推荐(0) 编辑
摘要:新的博客,新的开始………… 阅读全文
posted @ 2014-04-09 07:43 YaLing 阅读(94) 评论(0) 推荐(0) 编辑