practice problems from spoj etc.