beads.cpp: In function 'int main()':
beads.cpp:15:21: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(int&)'
g[u].push_back(v);
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from beads.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from 'int' to 'const value_type& {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from 'int' to 'std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}'
beads.cpp:16:21: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(int&)'
g[v].push_back(u);
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from beads.cpp:1:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from 'int' to 'const value_type& {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from 'int' to 'std::vector<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}'
beads.cpp:24:10: error: 'in' was not declared in this scope
in[i] = g[i].size() - (i != node);
^~
beads.cpp:24:10: note: suggested alternative: 'i'
in[i] = g[i].size() - (i != node);
^~
i
beads.cpp:26:11: error: 'q' was not declared in this scope
q[en++] = i;
^
beads.cpp:29:20: error: 'q' was not declared in this scope
curnode = q[st++];
^
beads.cpp:32:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(i=0;i<g[curnode].size();i++){
~^~~~~~~~~~~~~~~~~~
beads.cpp:33:14: error: 'in' was not declared in this scope
if(in[g[curnode][i].first] != 0){
^~
beads.cpp:33:14: note: suggested alternative: 'i'
if(in[g[curnode][i].first] != 0){
^~
i
beads.cpp:11:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
~~~~~^~~~~~~~~
beads.cpp:14:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&u,&v);
~~~~~^~~~~~~~~~~~~~