skyscraper.cpp: In function 'int main()':
skyscraper.cpp:52:57: error: expected primary-expression before ')' token
52 | if(idx - i >= 0 && !vis[idx - i][i]))
| ^
skyscraper.cpp:57:34: error: no matching function for call to 'std::map<int, bool>::insert(int&)'
57 | vis[idx].insert(i);
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from skyscraper.cpp:1:
/usr/include/c++/10/bits/stl_map.h:629:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::insert_return_type std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::node_type&&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::insert_return_type = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::insert_return_type; std::map<_Key, _Tp, _Compare, _Alloc>::node_type = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::node_type]'
629 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:629:26: note: no known conversion for argument 1 from 'int' to 'std::map<int, bool>::node_type&&' {aka 'std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::node_type&&'}
629 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/10/bits/stl_map.h:634:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, std::map<_Key, _Tp, _Compare, _Alloc>::node_type&&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::const_iterator; std::map<_Key, _Tp, _Compare, _Alloc>::node_type = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::node_type]'
634 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:634:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_map.h:803:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, bool>]'
803 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:803:32: note: no known conversion for argument 1 from 'int' to 'const value_type&' {aka 'const std::pair<const int, bool>&'}
803 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:810:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::value_type&&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, bool>]'
810 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:810:27: note: no known conversion for argument 1 from 'int' to 'std::map<int, bool>::value_type&&' {aka 'std::pair<const int, bool>&&'}
810 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:816:2: note: candidate: 'template<class _Pair> std::__enable_if_t<std::is_constructible<std::pair<const _Key, _Tp>, _Pair>::value, std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> > std::map<_Key, _Tp, _Compare, _Alloc>::insert(_Pair&&) [with _Pair = _Pair; _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >]'
816 | insert(_Pair&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:816:2: note: template argument deduction/substitution failed:
In file included from /usr/include/c++/10/bits/move.h:57,
from /usr/include/c++/10/bits/stl_pair.h:59,
from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from skyscraper.cpp:1:
/usr/include/c++/10/type_traits: In substitution of 'template<bool _Cond, class _Tp> using __enable_if_t = typename std::enable_if::type [with bool _Cond = false; _Tp = std::pair<std::_Rb_tree_iterator<std::pair<const int, bool> >, bool>]':
/usr/include/c++/10/bits/stl_map.h:816:2: required by substitution of 'template<class _Pair> std::__enable_if_t<std::is_constructible<std::pair<const int, bool>, _Pair>::value, std::pair<std::_Rb_tree_iterator<std::pair<const int, bool> >, bool> > std::map<int, bool>::insert<_Pair>(_Pair&&) [with _Pair = int&]'
skyscraper.cpp:57:34: required from here
/usr/include/c++/10/type_traits:2192:11: error: no type named 'type' in 'struct std::enable_if<false, std::pair<std::_Rb_tree_iterator<std::pair<const int, bool> >, bool> >'
2192 | using __enable_if_t = typename enable_if<_Cond, _Tp>::type;
| ^~~~~~~~~~~~~
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from skyscraper.cpp:1:
/usr/include/c++/10/bits/stl_map.h:830:7: note: candidate: 'void std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::initializer_list<std::pair<const _Key, _Tp> >) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >]'
830 | insert(std::initializer_list<value_type> __list)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:830:48: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::pair<const int, bool> >'
830 | insert(std::initializer_list<value_type> __list)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/10/bits/stl_map.h:860:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::const_iterator; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, bool>]'
860 | insert(const_iterator __position, const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:860:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_map.h:870:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, std::map<_Key, _Tp, _Compare, _Alloc>::value_type&&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::const_iterator; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, bool>]'
870 | insert(const_iterator __position, value_type&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:870:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_map.h:875:2: note: candidate: 'template<class _Pair> std::__enable_if_t<std::is_constructible<std::pair<const _Key, _Tp>, _Pair>::value, typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator> std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, _Pair&&) [with _Pair = _Pair; _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >]'
875 | insert(const_iterator __position, _Pair&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:875:2: note: template argument deduction/substitution failed:
skyscraper.cpp:57:34: note: candidate expects 2 arguments, 1 provided
57 | vis[idx].insert(i);
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from skyscraper.cpp:1:
/usr/include/c++/10/bits/stl_map.h:893:2: note: candidate: 'template<class _InputIterator> void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _InputIterator = _InputIterator; _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >]'
893 | insert(_InputIterator __first, _InputIterator __last)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:893:2: note: template argument deduction/substitution failed:
skyscraper.cpp:57:34: note: candidate expects 2 arguments, 1 provided
57 | vis[idx].insert(i);
| ^
skyscraper.cpp:62:33: error: no matching function for call to 'std::map<int, bool>::insert(int&)'
62 | vis[idx].insert(curp);
| ^
In file included from /usr/include/c++/10/map:61,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
from skyscraper.cpp:1:
/usr/include/c++/10/bits/stl_map.h:629:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::insert_return_type std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::node_type&&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::insert_return_type = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::insert_return_type; std::map<_Key, _Tp, _Compare, _Alloc>::node_type = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::node_type]'
629 | insert(node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:629:26: note: no known conversion for argument 1 from 'int' to 'std::map<int, bool>::node_type&&' {aka 'std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::node_type&&'}
629 | insert(node_type&& __nh)
| ~~~~~~~~~~~~^~~~
/usr/include/c++/10/bits/stl_map.h:634:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, std::map<_Key, _Tp, _Compare, _Alloc>::node_type&&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::const_iterator; std::map<_Key, _Tp, _Compare, _Alloc>::node_type = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::node_type]'
634 | insert(const_iterator __hint, node_type&& __nh)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:634:7: note: candidate expects 2 arguments, 1 provided
/usr/include/c++/10/bits/stl_map.h:803:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const value_type&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, bool>]'
803 | insert(const value_type& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:803:32: note: no known conversion for argument 1 from 'int' to 'const value_type&' {aka 'const std::pair<const int, bool>&'}
803 | insert(const value_type& __x)
| ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:810:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::value_type&&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::value_type = std::pair<const int, bool>]'
810 | insert(value_type&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:810:27: note: no known conversion for argument 1 from 'int' to 'std::map<int, bool>::value_type&&' {aka 'std::pair<const int, bool>&&'}
810 | insert(value_type&& __x)
| ~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_map.h:816:2: note: candidate: 'template<class _Pair> std::__enable_if_t<std::is_constructible<std::pair<const _Key, _Tp>, _Pair>::value, std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Tp> >::other>::iterator, bool> > std::map<_Key, _Tp, _Compare, _Alloc>::insert(_Pair&&) [with _Pair = _Pair; _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >]'
816 | insert(_Pair&& __x)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:816:2: note: template argument deduction/substitution failed:
/usr/include/c++/10/bits/stl_map.h:830:7: note: candidate: 'void std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::initializer_list<std::pair<const _Key, _Tp> >) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >]'
830 | insert(std::initializer_list<value_type> __list)
| ^~~~~~
/usr/include/c++/10/bits/stl_map.h:830:48: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::pair<const int, bool> >'
830 | insert(std::initializer_list<value_type> __list)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/10/bits/stl_map.h:860:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator, const value_type&) [with _Key = int; _Tp = bool; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, bool> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allocator<std::pair<const int, bool> > >::iterator; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree<int, std::pair<const int, bool>, std::_Select1st<std::pair<const int, bool> >, std::less<int>, std::allo