#998
Matrice6
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 | #51533853 | Utilizator | |
Fișier | matrice6.cpp | Dimensiune | 931 B |
Data încărcării | 06 Iulie 2024, 15:18 | Scor / rezultat | Eroare de compilare |
matrice6.cpp:4:10: error: expected unqualified-id before string constant ifstream("matrice6.in") ^ matrice6.cpp:4:10: error: expected ')' before string constant matrice6.cpp: In function 'int main()': matrice6.cpp:11:12: error: 'n' was not declared in this scope cin >> n; ^ matrice6.cpp:14:20: error: 'a' was not declared in this scope cin >> a[i][j]; ^ matrice6.cpp:19:16: error: 'a' was not declared in this scope if(a[i][j] > maxim) ^ matrice6.cpp:19:26: error: 'maxim' was not declared in this scope if(a[i][j] > maxim) ^ matrice6.cpp:21:16: error: 'a' was not declared in this scope if(a[i][j] < minim) ^ matrice6.cpp:21:26: error: 'minim' was not declared in this scope if(a[i][j] < minim) ^ matrice6.cpp:29:16: error: 'a' was not declared in this scope if(a[i][j] == maxim) ^ matrice6.cpp:29:27: error: 'maxim' was not declared in this scope if(a[i][j] == maxim) ^ matrice6.cpp:33:17: error: 'a' was not declared in this scope a[i][j] += minim; ^ matrice6.cpp:33:28: error: 'minim' was not declared in this scope a[i][j] += minim; ^ matrice6.cpp:38:21: error: 'a' was not declared in this scope cout << a[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ă.