Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads SourceCode Mathimatics-Numerical algorithms Algorithm
  • Category : Algorithm
  • Tags :
  • Update : 2013-04-11
  • Size : 1kb
  • Downloaded :0次
  • Author :l****
  • 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
Problem Description: n heap stones placed around a playground. Now want to stone in order to merge into a pile. Provision for at least selected pile up election k to heap stones merger into a new pile of combined costs for the new pile of stones number. Try to design an algorithm to calculate the maximum total cost and minimum total cost of n heap stones combined into a pile. Programming tasks: For a given n heap stones, programming calculation merged into a bunch of maximum total cost and minimum total cost. Input test data the first row there are two positive integers n and k, n heap stones, each time at least one selected two heap up selected k heap stones merge. The second row has n numbers denote the number of each heap stones. Output Output maximum total cost and minimum total cost, separated by a space, each answer a row. Sample Input 7 3 45 13 12 16 9 5 22 Sample Output 593 1
Packet file list
(Preview for download)


code.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 one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.