原创 二分匹配_HDU_2389

二分匹配,建圖,hk算法,然道匈牙利算法要退休了? #include<iostream> #include<cstdio> #include<cstring> #include<queue> #define oo 0x3f3f3f

原创 線段樹_HDU_2795

/* h*w的廣告牌,每次儘可能選上面貼,儘可能靠左貼,問給定的廣告長度中,應該在第幾行 我應該可以令根節點等於寬度,區間值爲區間內能放的最大寬度,儘可能高度10^9,然而廣告條數 只有n=200000,因此高度只要在n之內就好了

原创 二分匹配_HDU_2768

/* 應該是二選一的問題,在寵物愛好上有衝突的,就必須二選1,就有一條邊 最後就是求最大獨立點集合 非二分圖的最大匹配,link[u] = ,link[v] = ,不爲 */ #include<iostream> #include

原创 線段樹_FZU_1921

#include<iostream> #include<cstdio> #include<cstring> const int maxn = 10010; using namespace std; struct node {

原创 線段數_HDU_3074

區間求積,暴int #include<iostream> #include<cstdio> #define Mod 1000000007 const int maxn = 50050; using namespace std; _

原创 MFC_編輯框字體調節

  在學習MFC中需要調整編輯框中的字體大小,以下是我結合網上與自己實際操作總結的,希望對其它同學有所幫助。        首先,瞭解以下函數原型: BOOL CreateFont( int nHeight, // 字體高度:0爲默認高度

原创 HDU_1845

#include<iostream> #include<cstdio> #include<cstring> const int maxn = 5005; using namespace std; int n; int main()

原创 數學_LightOJ_1008

數學規律題,可知給的數是,1,3,5,7,9,一圈一圈的擴散出去,由此可以確定數的xi或者yi 開根號數,另外一軸在特判一下就ok了 #include<iostream> #include<cstring> #include<cs

原创 DFS_HDU_5222

有雙向邊,有單向邊,問是否存在一點出發,回到出發點,也就是成環 直接深搜一發,在記得回溯邊跟點,內存4*maxn #pragma comment(linker, "/STACK:102400000,102400000") #in

原创 線段數_HDU_1166

初級的單點更新,區間求和 #include<iostream> const int maxn = 50050; using namespace std; struct node { int l,r,d; int m

原创 二分圖_HDU_1054

/* hdu1054_最小點覆蓋 = 最大匹配 */ #include<iostream> #include<cstdio> #include<cstring> const int maxn = 1505; using names

原创 二分圖_HDU_1045

/* 二分圖的構造 拆行、拆列 */ #include<iostream> #include<cstdio> #include<cstring> const int maxn = 10; using namespace std;

原创 二分圖_HDU_4185

#include<iostream> #include<cstdio> #include<cstring> const int maxn = 605; using namespace std; char map[maxn][max

原创 並查集_HDU_2235

藏的很深的並查集,先按每個點的高度排序,從最小並查起 每次訪問點的四邊,看是否有以當前高度爲邊的可以放水的 然後還要標記點在哪些情況下是是段木板,例如 4 4 4 4 4 4 4 0 1 4 4 2 3 4 4 4

原创 二分匹配_HDU_1525

#include<iostream> #include<cstdio> #include<cstring> const int maxn = 105; using namespace std; int n,map[maxn][ma