2014年7月16日

hdu1285 拓扑序

摘要: 1 #include 2 #include 3 int map[505][505],into[505],w[505]; 4 int main() 5 { 6 int n,m,u,v,i,j,k; 7 while (~scanf("%d%d",&n,&m)) 8 { 9 ... 阅读全文

posted @ 2014-07-16 16:02 xiao_xin 阅读(120) 评论(0) 推荐(0)

hdu1010 dfs

摘要: 1 #include 2 #include 3 int xx[]={0,0,1,-1}; 4 int yy[]={1,-1,0,0}; 5 int used[15][15]; 6 char map[15][15]; 7 int n,m,t,x2,y2; 8 typedef struct dian ... 阅读全文

posted @ 2014-07-16 16:00 xiao_xin 阅读(95) 评论(0) 推荐(0)

hdu2063 最大匹配

摘要: 1 #include 2 #include 3 int g[505][505],y[505],link[505],n1,n2; 4 int find(int x) 5 { 6 int i; 7 for (i=1;i<=n2;i++) 8 if (g[x][i]==1&&y... 阅读全文

posted @ 2014-07-16 15:57 xiao_xin 阅读(93) 评论(0) 推荐(0)

hdu2444 二分图匹配(匈牙利算法)

摘要: 1 #include 2 #include 3 int number[505],dian1[505],dian2[505],y[505],link[505],hash[505]; 4 int f[505][505],g[505][505]; 5 int n1,n2; 6 int doit(int ... 阅读全文

posted @ 2014-07-16 15:56 xiao_xin 阅读(125) 评论(0) 推荐(0)

hdu2276 快速矩阵幂

摘要: 1 #include 2 #include 3 char s[105]; 4 int ans[105],temp[105],temp1[105][105],a[105][105]; 5 int main() 6 { 7 int i,j,k,n,m; 8 while (~scanf(... 阅读全文

posted @ 2014-07-16 15:01 xiao_xin 阅读(101) 评论(0) 推荐(0)

hdu1043 A*+康托展开

摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 typedef struct node 8 { 9 int f,g,h; 10 int x,y; 11 ... 阅读全文

posted @ 2014-07-16 14:53 xiao_xin 阅读(250) 评论(0) 推荐(0)

hdu1051二维动规

摘要: 1 #include 2 int a[100005],b[100005],maxlen[100005]; 3 void sort(int l,int r) 4 { 5 int i,j,x,y,x1,y1; 6 i=l; j=r; 7 x=a[(i+j)/2]; x1=b[(... 阅读全文

posted @ 2014-07-16 14:51 xiao_xin 阅读(98) 评论(0) 推荐(0)

hdu2513区间动规

摘要: 1 #include 2 #include 3 #define INF 1000000000 4 int hash[45][45][45][45],judge[45][45][45][45],map[45][45],m,n; 5 int dp(int i,int j,int h,int w) 6 ... 阅读全文

posted @ 2014-07-16 14:46 xiao_xin 阅读(154) 评论(0) 推荐(0)

hdu2515

摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 int hash[100005],k[100005],a[100005]; 6 int main() 7 { 8 int n,sum,i,j,x,sum1,t; 9 ... 阅读全文

posted @ 2014-07-16 14:44 xiao_xin 阅读(123) 评论(0) 推荐(0)

hdu2517 区间动规

摘要: 1 #include 2 #include 3 #include 4 #define inf 1000000000 5 int hash[10][10][10][10][20]; 6 int s[10][10][10][10],fsum[10][10][10][10]; 7 int dp(int ... 阅读全文

posted @ 2014-07-16 14:41 xiao_xin 阅读(122) 评论(0) 推荐(0)

导航