Prince and Princess 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=4685 Description There are n princes and m princesses. Princess can marry any prince. But prince can only marry the princess they DO love. For all princes,give all the princesses tha…
Prince and Princess Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 150 Accepted Submission(s): 46 Problem Description There are n princes and m princesses. Princess can marry any prince. But…
看了别人的题解.须要用到匈牙利算法的强连通算法 #include<cstdio> #include<algorithm> #include<vector> #pragma comment(linker, "/STACK:1024000000,1024000000") using namespace std; const int MAXN = 1005; int n, m; int mb[MAXN], ma[MAXN]; bool vis[MAXN],…
Bomb Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1853 Accepted Submission(s): 608 Problem Description There are N bombs needing exploding. Each bomb has three attributes: exploding radius…