Main.cpp: In member function 'bool cmp::operator()(const Node&, const Node&) const':
Main.cpp:53:12: error: 'const struct Node' has no member named 'pr'
53 | if ( a.pr == b.pr ) {
| ^~
Main.cpp:53:20: error: 'const struct Node' has no member named 'pr'
53 | if ( a.pr == b.pr ) {
| ^~
Main.cpp:56:14: error: 'const struct Node' has no member named 'pr'
56 | return a.pr < b.pr;
| ^~
Main.cpp:56:21: error: 'const struct Node' has no member named 'pr'
56 | return a.pr < b.pr;
| ^~
Main.cpp: At global scope:
Main.cpp:97:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
97 | main () {
| ^~~~
Main.cpp: In function 'int main()':
Main.cpp:109:28: error: no matching function for call to 'std::set<Node, cmp>::insert(<brace-enclosed initializer list>)'
109 | st.insert( { 0, 1, 0, 0 } );
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from Main.cpp:2:
/usr/include/c++/10/bits/stl_set.h:509:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
509 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:509:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const Node&'}
509 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:518:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
518 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:518:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<Node, cmp>::value_type&&' {aka 'Node&&'}
518 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:546:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
546 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:546:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_set.h:551:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
551 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:551:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_set.h:566:2: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>]'
566 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:566:2: note: template argument deduction/substitution failed:
Main.cpp:109:28: note: candidate expects 2 arguments, 1 provided
109 | st.insert( { 0, 1, 0, 0 } );
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from Main.cpp:2:
/usr/include/c++/10/bits/stl_set.h:578:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>]'
578 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:578:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<Node>'
578 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:598:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::node_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::insert_return_type = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::insert_return_type; std::set<_Key, _Compare, _Alloc>::node_type = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::node_type]'
598 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:598:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<Node, cmp>::node_type&&' {aka 'std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::node_type&&'}
598 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/10/bits/stl_set.h:603:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::node_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::node_type = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::node_type]'
603 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:603:7: note: candidate expects 2 arguments, 1 provided
Main.cpp:116:24: error: 'struct Node' has no member named 'pr'
116 | if ( to.first == u.pr ) {
| ^~
Main.cpp:122:23: error: 'struct Node' has no member named 'pr'
122 | if ( to.first == u.pr )
| ^~
Main.cpp:128:64: error: no matching function for call to 'std::set<Node, cmp>::erase(<brace-enclosed initializer list>)'
128 | st.erase( { dp[ to.first ][ 1 ][ u.u ], to.first, u.u, 1 } );
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from Main.cpp:2:
/usr/include/c++/10/bits/stl_set.h:654:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator]'
654 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:654:28: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<Node, cmp>::const_iterator' {aka 'std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator'}
654 | erase(const_iterator __position)
| ~~~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/c++/10/bits/stl_set.h:684:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::size_type std::set<_Key, _Compare, _Alloc>::erase(const key_type&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::size_type = long unsigned int; std::set<_Key, _Compare, _Alloc>::key_type = Node]'
684 | erase(const key_type& __x)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:684:29: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type&' {aka 'const Node&'}
684 | erase(const key_type& __x)
| ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator]'
706 | erase(const_iterator __first, const_iterator __last)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:706:7: note: candidate expects 2 arguments, 1 provided
Main.cpp:130:65: error: no matching function for call to 'std::set<Node, cmp>::insert(<brace-enclosed initializer list>)'
130 | st.insert( { dp[ to.first ][ 1 ][ u.u ], to.first, u.u, 1 } );
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from Main.cpp:2:
/usr/include/c++/10/bits/stl_set.h:509:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
509 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:509:32: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type&' {aka 'const Node&'}
509 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:518:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
518 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:518:27: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<Node, cmp>::value_type&&' {aka 'Node&&'}
518 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:546:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
546 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:546:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_set.h:551:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::value_type = Node]'
551 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:551:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_set.h:566:2: note: candidate: 'template<class _InputIterator> void std::set<_Key, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>]'
566 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:566:2: note: template argument deduction/substitution failed:
Main.cpp:130:65: note: candidate expects 2 arguments, 1 provided
130 | st.insert( { dp[ to.first ][ 1 ][ u.u ], to.first, u.u, 1 } );
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from Main.cpp:2:
/usr/include/c++/10/bits/stl_set.h:578:7: note: candidate: 'void std::set<_Key, _Compare, _Alloc>::insert(std::initializer_list<_Tp>) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>]'
578 | insert(initializer_list<value_type> __l)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:578:43: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::initializer_list<Node>'
578 | insert(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_set.h:598:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::insert_return_type std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::node_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::insert_return_type = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::insert_return_type; std::set<_Key, _Compare, _Alloc>::node_type = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::node_type]'
598 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:598:26: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::set<Node, cmp>::node_type&&' {aka 'std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::node_type&&'}
598 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/10/bits/stl_set.h:603:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::const_iterator, std::set<_Key, _Compare, _Alloc>::node_type&&) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::node_type = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::node_type]'
603 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_set.h:603:7: note: candidate expects 2 arguments, 1 provided
Main.cpp:133:64: error: no matching function for call to 'std::set<Node, cmp>::erase(<brace-enclosed initializer list>)'
133 | st.erase( { dp[ to.first ][ 0 ][ u.u ], to.first, u.u, 0 } );
| ^
In file included from /usr/include/c++/10/set:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:87,
from Main.cpp:2:
/usr/include/c++/10/bits/stl_set.h:654:7: note: candidate: 'std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::erase(std::set<_Key, _Compare, _Alloc>::const_iterator) [with _Key = Node; _Compare = cmp; _Alloc = std::allocator<Node>; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator; std::set<_Key, _Compare, _Alloc>::const_iterator = std::_Rb_tree<Node, Node, std::_Identity<Node>, cmp, std::allocator<Node> >::const_iterator]'
654 | erase(const_iterator __position)
| ^~~~~
/usr/include/c++/10/bits/stl_set.h:654:28: note: no known c