随笔分类 -  矩阵乘法

摘要: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 阅读(136) 评论(0) 推荐(0)
摘要:Description "题目链接" Solution 容斥原理,答案为忽略质数限制的方案数减去不含质数的方案数 然后矩阵乘法优化一下DP即可 Code c++ include include include define N 120 using namespace std; const int M 阅读全文
posted @ 2018-04-03 14:57 void_f 阅读(145) 评论(0) 推荐(0)