#include<stdio.h>#include<string.h>#include<algorithm>#include<queue>using namespace std;#define SIZE 1010const int inf = 100000000;struct node{ int s,t,f,w; int next;}edge[100010];int head[2010];int mincost,tot;int s,t,pre[2010];void add(int s,int t,int w,int f){ edge[tot].f Read More
posted @ 2011-11-24 23:49 Because Of You Views(609) Comments(0) Diggs(0) Edit
蛮简单的dp,只是要注意会超intdp[i][j]代表i个数以j结尾的数列个数#include<stdio.h>#include<string.h>__int64 dp[11][2001];int i,j,k;void init(){ memset(dp,0,sizeof(dp)); for(i=1;i<=2000;i++) dp[1][i]=1; for(i=2;i<=10;i++) { for(j=i;j<=2000;j++) { for(k=1;k<=j/2;k++) { dp[i][j]+=dp[i-1][k]; } } }}int ma Read More
posted @ 2011-11-24 10:36 Because Of You Views(334) Comments(0) Diggs(0) Edit