11 2021 档案
摘要:前序 + 中序 #include<iostream> #include<deque> using namespace std; deque<int> rear,center,pref; void build(deque<int> pre,deque<int> cen){ int temp; if(p
阅读全文
摘要:食物链 带权并查集 #include<iostream> using namespace std; const int N = 100010; int p[N],d[N]; int n,k; int res = 0; int find(int x){ if(p[x] != x){ int rot =
阅读全文