#941
Urare
În preajma Crăciunului toţi suntem sau redevenim copii.
Scrie un program care afişează pe ecran o urare pentru cei dragi ţie!
Problema | Urare | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52696734 | Utilizator | |
Fișier | urare.cpp | Dimensiune | 3.81 KB |
Data încărcării | 07 Octombrie 2024, 13:00 | Scor / rezultat | Eroare de compilare |
urare.cpp: In function 'double infasoara(std::pair<double, double>, std::pair<double, double>)': urare.cpp:99:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] while(stiva.size() >= marime+1 && semn(v[stiva[stiva.size()-2]], v[stiva.back()], v[i]) == -1) ^ urare.cpp: In function 'void solve()': urare.cpp:166:56: error: no matching function for call to 'min(int&, double)' ariemin = min(ariemin, abs(arie1-arie2)); ^ urare.cpp:166:56: note: candidates are: 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from urare.cpp:1: /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) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: urare.cpp:166:56: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'double') ariemin = min(ariemin, abs(arie1-arie2)); ^ 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/ostream:38, from /usr/include/c++/4.8/iostream:39, from urare.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:239:5: note: template argument deduction/substitution failed: urare.cpp:166:56: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'double') ariemin = min(ariemin, abs(arie1-arie2)); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from urare.cpp:5: /usr/include/c++/4.8/bits/stl_algo.h:4221:5: note: template<class _Tp> _Tp std::min(std::initializer_list<_Tp>) min(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4221:5: note: template argument deduction/substitution failed: urare.cpp:166:56: note: mismatched types 'std::initializer_list<_Tp>' and 'int' ariemin = min(ariemin, abs(arie1-arie2)); ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from urare.cpp:5: /usr/include/c++/4.8/bits/stl_algo.h:4226:5: note: template<class _Tp, class _Compare> _Tp std::min(std::initializer_list<_Tp>, _Compare) min(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algo.h:4226:5: note: template argument deduction/substitution failed: urare.cpp:166:56: note: mismatched types 'std::initializer_list<_Tp>' and 'int' ariemin = min(ariemin, abs(arie1-arie2)); ^ urare.cpp: In function 'int main()': urare.cpp:184:18: error: 'descompune' was not declared in this scope descompune(24); ^ urare.cpp: In function 'double infasoara(std::pair<double, double>, std::pair<double, double>)': urare.cpp:116:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Urare 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ă.