/in/foo.cc: In function 'int find(int, int, int)':
/in/foo.cc:16:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
int mid=L+R>>1;
~^~
/in/foo.cc: In function 'void print()':
/in/foo.cc:25:42: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long long int' [-Wformat=]
for (int i=1;i<=n;i++) printf("%d ",f[i]); printf("\n");
^
/in/foo.cc:25:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for (int i=1;i<=n;i++) printf("%d ",f[i]); printf("\n");
^~~
/in/foo.cc:25:45: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
for (int i=1;i<=n;i++) printf("%d ",f[i]); printf("\n");
^~~~~~
/in/foo.cc: In function 'int find(int, int, int)':
/in/foo.cc:22:9: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
return ans;
^~~