- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 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
您可能关注的文档
- 【人教版】2019年高考英语一轮复习方案配套练习:必修1-作业手册(含解析).pdf
- 【人教版】2019年高考英语一轮复习方案配套练习:必修2-作业手册(含解析).pdf
- 【人教版】2019年秋高中化学必修1单元综合检测试题及答案(1-4).pdf
- 【山东省枣庄市】2017年高考二模数学(文科)试卷(附答案).pdf
- 【上海市】2017年高考生物试卷(附答案与解析).pdf
- 【省会检测】2018年安徽省合肥市高考数学二模试卷(文科).pdf
- 【市级联考】浙江省丽水市2019届高三5月模拟(含听力)英语试题(解析版).pdf
- 【试卷】2019年山东省威海市中考生物试卷-40dde11444ed44c5b9c227d05af.pdf
- 【试题】2020届新高考研究联盟高三技术12月适应性考试试题.pdf
- 【天津市耀华中学】2017届高三上学期统练语文试卷(一)(附答案与解析).pdf
最近下载
- 2022东君照明集中控制系统用户手册.docx VIP
- 〖GB50011-2016〗建筑抗震设计规范(2016年版).docx VIP
- 《浙江省建设工程其他费用定额》(2018版).docx
- 怎样恢复已删除的文件.doc VIP
- 2025年中国铁道橡胶垫板数据监测报告.docx
- 2023-2024全国初中物理竞赛试题精选精编第05讲凸透镜成像(解析版).docx VIP
- 2001-2016年电子科技大学《601数学分析》历年考研真题汇总(含部分答案).pdf VIP
- 古典文献学第二章 文献的形成和流布.ppt VIP
- 2025年综合窗口岗位工作人员招聘考试笔试试题(附答案).docx VIP
- 纪念中国红军长征胜利89周年PPT课件.pptx VIP
文档评论(0)