- 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
您可能关注的文档
最近下载
- 八年级物理上册《透镜》练习题(含答案解析) .pdf
- 插花与花艺设计(花道——插花技艺养成)智慧树知到期末考试答案章节答案2024年云南林业职业技术学院.docx
- 四书精读教学-《四书》精读课堂笔记.docx VIP
- 2022年青岛版五四制三年级上册数学典型应用题105道.pdf
- 国旗下讲话:远离垃圾食品,享受健康生活.doc
- 幼儿园课件:第八章--学前儿童的情绪和情感.pptx
- 部编版语文九年级下册课内外古诗词(共17首)阅读理解题背诵-中考考点汇总(全册-含答案).doc VIP
- 第一章立体构成概述 .ppt
- 2024年河北省继续医学教育公共选修课参考答案.pdf VIP
- 《立体构成》课件 第一章 立体构成概述.ppt
文档评论(0)