VSZM's solutions on SPOJ