随笔分类 - dp / # 树形dp
摘要:Problem - K - Codeforces time limit per test 2.0 s memory limit per test 512 megabytes input standard input output standard output Alex is a professio
阅读全文
摘要:287. 积蓄程度 - AcWing题库 有一个树形的水系,由 N−1 条河道和 N 个交叉点组成。 我们可以把交叉点看作树中的节点,编号为 1∼N,河道则看作树中的无向边。 每条河道都有一个容量,连接 x 与 y 的河道的容量记为 c(x,y)。 河道中单位时间流过的水量不能超过河道的容量。 有一
阅读全文
摘要:286. 选课 - AcWing题库 学校实行学分制。 每门的必修课都有固定的学分,同时还必须获得相应的选修课程学分。 学校开设了 N 门的选修课程,每个学生可选课程的数量 M 是给定的。 学生选修了这 M 门课并考核通过就能获得相应的学分。 在选修课程中,有些课程可以直接选修,有些课程需要一定的基
阅读全文
摘要:A - 没有上司的舞会 285. 没有上司的舞会 - AcWing题库 #include<iostream> #include<cstdio> #include<cstdlib> #include<string> #include<cstring> #include<cmath> #include<
阅读全文