hust 1024 dance party
来源:互联网 发布:淘宝上有特色的礼物店 编辑:程序博客网 时间:2024/05/17 07:50
dance party
Time Limit: 2 Sec Memory Limit: 128 MBSubmissions: 324 Solved: 112
Description
You are organizing a dance party. The party will be attended by n boys and n girls. There will be several rounds of dancing.
In each round, you divide the guests into n dancing pairs. Each guest must be in exactly one pair, and each pair must contain one boy and one girl. Each boy must dance with a different girl in every round. Some boys and girls like each other and some do not. During the party, each boy agrees to dance with at most k girls he doesn't like. Similarly, each girl agrees to dance with at most k boys she doesn't like.
You are given the each pairs of boys and girls who agree to dance with each other .Find out the maximum number of rounds you can organize.
Input
The first line contains a integer t,which means there are t cases followed.
For each case,the first line contain three integer n,m,k ,which means there are n boys and n girls attending the party and m pairs of boys and girls who agree to dance with each other,and each boy or girl agrees to dance with at most k girls or boys he or she doesn't like.At last ,there are m lines with two integers a,b which means boy a and girl b agree to dance with each other.
(0<n<=100,0<m<=n*n,0<k<100,0<a,b<=n)
Output
The output cotains only one integer which means the maximum number of rounds you can organize.
Sample Input
22 4 01 12 22 11 23 7 01 11 21 32 12 23 13 3
Sample Output
22
HINT
Source
lshmouse
[Submit][Status][Discuss]
HOME Back
- hust 1024 dance party
- hust 1024 dance party
- hust 1024 dance party
- HUST [1024] dance party &&HDU Marriage Match II &&HDU Marriage Match III
- Chang'an(Dance Party-贪心)
- 【hust1024】【二分法】【最大流】dance party
- gym 101124 Problem E. Dance Party(概率)
- HUST——1103Party(拓扑排序+个人见解)
- HUST
- HUST
- HUST
- HUST
- 2031 - Dance Dance Revolution
- Party
- Party
- Party
- Party
- Party
- Number Sequence hdu1005
- 如何确定您当前运行的是 32 位还是 64 位的 Windows 版本
- 一个分号将代码效率提升100倍
- SQL SERVER 2000创建多维数据集对应的cub文件
- 简单excel导入数据库
- hust 1024 dance party
- SQL SERVER 2000在哪使用多维表达式
- ld: Unsatisfied symbol 解决办法
- Myeclipse标准工程建立
- 求JFreechart绘制折线图!!高手请进!!急!急!急!
- 不知道怎么安装Hspice,谁可以帮帮我啊~谢啦
- 双核CPU如何关闭一个
- asp.net 缩小上传图片
- Eclipse安装插件Jigloo SWTSwing GUI Builder做图形用户界面编程