随笔分类 - 矩阵乘法
摘要: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>=...
阅读全文
摘要:Description "题目链接" Solution 容斥原理,答案为忽略质数限制的方案数减去不含质数的方案数 然后矩阵乘法优化一下DP即可 Code c++ include include include define N 120 using namespace std; const int M
阅读全文

浙公网安备 33010602011771号