P2212 [USACO14MAR] Watering the Fields S

题目描述

Due to a lack of rain, Farmer John wants to build an irrigation system to send water between his N fields (1

输入格式

输出格式

说明/提示

INPUT DETAILS: There are 3 fields, at locations (0,2), (5,0), and (4,3). The contractor will only install pipes of cost at least 11. OUTPUT DETAILS: FJ cannot build a pipe between the fields at (4,3) and (5,0), since its cost would be only 10. He therefore builds a pipe between (0,2) and (5,0) at cost 29, and a pipe between (0,2) and (4,3) at cost 17. Source: USACO 2014 March Contest, Silver ### 数据规模与约定 对于 $100\%$ 的数据,$1 \le n \le 2000$,$0 \le x_i,y_i \le 1000$,$1 \le c \le 10^6$。 ### 说明 Translated by 一只书虫仔。