上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页

2017年7月18日

摘要: 1.BFS是用来搜索最短径路的解是比较合适的,比如求最少步数的解,最少交换次数的解,因为BFS搜索过程中遇到的解一定是离根最近的,所以遇到一个解,一定就是最优解,此时搜索算法可以终止。这个时候不适宜使用DFS,因为DFS搜索到的解不一定是离根最近的,只有全局搜索完毕,才能从所有解中找出离根的最近的解 阅读全文
posted @ 2017-07-18 11:03 Annetree 阅读(2259) 评论(0) 推荐(1) 编辑
 
摘要: Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a numb 阅读全文
posted @ 2017-07-18 10:56 Annetree 阅读(144) 评论(0) 推荐(0) 编辑
 
摘要: 在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。 Input 输入含有多组测试数据。 每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将 阅读全文
posted @ 2017-07-18 10:20 Annetree 阅读(165) 评论(0) 推荐(0) 编辑
 
摘要: Problem Description In China, foreign brand commodities are often much more expensive than abroad. The main reason is that we Chinese people tend to t 阅读全文
posted @ 2017-07-18 09:46 Annetree 阅读(363) 评论(0) 推荐(0) 编辑

2017年7月17日

摘要: Description You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set 阅读全文
posted @ 2017-07-17 16:41 Annetree 阅读(299) 评论(0) 推荐(0) 编辑
 
摘要: Description 城市C是一个非常繁忙的大都市,城市中的道路十分的拥挤,于是市长决定对其中的道路进行改造。城市C的道路是这样分布的:城市中有n个交叉路口,有些交叉路口之间有道路相连,两个交叉路口之间最多有一条道路相连接。这些道路是双向的,且把所有的交叉路口直接或间接的连接起来了。每条道路都有一 阅读全文
posted @ 2017-07-17 15:51 Annetree 阅读(113) 评论(0) 推荐(0) 编辑

2017年7月15日

摘要: There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine 阅读全文
posted @ 2017-07-15 16:27 Annetree 阅读(210) 评论(0) 推荐(0) 编辑
 
摘要: Adapted from Wikipedia, the free encyclopedia The humidex is a measurement used by Canadian meteorologists to reflect the combined effect of heat and 阅读全文
posted @ 2017-07-15 16:25 Annetree 阅读(212) 评论(0) 推荐(0) 编辑
 
摘要: Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is gues 阅读全文
posted @ 2017-07-15 11:48 Annetree 阅读(131) 评论(0) 推荐(0) 编辑
 
摘要: Description Here is a simple game. In this game, there are several piles of matches and two players. The two player play in turn. In each turn, one ca 阅读全文
posted @ 2017-07-15 10:29 Annetree 阅读(203) 评论(0) 推荐(0) 编辑

2017年7月14日

摘要: Being an ACMer requires knowledge in many fields, because problems in this contest may use physics, biology, and even musicology as background. And no 阅读全文
posted @ 2017-07-14 14:52 Annetree 阅读(108) 评论(0) 推荐(0) 编辑
 
摘要: A stack is a data structure in which all insertions and deletions of entries are made at one end, called the "top" of the stack. The last entry which 阅读全文
posted @ 2017-07-14 13:57 Annetree 阅读(205) 评论(0) 推荐(0) 编辑
 
摘要: Mr. Chopsticks is interested in random phenomena, and he conducts an experiment to study randomness. In the experiment, he throws n balls into m boxes 阅读全文
posted @ 2017-07-14 10:28 Annetree 阅读(207) 评论(0) 推荐(0) 编辑

2017年7月10日

摘要: Problem Description Last year summer Max traveled to California for his vacation. He had a great time there: took many photos, visited famous universi 阅读全文
posted @ 2017-07-10 11:11 Annetree 阅读(235) 评论(0) 推荐(0) 编辑
 
摘要: Problem Description 喜欢西游记的同学肯定都知道悟空偷吃蟠桃的故事,你们一定都觉得这猴子太闹腾了,其实你们是有所不知:悟空是在研究一个数学问题!什么问题?他研究的问题是蟠桃一共有多少个!不过,到最后,他还是没能解决这个难题,呵呵^-^当时的情况是这样的:第一天悟空吃掉桃子总数一半多 阅读全文
posted @ 2017-07-10 10:05 Annetree 阅读(155) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 22 下一页