pipes.cpp: In function 'int main()':
pipes.cpp:46:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
46 | if(u%2 == 1 and d1.join(u, v) || d2.join(u, v)) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~
pipes.cpp:55:40: warning: iteration 70009 invokes undefined behavior [-Waggressive-loop-optimizations]
55 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=0;
| ~~~~~~~^~
pipes.cpp:55:17: note: within this loop
55 | for(int i = 1;i<=N;i++)d1.e[i]=d2.e[i]=0;
| ~^~~
pipes.cpp:55:40: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [280040, 280043] is out of the bounds [0, 280040] of object 'd2' with type 'dsu' [-Warray-bounds]
55 | 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:55:32: warning: 'void* __builtin_memset(void*, int, long unsigned int)' forming offset [280040, 280043] is out of the bounds [0, 280040] of object 'd1' with type 'dsu' [-Warray-bounds]
55 | 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;
| ^~