| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1289 人关注过本帖
标题:这个题目该怎么做.翻译一下.
只看楼主 加入收藏
nuciewth
Rank: 14Rank: 14Rank: 14Rank: 14
来 自:我爱龙龙
等 级:贵宾
威 望:104
帖 子:9786
专家分:208
注 册:2006-5-23
结帖率:50%
收藏
 问题点数:0 回复次数:14 
这个题目该怎么做.翻译一下.

A long, linear field has N (1 <= N <= 1,000) clumps of grass at unique integer locations on what will be treated as a number line.Think of the clumps as points on the number line.

Bessie starts at some specified integer location L on the number line (1 <= L <= 1,000,000) and traverses the number line in the two possible directions (sometimes reversing her direction) in order to reach and eat all the clumps. She moves at a constant speed (one unit of distance in one unit of time), and eats a clump instantly when she encounters it.

Clumps that aren't eaten for a while get stale. We say the "staleness" of a clump is the amount of time that elapses from when Bessie starts moving until she eats a clump. Bessie wants to minimize the total staleness of all the clumps she eats.

Find the minimum total staleness that Bessie can achieve while eating all the clumps.

Input
* Line 1 : Two space-separated integers: N and L.
* Lines 2..N+1: Each line contains a single integer giving the position P of a clump (1 <= P <= 1,000,000).


Output
* Line 1: A single integer: the minimum total staleness Bessie can achieve while eating all the clumps.

Sample Input


4 10
1
9
11
19


Sample Output


44

搜索更多相关主题的帖子: 翻译 
2006-10-26 23:10
盖茨他爹
Rank: 6Rank: 6
等 级:贵宾
威 望:28
帖 子:5255
专家分:0
注 册:2005-5-3
收藏
得分:0 
我的英文也很烂,帮你顶
2006-10-26 23:31
honkerman
Rank: 2
等 级:新手上路
威 望:4
帖 子:3078
专家分:0
注 册:2006-8-25
收藏
得分:0 
同上~~

" target="_blank">God Bless You[GLOW=255,#00ff00,2]My Friends![/GLOW]
2006-10-26 23:43
cwande
Rank: 2
等 级:新手上路
威 望:3
帖 子:333
专家分:0
注 册:2006-8-18
收藏
得分:0 
最近搞这个的好象特别多................

汗,都懒得写代码了.......... cheat了一个威望,哈.....
2006-10-26 23:46
nuciewth
Rank: 14Rank: 14Rank: 14Rank: 14
来 自:我爱龙龙
等 级:贵宾
威 望:104
帖 子:9786
专家分:208
注 册:2006-5-23
收藏
得分:0 

楼上的大哥,帮忙翻下了.


倚天照海花无数,流水高山心自知。
2006-10-26 23:49
cwande
Rank: 2
等 级:新手上路
威 望:3
帖 子:333
专家分:0
注 册:2006-8-18
收藏
得分:0 

没人翻译,偶来试一下.
大意是这样:
一块田地上有N(1<=N<=1000)块草丛,田地可看成一条直线,草丛可看成直线上的点.
一个叫贝茜的家伙(貌似是头牛),想吃掉所有的草.她以1m/s的速度移动(当然可以左右移动)
当她到达有草的地方,立即把草吃掉.
然后定义 一块草丛的"staleness" 是贝茜从刚开始移动到吃掉这块草丛的时间.
第一行给出草丛的数量N和贝系的初始位置L,
第二行给出草丛的位置.

当贝系吃完所有的草,求出所能达到的最小的"staleness"..

4 10
1
9
11
19


10->9->11->19->1
1+3+11+29=44


发现自己翻译的真土.........





汗,都懒得写代码了.......... cheat了一个威望,哈.....
2006-10-27 13:49
king_baby
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2006-10-25
收藏
得分:0 
头疼..见到英文头就疼

2006-10-27 14:13
C语言学习者
Rank: 4
等 级:贵宾
威 望:13
帖 子:1278
专家分:0
注 册:2006-9-26
收藏
得分:0 
什么地方拿出来题目。

谁有强殖装甲第二部,可以Q我460054868
2006-10-27 16:36
nuciewth
Rank: 14Rank: 14Rank: 14Rank: 14
来 自:我爱龙龙
等 级:贵宾
威 望:104
帖 子:9786
专家分:208
注 册:2006-5-23
收藏
得分:0 

一块长为N(1<=N<=1000)且被当作由唯一一组数字标示的数字草田。在这个数线上,每一个草块被看成是一个点。
贝西在草田上的某个特定位置(L,1 <= L <= 1,000,000)出发。并且在走这条数字线时允许走两个方向(有时要掉转它的方向)为了够着并且吃完所有的草地。她是以匀速前进的(单位时间单位距离)当她遇到草地时就吃草。
没被吃掉的草会变质。我们说的陈年旧草是指从贝西开始走动到吃完这块草地所需的时间。贝西想她吃完所有草的陈旧时间之和最少。

/*自己瞎翻译出来了,可是做的是错误的*/


倚天照海花无数,流水高山心自知。
2006-10-27 17:29
hyl8729252
Rank: 1
等 级:新手上路
帖 子:22
专家分:0
注 册:2006-6-5
收藏
得分:0 
6楼英语不错啊。
偶的就太烂了!

2006-10-27 17:30
快速回复:这个题目该怎么做.翻译一下.
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037616 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved