#3741
Gigel are n bile și k cutii. În câte moduri poate plasa Gigel bilele în cutii, știind că pot rămâne și cutii goale.
| Problema | StarsAndBars1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64790262 | Utilizator | |
| Fișier | starsandbars1.cpp | Dimensiune | 9.07 KB |
| Data încărcării | 31 Mai 2026, 23:23 | Scor/rezultat | Eroare de compilare |
starsandbars1.cpp: In function ‘NumarMare& operator/=(NumarMare&, const NumarMare&)’: starsandbars1.cpp:181:50: error: no match for ‘operator>’ (operand types are ‘NumarMare’ and ‘NumarMare’) 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ | | | | NumarMare NumarMare In file included from /usr/include/c++/13/string:48, from /usr/include/c++/13/bits/locale_classes.h:40, from /usr/include/c++/13/bits/ios_base.h:41, from /usr/include/c++/13/ios:44, from /usr/include/c++/13/ostream:40, from /usr/include/c++/13/iostream:41, from starsandbars1.cpp:1: /usr/include/c++/13/bits/stl_iterator.h:469:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’ 469 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:469:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::reverse_iterator<_Iterator>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_iterator.h:514:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’ 514 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:514:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::reverse_iterator<_Iterator>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_iterator.h:1725:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’ 1725 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1725:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::move_iterator<_IteratorL>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_iterator.h:1784:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’ 1784 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1784:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::move_iterator<_IteratorL>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ In file included from /usr/include/c++/13/bits/stl_algobase.h:64, from /usr/include/c++/13/string:51: /usr/include/c++/13/bits/stl_pair.h:848:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’ 848 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/13/bits/stl_pair.h:848:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::pair<_T1, _T2>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ In file included from /usr/include/c++/13/string:54: /usr/include/c++/13/bits/basic_string.h:3870:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3870 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3870:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/basic_string.h:3884:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)’ 3884 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3884:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/basic_string.h:3897:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3897 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3897:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: mismatched types ‘const _CharT*’ and ‘NumarMare’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ In file included from /usr/include/c++/13/vector:66, from starsandbars1.cpp:2: /usr/include/c++/13/bits/stl_vector.h:2092:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)’ 2092 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:2092:5: note: template argument deduction/substitution failed: starsandbars1.cpp:181:52: note: ‘NumarMare’ is not derived from ‘const std::vector<_Tp, _Alloc>’ 181 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ starsandbars1.cpp: In function ‘NumarMare& operator%=(NumarMare&, const NumarMare&)’: starsandbars1.cpp:213:50: error: no match for ‘operator>’ (operand types are ‘NumarMare’ and ‘NumarMare’) 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ | | | | NumarMare NumarMare /usr/include/c++/13/bits/stl_iterator.h:469:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’ 469 | operator>(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:469:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::reverse_iterator<_Iterator>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_iterator.h:514:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’ 514 | operator>(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:514:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::reverse_iterator<_Iterator>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_iterator.h:1725:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’ 1725 | operator>(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1725:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::move_iterator<_IteratorL>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_iterator.h:1784:5: note: candidate: ‘template<class _Iterator> bool std::operator>(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’ 1784 | operator>(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1784:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::move_iterator<_IteratorL>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_pair.h:848:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator>(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’ 848 | operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/13/bits/stl_pair.h:848:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::pair<_T1, _T2>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/basic_string.h:3870:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3870 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3870:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/basic_string.h:3884:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)’ 3884 | operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3884:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/basic_string.h:3897:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3897 | operator>(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3897:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: mismatched types ‘const _CharT*’ and ‘NumarMare’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^ /usr/include/c++/13/bits/stl_vector.h:2092:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator>(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)’ 2092 | operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:2092:5: note: template argument deduction/substitution failed: starsandbars1.cpp:213:52: note: ‘NumarMare’ is not derived from ‘const std::vector<_Tp, _Alloc>’ 213 | for (cc = 9; NumarMare(cc) * dreapta > t; cc--); | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema StarsAndBars1 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ă.