solutions to some UVA problems