#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 | #64578731 | Utilizator | |
| Fișier | matrice6.cpp | Dimensiune | 379 B |
| Data încărcării | 15 Mai 2026, 16:01 | Scor/rezultat | Eroare de compilare |
matrice6.cpp:2:1: error: ‘ifstream’ does not name a type 2 | ifstream in( "matrice6.in"); | ^~~~~~~~ matrice6.cpp:3:1: error: ‘ofstream’ does not name a type 3 | ofstream out( "matrce6.out"); | ^~~~~~~~ matrice6.cpp:4:15: error: expected initializer before ‘w’ 4 | int n,max,min w[101][101]; | ^ matrice6.cpp: In function ‘int main()’: matrice6.cpp:6:4: error: ‘in’ was not declared in this scope; did you mean ‘n’? 6 | { in>>n>>m; | ^~ | n matrice6.cpp:6:11: error: ‘m’ was not declared in this scope 6 | { in>>n>>m; | ^ matrice6.cpp:9:10: error: ‘w’ was not declared in this scope 9 | in>> w[i][j]; | ^ matrice6.cpp:11:24: error: ‘min’ was not declared in this scope; did you mean ‘main’? 11 | w[i][j]= w[i][j]+ min;} | ^~~ | main matrice6.cpp:7:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 7 | for( int i=1; i<=n; i++) | ^~~ matrice6.cpp:12:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | for( int i=1; i<=n; i++, out<< endl) | ^~~ matrice6.cpp:12:30: error: ‘out’ was not declared in this scope 12 | for( int i=1; i<=n; i++, out<< endl) | ^~~ matrice6.cpp:12:36: error: ‘endl’ was not declared in this scope 12 | for( int i=1; i<=n; i++, out<< endl) | ^~~~ matrice6.cpp:1:1: note: ‘std::endl’ is defined in header ‘<ostream>’; did you forget to ‘#include <ostream>’? +++ |+#include <ostream> 1 | using namespace std; matrice6.cpp:14:15: error: ‘w’ was not declared in this scope 14 | out<< w[i][j]<< " "; | ^
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ă.