{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eLegend has it that in a distant place, there was a very wealthy village. One day, the village chief decided to carry out a reform: to redistribute houses.\u003cbr\u003eThis was a big deal, as it involved the housing issue of the people. There were a total of n rooms in the village, just enough for n families. Considering that each family must have a house to live in (if there are people without houses, it may cause instability), each family must be allocated one house and can only get one house.\u003cbr\u003eOn the other hand, the village chief and other village leaders hoped to maximize the benefits, so that the village institutions would have money. Since the people were relatively wealthy, they could offer a certain price for each house within their economic range. For example, if there are 3 houses, a family can offer 100,000 for the first house, 20,000 for the second house, and 200,000 for the third house (of course, within their economic range). Now the problem is how the village leaders can distribute the houses to maximize income. (Even if a villager has enough money to buy a house, they may not necessarily be able to buy one; it depends on the distribution by the village leaders).\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input data contains multiple sets of test cases. The first line of each group of data inputs n, indicating the number of houses (also the number of families), followed by n lines, each with n numbers indicating the price the i-th villager offers for the j-th house (n\u003c\u003d300).\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"Please output the maximum income value for each set of data, with each set\u0027s output taking up one line.\u003cbr\u003e\u003cbr\u003e"}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\r\n100 10\r\n15 23\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e123\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}