Optimization of hard150. solve 2.input