# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1207909 | sameer | Combo (IOI18_combo) | C++20 | Compilation error | 0 ms | 0 KiB |
#include "combo.h"
using namespace std;
string guess_sequence(int n) {
string ans, t; int i, j, k; char s[4] = {'A', 'B', 'X', 'Y'};
t.push_back('A'); t.push_back('B');
if(press(t)){
t.clear(); t.push_back('A');
(press(t))? ans.push_back('A'): ans.push_back('B');
} else{
t.clear(); t.push_back('X');
(press(t))? ans.push_back('X'): ans.push_back('Y');
}
for( j = 0; ; j++) if(s[j] == ans[0]) break;
for( i = 1; i < n-1; i++){
t.clear();
t += ans; t.push_back(s[(j+1) % 4]);
t += ans; t.push_back(s[(j+2) % 4]); t.push_back(s[(j+1) % 4]);
t += ans; t.push_back(s[(j+2) % 4]); t.push_back(s[(j+2) % 4]);
t += ans; t.push_back(s[(j+2) % 4]); t.push_back(s[(j+3) % 4]);
k = press(t);
if(t == ans.size()) ans.push_back(s[(j+3) % 4]);
else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]);
else ans.push_back(s[(j+2) % 4]);
}
if(n > 1){
t.clear();
t += ans; t.push_back(s[(j+1) % 4]);
t += ans; t.push_back(s[(j+2) % 4]);
if(press(t) != ans.size()){
t.clear();
t += ans; t.push_back(s[(j+1) % 4]);
(press(t) != ans.size())? ans.push_back(s[(j+1) % 4]): ans.push_back(s[(j+2) % 4]);
} else ans.push_back(s[(j+3) % 4]);
} return ans;
}
Compilation message (stderr)
combo.cpp: In function 'std::string guess_sequence(int)': combo.cpp:22:7: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}) 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ~ ^~ ~~~~~~~~~~ | | | | | std::__cxx11::basic_string<char>::size_type {aka long unsigned int} | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:495:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' (reversed) 495 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:495:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1585:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' (reversed) 1585 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1585:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/string:41, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/allocator.h:218:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)' (reversed) 218 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/11/bits/allocator.h:218:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'const std::allocator<_CharT>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/basic_string.h:48, from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/string_view:541:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::__type_identity_t<std::basic_string_view<_CharT, _Traits> >)' (reversed) 541 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/11/string_view:541:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long unsigned int' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/basic_string.h:6248:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' (reversed) 6248 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6248:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1122:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> requires requires(_IteratorL __lhs, _IteratorR __rhs) {{__lhs == __rhs} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];} constexpr bool __gnu_cxx::operator==(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)' (reversed) 1122 | operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1122:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h:33, from /usr/include/c++/11/bits/allocator.h:46, from /usr/include/c++/11/string:41, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/ext/new_allocator.h:183:9: note: candidate: 'template<class _Up> constexpr bool __gnu_cxx::operator==(const __gnu_cxx::new_allocator<char>&, const __gnu_cxx::new_allocator<_Tp>&)' (reversed) 183 | operator==(const new_allocator&, const new_allocator<_Up>&) | ^~~~~~~~ /usr/include/c++/11/ext/new_allocator.h:183:9: note: template argument deduction/substitution failed: combo.cpp:22:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const __gnu_cxx::new_allocator<_Tp>' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_pair.h:466:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)' 466 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/11/bits/stl_pair.h:466:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:547:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorL>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' 547 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:547:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_IteratorL>' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1648:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)' 1648 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1648:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/char_traits.h:40, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/postypes.h:222:5: note: candidate: 'template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)' 222 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/11/bits/postypes.h:222:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/basic_string.h:48, from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/string_view:535:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)' 535 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/11/string_view:535:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/basic_string.h:6226:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 6226 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6226:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/basic_string.h:6234:5: note: candidate: 'template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::__cxx11::basic_string<_CharT>&, const std::__cxx11::basic_string<_CharT>&)' 6234 | operator==(const basic_string<_CharT>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6234:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: mismatched types 'const std::__cxx11::basic_string<_CharT>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1136:5: note: candidate: 'template<class _Iterator, class _Container> constexpr bool __gnu_cxx::operator==(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&) requires requires{{__gnu_cxx::operator==::__lhs->base() == __gnu_cxx::operator==::__rhs->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' 1136 | operator==(const __normal_iterator<_Iterator, _Container>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1136:5: note: template argument deduction/substitution failed: combo.cpp:22:19: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' 22 | if(t == ans.size()) ans.push_back(s[(j+3) % 4]); | ^ In file included from /usr/include/c++/11/string:41, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/allocator.h:204:7: note: candidate: 'constexpr bool std::operator==(const std::allocator<char>&, const std::allocator<char>&)' 204 | operator==(const allocator&, const allocator&) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/11/bits/allocator.h:204:18: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::allocator<char>&' 204 | operator==(const allocator&, const allocator&) _GLIBCXX_NOTHROW | ^~~~~~~~~~~~~~~~ combo.cpp:23:12: error: no match for 'operator==' (operand types are 'std::string' {aka 'std::__cxx11::basic_string<char>'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}) 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ~ ^~ ~~~~~~~~~~~~ | | | | | std::__cxx11::basic_string<char>::size_type {aka long unsigned int} | std::string {aka std::__cxx11::basic_string<char>} In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:495:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' (reversed) 495 | operator==(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:495:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'const std::reverse_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1585:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorR>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' (reversed) 1585 | operator==(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1585:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'const std::move_iterator<_IteratorL>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/string:41, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/allocator.h:218:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)' (reversed) 218 | operator==(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/11/bits/allocator.h:218:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'const std::allocator<_CharT>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/basic_string.h:48, from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/string_view:541:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::__type_identity_t<std::basic_string_view<_CharT, _Traits> >)' (reversed) 541 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/11/string_view:541:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'long unsigned int' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/basic_string.h:6248:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' (reversed) 6248 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6248:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1122:5: note: candidate: 'template<class _IteratorL, class _IteratorR, class _Container> requires requires(_IteratorL __lhs, _IteratorR __rhs) {{__lhs == __rhs} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];} constexpr bool __gnu_cxx::operator==(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)' (reversed) 1122 | operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1122:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'const __gnu_cxx::__normal_iterator<_IteratorL, _Container>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/c++allocator.h:33, from /usr/include/c++/11/bits/allocator.h:46, from /usr/include/c++/11/string:41, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/ext/new_allocator.h:183:9: note: candidate: 'template<class _Up> constexpr bool __gnu_cxx::operator==(const __gnu_cxx::new_allocator<char>&, const __gnu_cxx::new_allocator<_Tp>&)' (reversed) 183 | operator==(const new_allocator&, const new_allocator<_Up>&) | ^~~~~~~~ /usr/include/c++/11/ext/new_allocator.h:183:9: note: template argument deduction/substitution failed: combo.cpp:23:26: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const __gnu_cxx::new_allocator<_Tp>' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:64, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_pair.h:466:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)' 466 | operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/11/bits/stl_pair.h:466:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::pair<_T1, _T2>' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:547:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorL>&) requires requires{{std::operator==::__x->base() == std::operator==::__y->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' 547 | operator==(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:547:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::reverse_iterator<_IteratorL>' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1648:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator==(const std::move_iterator<_IteratorL>&, const std::move_iterator<_IteratorL>&)' 1648 | operator==(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1648:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/char_traits.h:40, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/postypes.h:222:5: note: candidate: 'template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)' 222 | operator==(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/11/bits/postypes.h:222:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const std::fpos<_StateT>' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/basic_string.h:48, from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/string_view:535:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator==(std::basic_string_view<_CharT, _Traits>, std::basic_string_view<_CharT, _Traits>)' 535 | operator==(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/11/string_view:535:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: 'std::__cxx11::basic_string<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/basic_string.h:6226:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&, const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 6226 | operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6226:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/string:55, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/basic_string.h:6234:5: note: candidate: 'template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::__cxx11::basic_string<_CharT>&, const std::__cxx11::basic_string<_CharT>&)' 6234 | operator==(const basic_string<_CharT>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/basic_string.h:6234:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: mismatched types 'const std::__cxx11::basic_string<_CharT>' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/bits/stl_algobase.h:67, from /usr/include/c++/11/bits/char_traits.h:39, from /usr/include/c++/11/string:40, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/stl_iterator.h:1136:5: note: candidate: 'template<class _Iterator, class _Container> constexpr bool __gnu_cxx::operator==(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&) requires requires{{__gnu_cxx::operator==::__lhs->base() == __gnu_cxx::operator==::__rhs->base()} -> decltype(auto) [requires std::convertible_to<<placeholder>, bool>];}' 1136 | operator==(const __normal_iterator<_Iterator, _Container>& __lhs, | ^~~~~~~~ /usr/include/c++/11/bits/stl_iterator.h:1136:5: note: template argument deduction/substitution failed: combo.cpp:23:26: note: 'std::string' {aka 'std::__cxx11::basic_string<char>'} is not derived from 'const __gnu_cxx::__normal_iterator<_Iterator, _Container>' 23 | else if(t == ans.size()+1) ans.push_back(s[(j+1) % 4]); | ^ In file included from /usr/include/c++/11/string:41, from combo.h:3, from combo.cpp:1: /usr/include/c++/11/bits/allocator.h:204:7: note: candidate: 'constexpr bool std::operator==(const std::allocator<char>&, const std::allocator<char>&)' 204 | operator==(const allocator&, const allocator&) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/11/bits/allocator.h:204:18: note: no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::allocator<char>&' 204 | operator==(const allocator&, const allocator&) _GLIBCXX_NOTHROW | ^~~~~~~~~~~~~~~~