题目链接 题意:给定一个矩阵,每列有两个白点,其它都是黑点,如今要求每列选一个白点,使得每一行至少包括一个白点被选中 思路:利用白点所在的位置用行指向列建图,用行去匹配列,最大匹配数假设不等于行数的话,就无解. 代码: #include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std…
Description(下有中文题意) Welcome to the Annual Byteland Shooting Contest. Each competitor will shoot to a target which is a rectangular grid. The target consists of r*c squares located in r rows and c columns. The squares are coloured white or black. Ther…
POJ 1719 Shooting Contest id=1719" target="_blank" style="">题目链接 题意:给定一个矩阵,每列有两个白点,其它都是黑点,如今要求每列选一个白点,使得每一行至少包括一个白点被选中 思路:二分图匹配,白点的位置行列建边,然后跑匹配,假设匹配数不等于行数,就是是无解,然后输出方案的时候注意,假设有位置是没匹配的,说明这个位置是多余的,可是还是要随意选一个白点来输出 代码: #include <…
Fire Net Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12575    Accepted Submission(s): 7614 Problem Description Suppose that we have a square city with straight streets. A map of a city is a…
http://poj.org/problem?id=1719 Shooting Contest Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 4135   Accepted: 1521   Special Judge Description Welcome to the Annual Byteland Shooting Contest. Each competitor will shoot to a target whi…
Rain on your Parade Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 655350/165535 K (Java/Others)Total Submission(s): 4728    Accepted Submission(s): 1552 Problem Description You’re giving a party in the garden of your villa by the sea. The p…
Swap Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3800    Accepted Submission(s): 1401Special Judge Problem Description Given an N*N matrix with each entry equal to 0 or 1. You can swap any t…
Oil Skimming Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2917    Accepted Submission(s): 1210 Problem Description Thanks to a certain "green" resources company, there is a new profitabl…
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=1045 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description Suppose that we have a square city with straight streets. A map of a city is a square board…
Shooting Contest Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3812   Accepted: 1389   Special Judge Description Welcome to the Annual Byteland Shooting Contest. Each competitor will shoot to a target which is a rectangular grid. The t…