题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=2645 find the nearest station Description Since dandelion has left the hometown so long,she finds it's difficult to find the station in the city.So she needs you ,a clear programmer, to help her.Now you…
http://acm.hdu.edu.cn/showproblem.php?pid=2645 找出每个点到距离最近的车站的距离. 直接bfs就好. #include <cstdio> #include <queue> #include <cstring> using namespace std; int n,m; ][],dis[][],vis[][]; ][]={-,,,,,,,-}; struct point { int x,y,step; }; int bfs(i…
描述A city is served by a number of fire stations. Some residents have complained that the distance from their houses to the nearest station is too far, so a new station is to be built. You are to choose the location of the fire station so as to reduce…
题目链接: http://poj.org/problem?id=2607 Description A city is served by a number of fire stations. Some residents have complained that the distance from their houses to the nearest station is too far, so a new station is to be built. You are to choose t…
Fire station Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1308 Accepted Submission(s): 434 Problem Description A city's map can be seen as a two dimensional plane. There are N houses in…
Fire Station Time Limit: 5000ms Memory Limit: 65536KB This problem will be judged on PKU. Original ID: 260764-bit integer IO format: %lld Java class name: Main A city is served by a number of fire stations. Some residents have complained that…
C - Fire Station Description A city is served by a number of fire stations. Some residents have complained that the distance from their houses to the nearest station is too far, so a new station is to be built. You are to choose the location of the f…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3879 A famous mobile communication company is planning to build a new set of base stations. According to the previous investigation, n places are chosen as the possible new locations to build those new s…
Base Station Time Limit: 2000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 3879 64-bit integer IO format: %I64d Java class name: Main A famous mobile communication company is planning to build a new set of base statio…