#include<iostream>#include<cstring>#include<cstdio>using namespace std;const int N = 50000;long dp[N];char code[N];//若是12,23这种可分解为1,2;3,4的形式的数则返回true;//若是02,34这种只能分解一种形式的,则返回false。bool isDevidable(char a,char b){ if(a == '0' || b=='0' || a>'2' || (a==' Read More
posted @ 2012-11-25 19:23 Frank@609 Views(148) Comments(0) Diggs(0) Edit
#include<iostream>using namespace std;const int N = 1000005;int p[N],pre_max[N];int max(int a,int b){ return a>b?a:b;}int main(){ int i,j,k,m,n,curMax,Max; while(scanf("%d%d",&m,&n)!=EOF) { memset(pre_max,0,sizeof(pre_max)); for(i=1; i<=n; i++) scanf("%d",& Read More
posted @ 2012-11-25 11:39 Frank@609 Views(218) Comments(0) Diggs(0) Edit