swap.cpp: In function 'std::vector<int>& solve(int, int)':
swap.cpp:47:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0, i=0, j=0; i<p.size() || j<q.size(); k++)
~^~~~~~~~~
swap.cpp:47:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0, i=0, j=0; i<p.size() || j<q.size(); k++)
~^~~~~~~~~
swap.cpp:49:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int t=0; t<(1<<k) && i<p.size(); t++, i++) ret.push_back(p[i]);
~^~~~~~~~~
swap.cpp:50:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int t=0; t<(1<<k) && j<q.size(); t++, j++) ret.push_back(q[j]);
~^~~~~~~~~
swap.cpp:58:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0, i=0, j=0; i<p.size() || j<q.size(); k++)
~^~~~~~~~~
swap.cpp:58:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0, i=0, j=0; i<p.size() || j<q.size(); k++)
~^~~~~~~~~
swap.cpp:60:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int t=0; t<(1<<k) && i<p.size(); t++, i++) ret.push_back(p[i]);
~^~~~~~~~~
swap.cpp:61:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int t=0; t<(1<<k) && j<q.size(); t++, j++) ret.push_back(q[j]);
~^~~~~~~~~
swap.cpp:71:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0, i=0, j=0; i<p1.size() || j<q1.size(); k++)
~^~~~~~~~~~
swap.cpp:71:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int k=0, i=0, j=0; i<p1.size() || j<q1.size(); k++)
~^~~~~~~~~~
swap.cpp:73:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int t=0; t<(1<<k) && i<p1.size(); t++, i++)
~^~~~~~~~~~
swap.cpp:84:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int t=0; t<(1<<k) && j<q1.size(); t++, j++)
~^~~~~~~~~~
swap.cpp:98:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
swap.cpp: In function 'int main()':
swap.cpp:102:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &N);
~~~~~^~~~~~~~~~
swap.cpp:103:31: 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]);
~~~~~^~~~~~~~~~~~~