Added SPOJ's WEIGHT.