上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页
摘要: Sort it You want to processe a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending or 阅读全文
posted @ 2017-08-11 15:49 yzm10 阅读(324) 评论(0) 推荐(1) 编辑
摘要: Mr. Kitayuta's Colorful Graph Mr. Kitayuta has just bought an undirected graph consisting of n vertices and medges. The vertices of the graph are numb 阅读全文
posted @ 2017-08-11 15:29 yzm10 阅读(281) 评论(0) 推荐(1) 编辑
摘要: Color the ball N个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a <= b),lele便为骑上他的“小飞鸽"牌电动车从气球a开始到气球b依次给每个气球涂一次颜色。但是N次以后lele已经忘记了第I个气球已经涂过几次颜色了,你能帮他算出每个气球被涂过几 阅读全文
posted @ 2017-08-08 20:36 yzm10 阅读(197) 评论(0) 推荐(1) 编辑
摘要: 敌兵布阵 C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都 阅读全文
posted @ 2017-08-08 20:02 yzm10 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 转自http://www.cnblogs.com/TheRoadToTheGold/p/6254255.html 数据结构——线段树 O、引例 A.给出n个数,n<=100,和m个询问,每次询问区间[l,r]的和,并输出。 一种回答:这也太简单了,O(n)枚举搜索就行了。 另一种回答:还用得着o(n 阅读全文
posted @ 2017-08-07 23:25 yzm10 阅读(204) 评论(0) 推荐(1) 编辑
摘要: 度度熊的王国战略 Accepts: 644 Submissions: 5880 Time Limit: 40000/20000 MS (Java/Others) Memory Limit: 32768/132768 K (Java/Others) Accepts: 644 Submissions: 阅读全文
posted @ 2017-08-07 00:07 yzm10 阅读(371) 评论(0) 推荐(1) 编辑
摘要: 六度分离 1967年,美国著名的社会学家斯坦利·米尔格兰姆提出了一个名为“小世界现象(small world phenomenon)”的著名假说,大意是说,任何2个素不相识的人中间最多只隔着6个人,即只用6个人就可以将他们联系在一起,因此他的理论也被称为“六度分离”理论(six degrees of 阅读全文
posted @ 2017-08-06 23:08 yzm10 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 天气晴朗的魔法 这样阴沉的天气持续下去,我们不免担心起他的健康。 51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。 N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。 魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔法最终的效果取决 阅读全文
posted @ 2017-08-06 23:00 yzm10 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Invitation Cards In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They 阅读全文
posted @ 2017-08-04 18:08 yzm10 阅读(162) 评论(0) 推荐(0) 编辑
摘要: Flight Recently, Shua Shua had a big quarrel with his GF. He is so upset that he decides to take a trip to some other city to avoid meeting her. He wi 阅读全文
posted @ 2017-08-04 17:56 yzm10 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Trucking A certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desirable to transport 阅读全文
posted @ 2017-08-03 16:26 yzm10 阅读(169) 评论(0) 推荐(1) 编辑
摘要: Idiomatic Phrases Game Tom is playing a game called Idiomatic Phrases Game. An idiom consists of several Chinese characters and has a certain meaning. 阅读全文
posted @ 2017-08-03 15:17 yzm10 阅读(243) 评论(0) 推荐(1) 编辑
摘要: Arctic Network The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication 阅读全文
posted @ 2017-08-03 14:58 yzm10 阅读(192) 评论(0) 推荐(1) 编辑
摘要: Bad Cowtractors Bessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are conveniently numbered 1 阅读全文
posted @ 2017-08-02 22:43 yzm10 阅读(215) 评论(0) 推荐(1) 编辑
摘要: Silver Cow Party One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 阅读全文
posted @ 2017-08-02 14:56 yzm10 阅读(222) 评论(0) 推荐(1) 编辑
摘要: Skiing Skiing Bessie and the rest of Farmer John's cows are taking a trip this winter to go skiing. One day Bessie finds herself at the top left corne 阅读全文
posted @ 2017-08-01 21:18 yzm10 阅读(220) 评论(0) 推荐(0) 编辑
摘要: MPI Maelstrom BIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine with a hiera 阅读全文
posted @ 2017-08-01 20:37 yzm10 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Building a Space Station You are a member of the space station engineering team, and are assigned a task in the construction process of the station. Y 阅读全文
posted @ 2017-08-01 20:34 yzm10 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 粗略讲讲SPFA算法的原理,SPFA算法是1994年西南交通大学段凡丁提出 是一种求单源最短路的算法 算法中需要用到的主要变量 int n; //表示n个点,从1到n标号 int s,t; //s为源点,t为终点 int d[N]; //d[i]表示源点s到点i的最短路 int p[N]; //记录 阅读全文
posted @ 2017-08-01 00:57 yzm10 阅读(352) 评论(0) 推荐(1) 编辑
摘要: Jungle Roads The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages 阅读全文
posted @ 2017-08-01 00:17 yzm10 阅读(161) 评论(0) 推荐(1) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页