Solving the Problems on the page, http://uva.onlinejudge.org.