注意初始化。
memset(dp,-0x3f,sizeof dp); - dp[0][0][b]=0; + for(int j=1;j<=b;j++)dp[0][0][j]=0; + for(int j=0;j<=a;j++)dp[0][1][j]=0;