QOJ.ac

QOJ

満点: 100 出力のみ

#13205. Birthday Party

統計

Yaya had a dream. She dreamed it was her birthday and she bought a very, very large cake with $n$ candles on it. "I'm so happy today, $m$ friends have come to my birthday party, and I want to give you all a big piece of cake!"

Yaya wants to cut an $m$-sided piece of cake for everyone. The top view of this piece of cake should be a convex polygon, and there should be a candle at each vertex to make it look solemn and beautiful. But how should she cut it to make the area of this piece of cake as large as possible?

Input

This is an "answer-only" problem. The input files party1.in through party10.in are already provided in the user directory. The first line of the input file contains two integers $n$ and $m$, representing the number of candles and the number of people attending the party, respectively. The following $n$ lines each contain two real numbers $x, y$, representing the coordinates of the $i$-th point. Points are numbered starting from 1. The input is guaranteed to have a solution.

Output

You should place the output files party1.out through party10.out in the user directory; you do not need to submit a program. Each output file contains $m$ lines, each containing an integer representing the index of the $i$-th vertex of the convex polygon. The $m$ vertices should be listed in counter-clockwise order. Other candles may exist inside or on the edges of this polygon, but the indices of these candles should not appear in your output file.

Examples

Input 1

4 3
0 0
0 1
1 0
1 1

Output 1

1
3
4

Note

The four input points are $p_1, p_2, p_3, p_4$, and the output triangle is $p_1-p_3-p_4$. The three points are arranged in counter-clockwise order.

Subtasks

Each test case is worth 10 points. Your score depends on the ratio of the quality of your output compared to the reference answer.

Implementation Details

An output checker party_c is provided for this problem. It can be run as follows:

./party_c 3

This checks if party3.out is correct. If it is correct, the area of the polygon will be displayed.


またはファイルを一つずつアップロード:

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.