POJ 3189 - Steady Cow Assignment
Problem : N(1<=N<=1000) cows each has a preference rank for M(1<=20<=M) barns. Barns has a limit space. Now assign cows to barn to make the matching's largest rank and smallest rank minimum.
Solution : enum the smallest rank and largest rank, if match get, enlarge the lower bound, otherwise enlarge the upper bound.