chameleon.cpp: In function 'std::vector<long long int> find(long long int, long long int, long long int, long long int)':
chameleon.cpp:58:27: warning: narrowing conversion of 'arr[id].std::vector<long long int>::operator[](((std::vector<long long int>::size_type)l))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
58 | if (Query({arr[id][l],x})==1)return {arr[id][l]};
| ^
chameleon.cpp:58:27: warning: narrowing conversion of 'arr[id].std::vector<long long int>::operator[](((std::vector<long long int>::size_type)l))' from '__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type' {aka 'long long int'} to 'int' [-Wnarrowing]
chameleon.cpp:58:25: warning: narrowing conversion of 'x' from 'long long int' to 'int' [-Wnarrowing]
58 | if (Query({arr[id][l],x})==1)return {arr[id][l]};
| ^
chameleon.cpp:58:25: warning: narrowing conversion of 'x' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:67:12: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'std::vector<long long int>'
67 | if (Query(p)<mid-l+2 && l<=mid){
| ^
In file included from chameleon.cpp:2:
chameleon.h:9:35: note: in passing argument 1 of 'int Query(const std::vector<int>&)'
9 | int Query(const std::vector<int> &p);
| ~~~~~~~~~~~~~~~~~~~~~~~~^
chameleon.cpp:75:12: error: invalid initialization of reference of type 'const std::vector<int>&' from expression of type 'std::vector<long long int>'
75 | if (Query(p)<r-mid+1 && r>mid){
| ^
In file included from chameleon.cpp:2:
chameleon.h:9:35: note: in passing argument 1 of 'int Query(const std::vector<int>&)'
9 | int Query(const std::vector<int> &p);
| ~~~~~~~~~~~~~~~~~~~~~~~~^
chameleon.cpp: In function 'void Solve(long long int)':
chameleon.cpp:109:15: warning: narrowing conversion of 'c1' from 'long long int' to 'int' [-Wnarrowing]
109 | if (Query({c1,c2,i})==1)res=c3;
| ^~
chameleon.cpp:109:15: warning: narrowing conversion of 'c1' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:109:18: warning: narrowing conversion of 'c2' from 'long long int' to 'int' [-Wnarrowing]
109 | if (Query({c1,c2,i})==1)res=c3;
| ^~
chameleon.cpp:109:18: warning: narrowing conversion of 'c2' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:109:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
109 | if (Query({c1,c2,i})==1)res=c3;
| ^
chameleon.cpp:109:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:109:28: error: 'res' was not declared in this scope
109 | if (Query({c1,c2,i})==1)res=c3;
| ^~~
chameleon.cpp:110:15: warning: narrowing conversion of 'c2' from 'long long int' to 'int' [-Wnarrowing]
110 | if (Query({c2,c3,i})==1)res=c1;
| ^~
chameleon.cpp:110:15: warning: narrowing conversion of 'c2' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:110:18: warning: narrowing conversion of 'c3' from 'long long int' to 'int' [-Wnarrowing]
110 | if (Query({c2,c3,i})==1)res=c1;
| ^~
chameleon.cpp:110:18: warning: narrowing conversion of 'c3' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:110:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
110 | if (Query({c2,c3,i})==1)res=c1;
| ^
chameleon.cpp:110:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:110:28: error: 'res' was not declared in this scope
110 | if (Query({c2,c3,i})==1)res=c1;
| ^~~
chameleon.cpp:111:15: warning: narrowing conversion of 'c1' from 'long long int' to 'int' [-Wnarrowing]
111 | if (Query({c1,c3,i})==1)res=c2;
| ^~
chameleon.cpp:111:15: warning: narrowing conversion of 'c1' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:111:18: warning: narrowing conversion of 'c3' from 'long long int' to 'int' [-Wnarrowing]
111 | if (Query({c1,c3,i})==1)res=c2;
| ^~
chameleon.cpp:111:18: warning: narrowing conversion of 'c3' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:111:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
111 | if (Query({c1,c3,i})==1)res=c2;
| ^
chameleon.cpp:111:21: warning: narrowing conversion of 'i' from 'long long int' to 'int' [-Wnarrowing]
chameleon.cpp:111:28: error: 'res' was not declared in this scope
111 | if (Query({c1,c3,i})==1)res=c2;
| ^~~
chameleon.cpp:113:14: error: 'res' was not declared in this scope
113 | marked[{i,res}]=true;
| ^~~
chameleon.cpp:113:10: error: no match for 'operator[]' (operand types are 'std::map<std::pair<long long int, long long int>, long long int>' and '<brace-enclosed initializer list>')
113 | marked[{i,res}]=true;
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from chameleon.cpp:1:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<long long int, long long int>; _Tp = long long int; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<const std::pair<long long int, long long int>, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<long long int, long long int>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<long long int, long long int>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::pair<long long int, long long int>; _Tp = long long int; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<const std::pair<long long int, long long int>, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<long long int, long long int>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<long long int, long long int>, long long int>::key_type&&' {aka 'std::pair<long long int, long long int>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~
chameleon.cpp:114:10: error: no match for 'operator[]' (operand types are 'std::map<std::pair<long long int, long long int>, long long int>' and '<brace-enclosed initializer list>')
114 | marked[{res,i}]=true;
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from chameleon.cpp:1:
/usr/include/c++/10/bits/stl_map.h:492:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::pair<long long int, long long int>; _Tp = long long int; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<const std::pair<long long int, long long int>, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<long long int, long long int>]'
492 | operator[](const key_type& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:492:34: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const std::pair<long long int, long long int>&'}
492 | operator[](const key_type& __k)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:512:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](std::map<_Key, _Tp, _Compare, _Alloc>::key_type&&) [with _Key = std::pair<long long int, long long int>; _Tp = long long int; _Compare = std::less<std::pair<long long int, long long int> >; _Alloc = std::allocator<std::pair<const std::pair<long long int, long long int>, long long int> >; std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type = long long int; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<long long int, long long int>]'
512 | operator[](key_type&& __k)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_map.h:512:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::map<std::pair<long long int, long long int>, long long int>::key_type&&' {aka 'std::pair<long long int, long long int>&&'}
512 | operator[](key_type&& __k)
| ~~~~~~~~~~~^~~