pipes.cpp: In function 'int main()':
pipes.cpp:70:15: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while(!g1[A]==A){
^~
pipes.cpp:70:9: note: add parentheses around left hand side expression to silence this warning
while(!g1[A]==A){
^~~~~~
( )
pipes.cpp:77:15: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while(!g1[B]==B){
^~
pipes.cpp:77:9: note: add parentheses around left hand side expression to silence this warning
while(!g1[B]==B){
^~~~~~
( )
pipes.cpp:89:15: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while(!g2[A]==A){
^~
pipes.cpp:89:9: note: add parentheses around left hand side expression to silence this warning
while(!g2[A]==A){
^~~~~~
( )
pipes.cpp:95:15: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
while(!g2[B]==B){
^~
pipes.cpp:95:9: note: add parentheses around left hand side expression to silence this warning
while(!g2[B]==B){
^~~~~~
( )
pipes.cpp:64:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &N, &M);
~~~~~^~~~~~~~~~~~~~~~~
pipes.cpp:68:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &a, &b);
~~~~~^~~~~~~~~~~~~~~~