题目链接:https://vjudge.net/problem/POJ-3189 Steady Cow Assignment Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6979 Accepted: 2418 Description Farmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns wh…
Steady Cow Assignment Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7482 Accepted: 2572 题目链接:http://poj.org/problem?id=3189 Description: Farmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns which,…
Steady Cow Assignment Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6817 Accepted: 2349 Description Farmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns which, of course, have limited capacity. So…
Jamie's Contact Groups Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others) 题目链接:http://poj.org/problem?id=2289 Description: Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very long…
题目大概说,有n头牛和b块草地,每头牛心中分别对每块草地都有排名,草地在牛中排名越高牛安排在那的幸福度就越小(...),每块草地都能容纳一定数量的牛.现在要给这n头牛分配草地,牛中的幸福度最大与幸福度最小的差值越小越好,问最小能多小. 显然又是枚举结果跑最大流看是否合法.不过,枚举幸福度的差值是做不了的,应该要枚举的是幸福度的最大值和幸福度的最小值.然后建图没啥好说的..最后的结果要加1,因为题目说“including the endpoints”,虽然不知道什么意思.. #include<cs…
Jamie's Contact Groups Time Limit: 15000/7000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 747 Accepted Submission(s): 303 Problem Description Jamie is a very popular girl and has quite a lot of friends, so she…
Steady Cow Assignment Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3189 Description Farmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns which, of co…
二分匹配:二分图的一些性质 二分图又称作二部图,是图论中的一种特殊模型. 设G=(V,E)是一个无向图,如果顶点V可分割为两个互不相交的子集(A,B),并且图中的每条边(i,j)所关联的两个顶点i和j分别属于这两个不同的顶点集(i in A,j in B),则称图G为一个二分图. 1.一个二分图中的最大匹配数等于这个图中的最小点覆盖数 König定理是一个二分图中很重要的定理,它的意思是,一个二分图中的最大匹配数等于这个图中的最小点覆盖数.如果你还不知道什么是最小点覆盖,我也在这里说一下:假如选…
Optimal Milking Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 20262 Accepted: 7230 Case Time Limit: 1000MS Description: FJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) c…
题目链接:https://vjudge.net/problem/POJ-2112 Optimal Milking Time Limit: 2000MS Memory Limit: 30000K Total Submissions: 18555 Accepted: 6626 Case Time Limit: 1000MS Description FJ has moved his K (1 <= K <= 30) milking machines out into the cow past…
题目链接:http://poj.org/problem?id=2289 Jamie's Contact Groups Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 8473 Accepted: 2875 Description Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very long con…
题目链接:https://vjudge.net/problem/POJ-2289 Jamie's Contact Groups Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 8147 Accepted: 2736 Description Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very lon…
Jamie's Contact Groups Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 7721 Accepted: 2599 Description Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The con…
http://poj.org/problem?id=1698 电影和日子匹配,电影可以匹配多个日子. 最多有maxw*7个日子. 二分图多重匹配完,检查一下是否每个电影都匹配了要求的日子那么多. #include<cstdio> #include<cstring> #include<algorithm> #define N 360 #define M 30 using namespace std; int t,n,m; int g[N][M]; int linker[M…
2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of the planet. Now scientists want your help, is to determine what all of people c…
Escape Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 8747 Accepted Submission(s): 2026 Problem Description 2012 If this is the end of the world how to do? I do not know how. But now scienti…