原创 2014 UESTC Training for Graph Theory L

二分匹配 主要是匈牙利算法查找增廣路 如果找到增廣路ans++套匈牙利模板就可以了 #include <map> #include <set> #i

原创 UVALIVE 3971 Assemble 二分+貪心

#include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #include <deque> #incl

原创 UVALIVE 2519 Radar Installation 區間選點問題

#include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #include <deque> #incl

原创 UVALIVE 2949 Elevator Stopping Plan(二分 + 貪心)

看了好久別人的報告纔看明白,,太弱了。。。 #include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime>

原创 UVA 624 CD 0-1揹包

#include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #include <deque> #incl

原创 UVA 10404 Bachet's Game

#include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #include <deque> #incl

原创 UVA 437 The Tower of Babylon DP+記憶化

#include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #include <deque> #incl

原创 UVALIVE 3635 Pie 二分

有m個派, 要分給n + 1個人, 要求每個人拿到的大小相同, 並且每個人的派必須是一整塊, 不能說分別從兩個派切出一塊湊成。 現在給出m個派的半徑(派均爲圓柱,高爲1),輸出每人可以拿到的最大派的體積。 注意double精度等問題直接二

原创 2014 UESTC Training for Graph Theory K

如果原圖直接聯通那麼就是一個簡單的最小生成樹問題, 那麼就可以構造特殊點生成最小生成樹跑一邊kruskal得到答案就可以 注意並查集的應用,特殊點爲

原创 UVA 825 Walking on the Safe Side 讀入輸出+DP

#include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #include <deque> #incl

原创 UVA 531 DP LCS 打印路徑

fa數組初始化搞了半天。莫名WA了好幾次,不知道瞎搞後來就AC了,汗。。 很是蛋疼啊。感覺理解不到位 #include <map> #include <set> #include <list> #include <cmath> #incl

原创 UVALIVE 2088 Entropy Huffman

直接優先隊列模擬就可以了,上代碼,這裏q.size()==1WA了一次,直接只想到len==1的特殊情況 #include <map> #include <set> #include <list> #include <cmath> #i

原创 UVA 993 Product of digits

  Product of digits  For a given non-negative integer number N , find the minimal natural Q such that the product o

原创 UVA 10827 Maxsum升級版

#include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #include <deque> #incl

原创 UVA 10130 SuperSale 0-1揹包

最裸的0-1揹包,直接上代碼 #include <map> #include <set> #include <list> #include <cmath> #include<cctype> #include <ctime> #includ