這道題是求最少要建設多少個發射台、、顯然的二分匹配啊,但是建立的是無向圖所以會多出來一倍的覆蓋點啊,實際上有的點是重複了啊,所以需要輸出總數-記錄的匹配點的一半啊、、Antenna PlacementTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5576 Accepted: 2793DescriptionThe Global Aerial Research Centre has been allotted the task
連結:http://poj.org/problem?id=1844http://acm.hust.edu.cn/vjudge/contest/view.action?cid=29256#problem/DSumTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 9795 Accepted: 6406DescriptionConsider the natural numbers from 1 to N. By associating
連結:http://acm.hdu.edu.cn/showproblem.php?pid=1142http://acm.hust.edu.cn/vjudge/contest/view.action?cid=29256#problem/EA Walk Through the ForestTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 458
/*This Code is Submitted by Iris for Problem 1316 at 2013-07-26 12:19:13*/#include <iostream>#include <algorithm>using namespace std;//這個問題用DP的話,需要考慮//dp[i][j]表示長為i,j時的最大相似性//dp[i][j] = max{dp[i-1][j-1]+cal[i][j],// dp[i][j-
原題串連:http://poj.org/problem?id=1113題意:給 n 個點,你見一個圍牆,使所有的點到圍牆的距離不小於 l 。求圍牆長度。。思路:先求出n個點的 凸包,然後根據凸包建一個圍牆,圍牆的一部分就是 凸包長度,另一部分 是一個 以 l 為半徑的 圓!!代碼:#include<stdio.h>#include<string.h>#include<math.h>#include<algorithm>using
/*This Code is Submitted by Iris for Problem 1227 at 2013-07-26 10:41:29*///HOJ 1227 Common Subsequence//dp[i][j]represents first i elems and first j elems 's LCS#include <iostream>#include <string>#include <cstring>using namespace