Kinking Cables
문제
You need to lay a cable to connect two computers with each other. This cable however has a very specific length and you need to use exactly the full length of the cable. Moreover, the cable cannot intersect itself and one part of the cable cannot be too close to another part. Can you connect the two computers with each other using the full length of the cable?
The two computers are standing in an rectangular two-dimensional room. Computer 1 is always positioned at (the upper left corner) and Computer 2 at (the lower right corner). The cable is specified by a sequence of marked points . The path of the cable is then obtained by connecting the consecutive points of this sequence with (straight) line segments. The cable path should satisfy the following constraints:
- None of the line segments within the cable path should intersect.
- The marked points of the path should not be too close to each other: given a point there should be no other marked points strictly within a radius of 1 of , except possibly and (the two consecutive points).
- The path should always start at and end at .
- All points should lie somewhere in the room.
입력
The input consists of:
- One line with two integers and (), the width and height of the room.
- One line with a floating-point number (), the length that the cable should have.
출력
Output the number of points () that the cable path contains, followed by the points of the path, in their respective order. Each point consists of two floating-point numbers and , the - and -coordinates of this point in the path.
The total length of the path should be exactly , up to a relative or absolute error of .
If there are multiple valid solutions, you may output any one of them.
예제
예제 1
3 4 5.0
2 0 0 3 4
예제 2
3 4 7.0
3 0 0 3 0 3 4
예제 3
5 5 11.5
7 0 0 2 0 2 1.75 4 1.75 4 1 5 1 5 5