UVA coding problems