#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 | #64800884 | Utilizator | |
| Fișier | matrice6.cpp | Dimensiune | 841 B |
| Data încărcării | 02 Iunie 2026, 10:53 | Scor/rezultat | 0 puncte |
matrice6.cpp: In function ‘int main()’: matrice6.cpp:17:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 17 | if(a[i][j]>maxim) | ^~ matrice6.cpp:20:16: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 20 | if(a[i][j]<minim) | ^~ matrice6.cpp:26:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 26 | for(j=1; j<=n; j++) | ^~~ matrice6.cpp:30:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 30 | for(j=1; j<=n; j++) | ^~~ matrice6.cpp:31:20: warning: statement has no effect [-Wunused-value] 31 | a[i][j]+minim; | ~~~~~~~^~~~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | Raspuns gresit. | 20 | 0 | Exemplu | |
| 2 | 0.001 secunde | Raspuns gresit. | 20 | 0 | ||
| 3 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| 4 | 0.003 secunde | Raspuns gresit. | 20 | 0 | ||
| 5 | 0.002 secunde | Raspuns gresit. | 20 | 0 | ||
| Punctaj total | 0 | |||||
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ă.