#3264
SumMin_XI
Se dă o matrice pătratică cu n
lini şi n
coloane şi elemente numere întregi. Determinaţi cea mai mică sumă a n
elemente din matrice, obținută adunând câte un element de pe fiecare coloană a matricei.
Problema | SumMin_XI | Operații I/O |
summin_xi.in /summin_xi.out
|
---|---|---|---|
Limita timp | 0.75 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54210748 | Utilizator | |
Fișier | summin_xi.cpp | Dimensiune | 444 B |
Data încărcării | 22 Noiembrie 2024, 10:32 | Scor / rezultat | Eroare de compilare |
summin_xi.cpp: In function 'int main()': summin_xi.cpp:14:9: error: reference to 'min' is ambiguous min=10000; ^ summin_xi.cpp:5:16: note: candidates are: int min int n,i,j,smin,min,a[101][101]; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from summin_xi.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ summin_xi.cpp:16:20: error: reference to 'min' is ambiguous if(a[i][j]<min) ^ summin_xi.cpp:5:16: note: candidates are: int min int n,i,j,smin,min,a[101][101]; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from summin_xi.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ summin_xi.cpp:17:9: error: reference to 'min' is ambiguous min=a[i][j]; ^ summin_xi.cpp:5:16: note: candidates are: int min int n,i,j,smin,min,a[101][101]; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from summin_xi.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ summin_xi.cpp:18:19: error: reference to 'min' is ambiguous smin=smin+min; ^ summin_xi.cpp:5:16: note: candidates are: int min int n,i,j,smin,min,a[101][101]; ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/fstream:38, from summin_xi.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SumMin_XI 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ă.