摘要:
debug:重载乘号的时候要把两个传进来的矩阵用起来 // Problem: P3390 【模板】矩阵快速幂 // Contest: Luogu // URL: https://www.luogu.com.cn/problem/P3390 // Memory Limit: 256 MB // Tim 阅读全文
posted @ 2024-03-21 22:02
potential-star
阅读(13)
评论(0)
推荐(0)
摘要:
int n, m; int k; struct matrix{ int c[101][101]; matrix(){memset(c,0,sizeof c);} }; matrix operator*(matrix &a,matrix &b){ matrix t; for(int i=1;i<=n; 阅读全文
posted @ 2024-03-21 21:25
potential-star
阅读(24)
评论(0)
推荐(0)
摘要:
https://www.acwing.com/problem/content/description/2071/ 每次合并的时候需要开一个新点去实现信息的无后效性,也就是合并之前的两个连通块信息是无法共享的,发现这样开点连边最后 形成一棵树,每次我们将信息传递到新点,也是两个合并点的lca,这使得最 阅读全文
posted @ 2024-03-21 16:06
potential-star
阅读(24)
评论(0)
推荐(0)