该文被密码保护。 阅读全文
posted @ 2020-07-28 20:03 zhnzh 阅读(5) 评论(0) 推荐(0)
摘要: #include<bits/stdc++.h> using namespace std; int a,b,c,d; // int head[1000001]; int cnt; struct node{ int nxt,to; void read() { int u,v; scanf("%d%d", 阅读全文
posted @ 2020-07-28 20:02 zhnzh 阅读(43) 评论(0) 推荐(1)
摘要: 看原题戳这儿 如题,肯定是树链剖分的题。 零、写在前面 建议先A掉这道模板题(不会的先看这个) 前置知识:链式前向星,树,dfs序,LCA,树形dp,线段树,树链剖分$······$ 一定要先完全学懂,否则不保证这篇题解能完全看懂!!! 一、审题 先简化题目: 已知一棵包含 \(N(0 \le N 阅读全文
posted @ 2020-07-28 20:00 zhnzh 阅读(126) 评论(0) 推荐(1)
摘要: 看原题戳这儿 如题,肯定是树链剖分的题。 零、写在前面 建议先A掉这道模板题(不会的先看这个) 前置知识:链式前向星,树,dfs序,LCA,树形dp,线段树,树链剖分$······$ 一定要先完全学懂$!!!$ 一、审题 将题面简化一下就是: 已知一棵包含 \(N(0 \le N \le 10000 阅读全文
posted @ 2020-07-28 19:59 zhnzh 阅读(96) 评论(0) 推荐(1)
摘要: a+b problem 1.标准做法 #include<bits/stdc++.h> using namespace std; int a,b,c,d; int aa[1000001]; int main() { cin>>a>>b; cout<<a+b<<endl; return 0; } #in 阅读全文
posted @ 2020-07-28 19:58 zhnzh 阅读(256) 评论(0) 推荐(1)
摘要: 个人收集的,应该没有什么遗漏的 #include <algorithm> #include <bitset> #include <cctype> #include <cerrno> #include <clocale> #include <cmath> #include <complex> #inc 阅读全文
posted @ 2020-07-28 19:57 zhnzh 阅读(1580) 评论(4) 推荐(0)
摘要: 倍增 #include<bits/stdc++.h> using namespace std; int n,m,u,v,r,cnt,head[500005],f[500005][22],dep[500005]; struct abc{ int to,nxt; }e[1000005]; void ad 阅读全文
posted @ 2020-07-28 19:56 zhnzh 阅读(61) 评论(0) 推荐(1)
摘要: 零.写在前面 第一次给比赛赛题写题解,有不足请多多指教。 原比赛地址这儿 适合普及+/提高-的人食用 一.T1 运算 看原题戳这儿 1.审题 在一行中从左到右写着 \(n\) 个数字 \(a_1,a_2…a_n\),你需要在每相邻的两个数字间填入" + "或者" ^ "(异或)中的一个。定义一种方案 阅读全文
posted @ 2020-07-28 19:52 zhnzh 阅读(254) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2020-07-28 18:32 zhnzh 阅读(143) 评论(0) 推荐(1)