watching.cpp: In function 'int binser(int)':
watching.cpp:8:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
8 | int mid=l+r>>1;
| ~^~
watching.cpp: In function 'int main()':
watching.cpp:46:12: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
46 | int mid=l+r>>1;
| ~^~
watching.cpp: In function 'int binser(int)':
watching.cpp:12:9: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
12 | return ans;
| ^~~
watching.cpp: In function 'bool can(int, int, int)':
watching.cpp:34:6: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
34 | idx++;
| ~~~^~
watching.cpp:29:4: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
29 | if(BIG==SMALL) p--, idx=SMALL;
| ^~
watching.cpp:29:4: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
watching.cpp:24:4: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
24 | if(SMALL>BIG) p-=2, idx=SMALL;
| ^~
watching.cpp:22:24: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
22 | SMALL=binser(a[SMALL+1]+w);
| ~~~~~^~
watching.cpp:24:4: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
24 | if(SMALL>BIG) p-=2, idx=SMALL;
| ^~