|  | 
|  | 
| back to board | What about the sample input? Posted by ValBG  7 May 2003 15:20My program uses the following method:I choose the upper, lower and rightmost points and then sort them
 in the order they were visited. Suppose their coordinates are
 (x1,y1), (x2,y2), (x3,y3), where 1 was the first visited, 2 - second
 and 3 - third.
 Then I put them in a martix
 x1 y1 1
 x2 y2 1
 x3 y3 1
 and calculate D=x1*y2*1-x3*y2*1. If D>0, the 3 points are oriented
 clockwise. When D<0, then orientation is counterclockwise.
 But what happens when D=0? And why is my method wrong for the
 sample input?
 Pls help me!
 Vallery777@yahoo.com
 | 
 | 
|