logo AlgoBeat OnlineJudge
登录 注册

#213574. [GCJ 2009 Finals] Min Perimeter

内存限制:1024 MiB 时间限制:30000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

You will be given a set of points with integer coordinates. You are asked to compute the smallest perimeter of a triangle with distinct vertexes from this set of points.

输入格式

The first line of the input data gives you the number of cases, . test cases follow. Each test case contains on the first line the integer , the number of points in the set. lines follow, each line containing two integer numbers , . These are the coordinates of the -th point. There may not be more than one point at the same coordinates.

输出格式

For each test case, output:

Case #X: Y

where is the number of the test case and is the minimum perimeter. Answers with a relative or absolute error of at most will be considered correct. Degenerate triangles — triangles with zero area — are ok.

样例

样例输入 1

1
10
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9

样例输出 1

Case #1: 5.656854

数据范围与提示

Limits

Small dataset(5 Pts)

  • Time limit: 60 15 seconds.

Large dataset(15 Pts)

  • Time limit: 120 30 seconds.