Stay Hungry,Stay Foolish!

摘要: E - Find Permutation https://atcoder.jp/contests/abc291/tasks/abc291_e 思路 对于能唯一确定的情况,必然存在一个升序 路径 AX1 < AX2 < .... < AXn *** 如果有两个及以上入度为0的起点, 则这两点的先后关系 阅读全文
posted @ 2023-02-27 22:04 lightsong 阅读(37) 评论(0) 推荐(0) 编辑
摘要: G - Longest Path https://atcoder.jp/contests/dp/tasks/dp_g 思路 使用拓扑序, 依此从入度为0的节点开始, 向外扩展,直至只剩一个节点 扩展的过程中,对每个点的最大路径做记录。 Code https://atcoder.jp/contests 阅读全文
posted @ 2023-02-27 21:53 lightsong 阅读(22) 评论(0) 推荐(0) 编辑
Life Is Short, We Need Ship To Travel