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: Repairing Company
Description Lily runs a repairing company that services the t on any repairman’s arrival, which is also its starting time, and takes a single repairman _{i}d time to finish. Repairmen work alone on all tasks and must finish one task before moving on to another. With a map of the city in hand, Lily want to know the minimum number of repairmen that have to be assign to this day’s tasks._{i}Input The input contains multiple test cases. Each test case begins with a line containing means a bidirectional road connects the _{ij}ith and the jth blocks and requires δ time to go from one end to another. If δ_{ij} = −1, such a road does not exist. The matrix is symmetric and all its diagonal elements are zeroes. Right below the matrix are _{ij}M lines describing the repairing tasks. The ith of these lines contains p, _{i}t and _{i}d. Two zeroes on a separate line come after the last test case._{i}Output For each test case output one line containing the minimum number of repairmen that have to be assigned. Sample Input 1 2 0 1 1 10 1 5 10 0 0 Sample Output 2 Source POJ Monthly--2007.04.01, crazyb0y |

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

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

Any problem, Please Contact Administrator