CodePudding user response:
The idea is simpleEach line - the total amount of the line, the average amount is the amount of each row of the first man should take, is the rest of the people should be spending an average amount
This back and statistics about spending, finally back - spending is the back your money, negative means to spending
Code LZ write yourself, have a problem ask