11389 --- The Bus Driver Problem

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&cat
egory=512&page=show_problem&problem=2384