文件名称:2
介绍说明--下载内容均来自于网络,请自行研究使用
羽毛球队有男女运动员各n人。给定2 个n×n矩阵P和Q。P[i][j]是男运动员i和女运动员j配对组成混合双打的男运动员竞赛优势;Q[i][j]是女运动员i和男运动员j配合的女运动员竞赛优势。由于技术配合和心理状态等各种因素影响,P[i][j]不一定等于Q[j][i]。男运动员i和女运动员j配对组成混合双打的男女双方竞赛优势为P[i][j]*Q[j][i]。设计一个算法,计算男女运动员最佳配对法,使各组男女双方竞赛优势的总和达到最大。
输入:。第一行有1 个正整数n (1≤n≤20)。接下来的2n行,每
行n个数。前n行是p,后n行是q。
输出:一行:男女双方竞赛优势的总和的最大值
-Badminton team has the n-person male and female athletes. Given two n × n matrix P and Q. P [i] [j] is the male athletes and female athletes i j composed of mixed doubles pair of male athletes race superiority Q [i] [j] i and female athletes with male athletes, female athletes contest j advantage. Mental state due to technical cooperation and other factors, P [i] [j] is not necessarily equal to Q [j] [i]. Male Athlete of the i and j are paired into a female athlete mixed doubles competition advantages for both men and women P [i] [j]* Q [j] [i]. Design an algorithm to calculate the best sportsmen and women pair method, so that competition benefits both men and women in each group the sum of the maximum.
Input:. The first line has a positive integer n (1 ≤ n ≤ 20). The next 2n lines, each
N number of rows. First n rows is p, after n line is q.
Output: line: the sum of both men and women race the maximum advantag
输入:。第一行有1 个正整数n (1≤n≤20)。接下来的2n行,每
行n个数。前n行是p,后n行是q。
输出:一行:男女双方竞赛优势的总和的最大值
-Badminton team has the n-person male and female athletes. Given two n × n matrix P and Q. P [i] [j] is the male athletes and female athletes i j composed of mixed doubles pair of male athletes race superiority Q [i] [j] i and female athletes with male athletes, female athletes contest j advantage. Mental state due to technical cooperation and other factors, P [i] [j] is not necessarily equal to Q [j] [i]. Male Athlete of the i and j are paired into a female athlete mixed doubles competition advantages for both men and women P [i] [j]* Q [j] [i]. Design an algorithm to calculate the best sportsmen and women pair method, so that competition benefits both men and women in each group the sum of the maximum.
Input:. The first line has a positive integer n (1 ≤ n ≤ 20). The next 2n lines, each
N number of rows. First n rows is p, after n line is q.
Output: line: the sum of both men and women race the maximum advantag
(系统自动生成,下载前可以参看下载内容)
下载文件列表
运动员最佳匹配问题.cpp