摘要: 萧芸斓是Z国的公主,平时的一大爱好是采花。今天天气晴朗,阳光明媚,公主清晨便去了皇宫中新建的花园采花 。花园足够大,容纳了n朵花,花有c种颜色(用整数1-c表示),且花是排成一排的,以便于公主采花。公主每次 采花后会统计采到的花的颜色数,颜色数越多她会越高兴!同时,她有一癖好,她不允许最后自己采到的 阅读全文
posted @ 2020-01-13 21:11 GRedComeT 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 恢复内容开始 HH有一串由各种漂亮的贝壳组成的项链。HH相信不同的贝壳会带来好运,所以每次散步 完后,他都会随意取出一 段贝壳,思考它们所表达的含义。HH不断地收集新的贝壳,因此他的项链变得越来越长。有一天,他突然提出了一 个问题:某一段贝壳中,包含了多少种不同的贝壳?这个问题很难回答。。。因为项链 阅读全文
posted @ 2020-01-13 11:10 GRedComeT 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是" 阅读全文
posted @ 2020-01-12 12:13 GRedComeT 阅读(194) 评论(0) 推荐(0) 编辑
摘要: A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral n 阅读全文
posted @ 2020-01-11 22:19 GRedComeT 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Given a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G 阅读全文
posted @ 2020-01-11 11:44 GRedComeT 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to be his sol 阅读全文
posted @ 2020-01-10 20:45 GRedComeT 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs you 阅读全文
posted @ 2020-01-10 15:13 GRedComeT 阅读(166) 评论(0) 推荐(0) 编辑
摘要: An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unex 阅读全文
posted @ 2020-01-10 13:05 GRedComeT 阅读(135) 评论(0) 推荐(0) 编辑
摘要: There are n cities numbered from 1 to n in Berland. Some of them are connected by two-way roads. Each road has its own length — an integer number from 阅读全文
posted @ 2020-01-10 11:45 GRedComeT 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果 阅读全文
posted @ 2020-01-09 21:03 GRedComeT 阅读(136) 评论(0) 推荐(0) 编辑