rainbow.cpp:102:2: error: extended character is not valid in an identifier
102 | ll x = (ac < x0 && x1 < bc && ar < y0 && br < y1);
| ^
rainbow.cpp:102:5: error: extended character is not valid in an identifier
102 | ll x = (ac < x0 && x1 < bc && ar < y0 && br < y1);
| ^
rainbow.cpp:64:30: error: 'int y0' redeclared as different kind of entity
64 | int R, C, sr, sc, M, x0 = N, y0 = N, x1, y1;
| ^~
In file included from /usr/include/features.h:461,
from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:518,
from /usr/include/c++/10/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
from rainbow.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:220:1: note: previous declaration 'double y0(double)'
220 | __MATHCALL (y0,, (_Mdouble_));
| ^~~~~~~~~~
rainbow.cpp:64:42: error: 'int y1' redeclared as different kind of entity
64 | int R, C, sr, sc, M, x0 = N, y0 = N, x1, y1;
| ^~
In file included from /usr/include/features.h:461,
from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:518,
from /usr/include/c++/10/cassert:43,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
from rainbow.cpp:3:
/usr/include/x86_64-linux-gnu/bits/mathcalls.h:221:1: note: previous declaration 'double y1(double)'
221 | __MATHCALL (y1,, (_Mdouble_));
| ^~~~~~~~~~
rainbow.cpp: In function 'void add(int, int)':
rainbow.cpp:79:19: error: no matching function for call to 'min(double (&)(double) throw (), int&)'
79 | y0 = min(y0, y);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
230 | min(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:230:5: note: template argument deduction/substitution failed:
rainbow.cpp:79:19: note: deduced conflicting types for parameter 'const _Tp' ('double(double)' and 'int')
79 | y0 = min(y0, y);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
278 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:278:5: note: template argument deduction/substitution failed:
rainbow.cpp:79:19: note: deduced conflicting types for parameter 'const _Tp' ('double(double)' and 'int')
79 | y0 = min(y0, y);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(std::initializer_list<_Tp>)'
3468 | min(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3468:5: note: template argument deduction/substitution failed:
rainbow.cpp:79:19: note: mismatched types 'std::initializer_list<_Tp>' and 'double (*)(double) throw ()' {aka 'double (*)(double)'}
79 | y0 = min(y0, y);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(std::initializer_list<_Tp>, _Compare)'
3474 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3474:5: note: template argument deduction/substitution failed:
rainbow.cpp:79:19: note: mismatched types 'std::initializer_list<_Tp>' and 'double (*)(double) throw ()' {aka 'double (*)(double)'}
79 | y0 = min(y0, y);
| ^
rainbow.cpp:80:19: error: no matching function for call to 'max(double (&)(double) throw (), int&)'
80 | y1 = max(y1, y);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
rainbow.cpp:80:19: note: deduced conflicting types for parameter 'const _Tp' ('double(double)' and 'int')
80 | y1 = max(y1, y);
| ^
In file included from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
rainbow.cpp:80:19: note: deduced conflicting types for parameter 'const _Tp' ('double(double)' and 'int')
80 | y1 = max(y1, y);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
rainbow.cpp:80:19: note: mismatched types 'std::initializer_list<_Tp>' and 'double (*)(double) throw ()' {aka 'double (*)(double)'}
80 | y1 = max(y1, y);
| ^
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from rainbow.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
rainbow.cpp:80:19: note: mismatched types 'std::initializer_list<_Tp>' and 'double (*)(double) throw ()' {aka 'double (*)(double)'}
80 | y1 = max(y1, y);
| ^
rainbow.cpp: In function 'int colour(int, int, int, int)':
rainbow.cpp:102:2: error: '\U000000a0' was not declared in this scope
102 | ll x = (ac < x0 && x1 < bc && ar < y0 && br < y1);
| ^
rainbow.cpp:103:30: error: 'x' was not declared in this scope
103 | ll res = m - n + 1 - r + x;
| ^