#3410
SubmatrixSumMax
Se dă o matrice de numere întregi cu n
linii și n
coloane. Să se determine suma maximă care se poate obține dintr-o submatrice.
Folclorul informatic
Problema | SubmatrixSumMax | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.3 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54026027 | Utilizator | |
Fișier | submatrixsummax.cpp | Dimensiune | 819 B |
Data încărcării | 18 Noiembrie 2024, 10:40 | Scor / rezultat | Eroare de compilare |
submatrixsummax.cpp:4:19: error: unable to find numeric literal operator 'operator"" n' int a[305][305],s[305n][305],i,il,jlj,smax=INT_MIN; ^ submatrixsummax.cpp:4:44: error: 'INT_MIN' was not declared in this scope int a[305][305],s[305n][305],i,il,jlj,smax=INT_MIN; ^ submatrixsummax.cpp: In function 'int main()': submatrixsummax.cpp:7:5: error: 'cin' was not declared in this scope cin>>n; ^ submatrixsummax.cpp:7:10: error: 'n' was not declared in this scope cin>>n; ^ submatrixsummax.cpp:9:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ submatrixsummax.cpp:12:17: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ submatrixsummax.cpp:13:13: error: 's' was not declared in this scope s[i][j]=a[i][j]+s[i-1][j]+s[i][j-1]-s[i-1][j-1]; ^ submatrixsummax.cpp:15:17: error: 'iil' was not declared in this scope for(iil=i;iil<=n;iil++) ^ submatrixsummax.cpp:17:18: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ submatrixsummax.cpp:19:17: error: 'v' was not declared in this scope v[j]=s[iil][j]-s[i-1][j]; ^ submatrixsummax.cpp:19:22: error: 's' was not declared in this scope v[j]=s[iil][j]-s[i-1][j]; ^ submatrixsummax.cpp:20:21: error: 'jjl' was not declared in this scope for(jjl=j;jjl<=n;jjl++) ^ submatrixsummax.cpp:21:13: error: expected primary-expression before '}' token } ^ submatrixsummax.cpp:21:13: error: expected ';' before '}' token submatrixsummax.cpp:24:21: error: 'jl' was not declared in this scope for(jl=j;jl<=n;jl++) ^ submatrixsummax.cpp:24:24: error: 'j' was not declared in this scope for(jl=j;jl<=n;jl++) ^ submatrixsummax.cpp:26:13: error: 'x' was not declared in this scope x=s[il][jl]-s[il][j-1]-s[i-1][jl]+s[i-1][j-1]; ^ submatrixsummax.cpp:26:15: error: 's' was not declared in this scope x=s[il][jl]-s[il][j-1]-s[i-1][jl]+s[i-1][j-1]; ^ submatrixsummax.cpp:31:8: error: 'cout' was not declared in this scope cout<<smax; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SubmatrixSumMax face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.