摘要: #include <bits/stdc++.h> using namespace std; #define ll long long const int N=1e5+10; int n; ll tree[N<<2],maxn[N<<2]; int Q; void build(int o,int l, 阅读全文
posted @ 2020-11-16 17:04 wqtnb_tql_qwq_%%% 阅读(98) 评论(0) 推荐(0) 编辑
摘要: #include <bits/stdc++.h> using namespace std; const int maxn=2e5+10; const int INF=1<<30; int n,m; int head[maxn],dis[maxn],cnt; bool vis[maxn]; struc 阅读全文
posted @ 2020-10-25 17:30 wqtnb_tql_qwq_%%% 阅读(133) 评论(0) 推荐(0) 编辑
摘要: #include <cstdio> #include <vector> #include <cstring> #include <algorithm> using namespace std; int T,n,val[100010],c_back[100010],c[100010],ans[1000 阅读全文
posted @ 2020-09-19 19:21 wqtnb_tql_qwq_%%% 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2020-08-14 20:21 wqtnb_tql_qwq_%%% 阅读(145) 评论(0) 推荐(1) 编辑
摘要: #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 阅读全文
posted @ 2020-08-07 16:23 wqtnb_tql_qwq_%%% 阅读(93) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2020-08-07 14:26 wqtnb_tql_qwq_%%% 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2020-08-06 20:41 wqtnb_tql_qwq_%%% 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 生成树计数 按位枚举每一位为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 阅读全文
posted @ 2020-08-06 19:40 wqtnb_tql_qwq_%%% 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 树形dp裸题 两遍dfs 第一次求dp[i][0]表示选取k-1条边(除父节点外)所能取得的最大权值 第二次求dp[i][1]表示i点可以超过k条边其他点不行所能取得的最大权值,过程中更新父亲的dp[fa][0] #include <cstdio> #include <algorithm> #inc 阅读全文
posted @ 2020-08-05 18:40 wqtnb_tql_qwq_%%% 阅读(123) 评论(0) 推荐(0) 编辑
摘要: #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 阅读全文
posted @ 2020-08-01 20:20 wqtnb_tql_qwq_%%% 阅读(91) 评论(0) 推荐(0) 编辑