2

所属分类:数据结构
开发工具:Visual C++
文件大小:1KB
下载次数:17
上传日期:2011-11-24 23:19:04
上 传 者passion220
说明:  羽毛球队有男女运动员各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)

文件列表:
运动员最佳匹配问题.cpp (1613, 2011-06-04)

近期下载者

相关文件


收藏者