#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 | #50247503 | Utilizator | |
Fișier | matrice7.cpp | Dimensiune | 581 B |
Data încărcării | 02 Aprilie 2024, 09:43 | Scor / rezultat | Eroare de compilare |
matrice7.cpp:4:1: error: expected ',' or ';' before 'ofstream' ofstream fout("matrice7.out") ^ matrice7.cpp: In function 'int main()': matrice7.cpp:8:10: error: 'n' was not declared in this scope fin>>n>>m; ^ matrice7.cpp:8:13: error: 'm' was not declared in this scope fin>>n>>m; ^ matrice7.cpp:9:5: error: 'maxi' was not declared in this scope maxi=-1; ^ 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:13:14: error: 'a' was not declared in this scope fin>>a[i][j]; ^ matrice7.cpp:16:9: error: 'j' was not declared in this scope for(j=1;j<=m;j++) ^ matrice7.cpp:18:9: error: 'minc' was not declared in this scope minc=a[1][j]; ^ matrice7.cpp:18:14: error: 'a' was not declared in this scope minc=a[1][j]; ^ matrice7.cpp:19:13: error: 'i' was not declared in this scope for(i=2;i<=n;i++) ^ matrice7.cpp:21:15: error: 'i' was not declared in this scope for(a[i][j]==maxi) a[i][j]=minc; ^ matrice7.cpp:21:26: error: expected ';' before ')' token for(a[i][j]==maxi) a[i][j]=minc; ^ matrice7.cpp:22:5: error: expected primary-expression before '}' token } ^ matrice7.cpp:22:5: error: expected ';' before '}' token matrice7.cpp:22:5: error: expected primary-expression before '}' token matrice7.cpp:22:5: error: expected ')' before '}' token matrice7.cpp:22:5: error: expected primary-expression before '}' token matrice7.cpp:22:5: error: expected ';' before '}' token matrice7.cpp:23:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ matrice7.cpp:24:9: error: 'fout' was not declared in this scope fout<<a[i][j]<<' '; ^ matrice7.cpp:24:15: error: 'a' was not declared in this scope fout<<a[i][j]<<' '; ^ matrice7.cpp:24:20: error: 'j' was not declared in this scope fout<<a[i][j]<<' '; ^ matrice7.cpp:26:6: error: 'fout' was not declared in this scope fout<<endl; ^
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ă.