正在加载图片...
The input consists of multiple test cases. The first line of each test case contains integers N(O<N<9), which is the number of saplings, and M(0<Ms200), which is the margin ed around each sapling. This line is followed by N additional lines. Each of these N lines contains two integers x and y that describe the Cartesian coordinates of a sapling(hl 100 and b< 100). No two saplings are in the same location. For simplicity the plings can all be considered as points and the thickness of deer-proof fences can be considered zero The last test case is followed by a line containing two zeros Output For each test case, print the case number(starting with 1)followed by the minimum total length of fencing required to protect the saplings with the given margin. Print the length with two digits to the right of the decimal point. Follow the format of the sample outpu Sample Input Output for the sample Input Case 1: length =29. 13 00 Case 2: length 45.13 100Input The input consists of multiple test cases. The first line of each test case contains integers N (0 < N ≤ 9), which is the number of saplings, and M (0 < M ≤ 200), which is the margin required around each sapling. This line is followed by N additional lines. Each of these N lines contains two integers x and y that describe the Cartesian coordinates of a sapling (|x| ≤ 100 and |y| ≤ 100). No two saplings are in the same location. For simplicity the saplings can all be considered as points and the thickness of deer-proof fences can be considered zero. The last test case is followed by a line containing two zeros. Output For each test case, print the case number (starting with 1) followed by the minimum total length of fencing required to protect the saplings with the given margin. Print the length with two digits to the right of the decimal point. Follow the format of the sample output. Sample Input Output for the Sample Input 3 2 0 0 2 0 10 0 3 4 0 0 2 0 10 0 0 0 Case 1: length = 29.13 Case 2: length = 45.13
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有