This is a personal UVa OJ solution repository. Feel free to review but DO NOT submit it directly.