#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 | #44071091 | Utilizator | |
Fișier | matrice6.cpp | Dimensiune | 725 B |
Data încărcării | 16 Iunie 2023, 18:47 | Scor / rezultat | Eroare de compilare |
matrice6.cpp: In function 'int main()': matrice6.cpp:11:3: error: reference to 'cin' is ambiguous cin>>n; ^ matrice6.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("matrice6.in"); ^ In file included from matrice6.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ matrice6.cpp:14:5: error: reference to 'cin' is ambiguous cin>>a[i][j]; ^ matrice6.cpp:5:10: note: candidates are: std::ifstream cin ifstream cin("matrice6.in"); ^ In file included from matrice6.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ matrice6.cpp:20:16: error: 'mainim' was not declared in this scope if(a[i][j]<mainim) ^ matrice6.cpp:21:9: error: 'minim' was not declared in this scope minim=a[i][j]; ^ matrice6.cpp:24:13: error: expected unqualified-id before '=' token bool=false; ^ matrice6.cpp:27:5: error: 'apare' was not declared in this scope apare=true; ^ matrice6.cpp:29:8: error: 'apare' was not declared in this scope if(apare) ^ matrice6.cpp:31:18: error: 'minim' was not declared in this scope a[i][j]+=minim;} ^ matrice6.cpp:33:24: error: reference to 'cout' is ambiguous for(i=1;i<=n;i++, cout<<endl) ^ matrice6.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("matrice6.out"); ^ In file included from matrice6.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ matrice6.cpp:35:9: error: reference to 'cout' is ambiguous cout<<a[i][j]<<" "; ^ matrice6.cpp:6:10: note: candidates are: std::ofstream cout ofstream cout("matrice6.out"); ^ In file included from matrice6.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ matrice6.cpp:10:26: warning: unused variable 'mimim' [-Wunused-variable] int n,a[101][101],i,j, mimim=1000000000, maxim=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ă.