- 1、本文档共9页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
省选PKU查漏补缺专题训练
NOI省队第三轮选拔赛-图论算法专题训练试题
[第八组]
【题目一览】
题号 第一题 第二题 第三题 第四题 题目名称 Pigs Life Forms Firing Shoot-out 提交文件 pigs.pas/c/cpp life.pas/c/cpp firing.pas/c/cpp shoot.pas/c/cpp 输入文件 pigs.in life.in firing.in shoot.in 输出文件 pigs.out life.out firing.out shoot.out 时间限制 1s 5s 5s 4s 试题类型 最大流问题 后缀树/后缀数组 最大权闭包 状态压缩动规 难度系数 ★★★★★ ★★★★★ ★★★★★ ★★★★★ 题目出处 POJ1149 POJ3294 POJ2987 POJ3028 题号 第五题 第六题 第七题 第八题 题目名称 Pipes Common Substrings Checking the Text Sequence 提交文件 pipes.pas/c/cpp sub.pas/c/cpp text.pas/c/cpp seq.pas/c/cpp 输入文件 pipes.in sub.in text.in seq.in 输出文件 pipes.out sub.out text.out seq.out 时间限制 1s 5s 8s 2s 试题类型 连通性状态压缩动规 后缀树/后缀数组 后缀数组 + RMQ 后缀数组 难度系数 ★★★★★ ★★★★★ ★★★★ ★★★★ 题目出处 POJ2064 POJ3415 POJ2758 POJ3581
Pigs
【问题描述】
Mirko works on a pig farm that consists of M locked pig-houses and Mirko cant unlock any pighouse because he doesnt have the keys. Customers come to the farm one after another. Each of them has keys to some pig-houses and wants to buy a certain number of pigs.
All data concerning customers planning to visit the farm on that particular day are available to Mirko early in the morning so that he can make a sales-plan in order to maximize the number of pigs sold.
More precisely, the procedure is as following: the customer arives, opens all pig-houses to which he has the key, Mirko sells a certain number of pigs from all the unlocked pig-houses to him, and, if Mirko wants, he can redistribute the remaining pigs across the unlocked pig-houses.
An unlimited number of pigs can be placed in every pig-house.
Write a program that will find the maximum number of pigs that he can sell on that day.
【输入格式】
The first line of input contains two integers M and N, 1=M=1000, 1=N=100, number of pighouses and number of customers. Pig houses are numbered from 1 to M and customers are numbered from 1 to N.
The next line contains M integeres, for each pig-house initial number of pigs. The number of pigs in each pig-house is greater or equal to 0 and less or equal to 1000.
The
您可能关注的文档
- 电工与电子技术 12 门电路和组合逻辑电路(3~4).ppt
- 电工与电子技术 12 门电路和组合逻辑电路(1~2).ppt
- 电工与电子技术 射极输出器.ppt
- 电工与电子技术 基本放大电路.ppt
- 电工与电子教案(门电路)1.doc
- 电工与电子技术2 单相正弦交流电路.ppt
- 电工与电子技术4 一阶线性电路的暂态1.ppt
- 电工知识竞赛20110802.doc
- 电影作品年表.doc
- 电影赏析1.ppt
- 2024年度党员干部民主生活会班子对照检查材料.docx
- 公司党委领导班子2024年度民主生活会对照检查材料4个带头方面.docx
- 市府办(政府办)领导班子2024年民主生活会会后综合情况报告.docx
- 在2025年市司法局信息宣传工作推进会上的讲话.docx
- 在2025年全省文化旅游高质量发展推进会上的讲话.docx
- 在2025年全区工业、住建大规模设备更新推进会上的讲话.docx
- 党支部2024年组织生活会民主评议党员情况总结报告_1.docx
- 2024年度组织生活会个人对照检查剖析材料.docx
- 镇党委书记2024年度民主生活会对照检查材料1.docx
- 党支部2024年组织生活会民主评议党员情况总结报告.docx
最近下载
- 小学二年级下册数学解决问题练习题.pdf VIP
- 2025年食品安全知识考试题库及答案.docx VIP
- 中职英语(高教版)基础模块一Unit6 Food and Drinks Listening and Speaking-优质教学课件PPT.pptx VIP
- 通过戏剧教育提升学生审美能力的研究教学研究课题报告.docx
- 年产运动鞋 400 万双项目环境影响报告表(2021年新版环评).pdf VIP
- 理光MPC3004 3504 4504 6004SP维修手册.pdf VIP
- 院感知识培训课件手卫生.pptx
- 居家用电安全知识ppt课件(完整内容).pptx VIP
- 2025年宜春职业技术学院单招职业适应性测试题库及一套完整答案.docx VIP
- 课题开题报告:新质生产力驱动下技能竞赛优化五育融合育人模式的实践研究.docx VIP
文档评论(0)