摘要: 原题链接 题解 拓扑排序+dp。 首先以入度为零的结点为起始结点,其游览城市数量为1,接下来每到下一结点,游览城市数++;即当前结点的游览城市数是上一结点的游览数+1,并取最大值。 code #include<bits/stdc++.h> using namespace std; const int 阅读全文
posted @ 2024-02-24 20:08 黑屿白 阅读(36) 评论(0) 推荐(0)