2004年16届国际信息学奥赛试题.pdf

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
2004年第16届 国际信息学奥赛试题解析 (希腊) 第一题阿耳特弥斯 Day 1. Source file Artemis.* Available memory: 16M. Maximum running time: 1S Zeus gave Artemis, the goddess of the ilderness, a rectangular area for gro ing a forest. With the left side of the area as a segment of the positive y-axis and the bottom side as a segment of the positive x-axis, and(0,0) the left bottom corner of the area, Zeus told Artemis to plant trees only on integer coordinate points in the area. Artemis liked the forest to look natural, and therefore planted trees in such a ay that a line connecting t o trees as never parallel to x-axis or y-axis. At times, Zeus ants Artemis to cut trees for him. The trees are to be cut as follo s: 1. Zeus ants at least a given number T of trees to be cut for him. 2. To get a rectangular football pitch for future football success, Artemis is to cut all trees ithin a rectangular area, and no trees outside of it. 3. The sides of this rectangular area are to be parallel to x-axis and y-axis. 4. T o opposite comers of the area must be located on trees and therefore those comer trees are also cut. As Artemis likes the trees, she ants to fulfill these conditions hilst cutting as fe trees as possible. You are to rite a program that, given information on the forest and the minimum number T of trees to be cut, selects an area for cutting trees for Artemis. INPUT The input file name is artemis. in. The first line contains one integer N : the number of trees in the forest. The second line contains one integer T: the minimum number of trees to be cut. The follo ing N lines describe the positions of the N trees. Each of these lines contains t o integers X and Y: the x-coordinate follo ed by the y-coordinate of a tree. OUTPUTS The output f

您可能关注的文档

文档评论(0)

chinaeia + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档