夏夜、

心若平似镜、何题不AC。

2013年10月21日

POJ 2779 DNA Sequence AC自动机+DP+矩阵

摘要: 因为一个感叹号WA了一页//#pragma comment(linker, "/STACK:1024000000,1024000000")#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;typedef pair pii;#define pb(a) push_back(a)#define INF 0x1f1f1f1f#de 阅读全文

posted @ 2013-10-21 22:31 BMan、 阅读(189) 评论(0) 推荐(0)

HDU 4686 Arc of Dream 矩阵快速幂

摘要: 输入的数据会大于mod,当n=0时输出0.#include#include#include#include#include#include#include#includeusing namespace std;typedef long long ll;const ll mod = 1000000007;struct Matrix{ ll da[5][5]; Matrix (){memset(da,0,sizeof(da));} Matrix operator *(const Matrix &a) { Matrix res; for(int i... 阅读全文

posted @ 2013-10-21 13:33 BMan、 阅读(212) 评论(0) 推荐(0)

导航