swap.cpp: In function 'void merge(std::vector<int>&, std::vector<int>&, std::vector<int>&)':
swap.cpp:9:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
9 | for (int i = 0, j = 1; i < l.size(); i += j, j <<= 1) {
| ~~^~~~~~~~~~
swap.cpp:10:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
10 | for (int k = i; k < i + j && k < l.size(); k++) ret.push_back(l[k]);
| ~~^~~~~~~~~~
swap.cpp:11:40: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
11 | for (int k = i; k < i + j && k < r.size(); k++) ret.push_back(r[k]);
| ~~^~~~~~~~~~
swap.cpp: In function 'int main()':
swap.cpp:23:41: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
23 | int mn = min({a[((node >> i + 1) << 1) + j], a[2 * node], a[2 * node + 1]});
| ~~^~~
swap.cpp:24:37: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
24 | if (mn == a[((node >> i + 1) << 1) + j]) {
| ~~^~~
swap.cpp:39:33: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
39 | int p = ((node >> i + 1) << 1) + j;
| ~~^~~
swap.cpp:17:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%d", &n);
| ~~~~~^~~~~~~~~~
swap.cpp:18:39: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
18 | for (int i = 1; i <= n; i++) scanf("%d", a + i);
| ~~~~~^~~~~~~~~~~~~