Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads SourceCode Other source in ebook
  • Category : source in ebook
  • Tags :
  • Update : 2012-11-26
  • Size : 1kb
  • Downloaded :0次
  • Author :be***
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Download1 Download2
Don't use download software fo downloading.
If download fail,Try it again for free.
Introduction - If you have any usage issues, please Google them yourself
算法实验作业 3-3 购物问题 问题描述: 由于换季,某商场推出优惠活动,以超低价格出售若干种商品。但是,商场为避免过分 亏本,规定某些商品不能同时购买,而且每种超低价商品只能买一件。身为顾客的你想获得 最大的实惠,也就是争取节省最多的钱。经过仔细研究过,我们发现,商场出售的超低价商 品中,不存在以下这种情况: n(3≤n)种商品 c1, c2, c3,…, cn,其中 ci和 ci+1是不能同时购买的(i=1, 2, …,n-1),而 且 c1和 cn也不能同时购买。 编程任务: 请编程计算可以节省的最大金额数。 数据输入: 第 1 行两个整数 K,M(1≤K≤1000),其中 K 表示超低价商品数,K 种商品的编号依 次为 1,2, …,K;M 表示不能同时购买的商品对数。 接下来 K 行,第 i 行有一个整数 Xi 表示购买编号为 i 的商品可以节省的金额(1≤Xi ≤100)。 再接下来 M 行,每行两个数 A 和 B,表示 A 和 B 不能同时购买,1≤A≤K,1≤B≤K,A ≠B。 结果输出 输出计算出的能节省的最大金额数
Packet file list
(Preview for download)
shop
....\shop.cpp
Related instructions
  • We are an exchange download platform that only provides communication channels. The downloaded content comes from the internet. Except for download issues, please Google on your own.
  • The downloaded content is provided for members to upload. If it unintentionally infringes on your copyright, please contact us.
  • Please use Winrar for decompression tools
  • If download fail, Try it againg or Feedback to us.
  • If downloaded content did not match the introduction, Feedback to us,Confirm and will be refund.
  • Before downloading, you can inquire through the uploaded person information

Nothing.

Post Comment
*Quick comment Recommend Not bad Password Unclear description Not source
Lost files Unable to decompress Bad
*Content :
*Captcha :
CodeBus is the largest source code store in internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.