Hot Search : Source embeded web remote control p2p game More...
Location : Home Downloads SourceCode Windows Develop
  • Category : Windows Develop
  • Tags :
  • Update : 2012-11-26
  • Size : 63kb
  • Downloaded :0次
  • Author :林总
  • About : Nobody
  • PS : If download it fails, try it again. Download again for free!
Introduction - If you have any usage issues, please Google them yourself
The problem of location selection of post -3 post office is presented Description of laquo: In a city divided between east and west, where the north and south divide into a regular neighborhood, the n settlements are scattered in different ways In the neighborhood. So we're going to use the x-coordinate to represent the east-west direction, and we're going to use the y-coordinate to represent the north and the north. The locations of the settlements can be represented by coordinates (x, y). The distance between any two points in the block (x1,y1) and (x2,y2) can be measured by the numerical |x1-x2|+|y1-y2 |. Residents want to choose the best place to set up a post office in the city, making n settlements the smallest distance from the post office. « programming tasks: Given the location of n settlements, the minimum value of the sum of the distance of n settlements to the post office is programmed. « data input: Input data is provided by input.txt. The first line of the document is the number of residents. And then the n line It is the location of the settlements, each row of two integers x and y, -10000£ x, y£ 10000. « result output: At the end of the program run, the result is output to the file output.txt. The number in line 1 of the file is n Min the sum of the distance to the post office. An example of the input file example output file Input. TXT output. TXT 5 1 2 2 2 1 3 3-2 3 3 10
Packet file list
(Preview for download)
1
.\post.cpp
.\post.pdf
.\post.ppt
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 :
DSSZ is the largest source code store in internet!
Contact us :
1999-2046 DSSZ All Rights Reserved.