paint.cpp: In function 'std::__cxx11::string solve_puzzle(std::__cxx11::string, std::vector<int>)':
paint.cpp:30:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < s.size(); i++) {
~~^~~~~~~~~~
paint.cpp:39:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < s.size(); i++) {
~~^~~~~~~~~~
paint.cpp:46:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 1; j < s.size(); j++) {
~~^~~~~~~~~~
paint.cpp:47:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < c.size(); i++) {
~~^~~~~~~~~~
paint.cpp:71:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < c.size(); i++) {
~~^~~~~~~~~~
paint.cpp:76:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( s.size() - j >= c[c.size() - i] )
paint.cpp:77:50: error: no matching function for call to 'min(int, std::__cxx11::basic_string<char>::size_type)'
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/string:40,
from paint.h:3,
from paint.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: candidate: template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)
min(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:195:5: note: template argument deduction/substitution failed:
paint.cpp:77:50: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}')
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/string:40,
from paint.h:3,
from paint.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:243:5: note: template argument deduction/substitution failed:
paint.cpp:77:50: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}')
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from paint.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: candidate: template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)
min(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3450:5: note: template argument deduction/substitution failed:
paint.cpp:77:50: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from paint.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)
min(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3456:5: note: template argument deduction/substitution failed:
paint.cpp:77:50: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
paint.cpp:77:104: error: no matching function for call to 'max(int, std::__cxx11::basic_string<char>::size_type)'
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/string:40,
from paint.h:3,
from paint.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: candidate: template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)
max(const _Tp& __a, const _Tp& __b)
^~~
/usr/include/c++/7/bits/stl_algobase.h:219:5: note: template argument deduction/substitution failed:
paint.cpp:77:104: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}')
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/bits/char_traits.h:39:0,
from /usr/include/c++/7/string:40,
from paint.h:3,
from paint.cpp:1:
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: candidate: template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algobase.h:265:5: note: template argument deduction/substitution failed:
paint.cpp:77:104: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'std::__cxx11::basic_string<char>::size_type {aka long unsigned int}')
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from paint.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: candidate: template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)
max(initializer_list<_Tp> __l)
^~~
/usr/include/c++/7/bits/stl_algo.h:3462:5: note: template argument deduction/substitution failed:
paint.cpp:77:104: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from paint.cpp:2:
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: candidate: template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)
max(initializer_list<_Tp> __l, _Compare __comp)
^~~
/usr/include/c++/7/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
paint.cpp:77:104: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
if ( s[min(j + c[c.size() - i], s.size() - 1)] != 'X' && rdp[max(j + c[c.size() - i] + 1, s.size())][i - 1] )
^
paint.cpp:81:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( rdp[j + 1][i] || (s.size() - j >= c[c.size() - i] && s[j + c[c.size() - i]] != 'X' && rdp[j + c[c.size() - i] + 1][i - 1]) )
paint.cpp:87:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < s.size(); i++)
~~^~~~~~~~~~
paint.cpp:88:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 0; j < c.size(); j++)
~~^~~~~~~~~~
paint.cpp:92:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < s.size(); i++)
~~^~~~~~~~~~
paint.cpp:93:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int j = 1; j < c.size(); j++)
~~^~~~~~~~~~
paint.cpp:101:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 1; i < s.size() - 1; i++) {
~~^~~~~~~~~~~~~~