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: Task schedule
Description There are d. Preemptive constrains are specified by oriented graph without cycles. Arc (_{j}i,j) in this graph means that job i has to be processed before job j. A solution is specified by a sequence of the jobs. For any solution the completion time C is easily determined. _{j}The objective is to find the optimal solution in order to minimize max{ d, 0}._{j}Input The first line contains a single integer d, 0 ≤ _{j}p ≤ 1000, 0 ≤ _{j}d ≤ 1000000, separated by one or more spaces. Line _{j}n+2 contains an integer m (number of arcs), 0 ≤ m ≤ 10*n. Each of the next m lines contains two integers i and j, 1 ≤ i, j ≤ n.Output Each of the Sample Input 2 4 1 4 0 1 1 2 Sample Output 1 2 Source Northeastern Europe 2003, Western Subregion |

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

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

Any problem, Please Contact Administrator