随笔分类 -  ACM---dfs

摘要:Problem DescriptionYou are given two sequence {a1,a2,...,an} and {b1,b2,...,bn}. Both sequences are permutation of {1,2,...,n}. You are going to find ... 阅读全文
posted @ 2015-10-05 21:56 UniqueColor 阅读(367) 评论(0) 推荐(0)
摘要:Problem DescriptionThis year is the 60th anniversary of NJUST, and to make the celebration more colorful, Tom200 is going to invite distinguished alum... 阅读全文
posted @ 2015-09-17 00:32 UniqueColor 阅读(331) 评论(0) 推荐(0)
摘要:DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and ... 阅读全文
posted @ 2015-09-15 20:24 UniqueColor 阅读(260) 评论(0) 推荐(0)
摘要:DescriptionA network of m roads connects N cities (numbered from 1 to N). There may be more than one road connecting one city with another. Some of th... 阅读全文
posted @ 2015-09-13 22:06 UniqueColor 阅读(237) 评论(0) 推荐(0)
摘要:DescriptionStarting with x and repeatedly multiplying by x, we can compute x31 with thirty multiplications:x2 = x × x, x3 = x2 × x, x4 = x3 × x, …, x3... 阅读全文
posted @ 2015-09-01 21:30 UniqueColor 阅读(403) 评论(0) 推荐(0)
摘要:Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is o... 阅读全文
posted @ 2015-08-29 23:50 UniqueColor 阅读(343) 评论(0) 推荐(0)
摘要:Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is o... 阅读全文
posted @ 2015-08-29 22:18 UniqueColor 阅读(225) 评论(0) 推荐(0)
摘要:Untrusted PatrolTime Limit:3 Seconds Memory Limit:65536 KBEdward is a rich man. He owns a large factory for health drink production. As a matter of co... 阅读全文
posted @ 2015-08-29 18:37 UniqueColor 阅读(261) 评论(0) 推荐(0)
摘要:DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a... 阅读全文
posted @ 2015-08-28 19:26 UniqueColor 阅读(226) 评论(0) 推荐(0)
摘要:DescriptionFJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 2 #include 3 #include 4 using namespace std; 5 #de... 阅读全文
posted @ 2015-08-28 01:33 UniqueColor 阅读(291) 评论(0) 推荐(0)
摘要:DescriptionGiven a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and writing them in some... 阅读全文
posted @ 2015-08-27 22:43 UniqueColor 阅读(259) 评论(0) 推荐(0)
摘要:#1156 : 彩色的树时间限制:2000ms单点时限:1000ms内存限制:256MB描述给定一棵n个节点的树,节点编号为1, 2, …, n。树中有n - 1条边,任意两个节点间恰好有一条路径。这是一棵彩色的树,每个节点恰好可以染一种颜色。初始时,所有节点的颜色都为0。现在需要实现两种操作:1.... 阅读全文
posted @ 2015-08-17 20:27 UniqueColor 阅读(363) 评论(0) 推荐(0)
摘要:Problem DescriptionSoda has a bipartite graph withnvertices andmundirected edges. Now he wants to make the graph become a complete bipartite graph wit... 阅读全文
posted @ 2015-08-15 18:03 UniqueColor 阅读(443) 评论(0) 推荐(0)
摘要:Problem DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new... 阅读全文
posted @ 2015-08-14 20:07 UniqueColor 阅读(282) 评论(0) 推荐(0)
摘要:Problem DescriptionZero Escape, is a visual novel adventure video game directed by Kotaro Uchikoshi (you may hear about ever17?) and developed by Chun... 阅读全文
posted @ 2015-08-14 16:01 UniqueColor 阅读(344) 评论(0) 推荐(0)