some solutions to problems on uva and hackerrank