#3165
MatrDivImp1
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 | #21872079 | Utilizator | |
Fișier | matrdivimp1.cpp | Dimensiune | 343 B |
Data încărcării | 17 Martie 2020, 10:33 | Scor / rezultat | Eroare de compilare |
matrdivimp1.cpp:2:9: error: #include expects "FILENAME" or <FILENAME> #include ^ matrdivimp1.cpp: In function 'int f(int, int)': matrdivimp1.cpp:8:12: error: invalid types 'int[int]' for array subscript {if(a[c1][1]%2==0) ^ matrdivimp1.cpp:9:15: error: invalid types 'int[int]' for array subscript return a[c1][1]; ^ matrdivimp1.cpp: In function 'int main()': matrdivimp1.cpp:19:2: error: 'cin' was not declared in this scope {cin>>n; ^ matrdivimp1.cpp:21:5: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ matrdivimp1.cpp:21:12: error: 'm' was not declared in this scope for(j=1;j<=m;j++) ^ matrdivimp1.cpp:23:1: error: 'cout' was not declared in this scope cout<<f(1,n*m); ^ matrdivimp1.cpp:23:13: error: 'm' was not declared in this scope cout<<f(1,n*m); ^ matrdivimp1.cpp: In function 'int f(int, int)': matrdivimp1.cpp:17:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
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ă.