摘要:
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 阅读全文
摘要:
在有向图中,若两点至少包含一条路径可以到达,则称两个顶点强连通,若任意两个顶点皆如此,则称此图为强联通图。非强连通图有向图的极大强连通子图,称为强连通分量(strongly connected components)。 中间查找过程类似于深度优先搜索和并查集。 代码实现: 阅读全文
摘要:
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 阅读全文