solutions for spoj