pipes.cpp: In function 'int main()':
pipes.cpp:44:40: warning: iteration 30009 invokes undefined behavior [-Waggressive-loop-optimizations]
44 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=-1;
| ~~~~~~~^~~
pipes.cpp:44:17: note: within this loop
44 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=-1;
| ~^~~
pipes.cpp:52:40: warning: iteration 30009 invokes undefined behavior [-Waggressive-loop-optimizations]
52 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=0;
| ~~~~~~~^~
pipes.cpp:52:17: note: within this loop
52 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=0;
| ~^~~
pipes.cpp:44:40: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [120040, 120043] is out of the bounds [0, 120040] of object 'd2' with type 'dsu' [-Warray-bounds]
44 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=-1;
| ~~~~~~~^~~
pipes.cpp:15:7: note: 'd2' declared here
15 | } d1, d2;
| ^~
pipes.cpp:44:32: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [120040, 120043] is out of the bounds [0, 120040] of object 'd1' with type 'dsu' [-Warray-bounds]
44 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=-1;
| ~~~~~~~^~~~~~~~~~~
pipes.cpp:15:3: note: 'd1' declared here
15 | } d1, d2;
| ^~
pipes.cpp:52:40: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [120040, 120043] is out of the bounds [0, 120040] of object 'd2' with type 'dsu' [-Warray-bounds]
52 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=0;
| ~~~~~~~^~
pipes.cpp:15:7: note: 'd2' declared here
15 | } d1, d2;
| ^~
pipes.cpp:52:32: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [120040, 120043] is out of the bounds [0, 120040] of object 'd1' with type 'dsu' [-Warray-bounds]
52 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=0;
| ~~~~~~~^~~~~~~~~~
pipes.cpp:15:3: note: 'd1' declared here
15 | } d1, d2;
| ^~