上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页
摘要: 二分图判定给定一个图,要给图上每个顶点染色,并且要使得相邻的顶点颜色不同。问是否能最多用2种颜色进行染色?参考如下:Source Code:#include #include using namespace std;vector Edge[1010];int colorArr[1010];void ... 阅读全文
posted @ 2015-01-18 20:52 tinylcy 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 最小邮票数题目描述: 有若干张邮票,要求从中选取最少的邮票张数凑成一个给定的总值。 如,有1分,3分,3分,3分,4分五张邮票,要求凑成10分,则使用3张邮票:3分、3分、4分即可。输入: 有多组数据,对于每组数据,首先是要求凑成的邮票总值M,M#define INF 0x7fffffff us... 阅读全文
posted @ 2015-01-13 21:14 tinylcy 阅读(617) 评论(0) 推荐(0) 编辑
摘要: ExpeditionDescriptionA group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor drivers, the cows unfortuna... 阅读全文
posted @ 2015-01-13 20:06 tinylcy 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 题目描述:Find a longest common subsequence of two strings.输入:First and second line of each input casecontain two strings of lowercase character a…z. There... 阅读全文
posted @ 2015-01-13 18:42 tinylcy 阅读(143) 评论(0) 推荐(0) 编辑
摘要: Fence RepairDescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN(1 ≤N... 阅读全文
posted @ 2015-01-13 15:33 tinylcy 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Saruman's ArmyDescriptionSaruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track of his forces, Saruman... 阅读全文
posted @ 2015-01-13 14:52 tinylcy 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Best Cow LineDescriptionFJ is about to take hisN(1 ≤N≤ 2,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arrange... 阅读全文
posted @ 2015-01-13 14:07 tinylcy 阅读(362) 评论(0) 推荐(0) 编辑
摘要: Lake CountingDescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (... 阅读全文
posted @ 2015-01-11 22:00 tinylcy 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目描述:看过变形金刚的人一定记得这样一个场景,机器人在攻击人类的时候,可以上天入地,并且都如履平地。聪明的人类很快就想到,可不可以也利用地下的攻势来跟机器人进行周旋。很快,人类就在地下建立了几个基地。现在这些基地之间要进行合作,必须有一些基地之间是有通道的,这样无论是运输补给还是进行交流都会方便很... 阅读全文
posted @ 2015-01-11 14:05 tinylcy 阅读(255) 评论(0) 推荐(0) 编辑
摘要: AntsDescriptionAn army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of th... 阅读全文
posted @ 2015-01-10 17:36 tinylcy 阅读(685) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 12 下一页