update for poj3216, Hungary+floyd