摘要: Elaxia的路线 求无向图中,两对点间最短路的最长公共路径。 四遍spfa标出每条边的标记,然后用拓扑排序跑dp即可。 exp:拓扑排序可以跑DAG上的dp。 c++ include include include using namespace std; const int maxn=1505; 阅读全文
posted @ 2018-08-21 16:28 pechpo 阅读(249) 评论(0) 推荐(0) 编辑
摘要: Sessions in BSU 有n项考试。每项考试给定两个时间,你可以任意选择一个时间。每个时间点只能考一场考试,请问在最优情况下最早考完的时间。n include include using namespace std; typedef pair pi; const int maxn=2e6+5 阅读全文
posted @ 2018-08-21 13:45 pechpo 阅读(130) 评论(0) 推荐(0) 编辑