www.spoj.com/problems/GLJIVE