Update Hungarian algo with max-input