
拓扑排序【Topological Sort】
zlttttt
这个作者很懒,什么都没留下…
展开
-
[BZOJ1565][NOI2009]植物大战僵尸-拓扑排序-网络流
植物大战僵尸DescriptionInputOutput仅包含一个整数,表示可以获得的最大能源收入。注意,你也可以选择不进行任何攻击,这样能源收入为0。Sample Input3 2 10 0 20 0 -10 0 -5 1 0 0 100 1 2 1 100 0Sample Output25HINT在样例中, 植物P1,1可以攻击位置(0,0), P2, 0可以攻击位置(2,1)。原创 2017-08-27 23:33:10 · 312 阅读 · 0 评论 -
AGC001F-Wide Swap-拓扑排序
Wide Swap Problem Statement You are given a permutation P1…PN of the set {1, 2, …, N}. You can apply the following operation to this permutation, any number of times (possibly zero): Choose two原创 2017-10-08 13:47:24 · 530 阅读 · 0 评论