400403: GYM100162 J Tourist Problem

Memory Limit:256 MB Time Limit:10 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

J. Tourist Problemtime limit per test10 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

"One does not simply set up a tourist tent", Gennady said.

As you probably know Gennady is a tourist. Now he is in a forest consisting of n trees. No three trees are on the same line. It is evening and Gennady wants to set up a tourist tent.

To set up a tourist tent he should choose k trees forming a convex polygon. There is an additional restriction: there must be exactly one tree inside the polygon to be used as a pole to maintain the tent.

Gennady can't decide which trees will be used. He decides to analyze each valid set of k trees. It is not a problem for him to count them.

Imagine that you are a tourist and count the number of valid tree sets to set up a tent.

Input

The input contains several test cases. Each test case starts with a line containing two positive integers n, k (1 ≤ n ≤ 250, 3 ≤ k ≤ 10) as described above. The following n lines contain a pair of integer coordinates (xi, yi) of the i-th tree. The absolute values of the coordinates never exceed 104. No three trees are located on the same line. The given n points are distinct.

Output

For each test case, display the case number and the required number of valid polygons. It is guaranteed that the answer fits in signed 64-bit integer type.

ExamplesInput
5 3
0 10
10 0
10 10
0 0
1 2
5 4
0 10
10 0
10 10
0 0
1 2
Output
Case 1: 2
Case 2: 1

加入题单

算法标签: