#1007
Matrice7
Se consideră o matrice cu n
linii şi m
coloane şi elemente numere naturale. Să se modifice matricea în felul următor: toate elementele egale cu valoarea maximă din matrice se înlocuiesc cu valoarea minimă de pe coloana lor.
Problema | Matrice7 | Operații I/O |
matrice7.in /matrice7.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54271780 | Utilizator | |
Fișier | matrice7.cpp | Dimensiune | 710 B |
Data încărcării | 24 Noiembrie 2024, 13:11 | Scor / rezultat | Eroare de compilare |
matrice7.cpp:5:30: error: expected ',' or ';' before '.' token ofstream cout("matrice7.out"). ^ matrice7.cpp: In function 'int main()': matrice7.cpp:9:10: error: 'n' was not declared in this scope cin>>n>>m; ^ matrice7.cpp:9:13: error: 'm' was not declared in this scope cin>>n>>m; ^ matrice7.cpp:10:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++){ ^ matrice7.cpp:11:13: error: 'j' was not declared in this scope for(j=1; j<=m; j++){ ^ matrice7.cpp:12:18: error: 'a' was not declared in this scope cin>>a[i][j]; ^ matrice7.cpp:13:21: error: 'maxi' was not declared in this scope if(a[i][j]>maxi) maxi=a[i][j]; ^ matrice7.cpp:17:9: error: 'j' was not declared in this scope for(j=1; j<=m; j++){ ^ matrice7.cpp:19:13: error: 'i' was not declared in this scope for(i=1; i<=n; i++){ ^ matrice7.cpp:20:16: error: 'a' was not declared in this scope if(a[i][j]<mini) mini=a[i][j]; ^ matrice7.cpp:23:13: error: 'i' was not declared in this scope for(i=1; i<=n; i++){ ^ matrice7.cpp:24:16: error: 'a' was not declared in this scope if(a[i][j]==maxi) a[i][j]=mini; ^ matrice7.cpp:24:25: error: 'maxi' was not declared in this scope if(a[i][j]==maxi) a[i][j]=mini; ^ matrice7.cpp:27:9: error: 'i' was not declared in this scope for(i=1; i<=n; i++){ ^ matrice7.cpp:28:13: error: 'j' was not declared in this scope for(j=1; j<=m; j++) ^ matrice7.cpp:29:19: error: 'a' was not declared in this scope cout<<a[i][j]<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Matrice7 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ă.