Solutions for UVA problems.