adriatic.cpp: In function 'int main()':
adriatic.cpp:55:23: warning: overflow in conversion from 'double' to 'short int' changes value from '1.0e+9' to '32767' [-Woverflow]
55 | min_y[i][j] = 1e9;
| ^~~
adriatic.cpp:56:23: warning: overflow in conversion from 'double' to 'short int' changes value from '1.0e+9' to '32767' [-Woverflow]
56 | min_x[i][j] = 1e9;
| ^~~
adriatic.cpp:60:26: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
60 | min_y[i][j] = min({min_y[i-1][j],min_y[i][j-1],(spc[i][j] ? i : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:60,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
from adriatic.cpp:1:
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed:
adriatic.cpp:60:26: note: candidate expects 2 arguments, 1 provided
60 | min_y[i][j] = min({min_y[i-1][j],min_y[i][j-1],(spc[i][j] ? i : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed:
adriatic.cpp:60:26: note: candidate expects 3 arguments, 1 provided
60 | min_y[i][j] = min({min_y[i-1][j],min_y[i][j-1],(spc[i][j] ? i : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61:
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
5775 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: template argument deduction/substitution failed:
adriatic.cpp:60:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
60 | min_y[i][j] = min({min_y[i-1][j],min_y[i][j-1],(spc[i][j] ? i : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
5785 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: template argument deduction/substitution failed:
adriatic.cpp:60:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
60 | min_y[i][j] = min({min_y[i-1][j],min_y[i][j-1],(spc[i][j] ? i : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adriatic.cpp:61:26: error: no matching function for call to 'min(<brace-enclosed initializer list>)'
61 | min_x[i][j] = min({min_x[i-1][j],min_x[i][j-1],(spc[i][j] ? j : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed:
adriatic.cpp:61:26: note: candidate expects 2 arguments, 1 provided
61 | min_x[i][j] = min({min_x[i-1][j],min_x[i][j-1],(spc[i][j] ? j : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed:
adriatic.cpp:61:26: note: candidate expects 3 arguments, 1 provided
61 | min_x[i][j] = min({min_x[i-1][j],min_x[i][j-1],(spc[i][j] ? j : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
5775 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: template argument deduction/substitution failed:
adriatic.cpp:61:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
61 | min_x[i][j] = min({min_x[i-1][j],min_x[i][j-1],(spc[i][j] ? j : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
5785 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: template argument deduction/substitution failed:
adriatic.cpp:61:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
61 | min_x[i][j] = min({min_x[i-1][j],min_x[i][j-1],(spc[i][j] ? j : (int)1e9)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adriatic.cpp:65:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
65 | max_y[i][j] = max({max_y[i+1][j],max_y[i][j+1],(spc[i][j] ? i : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
adriatic.cpp:65:26: note: candidate expects 2 arguments, 1 provided
65 | max_y[i][j] = max({max_y[i+1][j],max_y[i][j+1],(spc[i][j] ? i : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: template argument deduction/substitution failed:
adriatic.cpp:65:26: note: candidate expects 3 arguments, 1 provided
65 | max_y[i][j] = max({max_y[i+1][j],max_y[i][j+1],(spc[i][j] ? i : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5795 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: template argument deduction/substitution failed:
adriatic.cpp:65:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
65 | max_y[i][j] = max({max_y[i+1][j],max_y[i][j+1],(spc[i][j] ? i : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5805 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: template argument deduction/substitution failed:
adriatic.cpp:65:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
65 | max_y[i][j] = max({max_y[i+1][j],max_y[i][j+1],(spc[i][j] ? i : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adriatic.cpp:66:26: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
66 | max_x[i][j] = max({max_x[i+1][j],max_x[i][j+1],(spc[i][j] ? j : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
adriatic.cpp:66:26: note: candidate expects 2 arguments, 1 provided
66 | max_x[i][j] = max({max_x[i+1][j],max_x[i][j+1],(spc[i][j] ? j : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: template argument deduction/substitution failed:
adriatic.cpp:66:26: note: candidate expects 3 arguments, 1 provided
66 | max_x[i][j] = max({max_x[i+1][j],max_x[i][j+1],(spc[i][j] ? j : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5795 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: template argument deduction/substitution failed:
adriatic.cpp:66:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
66 | max_x[i][j] = max({max_x[i+1][j],max_x[i][j+1],(spc[i][j] ? j : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5805 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: template argument deduction/substitution failed:
adriatic.cpp:66:26: note: deduced conflicting types for parameter '_Tp' ('short int' and 'int')
66 | max_x[i][j] = max({max_x[i+1][j],max_x[i][j+1],(spc[i][j] ? j : (int)-1)});
| ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adriatic.cpp:71:24: error: no matching function for call to 'min(int&, short int&)'
71 | int nxt_y = min(i,min_y[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed:
adriatic.cpp:71:24: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
71 | int nxt_y = min(i,min_y[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed:
adriatic.cpp:71:24: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
71 | int nxt_y = min(i,min_y[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
5775 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: template argument deduction/substitution failed:
adriatic.cpp:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
71 | int nxt_y = min(i,min_y[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
5785 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: template argument deduction/substitution failed:
adriatic.cpp:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
71 | int nxt_y = min(i,min_y[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
adriatic.cpp:72:24: error: no matching function for call to 'max(int&, short int&)'
72 | int nxt_x = max(j,max_x[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
adriatic.cpp:72:24: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
72 | int nxt_x = max(j,max_x[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: template argument deduction/substitution failed:
adriatic.cpp:72:24: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
72 | int nxt_x = max(j,max_x[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5795 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: template argument deduction/substitution failed:
adriatic.cpp:72:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
72 | int nxt_x = max(j,max_x[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5805 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: template argument deduction/substitution failed:
adriatic.cpp:72:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
72 | int nxt_x = max(j,max_x[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
adriatic.cpp:75:20: error: no matching function for call to 'max(int&, short int&)'
75 | nxt_y = max(i,max_y[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
257 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:257:5: note: template argument deduction/substitution failed:
adriatic.cpp:75:20: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
75 | nxt_y = max(i,max_y[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:303:5: note: template argument deduction/substitution failed:
adriatic.cpp:75:20: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
75 | nxt_y = max(i,max_y[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
5795 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5795:5: note: template argument deduction/substitution failed:
adriatic.cpp:75:20: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
75 | nxt_y = max(i,max_y[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
5805 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5805:5: note: template argument deduction/substitution failed:
adriatic.cpp:75:20: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
75 | nxt_y = max(i,max_y[i+1][j+1]);
| ~~~^~~~~~~~~~~~~~~~~~~
adriatic.cpp:76:20: error: no matching function for call to 'min(int&, short int&)'
76 | nxt_x = min(j,min_x[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
233 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:233:5: note: template argument deduction/substitution failed:
adriatic.cpp:76:20: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
76 | nxt_x = min(j,min_x[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algobase.h:281:5: note: template argument deduction/substitution failed:
adriatic.cpp:76:20: note: deduced conflicting types for parameter 'const _Tp' ('int' and 'short int')
76 | nxt_x = min(j,min_x[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
5775 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5775:5: note: template argument deduction/substitution failed:
adriatic.cpp:76:20: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
76 | nxt_x = min(j,min_x[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
5785 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/13/bits/stl_algo.h:5785:5: note: template argument deduction/substitution failed:
adriatic.cpp:76:20: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
76 | nxt_x = min(j,min_x[i-1][j-1]);
| ~~~^~~~~~~~~~~~~~~~~~~