uva1585[Accepted]
uva1357 [Graph]
uva1357 [time limit]