Solved UVa 10810,1111,11858,and 299