Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
为什么RE...#include <iostream> using namespace std; int main() { int n,a[100][100]; scanf("%d",&n); for(int i=1;i<=n;i++) for(int j=1;j<=i;j++) scanf("%d",&a[i][j]); for(int i=n-1;i>0;i--) for(int j=1;j<=i;j++) if(a[i+1][j]>a[i+1][j+1])a[i][j]+=a[i+1][j]; else a[i][j]+=a[i+1][j+1]; printf("%d",a[1][1]); //system("PAUSE"); return 0; } 挺对的啊.. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator