08 2020 档案
摘要:#include <bits/stdc++.h> using namespace std; #define ll long long struct tree{ll v,late;}t[100010<<2]; int n,m,r,mod,val[100010],p[100010],size[10001
阅读全文
摘要:#include <cstdio> #include <algorithm> using namespace std; const int N=200010; const int INF=1e9; char s[N]; struct Node{ int m[5][5]; Node operator
阅读全文
摘要:#include <bits/stdc++.h> using namespace std; const int N=200010; int lc[N<<5],rc[N<<5],rt[N<<5],sum[N<<5],a[N],b[N],n,m,q,p,sz; void build(int& rt,in
阅读全文
摘要:#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int n,m; double dp[1010][20],ans; struct edge{double p,q;}a[1010]; bool
阅读全文
摘要:生成树计数 按位枚举每一位为1的个数在进行最小生成树计数时间复杂度O(Tn^2*30) #include <bits/stdc++.h> using namespace std; #define N 110 #define LL long long #define ll long long LL K
阅读全文
摘要:树形dp裸题 两遍dfs 第一次求dp[i][0]表示选取k-1条边(除父节点外)所能取得的最大权值 第二次求dp[i][1]表示i点可以超过k条边其他点不行所能取得的最大权值,过程中更新父亲的dp[fa][0] #include <cstdio> #include <algorithm> #inc
阅读全文
摘要:#include <bits/stdc++.h> using namespace std; int n,m,p,cnt,today,is_guilty[110],may[110]; map<string,int> mp,week; map<int,string> guilty; struct zhe
阅读全文

浙公网安备 33010602011771号