codes for the problems of the spoj