2 shunfurh shunfurh 于 2017.09.09 20:54 提问

Request for Proposal

When government, military, or commercial agencies wish to make a major purchase, they first issue a Request for Proposal (RFP) which lists a number of requirements that must be met by a successful proposal. Competing suppliers issue Proposals, indicating which of the requirements are met, and a price that will be charged should the proposal be accepted by the agency issuing the RFP.

Because the agencies are staffed by bureaucrats and are accountable to other agencies staffed by bureaucrats, it is necessary to remove all human judgement from the selection process. To this end, those evaluating the proposals are given feature sheets, which have one column for each requirement and an additional column for price, and one row for each Proposal. The evaluator reads each proposal and identifies each requirement that is met; for each such requirement a check mark is placed in the corresponding row (for the Proposal) and column (for the requirement). After all proposals have been evaluated, the number of check marks in each row is added. Any proposal that has the same number of check marks as the number of requirements is said to be compliant; otherwise the proposal is said to be partially compliant. Many agencies award the contract to the lowest compliant proposal; that is the compliant proposal with the lowest price. If there is no compliant proposal, many agencies evaluate partial compliance according to the following formula:
number_of_requirements_met
compliance = --------------------------
number_of_requirements

Your job is to select the Proposal with the highest compliance; if several proposals have the same compliance you are to select from these proposals the one with the lowest price. If several proposals have the same compliance and price you are to select the first one in the input.

Input

Your input will consist of the information for a number of RFPs and associated proposals. The information for each RFP will consist of:
a line containing two integers: 0 < n <= 1000, the number of requirements, and p the number of proposals. The line 0 0 indicates there are no more RFPs.

n lines naming the requirements. Each requirement is a string up to 80 characters long, terminated by the end of line. All strings are case sensitive.

for each of the p proposals:

a line naming the proposal (up to 80 characters terminated by end of line)

a line containing a floating point number d and an integer 0 <= r <= n: d is the price; r is the number of met requirement lines to follow.

for each met requirement, the name of the requirement, each on a separate line. All requirements are from the RFP requirement list, and no requirements are duplicated.

Output

For each RFP, give the number of the RFP (see sample) followed by the name of the best proposal, optimizing the criteria given above. Leave a blank line between the output for each pair of RFPs.

Sample Input

6 4
engine
brakes
tires
ashtray
vinyl roof
trip computer
Chevrolet
20000.00 3
engine
tires
brakes
Cadillac
70000.00 4
ashtray
vinyl roof
trip computer
engine
Hyundai
10000.00 3
engine
tires
ashtray
Lada
6000.00 1
tires
1 1
coffee
Starbucks
1.50 1
coffee
0 0

Sample Output

RFP #1
Cadillac

RFP #2
Starbucks

1个回答

caozhy
caozhy   Ds   Rxr 2017.09.26 16:34
已采纳
Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!
其他相关推荐
request for proposal
request for proposal
CCAPI Common Graphics Exchange RFP 2-01.pdf
CCAPI Task Force Common Graphics Exchange Request for Proposal Draft Version 2.0 英文版
UVa 10141 - Request for Proposal
题目:政府要做n个项目,对p个公司招标,政府想知道哪家公司能做的项目最多并且花费更少。 分析:简单题。因为每个厂家提供的方案都在招标的列表中,直接计数比较即可。 说明:注意数据格式,有几天没刷题了,要赶快不少( ⊙ o ⊙ )啊!。 #include #include #include #include #include #include #include using nam
交行信贷分析系统proposal
交行信贷分析系统proposal交行信贷分析系统proposal交行信贷分析系统proposal交行信贷分析系统proposal
【计算机视觉】detection/region/object proposal 方法综述文章
目录(?)[-] Papers大纲各种OP方法的回顾 Grouping proposal methodsWindow scoring proposal methodsAliternate proposal methodsBaseline proposal methods 各种OP方法对于复现的鲁棒性的讨论各种OP方法的recall各种OP方法在实际做detection任务时候的效果全
目标检测中region proposal的作用
作者:YJHMITWEB链接:https://www.zhihu.com/question/265345106/answer/294410307来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。首先我们明确一个定义,当前主流的Object Detection框架分为1 stage和2 stage,而2 stage多出来的这个stage就是Regional Proposa...
Research Proposal for PhD Studies
Research Proposal for PhD Studies博主 的留学读博研究计划Hosting institution: Seoul National University Research Title: Design of digital shipyard on the application of PLM Duration of study: 48 months (from XXX
Region Proposal Network
RPN
【计算机视觉】Object Proposal之BING理解
发现: 本论文主要有两大亮点。第一个亮点是发现了在固定窗口的大小下,物体与背景的梯度模式有所不同。如图1所示。图1(a)中绿框代表背景,红框代表物体。如果把这些框都resize成固定大小,比如8X8,然后求出8X8这些块中每个点的梯度(Normed Gradient,本文的结果为[0,255],之前看错成Normalized...估计这里的normed就是指窗口都resize成8X8),
目标检测特殊层:Proposal层
1:anchor_target_Layer函数功能    该函数生成anchors,之后随机的挑选256个anchors,包含正负样本的总和256个anchors,之后计算这256个anchors的去回归出来预测框,正样本有预测框,负样本没有预测的框,之后把这256个预测的anchors去计算softmaxLoss和SmoothL1Loss;第一个阶段的loss反向传播,该层只是生成了rpn_la...