#212
Se dă o matrice cu elemente numere naturale. Să se determine cea mai mică valoare de pe fiecare linie, iar dintre acestea să se determine valoarea maximă.
Variante Bacalaureat 2009
| Problema | MaxMinMatrice | Operații I/O |
maxminmatrice.in/maxminmatrice.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62096072 | Utilizator | |
| Fișier | maxminmatrice.cpp | Dimensiune | 638 B |
| Data încărcării | 08 Ianuarie 2026, 14:59 | Scor/rezultat | Eroare de compilare |
maxminmatrice.cpp:6:10: error: expected initializer before 'm' int maxi m,n,i,j,a[25][25]; ^ maxminmatrice.cpp: In function 'int main()': maxminmatrice.cpp:9:9: error: 'm' was not declared in this scope fin>>m>>n; ^ maxminmatrice.cpp:9:12: error: 'n' was not declared in this scope fin>>m>>n; ^ maxminmatrice.cpp:10:8: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ maxminmatrice.cpp:12:12: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ maxminmatrice.cpp:14:17: error: 'a' was not declared in this scope fin>>a[i][j]; ^ maxminmatrice.cpp:17:8: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ maxminmatrice.cpp:19:17: error: 'a' was not declared in this scope int mini=a[i][1]; // am initializat min cu primul element de pe linia i; ^ maxminmatrice.cpp:20:12: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ maxminmatrice.cpp:27:16: error: 'maxi' was not declared in this scope if(mini>maxi) ^ maxminmatrice.cpp:33:10: error: 'maxi' was not declared in this scope fout<<maxi; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MaxMinMatrice 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ă.