#3165
Se consideră o matrice cu m linii și n coloane, numere naturale. Folosind metoda Divide et Impera, determinați suma numerelor pare din matrice.
| Problema | MatrDivImp1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63378705 | Utilizator | |
| Fișier | matrdivimp1.cpp | Dimensiune | 585 B |
| Data încărcării | 28 Februarie 2026, 19:20 | Scor/rezultat | Eroare de compilare |
matrdivimp1.cpp: In function 'int suma(int, int, int, int)': matrdivimp1.cpp:14:21: error: too few arguments to function 'int suma(int, int, int, int)' S1l= suma(stl, mijl); ^ matrdivimp1.cpp:4:5: note: declared here int suma(int stl, int drl, int stc, int drc) ^ matrdivimp1.cpp:15:27: error: too few arguments to function 'int suma(int, int, int, int)' S2l= suma(mijl+1, drl); ^ matrdivimp1.cpp:4:5: note: declared here int suma(int stl, int drl, int stc, int drc) ^ matrdivimp1.cpp:16:21: error: too few arguments to function 'int suma(int, int, int, int)' S1c= suma(stc, mijc); ^ matrdivimp1.cpp:4:5: note: declared here int suma(int stl, int drl, int stc, int drc) ^ matrdivimp1.cpp:17:27: error: too few arguments to function 'int suma(int, int, int, int)' S2c= suma(mijc+1, drc); ^ matrdivimp1.cpp:4:5: note: declared here int suma(int stl, int drl, int stc, int drc) ^ matrdivimp1.cpp:18:12: warning: left operand of comma operator has no effect [-Wunused-value] return S1l+S2l, S1c+S2c;}} ^ matrdivimp1.cpp: In function 'int main()': matrdivimp1.cpp:24:17: warning: left operand of comma operator has no effect [-Wunused-value] cout<<(0, n-1, 0, m-1); ^ matrdivimp1.cpp:24:16: warning: right operand of comma operator has no effect [-Wunused-value] cout<<(0, n-1, 0, m-1); ^ matrdivimp1.cpp:24:25: warning: right operand of comma operator has no effect [-Wunused-value] cout<<(0, n-1, 0, m-1); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MatrDivImp1 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ă.