文件名称:sgu264

  • 所属分类:
  • 数学计算/工程计算
  • 资源属性:
  • [C/C++] [源码]
  • 上传时间:
  • 2015-06-15
  • 文件大小:
  • 1kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • owa***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

sgu264:Travel(稳定婚姻问题)

题目大意:

有n个男人和n个女人,每个男人都在心中有对n个女人的喜欢程度,每个女人亦然。求出一种完备匹配的方案使得任意一对男女(除去匹配的n对),满足这对男女之间的喜欢程度不都大于喜欢自己配对对象的程度。-264. Travel



time limit per test: 1 sec.

memory limit per test: 65536 KB

input: standard

output: standard







Travel agency decides to make a summer trip to Petrozavodsk for its best clients. N men and N women were selected to take part in this trip. There are N cars in the travel agency and in each car there are exactly two places for passengers, and one for driver. The head of the customer service of agency decided to place one man and one woman in each car, that s why they decided to ask customers to prepare their preference lists.

The preference list for each person is a list of persons of opposite sex in order best to worst. So, each man lists all women in the order of preference, and vice versa.

Suppose we ve assigned woman and men in such a way that each man has got exactly one woman and each woman has got exactly one man. We ll call this situation a perfect assignment .

If in a perfect assignment there is a pair of man and woman not assigned to each other and th
(系统自动生成,下载前可以参看下载内容)

下载文件列表





sgu264.cpp

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org