watching.cpp: In function 'int main()':
watching.cpp:64:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &n, &p, &q);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
watching.cpp:66:39: 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", &num[i]);
~~~~~^~~~~~~~~~~~~~~
watching.cpp: In function 'int busca2(int)':
watching.cpp:15:27: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
int ini = 1, fim = n, ans;
^~~
watching.cpp: In function 'bool ok(int)':
watching.cpp:34:55: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
next_[0][i] = busca2(num[i]+w-1), next_[1][i] = busca2(num[i]+2*w-1);
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
watching.cpp:34:21: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
next_[0][i] = busca2(num[i]+w-1), next_[1][i] = busca2(num[i]+2*w-1);
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
watching.cpp: In function 'int busca()':
watching.cpp:59:12: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
return ans;
^~~