07 2021 档案

摘要:目前缺少高精减低精 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 1e5; struct INT { int a[N]; 阅读全文
posted @ 2021-07-22 21:50 Acestar 阅读(82) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2021-07-22 20:13 Acestar 阅读(4) 评论(0) 推荐(0)
摘要:树形DP 求出每个子树的最长链,与父亲当前的最长链加起来更新直径,然后更新父亲最长链。 int f[N],mx; void dfs(int u,int fa) { for(int i = head[u]; i; i = e[i].nxt) { int v = e[i].v; if(v == fa) 阅读全文
posted @ 2021-07-21 22:36 Acestar 阅读(84) 评论(0) 推荐(0)