原创 二分圖的最大匹配模板

//二分圖的最大匹配 poj1469 #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<vector> #include<cs

原创 set_intersection() 的用法 codeforces 245G

#include<bits/stdc++.h> #define eps 1e-9 #define ALL(x) x.begin(),x.end() #define INS(x) inserter(x,x.begin()) #define

原创 poj1637 判斷一個混合圖是否存在歐拉回路

#include<iostream> #include<stdio.h> #include<string.h> #include<limits.h> #include<queue> #define V 220 using namespac

原创 數位dp 模板 poj 2089

//poj2089 /* #include<bits/stdc++.h> #define ll long long using namespace std; int n; int m; int dp[20][10]; int a[20]

原创 hdu3709 枚舉

#include<bits/stdc++.h> #define ll long long using namespace std; ll m,n; ll dp[20][2005][20]; int digit[20]; ll dfs(i

原创 計算幾何的一些模板

求凸包的Graham模板:#include<stdio.h> #include<math.h> #include<string.h> #include<algorithm> using namespace std; struct node

原创 區間修改,區間查詢

//區間修改,區間查詢 #define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #

原创 數論的模板

//歐拉篩 #include<iostream> #include<algorithm> #include<vector> #include<stdlib.h> #define ll long long using namespace

原创 線段樹 單點修改,區間修改

//單點修改,區間查詢 #define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<cstring> #include<string.h>

原创 spfa模板 hdu2544

//hdu2544 #include<iostream> #include<algorithm> #include<queue> #include<cstring> #include<string.h> #define INF 0x3f3

原创 poj3252注意前導0的影響

#include<bits/stdc++.h> #define ll long long using namespace std; int n,m; int dp[50][50];//dp[i][j]表示枚舉到第i位,前面0的個數和1的個

原创 kmp 模板

#include<iostream> #include<algorithm> #include<string> #include<cstring> using namespace std; #define MAXN 1000005 int

原创 hdu4734

int dp[20][10005]; int digit[20]; int getvalue(int a) { int i=0; int ans=0; while(a){ ans=ans+((a%1

原创 最小費用流模板

#define INFINITE 1 << 26 #define MAX_NODE 1005 #define MAX_EDGE_NUM 40005 #include<bits/stdc++.h> using namespace std;

原创 LCA模板 Tarjan

#include<iostream> #include<algorithm> #include<cstdio> #include<cstring> #include<string.h> using namespace std; cons