Canadian Computing Competition: 1997 Stage 2, Day 2, Problem 2
Earth is being attacked by space aliens yet again. The invasion is being tracked by time-lapse photography. Three photographs have been taken at equal time intervals. Your job is to predict the positions of the alien craft in the next photograph, so that they may be intercepted by Earth's defence force. Each alien craft appears as a point of light in the plane of the photograph.
Your input consists of three snapshots of the crafts' positions, taken at
Input Specification
The first line contains a positive integer
Output Specification
Your output is the set of coordinates where the points of light will be Impossible
.
Sample Input 1
2
1.0 1.0
2.0 2.0
2.0 2.0
3.0 3.0
3.0 3.0
4.0 4.0
Sample Output 1
2
4.0 4.0
5.0 5.0
Sample Input 2
3
1.0 1.0
1.0 2.0
1.0 3.0
2.0 1.5
2.0 2.0
2.0 2.5
3.0 1.0
3.0 2.0
3.0 3.0
Sample Output 2
3
4.0 0.0
4.0 2.5
4.0 3.5
Explanation for Sample Output 2
Note that, for the second test case, another valid solution is
Comments