摘要: 题意:有一个k*n的棋盘,要求用1*2的骨牌来铺满,有多少种方案?(k 2 #define pii pair 3 #define INF 0x3f3f3f3f 4 #define LL long long 5 using namespace std; 6 const int N=21000; 7 c... 阅读全文
posted @ 2015-09-03 21:20 xcw0754 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 题意:给一个3*n的矩阵,要求用1*2的骨牌来填满,有多少种方案?思路: 官网题解用的仍然是矩阵快速幂的方式。复杂度O(logn*83)。 这样做需要构造一个23*23的矩阵,这个矩阵自乘n-1次,再来乘以初始矩阵init{0,0,0,0,0,0,0,1}后,变成矩阵ans{x,x,x,x,x,... 阅读全文
posted @ 2015-09-03 17:33 xcw0754 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 题意:有一个n*m的棋盘,要求用1*2的骨牌来覆盖满它,有多少种方案?(n 2 #include 3 #include 4 #include 5 #define pii pair 6 #define INF 0x3f3f3f3f 7 #define LL long long 8 using n... 阅读全文
posted @ 2015-09-03 13:03 xcw0754 阅读(290) 评论(0) 推荐(0) 编辑