欢迎来到冰豆网! | 帮助中心 分享价值,成长自我!
冰豆网
全部分类
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • 党团工作>
  • ImageVerifierCode 换一换
    首页 冰豆网 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    acm第三届河南省大学生程序设计竞赛.docx

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

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    acm第三届河南省大学生程序设计竞赛.docx

    1、acm第三届河南省大学生程序设计竞赛第三届河南省大学生程序设计竞赛主办:河南省计算机学会承办:河南理工大学(正式赛)地点:河南理工大学时间:2010年5月16日所有的题目 时间限制: 1秒【试题一】 房间安排2010年上海世界博览会(Expo 2010),是第41届世界博览会。于2010年5月1日至10月31日期间,在中国上海市举行。本次世博会也是由中国举办的首届世界博览会。上海世博会以“城市,让生活更美好”(Better City, Better Life)为主题,将充分探索21世纪城市生活。这次世博会总投资达450亿人民币,创造了世界博览会史上最大规模记录。吸引200个国家和国际组织参展。

    2、预计有7000万人次的参观者。为了更好地接待在这期间来自世界各地的参观者,如何合理安排各宾馆的住房问题提到了日程。组委会已接到了大量的客房住宿定单,每张定单的内容包括要住宿的房间数,开始住宿时间和要住的天数。为了便于整个城市各宾馆的管理,组委会希望对这些定单进行安排,目的是用尽可能少的房间来满足这些定单,以便空出更多的房间用于安排流动游客。组委会请求DR. Kong来完成这个任务,对这些定单进行合理安排,使得满足这些定单要求的房间数最少。假设:某个定单上的游客一旦被安排到某房间,在他预定住宿的期间内是不换房间的。为了简化描述,定单上的开始住宿时间为距离现在的第几天。例如,定单为(10,30,5

    3、)表示游客要求使用10个房间,第30天开始连住5天。【标准输入】第一行: N 表示定单数 接下来有N行,每行有三个整数 A B C 表示房间数,开始住宿时间和天数【标准输出】输出一个整数,为满足所有定单要求的最少房间数。【约束条件】1N10000 1A10,1B180, 1C10【 样 例 】标准输入标准输出33 10 44 9 33 12 67【试题二】素 数走进世博园某信息通信馆,参观者将获得前所未有的尖端互动体验,一场充满创想和喜悦的信息通信互动体验秀将以全新形式呈现,从观众踏入展馆的第一步起,就将与手持终端密不可分,人类未来梦想的惊喜从参观者的掌上展开。在等候区的梦想花园中,参观者便开

    4、始了他们奇妙的体验之旅,等待中的游客可利用手机等终端参与互动小游戏,与梦想剧场内的虚拟人物Kr. Kong进行猜数比赛。当屏幕出现一个整数X时,若你能比Kr. Kong更快的发出最接近它的素数答案,你将会获得一个意想不到的礼物。例如:当屏幕出现22时,你的回答应是23;当屏幕出现8时,你的回答应是7;若X本身是素数,则回答X;若最接近X的素数有两个时,则回答大于它的素数。【标准输入】第一行: N 要竞猜的整数个数 接下来有N行, 每行有一个正整数 X 【标准输出】输出有N行,每行是对应X的最接近它的素数。【约束条件】1N5 1X1000【 样 例 】标准输入标准输出4225188235197【

    5、试题三】 网络的可靠性 A公司是全球领先的互联网解决方案提供商,也是 2010 年世博会的高级赞助商。它将提供先进的网络协作技术,展示其 智能+互联 的生活概念,同时为参观者提供高品质的个人体验和互动,以“信息通信,尽情城市梦想”为主题贯穿。借助奇幻的剧场大屏幕和特效,展现信息通信技术的应用前景,通过生动形象的故事,向观众展示沟通无限制的未来社会前景。为此,A公司为世博园的N个区域建立了视频通信系统,其中每个区域建立一个基站,编号依次为1,2,N。通过基站之间的通信线路为各区域的参观者提供视频服务。已知在各基站之间已铺设了一些光纤通讯线路,这些线路覆盖了所有区域,即任意两个区域都可以进行视频传

    6、递。但为了节约成本开支,目前只铺设了N-1条线路,同时为了减轻各基站的信息传递负载,每个基站最多有三条光纤通讯线路与之连接。但在通信系统试运行期间, A公司发现当某个基站发生故障时,会导致其它区域之间无法进行信息传递。为了提高该通信网络的可靠性,A公司准备在基站之间再新铺设一些光纤线路,使得任意一个基站故障后,其它基站之间仍然可以通讯。由于铺设线路的成本昂贵,A公司希望新增设的光纤线路越少越好。A公司请求Dr. Kong来完成这个任务。【标准输入】第一行: N 表示有N个基站接下来有N-1行: X Y 表示第X个基站与第Y个基站直连【标准输出】输出一个整数, 表示至少需新铺设的光纤线路数。【约

    7、束条件】 1 N 10000 (线路是双向通信的)【 样 例 】标准输入标准输出81 33 25 35 4 5 62 72 83【试题四】 虚拟城市之旅 展馆是未来城市的缩影,个人体验和互动是不变的主题。在A国展馆通过多维模式和高科技手段,引领参观者在展示空间踏上一段虚拟的城市之旅。梦幻国有N个城市和M条道路,每条道路连接某两个城市。任意两个城市之间最多只有一条道路直接相连。这M条道路中有一部分为单向通行的道路,一部分为双向通行的道路。梦幻国幅员辽阔,各地的资源分布情况各不相同,这就导致了同一种商品在不同城市的价格不一定相同。但是,同一种商品在同一个城市的买入价和卖出价始终是相同的。现在你已踏

    8、上一段虚拟的城市之旅。为了给你一个意外收获,允许你在旅游的同时,利用 X 商品在不同城市中的差价赚回一点旅费,但最多只能交易一次。即,在某个城市买入X 商品,可以走到另外一个城市买掉来获得旅费。当然,在赚不到差价的情况下,你也可以不进行贸易活动。设梦幻国N个城市的标号从1 N,你只能从1 号城市出发,并最终在N 号城市结束自己的旅行。在旅游的过程中,任何城市可以重复经过多次,但不要求经过所有N个城市。例如:梦幻国有5个大城市,城市的编号和道路连接情况如下图,单向箭头表示这条道路为单向通行,双向箭头表示这条道路为双向通行。假设 X 商品在15 号城市的价格分别为 4,3,5,6,1。你可以选择如

    9、下一条线路:1235,并在2 号城市以3 的价格买入X 商品,在3号城市以5 的价格卖出X 商品,赚取的旅费数为2。你也可以选择如下一条线路14545,并在第1次到达5号城市时以1的价格买入X 商品,在第2次到达4号城市时以6 的价格卖出X 商品,赚取的旅费数为5。现在给出N个城市的X 商品价格,M条道路的信息(每条道路所连接的两个城市的编号以及该条道路的通行情况)。请问你能赚取尽可能多的旅费吗。【标准输入】第一行:N M 分别表示城市的数目和道路的数目。第二行:N个正整数,每两个整数之间用一个空格隔开,分别表示1到N个城市的商品价格。接下来 M行,每行有3个正整数,X,Y,Z,每两个整数之间

    10、用一个空格隔开。如果 Z=1,表示这条道路是城市X到城市Y之间的单向道路;如果Z=2,表示这条道路为城市X 和城市Y之间的双向道路。【标准输出】输出1个整数,表示最多能赚取的旅费。如果没有进行贸易,则输出0。【约束条件】1N100000,1M500000,1X,YN,1Z2,1商品价格100。【 样 例 】标准输入标准输出5 54 3 5 6 11 2 11 4 12 3 23 5 14 5 25【试题五】 聪明的“KK”非洲某国展馆的设计灵感源于富有传奇色彩的沙漠中陡然起伏的沙丘,体现出本国不断变换和绚丽多彩的自然风光与城市风貌。展馆由五部分组成,馆内影院播放名为一眨眼的瞬间的宽银幕短片,反

    11、映了建国以来人民生活水平和城市居住环境的惊人巨变。可移动“沙丘”变戏法 的灵感源于其独特而雄伟的自然景观富于传奇色彩的险峻沙丘。宏伟的结构、可循环的建材,与大自然相得益彰。环绕一周,发现它正是从沙丘那不断变换的形态中汲取灵感的。外形逼真到无论从哪个角度去观察,都能清楚地辨识出沙丘的特征。它“坡面”高达20米,微风吹来,你是否感觉到沙的流动?用手去触碰,却发现原来是“魔术戏法”。它表面的不锈钢面板呈现出一种富于变幻的色彩,从不同角度观察,呈现不同色泽,由此来模仿流动沙丘的光感。走进第三展厅有一个超大的屏幕,通过奇妙的特效,让观众犹如亲身来到浩瀚的沙漠。更为奇妙的是,只见一个小动物“KK”正从沙漠

    12、区域(矩形)的左上角沿着向右或向下的方向往右下角跑去。KK太聪明了,它居然能在跑的过程中会选择吃掉尽可能多的虫子线路。你知道它吃掉多少虫子吗?【标准输入】第一行:N M 表示沙漠是一个N*M的矩形区域接下来有N行:每行有M个正整数,Xi1 Xi2 Xim 表示各位置中的虫子数(单个空格隔开)【标准输出】输出有一个整数, 表示“KK”吃掉最多的虫子数。【约束条件】 1 N M 20 0Xij 500 (i=1,2.N, j=1,2,M)假设“KK”只能向右走或向下走。【 样 例 】标准输入标准输出3 43 1 2 85 3 4 61 0 2 324【试题六】AMAZING AUCTION Rec

    13、ently the auction house has introduced a new type of auction, the lowest price auction. In this new system, people compete for the lowest bid price, as opposed to what they did in the past. What an amazing thing! Now you could buy cool stuff with one penny. Your task is to write the software to auto

    14、mate this auction system. First the auctioneer puts an upper limit on bid price for each item. Only positive price less than or equal to this price limit is a valid bid. For example, if the price limit is 100, then 1 to 100, inclusive, are all valid bid prices. Bidder can not put more than one bid f

    15、or the same price on a same item. However they can put many bids on a same item, as long as the prices are different. After all bids are set, the auctioneer chooses the winner according to the following rules: (1). If any valid price comes from only one bidder, the price is a unique bid. If there ar

    16、e unique bids, then the unique bid with the lowest price wins. This price is the winning price and the only bidder is the winning bidder. (2). If there are no unique bids, then the price with fewest bids is the winning bid. If there are more than one price which has the same lowest bid count, choose

    17、 the lowest one. This price is the winning price. The bidder who puts this bid first is the winning bidder. Given the price limit and all the bids that happen in order, you will determine the winning bidder and the winning price. 【Standard input】The first line contains two integers: U (1 = U = 1000)

    18、, the price upper limit and M (1 = M = 100), the total number of bids. M lines follow, each of which presents a single bid. The bid contains the bidders name (consecutive non-whitespace characters=5) and the price P (1 = P = U), separated with a single space. All bids in the input are guaranteed to

    19、be valid ones. 【Standard output】Print the sentence The winner is W on the first line, and The price is P on the second. 【Sample Input】 30 7 Mary 10 Mary 20Mary 30Bob 10Bob 30Carl 30Alice 23【Sample Output】The winner is MaryThe price is 20【试题七】BUYING FEEDFarmer John needs to travel to town to pick up

    20、K (1 = K = 100)pounds of feed. Driving D miles with K pounds of feed in his truck costs D*K cents.The county feed lot has N (1 = N = 100) stores (conveniently numbered 1.N) that sell feed. Each store is located on a segment of the X axis whose length is E (1 = E = 350). Store i is atlocation X_i (0

    21、X_i E) on the number line and can sell John as much as F_i (1 = F_i = 100) pounds of feed at a cost of C_i (1 = C_i = 1,000,000) cents per pound. Amazingly, a given point on the X axis might have more than one store.Farmer John starts at location 0 on this number line and can drive only in the posit

    22、ive direction, ultimately arriving at location E, with at least K pounds of feed. He can stop at any of the feed stores along the way and buy any amount of feed up to the the stores limit.What is the minimum amount Farmer John has to pay to buy and transport the K pounds of feed? Farmer John knows t

    23、here is a solution.Consider a sample where Farmer John needs two pounds of feed from three stores (locations: 1, 3, and 4) on a number line whose range is 0.5: 0 1 2 3 4 5 - 1 1 1 Available pounds of feed 1 2 2 Cents per poundIt is best for John to buy one pound of feed from both the second and thir

    24、d stores. He must pay two cents to buy each pound of feed for a total cost of 4. When John travels from 3 to 4 he is moving 1 unit of length and he has 1 pound of feed so he must pay 1*1 = 1 cents.When John travels from 4 to 5 he is moving one unit and he has 2 pounds of feed so he must pay 1*2 = 2

    25、cents. The total cost is 4+1+2 = 7 cents.【Standard input】Line 1: Three space-separated integers: K, E, and NLines 2N+1: Line i+1 contains three space-separated integers: Xi Fi Ci【Standard output】A single integer that is the minimum cost for FJ to buy and transport the feed【Sample input】 【Sample outp

    26、ut】2 5 3 73 1 24 1 21 1 1【试题八】ROOM ASSIGNATIONThe “cows” are journeying north to Thunder Bay in Canada to gain cultural enrichment and enjoy a vacation on the sunny shores of Lake Superior. Bessie, ever the competent travel agent, has named the Bullmoose Hotel on famed Cumberland Street as their vac

    27、ation residence. This immense hotel has N (1 = N = 50,000) rooms all located on the same side of an extremely long hallway (all the better to see the lake, of course).The “cows” and other visitors arrive in groups of size D_i (1 = D_i = N) and approach the front desk to check in. Each group i reques

    28、ts a set of D_i contiguous rooms from Canmuu, the moose staffing the counter. He assigns them some set of consecutive room numbers r.r+D_i-1 if they are available or, if no contiguous set of rooms is available, politely suggests alternate lodging. Canmuu always chooses the value of r to be the small

    29、est possible.Visitors also depart the hotel from groups of contiguous rooms. Checkout i has the parameters X_i and D_i which specify the vacating of rooms X_iX_i+D_i-1 (1 = X_i = N-D_i+1). Some (or all) of those rooms might be empty before the checkout.Your job is to assist Canmuu by processing M (1

    30、 = M 50,000) checkin/checkout requests. The hotel is initially unoccupied.【Standard input】 Line 1: Two space-separated integers: N and MLines 2.M+1: Line i+1 contains request expressed as one of two possible formats:(a) Two space separated integers representing a check-in request: 1 and D_i (b) Thre

    31、e space-separated integers representing a check-out: 2, X_i, and D_i【Standard output】 Lines 1.: For each check-in request, output a single line with a single integer r, the first room in the contiguous sequence of rooms to be occupied. If the request cannot be satisfied, output 0.【Sample input】 【Sample output】10 6 11 3 41 3 71 3 01 3 52 5 51 6


    注意事项

    本文(acm第三届河南省大学生程序设计竞赛.docx)为本站会员主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(点击联系客服),我们立即给予删除!

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




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2022 冰点文档网站版权所有

    经营许可证编号:鄂ICP备2022015515号-1

    收起
    展开