原创 hdu 4472 Count dp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N=1010; const int inf=1e9+7; int
原创 HDU 4504 威威貓系列故事――籃球夢 母函數&DP
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N =125; int dp[N]; __int64 a1[N],
原创 Tyvj 1007 排座椅 4次快排 VS 兩次快排+維護Topk數組 貪心
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 1010 int Row[N],Column[N]; int To
原创 Uest 1421 Adjacent Bit Counts dp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int dp[110][110][2]; void getsolve(){ mem
原创 hdu 2819 Swap 二分圖匹配
#include<cstdio> #include<cstring> #include<vector> #include<algorithm> using namespace std; #define N 110 vector<int>g
原创 hdu 4503 湫湫系列故事——植樹節
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N =1010; int a[N]; int main(){ i
原创 Tyvj 1034 尼克的任務 DP+鄰接表
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define inf 0x7f7f7f7f #define N 10010 stru
原创 zoj 2370 Expanding Rods 二分法
#include<cstdio> #include<cmath> using namespace std; #define PI 2*asin(1.0) int main() { double len,n,c; while
原创 Tyvj 1055 沙子合併 DP
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define inf 10000000 #define N 310 int a[N]
原创 hdu 4501 小明系列故事――買年貨 dp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N=110; struct node{ int price;
原创 hdu 2818 Building Block 並查集 路徑壓縮
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 30005 int set[N]; int num[N]; int
原创 Tyvj 1045 最大的算式 DP
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 110 #define inf -10000 int a[N];
原创 FZU 2156 Climb Stairs dp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int inf = 1000000007; int dp1[10010];
原创 Tyvj 1008 傳球遊戲 dp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 35 int dp[N][N]; int main(){ int
原创 hdu 4800 Josephina and RPG dp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; #define N 10002 #define M 122 double rate[M