#2943
Se dă o matrice pătratică de n x n numere naturale și o valoare naturală T. Suma unei submatrice este suma elementelor submatricei. Să se determine numărul submatricelor care au suma mai mică sau egală cu T.
| Problema | maru | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64213646 | Utilizator | |
| Fișier | maru.cpp | Dimensiune | 579 B |
| Data încărcării | 23 Aprilie 2026, 10:46 | Scor/rezultat | Eroare de compilare |
maru.cpp: In function ‘int main()’: maru.cpp:12:31: error: expected ‘)’ before ‘;’ token 12 | for(i=k1; i<=n;j=n; j++) | ~ ^ | ) maru.cpp:12:13: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(i=k1; i<=n;j=n; j++) | ^~~ maru.cpp:12:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for(i=k1; i<=n;j=n; j++) | ^ maru.cpp:11:33: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(k1=1;k1<=n;k1++)for(k2=1;k2<=n;k2++) | ^~~ maru.cpp:12:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for(i=k1; i<=n;j=n; j++) | ^ maru.cpp:12:36: error: expected ‘;’ before ‘)’ token 12 | for(i=k1; i<=n;j=n; j++) | ^ | ;
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema maru 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ă.