![](https://img-blog.csdnimg.cn/20190918140158853.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
lca
文章平均质量分 93
lca
_sky123_
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #728 (Div. 2) D. Tree Array
题目链接 You are given a tree consisting of nnn nodes. You generate an array from the tree by marking nodes one by one. Initially, when no nodes are marked, a node is equiprobably chosen and marked from the entire tree. After that, until all nodes are marked,原创 2021-08-06 16:45:48 · 200 阅读 · 0 评论 -
2020ICPC上海 K.Traveling Merchant
题目链接 题目描述 Mr. Lawrence is a traveling merchant who travels between cities and resells products. Basically, to earn from it, he needs to buy products at a very low price and sell them at a higher price. Your task is to tell him whether there exists an endle原创 2021-06-04 10:51:11 · 393 阅读 · 4 评论 -
Codeforces Round #703 (Div. 2) F. Pairs of Paths
题目链接 You are given a tree consisting of nnn vertices, and mmm simple vertex paths. Your task is to find how many pairs of those paths intersect at exactly one vertex. More formally you have to find the number of pairs (i,j)(i, j)(i,j) (1≤i<j≤m)(1 \leq i原创 2021-02-19 20:43:53 · 263 阅读 · 0 评论 -
2019 ICPC南昌邀请赛 J Distance on the tree
题目链接 A tree with nnn nodes, which is numbered from 111 to nnn. Edge between each two adjacent vertexes uuu and vvv has a value www, you’re asked to answer the number of edge whose value is no more than kkk during the path between uuu and vvv. Input In the原创 2020-11-05 21:18:36 · 211 阅读 · 0 评论 -
Berland Beauty
There are n railway stations in Berland. They are connected to each other by n−1 railway sections. The railway network is connected, i.e. can be represented as an undirected tree. You have a map of that network, so for each railway section you know which s原创 2020-05-20 15:20:30 · 213 阅读 · 0 评论