Live2d Test Env
摘要: You have been offered a job in a company developing a large social network. Your first task is connected with searching profiles that most probably be 阅读全文
posted @ 2018-08-21 22:10 nimphy 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 题意:给定N点,M边,求添加最少的边使之变为连通图的方案数。 思路:注意题目给出的M边可能带环,即最后生成的不一定是一棵树。但是影响不大。根据矩阵树定理,我们知道生成树的数量=N^(N-2),即点数^(连通数-2)。 此题把已经连通的看成一个整体,就可以得到数量为N^(cnt-2),然后考虑连通块内 阅读全文
posted @ 2018-08-21 17:07 nimphy 阅读(526) 评论(0) 推荐(0) 编辑
摘要: Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different. In Ancient Berland arenas in circu 阅读全文
posted @ 2018-08-21 15:20 nimphy 阅读(462) 评论(0) 推荐(1) 编辑
摘要: De Prezer loves rectangles.He has a n × m rectangle which there is a number in each of its cells. We show the number in the j - th column of the i - t 阅读全文
posted @ 2018-08-21 10:08 nimphy 阅读(509) 评论(0) 推荐(0) 编辑