A Strange Opera House II

Yesterday evening, I have dreamed of a strange opera house which is in the form of a simple polygon. I was standing on the stage at (x, y) singing “That’s All I Ask of You” with my girlfriend — that’s our favorite song. The walls can reflect our voice at most k times. The following 4 figures show how our voice is reflected. I wonder how much area in opera house could hear our song, either directly or indirectly. Can you tell me? Input The input consists of at most 10 test cases. Each case contains four integers n, k, x and y (3 ≤ n ≤ 50, 0 ≤ k ≤ 5), the number of vertices of the opera house, the maximal number of reflections of our voice, and the location of the stage. The stage will never be on a wall. The following n lines each contain two integers xi and yi, the coordinates of the vertices. The vertices are arranged either clockwise or counterclockwise. The last case is followed by a single zero, which should not be processed. All the coordinates are integers with absolute values not greater than 1000. Output For each test case, print the total area of the places that could hear our song, to two decimal places.

2/2 Sample Input 5 0 100 135 20 200 200 100 300 125 40 10 100 100 8 1 25 15 00 0 20 30 20 30 0 20 0 20 10 10 10 10 0 0 Sample Output 9368.00 466.67