CodeFoeces-707B

题目

原题链接:B. Bakery

题意

有n座城市,m个双向道,k个面粉店。现要要在没有面粉店的城市开一所面包店,问该城市离面粉店的最短距离。
参考了其他作者的代码和思路,由小到大排列找到最小的且离面粉点最近的城市。

代码

#include
using namespace std;
#define int64 __int64
struct node{
    int64 x,y,l;
}s[100010];
int cmp(node a,node b){
    return a.l

你可能感兴趣的:(CodeFoeces-707B)