Primarily Java code to solve problems from UVa online judge service.