subsequence.cpp: In function 'std::ostream& operator<<(std::ostream&, std::vector<int>&)':
subsequence.cpp:21:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < x.size(); i++) os << x[i] << sp;
^
subsequence.cpp: In function 'std::ostream& operator<<(std::ostream&, std::vector<std::pair<int, int> >&)':
subsequence.cpp:29:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < x.size(); i++) os << x[i] << endl;
^
subsequence.cpp: In function 'int main()':
subsequence.cpp:79:29: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type {aka long unsigned int}' [-Wformat=]
printf("%d\n", order.size());
^
subsequence.cpp:80:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < order.size(); i++) printf("%d ", order[i]);
^
subsequence.cpp:44:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
^
subsequence.cpp:45:49: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
^
subsequence.cpp:46:49: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
^
subsequence.cpp:47:68: warning: iteration 100005u invokes undefined behavior [-Waggressive-loop-optimizations]
for (int i = 0; i < (1 << 20); i++) cnt[i] = __builtin_popcount(i);
^
subsequence.cpp:47:20: note: containing loop
for (int i = 0; i < (1 << 20); i++) cnt[i] = __builtin_popcount(i);
^