UV.cpp: In function 'int main()':
UV.cpp:23:18: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (vec[i] > 0 && vec[n - 1] < 0 || vec[i] < 0 && vec[n - 1] > 0) continue;
~~~~~~~~~~~^~~~~~~~~~~~~~~~~
UV.cpp:24:3: error: 'memset' was not declared in this scope
memset(dp, 0, sizeof(dp));
^~~~~~
UV.cpp:24:3: note: suggested alternative: 'fd_set'
memset(dp, 0, sizeof(dp));
^~~~~~
fd_set
UV.cpp:31:19: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
if (vec[i] > 0 && vec[j] < 0 || vec[i] < 0 && vec[j] > 0) continue;
~~~~~~~~~~~^~~~~~~~~~~~~
UV.cpp:12:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &n);
~~~~~^~~~~~~~~~
UV.cpp:15:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &vec[i]);
~~~~~^~~~~~~~~~~~~~~~~