上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页
摘要: Maximum Xor Secondary CodeForces - 280B Bike loves looking for the second maximum element in the sequence. The second maximum element in the sequence 阅读全文
posted @ 2018-11-19 20:35 *starry* 阅读(361) 评论(0) 推荐(1) 编辑
摘要: Y HDU - 4705 题意:给你一棵树,n个节点n-1条边(双向),树上任意三个点不在一条路径上,统计这样的三点集合有多少种。 思路: n个节点中任选3个点的方案数为n*(n-1)*(n-2)/6,从中减去三个点在同一条路径上的种类数即为答案。如何找在同一条路径上的方案数呢,就是以固定某一个点, 阅读全文
posted @ 2018-11-14 20:01 *starry* 阅读(215) 评论(0) 推荐(1) 编辑
摘要: Average distance HDU - 2376 Given a tree, calculate the average distance between two vertices in the tree. For example, the average distance between t 阅读全文
posted @ 2018-11-14 19:30 *starry* 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Balls and Boxes CodeForces - 260C Little Vasya had n boxes with balls in the room. The boxes stood in a row and were numbered with numbers from 1 to n 阅读全文
posted @ 2018-11-12 09:52 *starry* 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Party at Hali-Bula UVA - 1220 题意: 公司里有n(n<=200)个人形成一个树状结构, 要求尽量选多的人,但不能同时选择一个人和他的直属上司,文最多能选多少人,以及是否方案唯一。 阅读全文
posted @ 2018-11-11 16:13 *starry* 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Almost Arithmetical Progression CodeForces - 255C Gena loves sequences of numbers. Recently, he has discovered a new type of sequences which he called 阅读全文
posted @ 2018-11-11 14:46 *starry* 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Anniversary party HDU - 1520 There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierar 阅读全文
posted @ 2018-11-11 10:56 *starry* 阅读(576) 评论(0) 推荐(0) 编辑
摘要: Reachability from the Capital CodeForces - 999E There are nn cities and mm roads in Berland. Each road connects a pair of cities. The roads in Berland 阅读全文
posted @ 2018-11-10 21:17 *starry* 阅读(301) 评论(0) 推荐(0) 编辑
摘要: Bear and Colors CodeForces - 673C Bear Limak has n colored balls, arranged in one long row. Balls are numbered 1through n, from left to right. There a 阅读全文
posted @ 2018-11-10 20:59 *starry* 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Plants vs. Zombies ZOJ - 4062 BaoBao and DreamGrid are playing the game Plants vs. Zombies. In the game, DreamGrid grows plants to defend his garden a 阅读全文
posted @ 2018-11-10 20:35 *starry* 阅读(710) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 16 下一页