#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 | #54025586 | Utilizator | |
Fișier | submatrixsummax.cpp | Dimensiune | 635 B |
Data încărcării | 18 Noiembrie 2024, 10:35 | 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: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ submatrixsummax.cpp:17:21: error: 'jl' was not declared in this scope for(jl=j;jl<=n;jl++) ^ submatrixsummax.cpp:19: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:19: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:23: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ă.