#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 | #63094823 | Utilizator | |
| Fișier | maxminmatrice.cpp | Dimensiune | 583 B |
| Data încărcării | 13 Februarie 2026, 15:52 | Scor/rezultat | Eroare de compilare |
maxminmatrice.cpp: In function 'int main()': maxminmatrice.cpp:7:1: error: expected ',' or ';' before 'ofstream' ofstream fout("maxminmatrice.out") ^ maxminmatrice.cpp:10:10: error: 'n' was not declared in this scope fin>>n>>m; ^ maxminmatrice.cpp:10:13: error: 'm' was not declared in this scope fin>>n>>m; ^ maxminmatrice.cpp:11:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ maxminmatrice.cpp:12:13: error: 'j' was not declared in this scope for(j=1; j<=m; j++) ^ maxminmatrice.cpp:13:18: error: 'a' was not declared in this scope fin>>a[i][j]; ^ maxminmatrice.cpp:14:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ maxminmatrice.cpp:17:13: error: 'j' was not declared in this scope for(j=1; j<=m; j++) ^ maxminmatrice.cpp:19:16: error: 'a' was not declared in this scope if(a[i][j]<min) ^ maxminmatrice.cpp:29:8: error: 'a' was not declared in this scope if(a[i][j]>max) ^ maxminmatrice.cpp:29:10: error: 'i' was not declared in this scope if(a[i][j]>max) ^ maxminmatrice.cpp:29:13: error: 'j' was not declared in this scope if(a[i][j]>max) ^ maxminmatrice.cpp:33:1: error: 'fout' was not declared in this scope fout<<max; ^
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ă.