电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本
换一换
首页 金锄头文库 > 资源分类 > DOC文档下载
分享到微信 分享到微博 分享到QQ空间

精校word版---2002年第14届国际信息学奥赛试题

  • 资源ID:92714807       资源大小:16.95MB        全文页数:73页
  • 资源格式: DOC        下载积分:8金贝
快捷下载 游客一键下载
账号登录下载
微信登录下载
三方登录下载: 微信开放平台登录   支付宝登录   QQ登录  
二维码
微信扫一扫登录
下载资源需要8金贝
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
支付方式: 支付宝    微信支付   
验证码:   换一换

 
账号:
密码:
验证码:   换一换
  忘记密码?
    
1、金锄头文库是“C2C”交易模式,即卖家上传的文档直接由买家下载,本站只是中间服务平台,本站所有文档下载所得的收益全部归上传人(卖家)所有,作为网络服务商,若您的权利被侵害请及时联系右侧客服;
2、如你看到网页展示的文档有jinchutou.com水印,是因预览和防盗链等技术需要对部份页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有jinchutou.com水印标识,下载后原文更清晰;
3、所有的PPT和DOC文档都被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;下载前须认真查看,确认无误后再购买;
4、文档大部份都是可以预览的,金锄头文库作为内容存储提供商,无法对各卖家所售文档的真实性、完整性、准确性以及专业性等问题提供审核和保证,请慎重购买;
5、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据;
6、如果您还有什么不清楚的或需要我们协助,可以点击右侧栏的客服。
下载须知 | 常见问题汇总

精校word版---2002年第14届国际信息学奥赛试题

2002年第14届国际信息学奥赛试题解析韩 国第一题 成古利青蛙Day 1. a gameIn Korea, the naughtiness of the cheonggaeguri, a small frog, is legendary, This is a well-deserved reputation, because the frogs jump through your rice paddy at night, flattening rice plants. In the morning, after noting which plants have been flattened, you want to identify the path of the frog which did the most dam age. A frog always jumps through the paddy in a straight line, with every hop the same length:Your rice paddy has plants arranged on the intersection points of a grid as shown in Figure-1, and the troublesome frogs hop completely through your paddy, starting outside the paddy on one side and ending outside the paddy on the other side as shown in Figure-2:Many frogs can jump through the paddy, hopping from rice plant to rice plant, Every hop lands on a plant and flattens it, as in Figure-3. Note that some plants may be landed on by more than one frog during the night. Of course, you can not see the lines showing the paths of the frogs or any of their hops outside of your paddy-for the situation in Figure-3. what you can see is shown in Figure-4:From Figure-4, you can reconstruct all the possible paths which the frogs may have followed across your paddy. You are only interested in frogs which have landed on at least 3 of your rice plants in their voyage through the paddy. Such a path is said to be frog path. In this case, that means that the three paths shown in Figure-3 are frog paths(there are also other possible frog paths). The vertical path down column 1 might have been a frog path with hop length 4 except there are only 2 plants flattened so we are not interested; and the diagonal path including the plants on row 2 col. 3, row 3 col. 4, and row 6 col. 7 has three flat plants but there is no regular hop length which could have spaced the hops in this way while still landing on at least 3 plants, and hence it is not a frog path. Note also that along the line a frog path follows there may be additional flattened plants which do not need to be landed on by that path(see the plant at (2,6) on the horizontal path across row 2 in Figure-4), and in fact some flattened plants may not be explained by any frog path at all.Your task is to write a program to determine the maximum number of landing in any single frog path(where the maximum is taken over all possible frog paths). In Figure-4 the answer is 7, obtained from the frog path across row 6.INPUTYour program is to read from standard input. The first line contains two integers R and C, respectively the number of rows and columns in your rice paddy, 1R,C5000. The second line contains the single integer N, the number of flat-tenedrice plants, 3N5000. Each of the remaining N lines contains two intergers, the row number (1row numberR) and the column number(1column numberC)of a flattened rice plant, separated by one blank. Each flattened plant is only listed once.OUTPUTYour program is to write to standard output. The output contains one line with a single integer, the number of plants flattened along a frog path which did the most damage if there exists at least on frog path, otherwise, 0.EXAMPLE INPUTS AND OUTPUTSExample 1: input output(the example of Figure -4)6 7142 16 64 22 52 62 73 46 16 22 36 36 46 56 77Example 2: input(the example of Figure -5)6 7181 16 23 51 54 71 21 41 61 72 12 32 64 24 44 55 46 55 6output 4SCORINGIf your program outputs the correct answer for a test case within the time limit, then you get full points for the test case, and otherwise you get 0 points.参考译文:(day 1文件名frog. *内存限制:64MB,时间限制2s)问题描述:在韩国,成古利(一种小青蛙)的顽皮是众所皆知的,且名符其实,因为这种青蛙在晚上一路跳跃过你的稻田,并踩平稻作物。在早上,看过被踩平的稻作物后,你要找出造成最 大伤害的那条青蛙踩过的路径。青蛙永远以直线跳跃过稻田 每个跳跃的长度皆相同如Figure1所示,稻作物种在格子点上。如Figure2所示,麻烦的青蛙由稻田的一侧跳入,一路跳跃至稻田的另一侧离开。青蛙从一株稻作物跳跃到另一株稻作物,如Figure3所示,每一个跳跃踩平所处之稻作物。请注意:有些稻作物可能被一只以上的青蛙踩平过。以Figure3为例,你无法看到稻田外之青蛙跳跃路径。Figure3为你所观察到的现象。从Figure4,你将可以重建青蛙跳跃过的所有可能路径。你有兴趣的路径应该至少有3株稻作物被踩平,这种路径叫做青蛙路径。Figure3标示的三个路径口是青蛙路径(当然也有可能还有其他的青蛙路径)。例如,我们对第一行上的路径没有兴趣,因灾此路径只有2株稻作物被踩平(跳跃长度是4),另外跳跃过(列2行3),(列3行4)及(列6行7)之斜角路径,虽然有二株稻作物被踩平,但因为跳跃长度并不规则,所以不是合法路径。请注意,有些踏平的稻作物无法由任何青蛙路径来解释,如Figure 4内第二列中踏平之踩作物可以为一个青蛙路径掺杂其他原因所踏平之稻作物,如(列2行6)之稻作物。你的任务是写一个程序在所有可能的青蛙路径中,找到具有被踩平最多稻作物之所属的青蛙路径(即引起稻作物最大伤害)。在Figure 4中列6中之青蛙路径,产生答案7。输入:你的程序将由标准输入读入。第一行包括两个整数R和C,分别是你的稻田的列和行数,1<=R,c<=5000。第二行包括单一个整数N,其为被踩平稻作的个数,3< = N < = 5000。剩下的N行,每行包括两个整数,即为被踩平稻作物的列号码(1< = 列号码 < = R)和行号码(1 < = 行号码< = C),用一个空白间隔。每株被踩平的稻作物只列出一次。输出:你的程序将写到标准输出。输出单一个整数在一行。如果存在任何合法之青蛙路径,找出具有最大伤害之青蛙路径,并输出此青蛙路径所属的踩平之稻作物数;否则输出0。输入输出样例:样例1:(图四的例子)frog. in6 7142 16 64 22 5

注意事项

本文(精校word版---2002年第14届国际信息学奥赛试题)为本站会员(刚**)主动上传,金锄头文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即阅读金锄头文库的“版权提示”【网址:https://www.jinchutou.com/h-59.html】,按提示上传提交保证函及证明材料,经审查核实后我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.