//prof.Carmen Minca #include using namespace std; int a[58][58][58],t[58][58][58]; int n,k; ifstream f("suma5.in"); ofstream g("suma5.out"); void citeste() { int i,l,c,x; k=0; f>>n; for(i=1;i<=n;i++) while (n>0) { k++; for(l=1;l<=k;l++) for(c=1;c<=k;c++) { f>>x; t[k][l][c]=a[k][l][c]=x; } n=n-k*k; } g<=1;i--) for(l=1;l<=i;l++) for(c=1;c<=i;c++) { if(t[i+1][l][c]<=t[i+1][l][c+1]) x=t[i+1][l][c]; else x=t[i+1][l][c+1]; if(x>t[i+1][l+1][c])x=t[i+1][l+1][c]; if(x>t[i+1][l+1][c+1])x=t[i+1][l+1][c+1]; t[i][l][c]=t[i][l][c]+x; } } void drum() {int c,l,i=1,s,nr=0; s=t[1][1][1]; g<