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: Route Planning
Description Superior Island is a very picturesque island and only bicycles are allowed on the island. Therefore, there are many one-way bicycle roads connecting the different best photo-shooting spots on the island. To help the visitors plan their trip to the island, the tourism commission wants to designate Input There are two parts to the input. The first part of input gives the information of the bicycle roads on the island. The first line contains two integer i denotes the distance from best photo-shooting spot i − 1 to best photo-shooting spot j; the distances are all between 0 and 10, where 0 indicates that there is no one-way road going from best photo-shooting spot i − 1 to spot j.The second part of input has Output Output Sample Input 6 3 0 1 2 0 1 1 1 0 1 1 1 0 0 2 0 1 3 0 4 3 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1 3 5 6 3 2 5 6 1 2 3 4 5 Sample Output 5 0 7 Source |

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

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

Any problem, Please Contact Administrator