Cookie Cutters
시간 제한1초메모리 제한1024 MB
단순 다각형의 넓이가 A가 되도록 같은 비율로 확대하거나 축소한 뒤, x축과 y축에 닿도록 북동쪽 사분면으로 평행 이동한다.
문제
Theta likes to bake cookies for the upcoming holidays. She has a selection of cookie cutters of different shapes and sizes. She thinks it's unfair that some shapes are larger than others - because even if everyone gets the same number of cookies, some will end up with more dough!
She comes up with a plan to enlarge (or shrink) the cookie cutters' shapes --- while retaining their proportions --- so that all cookies will have the same weight.
Your task in this problem is to help her draw the plans the new cookie cutters will be based on!
입력
The input is a single test case, consisting of one cookie cutter outline. Cookie cutters are modeled as simple polygons. (Simple polygons do not self-intersect.) The first line of input contains a number () denoting the number of corners of the polygon. This is followed by lines containing two floating point numbers and (), each describing a set of coordinates of a polygon point. The coordinates are given in counter-clockwise order.
The next line will contain an integer number () denoting the size of the desired area to which the polygon should be grown or shrunk. (Since the dough is rolled out precisely to an even height everywhere, we can use area to represent weight.) The resized polygon must be similar to the original polygon, that is, all interior angles must be congruent and all corresponding sides must have the same ratio.
출력
Output lines with the , coordinates of the expanded/shrunk polygon. Because these coordinates will be used to draw a new cookie cutter, your new polygon should lie in the north-east quadrant () and it should touch the x- and y-axes in at least one point. More precisely, you must move the resized polygon horizontally and/or vertically so that . You may not, however, rotate or skew the polygon in any way.
Provide your answers as floating point numbers. Your answer will be considered correct if none of the coordinates have an absolute or relative error larger than .