题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3729 I'm Telling the Truth Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1700    Accepted Submission(s): 853 Problem Description After this year’…
题意:给定 n 个人成绩排名区间,然后问你最多有多少人成绩是真实的. 析:真是没想到二分匹配,....后来看到,一下子就明白了,原来是水题,二分匹配,只要把每个人和他对应的区间连起来就好,跑一次二分匹配,裸的. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #inc…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1498 50 years, 50 colors Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1918    Accepted Submission(s): 1058 Problem Description On Octorber 21st,…
裸的二分图匹配.需要输出方案. #include<cstdio> #include<cstring> #include<vector> #include<algorithm> #include<iostream> using namespace std; #define M 100005 #define N 65 bool vis[M]; vector<int> g[N]; int now[M]; int n,m; int dfs(i…
Rain on your Parade Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 655350/165535 K (Java/Others)Total Submission(s): 2154    Accepted Submission(s): 662 Problem Description You’re giving a party in the garden of your villa by the sea. The pa…
过山车 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9745    Accepted Submission(s): 4294 Problem Description RPG girls今天和大家一起去游乐场玩,最终能够坐上梦寐以求的过山车了.但是,过山车的每一排仅仅有两个座位,并且还有条不成文的规矩,就是每一个女生必须找个个男生做p…
题意:有n个人,每个人给出自己的名次区间,问最多有多少个人没撒谎,如果有多解,输出字典序最大的解. 分析: 1.因为字典序最大,所以从后往前分析. 2.假设后面的人没说谎,并将此作为已知条件,然后从后往前依次给每个人找到合适的名次,输出所有能找到合适名次的人即可. 3.假定给第i个人安排名次,第i+1~n个人名次已经安排好,假如第i个人想占的名次被第j个人所占,那就从第j个人可以占的名次中再找个合适的名次给j,然后把空出来的这个名次给i,如果i可以占的所有名次都被占且占领的人找不到其他可以占的名…
简单题hdu2063 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2063 过山车 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 13500    Accepted Submission(s): 5913 Problem Description RPG girls今天和大家一起去游乐场玩…
Machine Schedule Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5371    Accepted Submission(s): 2658 Problem Description As we all know, machine scheduling is a very classical problem in compu…
过山车 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 30799    Accepted Submission(s): 13289 Problem Description RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了.可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做pa…