C - 工作分配问题
Description
设有n件工作分配给n个人。将工作i分配给第j个人所需的费用为 cij。试设计一个算法,为每一个人都分配1 件不同的工作,并使总费用达到最小。
设计一个算法,对于给定的工作费用,计算最佳工作分配方案,使总费用达到最小。
Input
输入数据的第一行有1 个正整数n (1≤n≤11)。接下来的n行,每行n个数,表示工作费用。
Output
将计算出的最小总费用输出。
Sample
Input
3
10 2 3
2 3 4
3 4 5
Output
9
#include <bits/stdc++.h>
using namespace std;
#define inf 0x3f3f3f3f
int n, m;
int c[25][25