xorsum.cpp: In function 'int f(unsigned int)':
xorsum.cpp:9:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int l=0;l<v.size();l++)
~^~~~~~~~~
xorsum.cpp:12:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (r>l && v[l]+v[r-1]>=x)
xorsum.cpp: In function 'int main()':
xorsum.cpp:34:9: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (j<2*i)
~^~~~
xorsum.cpp:21:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
xorsum.cpp:25:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&a);
~~~~~^~~~~~~~~