prob_27 flowkater&thswave solve