Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|

Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |

Language: Rectilinear polygon
Description Given is Input The first line of input is an integer giving the number of cases that follow. The input of each case starts with an integer 4 ≤ pairs of integers specifying the and coordinates of the points for this case. Output The output should contain one line for each case on input. Each line should contain one integer number giving the length of the rectilinear polygon passing throught the given points when it exists; otherwise, it should contain Sample Input 1 8 1 2 1 0 2 1 2 2 3 2 3 1 4 0 4 2 Sample Output 12 Source Waterloo Local Contest, 2006.9.30 |

[Submit] [Go Back] [Status] [Discuss]

All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di

Any problem, Please Contact Administrator