Submission #719892

#TimeUsernameProblemLanguageResultExecution timeMemory
719892joelgun14Jakarta Skyscrapers (APIO15_skyscraper)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #define mp make_pair #define fi first #define se second #define endl "\n" using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; int blk = 200; vector<int> weights[n]; int init = -1, initp = -1, target = -1; for(int i = 1; i <= m; ++i) { int b, p; cin >> b >> p; if(i == 1) init = b, initp = p; else if(i == 2) target = b; // b -> pos // p -> multiple weights[b].push_back(p); } // doge cmn boleh gerak dr ori node (gaboleh meet di tengah) // hence cukup dijkstra dengan 1 origin, terus klo intersect lainnya bs langsung dijkstra aja // tiap node ada theoretically n^2 dijkstra state yg mgkn? // tp yg high modulo itu sparse, jadi bs simpan manual pakai sorted vector/semacamnya priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<pair<int, pair<int, int>>>> pq; // fi -> dist // se.fi -> idx // se.se -> current p //cout << init << " " << initp << endl; pq.push(mp(0, mp(init, initp))); int d[n + 1]; map<int, bool> vis[n]; bool proc_edge[n]; memset(proc_edge, 0, sizeof(proc_edge)); memset(d, -1, sizeof(d)); while(pq.size()) { int dist = pq.top().fi, idx = pq.top().se.fi, curp = pq.top().se.se; pq.pop(); //cout << dist << " " << idx << endl; if(vis[idx][curp]) continue; if(d[idx] == -1) d[idx] = dist; d[idx] = min(d[idx], dist); if(!proc_edge[idx]) { for(auto i : weights[idx]) { if(!vis[idx].count(i)) { if(idx - i >= 0 && !vis[idx - i][i])) pq.push(mp(dist + 1, mp(idx - i, i))); if(idx + i < n && !vis[idx + i][i]) pq.push(mp(dist + 1, mp(idx + i, i))); } vis[idx].insert(i); } proc_edge[idx] = 1; } if(!vis[idx].count(curp)) { vis[idx].insert(curp); if(idx + curp < n && !vis[idx + curp][curp]) pq.push(mp(dist + 1, mp(idx + curp, curp))); if(idx - curp >= 0 && !vis[idx - curp][curp]) pq.push(mp(dist + 1, mp(idx - curp, curp))); } if(idx == target) break; } cout << d[target] << endl; // use observation: tiap fox max dipake sekali aja // buat banyak edge -> not feasible // buat untuk pair idx modulo tertentu sebuah value init // nanti dia cari minimum dr kiri dan kanan bs pakai pbds untuk cek insertion // kalo misal insertion ga worth it -> ga usah insert // bakal di stop kalo distcur >= distnd + costcur // make dijkstra algo // pq dist node // observation: one doge used at most once? yes // therefore we can just calculate brute force for each doge usage x distances // divide into 2 parts, < blk and >= blk // >= blk -> do every distance (manual dijkstra) // < blk -> need to find a smart trick to handle, try to iterate through every size // find modulo kongruen, find moving ke tiap distance minimalnya berapa // karena moving ke tiap distance cmn dijalanin sekali, otomatis tiap sqrt blok itu butuh tepat n aja? // WRONG !!! // only check n-i and n+i? -> yes // untuk n - i dan n + i observasinya adalah kita tidak perlu cek // tiap dijkstra pny 2 macam, bs pake yg berapapun??? // although belum tentu minimal??? // nanti tiap node yg dikunjungi (mis kunjungi next) itu tambah aja ke prev atau ke nxt // buat kasus khususnya dia sendiri klo misal // yg small itu yg masalah? tiap node bs maintain state yg besar // harus bagi kasus // di kiri atau di kanan mau ke kiri atau kanan beda kasus // kalo misal dari kiri ke kanan terus dianya di kiri, berarti klo mau pake pasti harus dr skrg // tp klo dari kiri ke kanan terus dianya di kanan, ada 2 pilihan, start sekarang atau nanti // dijkstranya statenya ada 2 // fi -> node biasa // se -> last used itu se // tujuannya -> biar kita coba manual tiap node 1...blk itu harus wajib // tapi yg lebih dr itu cobanya satu per satu }

Compilation message (stderr)

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