摘要:
#include<bits/stdc++.h> using namespace std; const int N=1e5+20; const int mod=998244353; int a[N]; int n; int k,len; int dp[N][118]; //设dp[i][j]为考虑前i 阅读全文
摘要:
单调队列优化. #include<bits/stdc++.h> using namespace std; const int N=7e7+7; int n,m,l,u,v,t; int a[N],p1[N],p2[N]; priority_queue<int > q; double p; //我们要 阅读全文
摘要:
很有意思的题 zty提了一嘴 感觉ZRQ的理解真的很妙 具体看代码注释 #include<bits/stdc++.h> using namespace std; const int N=36; const int mod=2017; int base[N][N],num[N][N]; int n,m 阅读全文
摘要:
by luogu 期望dp WJMZBMR打osu! / Easy 很好的题,但是我太菜了 我开始的思路是统计?的个数,然后dfs处理 但是发现N3e5我的想法也无法实现 len记录当前一连串 o 的个数 当遇到 x 时处理结束; #include<bits/stdc++.h> using name 阅读全文
摘要:
长链剖分 一个dp dp[i][j]距离i节点的子树中为j的节点数 #include<bits/stdc++.h> using namespace std; const int N=1e6+7; //长链剖分 int head[N],nxt[N<<1],to[N<<1]; int _; void a 阅读全文