HDU-3718 Similarity】的更多相关文章

HDU 3718 Similarity 题目链接 题意:给定一个标准答案字符串,然后以下每一行给一个串.要求把字符一种相应一种,要求匹配尽量多 思路:显然的KM最大匹配问题,位置相应的字符连边权值+1 代码: #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const int MAXNODE = 27; typede…
一个二分图最大匹配的题: 匈牙利算法不熟: 建了个模,用最小费用最大流解决了 #include <iostream> #include <cstring> #define INF 9999999 #include <cstdio> #include <queue> #include <vector> #include<algorithm> using namespace std; #define maxn 6100 struct ed…
Different Division Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 234    Accepted Submission(s): 90 Problem Description Now we will give you a graph, there are many points in the graph. We wil…
#include<iostream> #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; #define MAXN 50 #define inf 65553566 int love[MAXN][MAXN]; /// 记录每个妹子和每个男生的好感度 int ex_girl[MAXN]; /// 每个妹子的期望值 int ex_boy[MAXN]; /// 每…
转自——http://blog.csdn.net/qwe20060514/article/details/8112550 =============================以下是最小生成树+并查集======================================[HDU]1213   How Many Tables   基础并查集★1272   小希的迷宫   基础并查集★1325&&poj1308  Is It A Tree?   基础并查集★1856   More i…
=============================以下是最小生成树+并查集====================================== [HDU] 1213 How Many Tables 基础并查集★ 1272 小希的迷宫 基础并查集★ 1325&&poj1308 Is It A Tree? 基础并查集★ 1856 More is better 基础并查集★ 1102 Constructing Roads 基础最小生成树★ 1232 畅通工程 基础并查集★ 123…
=============================以下是最小生成树+并查集====================================== [HDU] 1213 How Many Tables 基础并查集★ 1272 小希的迷宫 基础并查集★ 1325&&poj1308 Is It A Tree? 基础并查集★ 1856 More is better 基础并查集★ 1102 Constructing Roads 基础最小生成树★ 1232 畅通工程 基础并查集★ 123…
转自:http://blog.csdn.net/shahdza/article/details/7779324 [HDU]2255 奔小康赚大钱 模板题★1533 Going Home 模板题★2426 Interesting Housing Problem KM★3395 Special Fish KM★2282 Chocolate KM★2813 One fihgt one KM★1853 Cyclic Tour 最小费用圈覆盖★★3488 Tour 最小费用圈覆盖★★3435 A new…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3718 题意:有一堆答题情况和正确答案,问每一个答题情况的正确率最大是多少. 给每一对答案和答题情况的字母做映射,每次映射权值+1,这样会构造出一个二分图.在这个二分图上做最大匹配结果除以题目数量就是正确率. #include <bits/stdc++.h> using namespace std; ; ; const int inf = 0x3f3f3f3f; int n, m, k; int n…
My Brute Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 941    Accepted Submission(s): 372 Problem Description Seaco is a beautiful girl and likes play a game called "My Brute". Before Va…