pipes.cpp: In function 'void dfs(int, int)':
pipes.cpp:53:16: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
if(g[u][0] == p) swap(g[u][0], g[u][1]);
^
pipes.cpp:53:35: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
if(g[u][0] == p) swap(g[u][0], g[u][1]);
^
pipes.cpp:53:44: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
if(g[u][0] == p) swap(g[u][0], g[u][1]);
^
pipes.cpp:54:27: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
int v = u ^ s[g[u][0]] ^ t[g[u][0]];
^
pipes.cpp:54:40: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
int v = u ^ s[g[u][0]] ^ t[g[u][0]];
^
pipes.cpp:55:24: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
g[v].erase(g[u][0]);
^
pipes.cpp:56:24: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
g[u].erase(g[u][0]);
^
pipes.cpp: In function 'int main()':
pipes.cpp:61:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &m);
~~~~~^~~~~~~~~~~~~~~~~
pipes.cpp:62:38: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(int i = 1; i <= n; ++i) scanf("%d", A+i);
~~~~~^~~~~~~~~~~
pipes.cpp:64:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", s+i, t+i);
~~~~~^~~~~~~~~~~~~~~~~~~