added uva 628
added uva 677