Try Again
摘要: F. Cities Excursions F. Cities Excursions There are n cities in Berland. Some pairs of them are connected with m directed roads. One can use only thes 阅读全文
posted @ 2017-10-01 17:27 十年换你一句好久不见 阅读(378) 评论(0) 推荐(0) 编辑
摘要: 在有向图中,若两点至少包含一条路径可以到达,则称两个顶点强连通,若任意两个顶点皆如此,则称此图为强联通图。非强连通图有向图的极大强连通子图,称为强连通分量(strongly connected components)。 中间查找过程类似于深度优先搜索和并查集。 代码实现: 阅读全文
posted @ 2017-10-01 16:11 十年换你一句好久不见 阅读(335) 评论(0) 推荐(0) 编辑
摘要: E. Fire http://codeforces.com/problemset/problem/864/E Polycarp is in really serious trouble — his house is on fire! It's time to save the most valuab 阅读全文
posted @ 2017-10-01 10:10 十年换你一句好久不见 阅读(267) 评论(0) 推荐(0) 编辑