1. 程式人生 > >POJ 2195 Going Home(二分圖最大權值匹配) KM

POJ 2195 Going Home(二分圖最大權值匹配) KM

There are one or more test cases in the input. Each case starts with a line giving two integers N and M, where N is the number of rows of the map, and M is the number of columns. The rest of the input will be N lines describing the map. You may assume both N and M are between 2 and 100, inclusive. There will be the same number of 'H's and 'm's on the map; and there will be at most 100 houses. Input will terminate with 0 0 for N and M.