solved problems at spoj