added solution to UVa 10827-Maximum sum on a torus