#998
Se consideră o matrice pătratică cu n linii şi n coloane şi elemente numere naturale. Să se modifice matricea în felul următor: toate elementele de pe liniile care conţin valoare maximă din matrice vor fi mărite cu valoarea minimă din matrice.
| Problema | Matrice6 | Operații I/O |
matrice6.in/matrice6.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64762259 | Utilizator | |
| Fișier | matrice6.cpp | Dimensiune | 830 B |
| Data încărcării | 28 Mai 2026, 13:11 | Scor/rezultat | Eroare de compilare |
matrice6.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include fstream | ^~~~~~~ matrice6.cpp:2:10: error: #include expects "FILENAME" or <FILENAME> 2 | #include iostream | ^~~~~~~~ matrice6.cpp:4:1: error: ‘ifstream’ does not name a type 4 | ifstream fin("matrice6.in"); | ^~~~~~~~ matrice6.cpp:5:1: error: ‘ofstream’ does not name a type 5 | ofstream fout("matrice6.out"); | ^~~~~~~~ matrice6.cpp: In function ‘int main()’: matrice6.cpp:10:5: error: ‘fin’ was not declared in this scope; did you mean ‘min’? 10 | fin >> n; | ^~~ | min matrice6.cpp:22:9: error: ‘c’ was not declared in this scope 22 | c = 0; | ^ matrice6.cpp:29:30: error: ‘j’ was not declared in this scope 29 | for( j = 1 ; j <= n ;j++) | ^ matrice6.cpp:30:13: error: ‘fout’ was not declared in this scope 30 | fout << a[i][j] + min << " "; | ^~~~ matrice6.cpp:32:30: error: ‘j’ was not declared in this scope 32 | for(j = 1 ; j <= n ;j++) | ^ matrice6.cpp:33:13: error: ‘fout’ was not declared in this scope 33 | fout << a[i][j] << " "; | ^~~~ matrice6.cpp:34:13: error: ‘fout’ was not declared in this scope 34 | fout << endl; | ^~~~ matrice6.cpp:34:21: error: ‘endl’ was not declared in this scope 34 | fout << endl; | ^~~~ matrice6.cpp:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’? +++ |+#include <ostream> 1 | #include fstream
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Matrice6 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ă.