Codes for UVA problems