#234
Se dă o matrice cu elemente numere întregi. Să se determine media aritmetică a elementelor strict pozitive din matrice, care sunt situate sub diagonala principală.
Variante Bacalaureat 2009
| Problema | MedPoz | Operații I/O |
medpoz.in/medpoz.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64765219 | Utilizator | |
| Fișier | medpoz.cpp | Dimensiune | 463 B |
| Data încărcării | 28 Mai 2026, 16:18 | Scor/rezultat | 0 puncte |
medpoz.cpp: In function ‘int main()’: medpoz.cpp:11:5: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for (i=0;i<n;i++) | ^~~ medpoz.cpp:14:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | if (i>j && a[i][j]>0) { | ^~ medpoz.cpp:18:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 18 | if (ma<0) | ^~ medpoz.cpp:20:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 20 | ma=ma/nr; | ^~ medpoz.cpp:14:9: warning: ‘j’ may be used uninitialized [-Wmaybe-uninitialized] 14 | if (i>j && a[i][j]>0) { | ^~ medpoz.cpp:8:13: note: ‘j’ was declared here 8 | int n,i,j,a[20][20],nr=0; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MedPoz 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ă.