some solutions to programming problems in http://uva.onlinejudge.org