Solved UVa 10815 and 11062