foo.cc: In function 'int main()':
foo.cc:22:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
22 | if(a[j]<0&&a[i]>=0||a[j]>=0&&a[i]<0){
| ~~~~~~^~~~~~~~~
foo.cc:10:48: warning: iteration 100004 invokes undefined behavior [-Waggressive-loop-optimizations]
10 | for(int i=1;i<=100005;i++) g[i]=0;
| ~~~~^~
foo.cc:10:30: note: within this loop
10 | for(int i=1;i<=100005;i++) g[i]=0;
| ~^~~~~~~~
foo.cc:10:48: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [800040, 800047] is out of the bounds [0, 800040] of object 'g' with type 'long long int [100005]' [-Warray-bounds]
10 | for(int i=1;i<=100005;i++) g[i]=0;
| ~~~~^~
foo.cc:5:11: note: 'g' declared here
5 | long long g[100005];
| ^
[Hydro](https://hydro.ac)提供评测服务