#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 | #50821043 | Utilizator | |
Fișier | matrice6.cpp | Dimensiune | 862 B |
Data încărcării | 08 Mai 2024, 15:14 | Scor / rezultat | Eroare de compilare |
matrice6.cpp: In function 'int main()': matrice6.cpp:7:5: error: reference to 'cin' is ambiguous cin>>n; ^ matrice6.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("matrice6.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from matrice6.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ matrice6.cpp:10:5: error: reference to 'cin' is ambiguous cin>>a[i][j]; ^ matrice6.cpp:3:10: note: candidates are: std::ifstream cin ifstream cin("matrice6.in"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from matrice6.cpp:1: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ matrice6.cpp:32:9: error: reference to 'cout' is ambiguous cout<<a[i][j]<<" "; ^ matrice6.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("matrice6.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from matrice6.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ matrice6.cpp:33:9: error: 'contor' was not declared in this scope contor++; ^ matrice6.cpp:36:13: error: reference to 'cout' is ambiguous cout<<endl; ^ matrice6.cpp:4:10: note: candidates are: std::ofstream cout ofstream cout("matrice6.out"); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:74:0, from matrice6.cpp:1: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ matrice6.cpp:6:13: warning: unused variable 'sd1' [-Wunused-variable] { int n,m,sd1=0,sd2=0,a[101][101],i,maxx=-1,minn=100000,aux; ^ matrice6.cpp:6:19: warning: unused variable 'sd2' [-Wunused-variable] { int n,m,sd1=0,sd2=0,a[101][101],i,maxx=-1,minn=100000,aux; ^ matrice6.cpp:6:37: warning: unused variable 'i' [-Wunused-variable] { int n,m,sd1=0,sd2=0,a[101][101],i,maxx=-1,minn=100000,aux; ^ matrice6.cpp:6:59: warning: unused variable 'aux' [-Wunused-variable] { int n,m,sd1=0,sd2=0,a[101][101],i,maxx=-1,minn=100000,aux; ^
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ă.