minerals.cpp: In function 'void Solve(int)':
minerals.cpp:50:27: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
50 | if (unique.size() < n && (second.size() == n || query(i) > last))
| ~~~~~~~~~~~~~~^~~
minerals.cpp:50:49: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
50 | if (unique.size() < n && (second.size() == n || query(i) > last))
| ~~~~~~~~~~~~~~^~~~
In file included from /usr/include/c++/10/cassert:44,
from minerals.cpp:5:
minerals.cpp:60:26: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
60 | assert(unique.size() == n);
| ~~~~~~~~~~~~~~^~~~
minerals.cpp:61:26: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
61 | assert(second.size() == n);
| ~~~~~~~~~~~~~~^~~~
minerals.cpp:64:21: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
64 | while ((1 << lg + 1) < n)
| ~~~^~~
minerals.cpp:80:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
80 | taken[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:80:41: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
80 | taken[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:81:30: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
81 | taken2[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:81:42: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
81 | taken2[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:82:50: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
82 | if (i & (1 << bit)) taken1[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:82:62: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
82 | if (i & (1 << bit)) taken1[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:83:35: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
83 | else taken0[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:83:47: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
83 | else taken0[(i >> bit + 1) << bit + 1]++;
| ~~~~^~~
minerals.cpp:92:31: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
92 | min[(i >> bit + 1) << bit + 1] = std::min(min[(i >> bit + 1) << bit + 1], i);
| ~~~~^~~
minerals.cpp:92:43: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
92 | min[(i >> bit + 1) << bit + 1] = std::min(min[(i >> bit + 1) << bit + 1], i);
| ~~~~^~~
minerals.cpp:92:73: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
92 | min[(i >> bit + 1) << bit + 1] = std::min(min[(i >> bit + 1) << bit + 1], i);
| ~~~~^~~
minerals.cpp:92:85: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
92 | min[(i >> bit + 1) << bit + 1] = std::min(min[(i >> bit + 1) << bit + 1], i);
| ~~~~^~~
minerals.cpp:46:9: warning: unused variable 'cnt' [-Wunused-variable]
46 | int cnt = 0;
| ^~~