摘要: [不稳定的传送门 Solution dp[i][j]表示前i个字符当前匹配到不吉利串的第j个,即当前方案的后缀等于不吉利串前缀 然而由于n过大,不能直接转移,用矩阵优化 Code 阅读全文
posted @ 2018-05-04 19:14 void_f 阅读(114) 评论(0) 推荐(0) 编辑
摘要: struct info{ int n,m,A[N][N]; info(int a,int b):n(a),m(b){memset(A,0,sizeof(A));} int *operator [](int x){return A[x];} friend info operator *(info a,info b){ info c(a.n,b.m); for(int i=0;i>=... 阅读全文
posted @ 2018-05-04 09:14 void_f 阅读(131) 评论(0) 推荐(0) 编辑