摘要:
注意有两个变量 now是判断x是不是根,并不是父节点 #include<bits/stdc++.h> using namespace std; const int maxn = 100005; struct edge{ int to, next; }e[maxn << 1]; int head[ma 阅读全文
摘要:
记住了l,r #include<bits/stdc++.h> using namespace std; const int maxn = 1e5+10; struct edge{ int to, nxt; }e[maxn]; int head[maxn], cnt; int n, m, x, y, 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; const int maxn = 1e5+10; const int inf = 0x3f3f3f3f; struct edge{ int to, nxt; }e[maxn << 1]; int head[ma 阅读全文
摘要:
记住体积倒序,因为每组只能取一个 #include<iostream> #include<cstdlib> #include<cstdio> #include<cmath> #include<algorithm> #include<string> using namespace std; int d 阅读全文
摘要:
#include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<algorithm> using namespace std; long a, k, p, n; long quc(long a, long 阅读全文
摘要:
迪杰斯特拉+堆优化 #include<bits/stdc++.h> using namespace std; const int MAXN = 100005; const int MAXM = 200005; struct edge{ int to, next; long long w; }e[MA 阅读全文