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: Tallest Cow
Description FJ's FJ has made a list of For each cow from 1.. Input Line 1: Four space-separated integers: N, I, H and R
Lines 2.. R+1: Two distinct space-separated integers A and B (1 ≤ A, B ≤ N), indicating that cow A can see cow B.Output Lines 1.. N: Line i contains the maximum possible height of cow i.Sample Input 9 3 5 5 1 3 5 3 4 3 3 7 9 8 Sample Output 5 4 5 3 4 4 5 5 5 Source |

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

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

Any problem, Please Contact Administrator