#212
MaxMinMatrice
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 | #54285186 | Utilizator | |
Fișier | maxminmatrice.cpp | Dimensiune | 444 B |
Data încărcării | 24 Noiembrie 2024, 19:34 | Scor / rezultat | Eroare de compilare |
maxminmatrice.cpp:5:15: warning: missing terminating " character [enabled by default] ofstream fout("maxminmatrice.out); ^ maxminmatrice.cpp:5:1: error: missing terminating " character ofstream fout("maxminmatrice.out); ^ maxminmatrice.cpp:6:17: error: 'i' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:19: error: 'n' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:21: error: 'm' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:23: error: 'j' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:25: error: 'I' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:27: error: 'k' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:29: error: 'ok' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:34: error: 's' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:36: error: 'maxi' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:49: error: 'mini' has not been declared int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:6:53: error: expected ')' before ';' token int v[101][101],i,n,m,j,I,k,ok=1,s,maxi=INT_MIN,mini; ^ maxminmatrice.cpp:5:10: error: default argument missing for parameter 9 of 'std::ofstream fout(int (*)[101], int, int, int, int, int, int, int, int, int, int)' ofstream fout("maxminmatrice.out); ^ maxminmatrice.cpp:5:10: error: default argument missing for parameter 11 of 'std::ofstream fout(int (*)[101], int, int, int, int, int, int, int, int, int, int)' maxminmatrice.cpp: In function 'int main()': maxminmatrice.cpp:9:10: error: 'm' was not declared in this scope fin>>m>>n; ^ maxminmatrice.cpp:9:13: error: 'n' was not declared in this scope fin>>m>>n; ^ maxminmatrice.cpp:10:9: error: 'i' was not declared in this scope for(i=1;i<=m;i++){ ^ maxminmatrice.cpp:11:9: error: 'mini' was not declared in this scope mini=INT_MAX; ^ maxminmatrice.cpp:12:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++){ ^ maxminmatrice.cpp:13:14: error: 'v' was not declared in this scope fin>>v[i][j]; ^ maxminmatrice.cpp:15:17: error: 'maxi' was not declared in this scope if(mini>maxi) maxi=mini;} ^ maxminmatrice.cpp:16:15: error: 'maxi' was not declared in this scope fout<<maxi; ^ maxminmatrice.cpp:8:9: warning: unused variable 'a' [-Wunused-variable] int a[101]; ^
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ă.