矩阵取数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
有一个 的矩阵,矩阵中的每个数都是整数。
现在要从矩阵中取 个数,要求每一行最多取一个数,每一列也最多取一个数。
这 个数的和最大能是多少?
输入格式
第一行两个数 和 。
接下来 行,每行 个数,表示矩阵。
输出格式
一行一个数,表示选择的 个数的和最大是多少。
样例输入
3 2
1 2 3
4 5 6
7 8 7
样例输出
14
数据规模
的数据,
的数据,
矩阵中的数是不超过的正整数。
CSP-J模拟8
- Status
- Done
- Rule
- OI
- Problem
- 4
- Start at
- 2024-8-10 9:00
- End at
- 2024-8-10 12:00
- Duration
- 3 hour(s)
- Host
- Partic.
- 7