#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 | #64579181 | Utilizator | |
| Fișier | matrice6.cpp | Dimensiune | 668 B |
| Data încărcării | 15 Mai 2026, 16:38 | Scor/rezultat | Eroare de compilare |
matrice6.cpp: In function ‘int main()’: matrice6.cpp:8:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 8 | for(int i=1;i<=n;i++) | ^~~ matrice6.cpp:11:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | ma=mi=a[1][1]; | ^~ matrice6.cpp:20:6: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 20 | for(int j=1;j<=n;j++) | ^~~ matrice6.cpp:22:10: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 22 | if(ok==1) | ^~ matrice6.cpp:27:4: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 27 | { for(int j=1;j<=n;j++) | ^~~ matrice6.cpp:28:19: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 28 | out<<a[i][j];<<" "; | ^~ matrice6.cpp:28:19: error: expected primary-expression before ‘<<’ token
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ă.