上一页 1 2 3 4 5 6 7 8 ··· 19 下一页
摘要: Problem DescriptionHave you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded.In the field of Cyberground, the position of each toy is fixed, and the ring is carefully designed so it can only encircle one toy at a tim 阅读全文
posted @ 2013-09-11 13:47 forevermemory 阅读(167) 评论(0) 推荐(0) 编辑
摘要: DescriptionAlice想要从城市A出发到城市B,由于Alice最近比较穷(不像集训队陈兴老师是个rich second),所以只能选择做火车从A到B。不过Alice很讨厌坐火车,火车上人比较多,比较拥挤,所以Alice有很严格的要求:火车的相邻两站间的最大距离尽可能的短,这样Alice就可以在停站的时候下车休息一下。当然Alice希望整个旅途比较短。Input有多组测试数据。每组测试数据的第一行有两个整数N,M,A,B(N=2, A,B#include#include#include#define inf 10000000using namespace std;struct lmx{ 阅读全文
posted @ 2013-09-10 10:37 forevermemory 阅读(322) 评论(0) 推荐(0) 编辑
摘要: #includeint p[10][10];int n;int main(){int cnt,i,x,y,j; while(scanf("%d",&n)!=EOF) { cnt=0; for(i=1;i<=n;i++) { p[1][i]=++cnt; } x=1;y=n; int temp=n-1; for(j=1;j<=n-1;j++) { for(i=1;i<=temp;i++) { x++; p[x][y]=++cnt; } for(i=1;i<=temp;i++) { y--; p[x][y]=++cnt; } temp-=1; f 阅读全文
posted @ 2013-09-07 21:20 forevermemory 阅读(326) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionThese are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should be delivered from one city to another. The transportation fee consists of two parts: The cost of the transportation on the path betw 阅读全文
posted @ 2013-09-06 17:31 forevermemory 阅读(231) 评论(0) 推荐(0) 编辑
摘要: Description任意一个分数都是有理数,对于任意一个有限小数,我们都可以表示成一个无限循环小数的形式(在其末尾添加0),对于任意一个无限循环小数都可以转化成一个分数。现在你的任务就是将任意一个无限循环小数转化成既约分数形式。所谓既约分数表示,分子和分母的最大公约数是1。Input有多组数据。每组数据一行。输入为0.a1a2a3...ak(b1b2...bm)的形式,其中a1a2a3...ak为非循环部分,(b1b2b3..bm)为循环部分。数据保证非循环部分的长度k和循环部分的长度m不会超过8.Output对于每组测试数据输出A/B,其中A是分子,B是分母,A,B均为整数。Sample 阅读全文
posted @ 2013-09-04 21:34 forevermemory 阅读(209) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a currency into more than one unit of the same currency. For example, suppose that 1 US Dollar buys 0.5 British pound, 1 British pound buys 10.0 French francs, and 1 French franc buys 0.21 US 阅读全文
posted @ 2013-08-29 10:11 forevermemory 阅读(271) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionOne day , Kiki wants to visit one of her friends. As she is liable to carsickness , she wants to arrive at her friend’s home as soon as possible . Now give you a map of the city’s traffic route, and the stations which are near Kiki’s home so that she can take. You may suppose Kiki 阅读全文
posted @ 2013-08-29 00:40 forevermemory 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗?Input输入包括多组数据。每组数据第一行是两个整数N、M(N#include#includeusing namespace std;const int inf=10000000;int n,m;int p[1005][1005];int visit[1005];int des[1005];int dijkstra(int s){ int i,k,j; 阅读全文
posted @ 2013-08-28 23:27 forevermemory 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海芋,去纽约纯粹看雪景,去巴黎喝咖啡写信,去北京探望孟姜女……眼看寒假就快到了,这么一大段时间,可不能浪费啊,一定要给自己好好的放个假,可是也不能荒废了训练啊,所以草儿决定在要在最短的时间去一个自己想去的地方!因为草儿的家在一个小镇上,没有火车经过,所以她只能去邻近的城市坐火车(好可怜啊~)。I 阅读全文
posted @ 2013-08-28 23:06 forevermemory 阅读(219) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensive to maintain. The Council of Elders must choose t 阅读全文
posted @ 2013-08-28 11:24 forevermemory 阅读(187) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页