- 1、本文档共7页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
acm培训专题规划书_动态规划
ACM-ICPC(重邮赛区)参赛队培训专题计划
培训专题及其所占比例:
搜索:10%
动态规划:15%
贪心算法:约5%
构造:约5%
图论:约10%
计算几何:约5%
纯数学问题:约20%
数据结构:约5%
其它:约25%
第二次专题——动态规划
(1)Jury Compromise
Description
In Frobnia, a far-away country, the verdicts in court trials are determined by a jury consisting of members of the general public. Every time a trial is set to begin, a jury has to be selected, which is done as follows. First, several people are drawn randomly from the public. For each person in this pool, defence and prosecution assign a grade from 0 to 20 indicating their preference for this person. 0 means total dislike, 20 on the other hand means that this person is considered ideally suited for the jury. Based on the grades of the two parties, the judge selects the jury. In order to ensure a fair trial, the tendencies of the jury to favour either defence or prosecution should be as balanced as possible. The jury therefore has to be chosen in a way that is satisfactory to both parties. We will now make this more precise: given a pool of n potential jurors and two values di (the defences value) and pi (the prosecutions value) for each potential juror i, you are to select a jury of m persons. If J is a subset of {1,..., n} with m elements, then D(J ) = sum(dk) k belong to J and P(J) = sum(pk) k belong to J are the total values of this jury for defence and prosecution. For an optimal jury J , the value |D(J) - P(J)| must be minimal. If there are several jurys with minimal |D(J) - P(J)|, one which maximizes D(J) + P(J) should be selected since the jury should be as ideal as possible for both parties. You are to write a program that implements this jury selection process and chooses an optimal jury given a set of candidates.
Input
The input file contains several jury selection rounds. Each round starts with a line containing two integers n and m. n is the number of candidates and m the number of jury members. These values will satisfy 1=n=200, 1=m=20 and of course m=n. The following n lines contain the two
您可能关注的文档
- 2011年滨州学院数学建模比赛选拔(往年数学建模题目评价).doc
- 2011年经济开发区旅游工作总结.doc
- 2011年电大资产评估-判断题.doc
- 2011年秋技能大赛备训-车工集训方案.doc
- 2011年营造林高级工题库.doc
- 2011年水力学二.doc
- 2011年高考地理四川卷(高清含解析).doc
- 2011执业药师考试《中药学》常用歌诀及总结.doc
- 2011执业药师-药化精讲第四讲.docx
- 2011新旧混凝土规范对比.doc
- 人教版小学数学五年级下册第四单元通分.pptx
- 北师大版(2024)初中英语七年级上册Starter Section 6 My Family Members.pptx
- 统编版小学语文二年级下册《“的、地、得”的用法》.pptx
- 第9课《木兰诗》课件 2024—2025学年统编版语文七年级下册.pptx
- 高中语文选择性必修下《茶馆(节选)》.pptx
- 2024年山东省日照市东港区新营中学中考语文三模试卷.docx
- 七下第7课《谁是最可爱的人》课件.pptx
- 八下第9课《桃花源记》课件.pptx
- 15 无言之美 课件(39张PPT).pptx
- 江苏省高邮市2024-2025学年八年级上学期期末语文试卷.docx
文档评论(0)