• 2024-08-15CF1988D The Omnipotent Monster Killer
    luogu中文题面:https://www.luogu.com.cn/problem/CF1988D树形dp。我们只关心子树的根节点v什么时候被删去。dp[u][i]+=min(dp[v][1...i-1,i+1...T]).T是log(n)的。因为\(T\leqMex(u)\),而考虑要多少节点使\(Mex(u)=T\),有\(f_T=1+f_1+...f_{T-1}\)得\(T=log_2n\)不
  • 2024-07-16D. The Omnipotent Monster Killer
    D.TheOmnipotentMonsterKillerYou,themonsterkiller,wanttokillagroupofmonsters.Themonstersareonatreewith$n$vertices.Onvertexwithnumber$i$($1\lei\len$),thereisamonsterwith$a_i$attackpoints.Youwanttobattlewithmon