2025年5月28日
摘要: 树形dp $op, f[i+1][u]+=f[i][v], u<-v$ https://ac.nowcoder.com/acm/contest/109081/E 最大独立集:选择的节点不相邻,其中的最大值 $i:节点,j:是否选择当前节点$ $dp[u][0]=0,dp[u][1]=w[u],后序遍 阅读全文
posted @ 2025-05-28 21:31 王不留航 阅读(10) 评论(0) 推荐(0)
  2025年5月15日
摘要: #include <bits/stdc++.h> #define ll long long #define pll pair<int,int> #define INF 0x3f3f3f3f3f3f3f3f using namespace std; #define IOS ios::sync_with 阅读全文
posted @ 2025-05-15 14:21 王不留航 阅读(19) 评论(0) 推荐(0)