Silph company deployed a passenger flow analysis system in a clothing store that captures photos of human faces and photos of human bodies in real time.
In order to analyze the passenger flow better, the system will associate human faces with human bodies. In other words, there are some edges connecting faces with bodies. Each edge has a positive weight.
However, due to lack of precision and accuracy of the algorithms provided by this company, these associations may not be completely correct.
In a correct relationship, one human face can associate with multiple human bodies (one person may change multiple suits of clothes), but one human body cannot associate with multiple human faces.
Now Bulbasaur works as an intern at Silph company and the boss asks him to solve this problem. Bulbasaur is supposed to find an association relationship, such that the sum of weights of the association edges is maximum.
输入描述:
The input starts with one li