链接:https://ac.nowcoder.com/acm/contest/18453/A 来源:牛客网
题目描述
The coaches in a certain regional are fed up with the judges. During the last contest over 90% of the teams failed to solve a single problem—in fact, even half the judges found the problems too hard to solve. So the coaches have decided to tar and feather the judges. They know the locations of all the judges as well as the locations of tar repositories and feather storehouses. They would like to assign one repository and one storehouse to each judge so as to minimize the total distances involved. But this is a hard problem and the coaches don’t have time to solve it (the judges are evil but not stupid—they have a sense of the unrest they’ve fomented and are getting ready to leave town). So instead they’ve decided to use a greedy solution. They’ll look for the smallest distance between any tar repository and any judge loca