#890
Se dă o propoziție formată din litere mari și mici ale alfabetului englez, cifre, spații și semne de punctuație, în care literele mari și mici se consideră identice. Determinați vocala din șir cu număr maxim de apariții.
Problema | NrVocale | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54759657 | Utilizator | |
Fișier | nrvocale.cpp | Dimensiune | 695 B |
Data încărcării | 07 Decembrie 2024, 17:41 | Scor / rezultat | Eroare de compilare |
nrvocale.cpp: In function 'int main()': nrvocale.cpp:14:26: error: no matching function for call to 'max(int&, int&, int&, int&, int&)' if(max(na,ne,ni,no,nu)==na)cout<<"A"; ^ nrvocale.cpp:14:26: 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: nrvocale.cpp:14:26: note: candidate expects 2 arguments, 5 provided if(max(na,ne,ni,no,nu)==na)cout<<"A"; ^ 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: nrvocale.cpp:14:26: note: candidate expects 3 arguments, 5 provided if(max(na,ne,ni,no,nu)==na)cout<<"A"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template argument deduction/substitution failed: nrvocale.cpp:14:26: note: mismatched types 'std::initializer_list<_Tp>' and 'int' if(max(na,ne,ni,no,nu)==na)cout<<"A"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template argument deduction/substitution failed: nrvocale.cpp:14:26: note: mismatched types 'std::initializer_list<_Tp>' and 'int' if(max(na,ne,ni,no,nu)==na)cout<<"A"; ^ nrvocale.cpp:15:33: error: no matching function for call to 'max(int&, int&, int&, int&, int&)' else if (max(na,ne,ni,no,nu)==nu)cout<<"U"; ^ nrvocale.cpp:15:33: 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: nrvocale.cpp:15:33: note: candidate expects 2 arguments, 5 provided else if (max(na,ne,ni,no,nu)==nu)cout<<"U"; ^ 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: nrvocale.cpp:15:33: note: candidate expects 3 arguments, 5 provided else if (max(na,ne,ni,no,nu)==nu)cout<<"U"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template argument deduction/substitution failed: nrvocale.cpp:15:33: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==nu)cout<<"U"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template argument deduction/substitution failed: nrvocale.cpp:15:33: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==nu)cout<<"U"; ^ nrvocale.cpp:16:40: error: no matching function for call to 'max(int&, int&, int&, int&, int&)' else if (max(na,ne,ni,no,nu)==ne)cout<<"E"; ^ nrvocale.cpp:16:40: 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: nrvocale.cpp:16:40: note: candidate expects 2 arguments, 5 provided else if (max(na,ne,ni,no,nu)==ne)cout<<"E"; ^ 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: nrvocale.cpp:16:40: note: candidate expects 3 arguments, 5 provided else if (max(na,ne,ni,no,nu)==ne)cout<<"E"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template argument deduction/substitution failed: nrvocale.cpp:16:40: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==ne)cout<<"E"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template argument deduction/substitution failed: nrvocale.cpp:16:40: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==ne)cout<<"E"; ^ nrvocale.cpp:17:40: error: no matching function for call to 'max(int&, int&, int&, int&, int&)' else if (max(na,ne,ni,no,nu)==no)cout<<"O"; ^ nrvocale.cpp:17:40: 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: nrvocale.cpp:17:40: note: candidate expects 2 arguments, 5 provided else if (max(na,ne,ni,no,nu)==no)cout<<"O"; ^ 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: nrvocale.cpp:17:40: note: candidate expects 3 arguments, 5 provided else if (max(na,ne,ni,no,nu)==no)cout<<"O"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template argument deduction/substitution failed: nrvocale.cpp:17:40: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==no)cout<<"O"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template argument deduction/substitution failed: nrvocale.cpp:17:40: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==no)cout<<"O"; ^ nrvocale.cpp:18:40: error: no matching function for call to 'max(int&, int&, int&, int&, int&)' else if (max(na,ne,ni,no,nu)==ni)cout<<"I"; ^ nrvocale.cpp:18:40: 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&) max(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:216:5: note: template argument deduction/substitution failed: nrvocale.cpp:18:40: note: candidate expects 2 arguments, 5 provided else if (max(na,ne,ni,no,nu)==ni)cout<<"I"; ^ 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 nrvocale.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare) max(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:260:5: note: template argument deduction/substitution failed: nrvocale.cpp:18:40: note: candidate expects 3 arguments, 5 provided else if (max(na,ne,ni,no,nu)==ni)cout<<"I"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template<class _Tp> _Tp std::max(std::initializer_list<_Tp>) max(initializer_list<_Tp> __l) ^ /usr/include/c++/4.8/bits/stl_algo.h:4231:5: note: template argument deduction/substitution failed: nrvocale.cpp:18:40: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==ni)cout<<"I"; ^ In file included from /usr/include/c++/4.8/algorithm:62:0, from nrvocale.cpp:2: /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare) max(initializer_list<_Tp> __l, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algo.h:4236:5: note: template argument deduction/substitution failed: nrvocale.cpp:18:40: note: mismatched types 'std::initializer_list<_Tp>' and 'int' else if (max(na,ne,ni,no,nu)==ni)cout<<"I"; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrVocale 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ă.