1060E

CF1060E Sergey and Subway

[原题](https://codeforces.com/problemset/problem/1060/E) [翻译](https://www.luogu.com.cn/problem/CF1060E) 首先容易想到答案 $ans = \sum_{x\leq y}{\lceil \frac{dist ......
Sergey Subway 1060E 1060 and

CF1060E Sergey and Subway

### 题目大意 给定一棵树,每两个有边直接相连的点之间距离为 $1$。现在我们要给所有原来距离为 $2$ 的城市之间修一条长度为 $1$ 的道路。 记 $\operatorname{dis}(a,b)$ 表示 $a,b$ 之间的最短距离,求 $$\sum_{i=1}^n\sum^{n}_{j=i+ ......
Sergey Subway 1060E 1060 and

CF1060E Sergey and Subway 题解

[题面](https://codeforces.com/problemset/problem/1060/E) 由题意可知,在原图中经过边数为 $2$ 的一对点,在新图中经过边数为 $1$。所以每对点在新图中的距离为: $$ \begin{aligned} \lceil \frac{dis(i,j)} ......
题解 Sergey Subway 1060E 1060
共3篇  :1/1页 首页上一页1下一页尾页