SPOJ 28 problems solved