摘要:
题目链接 不知道怎么该评价这道题……首先题目给的形式就很坑,很大程度上变成了一个模拟题。实际上就是求初始联通块个数。答案即为联通快个数-1. 阅读全文
posted @ 2017-06-12 16:42
perplex
阅读(202)
评论(0)
推荐(0)
摘要:
题目链接 题意:两个国家A,B,分别有N座城市和Q座城市(1 ≤ N, Q ≤ 4 × 10^4),每个国家里的城市都是树形结构,每条边的权值都是1。现在要随机从两个国家中各选择一个城市来将两个国家连接起来,问连接起来的大国家里面的最长路的期望是多少。 解题思路: 涉及到树上的最大长度,很容易想到树 阅读全文
posted @ 2017-06-12 16:37
perplex
阅读(207)
评论(0)
推荐(0)
摘要:
Vasily the bear has got a large square white table of n rows and n columns. The table has got a black border around this table. Vasily the bear wants 阅读全文
posted @ 2017-06-12 16:21
perplex
阅读(304)
评论(0)
推荐(0)
摘要:
Think of New York as a rectangular grid consisting of N vertical avenues numerated from 1 to N and M horizontal streets numerated 1 to M. C friends ar 阅读全文
posted @ 2017-06-12 15:58
perplex
阅读(384)
评论(0)
推荐(0)
摘要:
Little X has n distinct integers: p1, p2, ..., pn. He wants to divide all of them into two sets A and B. The following two conditions must be satisfie 阅读全文
posted @ 2017-06-12 15:40
perplex
阅读(362)
评论(0)
推荐(0)

浙公网安备 33010602011771号