摘要: 题目: Problem Statement Given an undirected tree, let the distance between vertices $u$ and $v$ be the number of edges on the simple path from $u$ to $v 阅读全文
posted @ 2017-06-13 15:56 Sky_miner 阅读(474) 评论(0) 推荐(0)
摘要: 题目: 给一个有向图,然后选一条路径起点终点都为1的路径出来,有一次机会可以沿某条边逆方向走,问最多有多少个点可以被经过?(一个点在路径中无论出现多少正整数次对答案的贡献均为1) 题解: 首先考虑简单一些的问题 如果没有逆向的机会,那么$ans$即为$1$所在的强连通分量的大小。 但是现在有一个逆向 阅读全文
posted @ 2017-06-13 15:12 Sky_miner 阅读(215) 评论(0) 推荐(0)