update for poj2195,binary graph pair，km