pku 3176
#include
int str[351][351];
int main()
{
int n,i,j;
// freopen(“e://2.txt”,”r”,stdin);
scanf(“%d”,&n);
for( i=0;i
for(j=0;j<=i;j++)
{
if(str[i+1][j]>str[i+1][j+1])
str[i][j]+=str[i+1][j];
else str[i][j]+=str[i+1][j+1];
}
printf(“%d\n”,str[0][0]);
}
还没有评论,来说两句吧...