toxic.cpp: In function 'void Search(std::vector<int>)':
toxic.cpp:44:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
44 | for(int i = mid; i < candidate.size(); i++) right.push_back(candidate[i]);
| ~~^~~~~~~~~~~~~~~~~~
toxic.cpp: In function 'void determine_type(int)':
toxic.cpp:57:24: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
57 | int cnt = 1 << j - i;
| ~~^~~
toxic.cpp:87:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
87 | for(int j = 0; j < arr.size(); j++) {
| ~~^~~~~~~~~~~~
toxic.cpp:92:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
92 | for(int j = 0; j < arr.size(); j++) {
| ~~^~~~~~~~~~~~
toxic.cpp:85:9: warning: unused variable 'cur' [-Wunused-variable]
85 | int cur = 1;
| ^~~
toxic.cpp:98:20: error: reference to 'sample' is ambiguous
98 | answer_type(i, sample[ans[i]]);
| ^~~~~~
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from toxic.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:5854:5: note: candidates are: 'template<class _PopulationIterator, class _SampleIterator, class _Distance, class _UniformRandomBitGenerator> _SampleIterator std::sample(_PopulationIterator, _PopulationIterator, _SampleIterator, _Distance, _UniformRandomBitGenerator&&)'
5854 | sample(_PopulationIterator __first, _PopulationIterator __last,
| ^~~~~~
toxic.cpp:12:6: note: 'char sample [3]'
12 | char sample[3] = {'R', 'S', 'T'};
| ^~~~~~