#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 | #64740313 | Utilizator | |
| Fișier | medpoz.cpp | Dimensiune | 1.28 KB |
| Data încărcării | 27 Mai 2026, 09:18 | Scor/rezultat | Eroare de compilare |
medpoz.cpp:27:26: error: stray ‘#’ in program 27 | S = (int S * 1000#include <fstream> | ^ medpoz.cpp: In function ‘int main()’: medpoz.cpp:27:14: error: expected primary-expression before ‘int’ 27 | S = (int S * 1000#include <fstream> | ^~~ medpoz.cpp:27:14: error: expected ‘)’ before ‘int’ 27 | S = (int S * 1000#include <fstream> | ~^~~ | ) medpoz.cpp:35:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 35 | int main() { | ^~ medpoz.cpp:35:9: note: remove parentheses to default-initialize a variable 35 | int main() { | ^~ | -- medpoz.cpp:35:9: note: or replace parentheses with braces to value-initialize a variable medpoz.cpp:35:12: error: a function-definition is not allowed here before ‘{’ token 35 | int main() { | ^ medpoz.cpp:66:14: error: expected ‘}’ at end of input 66 | return 0; | ^ medpoz.cpp:24:9: note: to match this ‘{’ 24 | else{ | ^ medpoz.cpp:33:5: warning: unused variable ‘a’ [-Wunused-variable] 33 | int a[105][105], n; | ^ medpoz.cpp:33:18: warning: unused variable ‘n’ [-Wunused-variable] 33 | int a[105][105], n; | ^ medpoz.cpp:66:14: error: expected ‘}’ at end of input 66 | return 0; | ^ medpoz.cpp:11:11: note: to match this ‘{’ 11 | int main(){ | ^
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ă.