Language: C++

#include <bits/stdc++.h>
using namespace std;

using ll = long long;

int main()
{
  ll N;
  cin >> N;
  vector<ll> A(N+1);
  map<ll, vector<ll>> kei;
  for(ll i = 1; i<=N; i++){
    cin >> A.at(i);
    if(i - A.at(i) >= 0){
      ll buf = i - A.at(i);
      if(kei.find(buf) ==kei.end() ){
        vector<ll> bb(1, i);
        kei.insert(buf, bb);
      }else{
        kei.at(buf).push_back(i);
      }
    }
  }

  ll count =0;

  for(int i = 0; i<=N; i++){
    ll keisan = i + A.at(i);
    if(kei.find(keisan) != kei.end()){
      vector<ll> koho - kei.at(keisan);
      for(ll k : koho){
        if(i > k){
          count++;
        }
      }
    }
  }

  cout << count <, endl;

  


}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:19: error: no matching function for call to 'std::map<long long int, std::vector<long long int> >::insert(ll&, std::vector<long long int>&)'
   18 |         kei.insert(buf, bb);
      |         ~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:847:9: note: candidate: 'template<class _Pair> std::__enable_if_t<((bool)std::is_constructible<std::pair<const _Key, _Val>, _Pair>::value), std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator, bool> > std::map<_Key, _Tp, _Compare, _Alloc>::insert(_Pair&&) [with _Key = long long int; _Tp = std::vector<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, std::vector<long long int> > >]'
  847 |         insert(_Pair&& __x)
      |         ^~~~~~
/usr/include/c++/14/bits/stl_map.h:847:9: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_map.h:924:9: note: candidate: 'template<class _Pair> std::__enable_if_t<((bool)std::is_constructible<std::pair<const _Key, _Val>, _Pair>::value), typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const_iterator, _Pair&&) [with _Key = long long int; _Tp = std::vector<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, std::vector<long long int> > >]'
  924 |         insert(const_iterator __position, _Pair&& __x)
      |         ^~~~~~
/usr/include/c++/14/bits/stl_map.h:924:9: note:   template argument deduction/substitution failed:
a.cc:18:20: note:   cannot convert 'buf' (type 'll' {aka 'long long int'}) to type 'std::map<long long int, std::vector<long long int> >::const_iterator' {aka 'std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::const_iterator'}
   18 |         kei.insert(buf, bb);
      |                    ^~~
/usr/include/c++/14/bits/stl_map.h:942:9: note: candidate: 'template<class _InputIterator> void std::map<_Key, _Tp, _Compare, _Alloc>::insert(_InputIterator, _InputIterator) [with _Key = long long int; _Tp = std::vector<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, std::vector<long long int> > >]'
  942 |         insert(_InputIterator __first, _InputIterator __last)
      |         ^~~~~~
/usr/include/c++/14/bits/stl_map.h:942:9: note:   template argument deduction/substitution failed:
a.cc:18:19: note:   deduced conflicting types for parameter '_InputIterator' ('long long int' and 'std::vector<long long int>')
   18 |         kei.insert(buf, bb);
      |         ~~~~~~~~~~^~~~~~~~~
/usr/include/c++/14/bits/stl_map.h:661:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::insert_return_type std::map<_Key, _Tp, _Compare, _Alloc>::insert(node_type&&) [with _Key = long long int; _Tp = std::vector<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, std::vector<long long int> > >; insert_return_type = std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::insert_return_type; node_type = std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::node_type]'
  661 |       insert(node_type&& __nh)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_map.h:661:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_map.h:666:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::insert(const_iterator, node_type&&) [with _Key = long long int; _Tp = std::vector<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, std::vector<long long int> > >; iterator = std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::iterator; const_iterator = std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::const_iterator; node_type = std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::node_type]'
  666 |       insert(const_iterator __hint, node_type&& __nh)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_map.h:666:29: note:   no known conversion for argument 1 from 'll' {aka 'long long int'} to 'std::map<long long int, std::vector<long long int> >::const_iterator' {aka 'std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::const_iterator'}
  666 |       insert(const_iterator __hint, node_type&& __nh)
      |              ~~~~~~~~~~~~~~~^~~~~~
/usr/include/c++/14/bits/stl_map.h:834:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(const value_type&) [with _Key = long long int; _Tp = std::vector<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, std::vector<long long int> > >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator = std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other = std::allocator<std::pair<const long long int, std::vector<long long int> > >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> > = __gnu_cxx::__alloc_traits<std::allocator<std::pair<const long long int, std::vector<long long int> > >, std::pair<const long long int, std::vector<long long int> > >::rebind<std::pair<const long long int, std::vector<long long int> > >; typename _Allocator::value_type = std::pair<const long long int, std::vector<long long int> >; value_type = std::pair<const long long int, std::vector<long long int> >]'
  834 |       insert(const value_type& __x)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_map.h:834:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_map.h:841:7: note: candidate: 'std::pair<typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator, bool> std::map<_Key, _Tp, _Compare, _Alloc>::insert(value_type&&) [with _Key = long long int; _Tp = std::vector<long long int>; _Compare = std::less<long long int>; _Alloc = std::allocator<std::pair<const long long int, std::vector<long long int> > >; typename std::_Rb_tree<_Key, std::pair<const _Key, _Val>, std::_Select1st<std::pair<const _Key, _Val> >, _Compare, typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other>::iterator = std::_Rb_tree<long long int, std::pair<const long long int, std::vector<long long int> >, std::_Select1st<std::pair<const long long int, std::vector<long long int> > >, std::less<long long int>, std::allocator<std::pair<const long long int, std::vector<long long int> > > >::iterator; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> >::other = std::allocator<std::pair<const long long int, std::vector<long long int> > >; typename __gnu_cxx::__alloc_traits<_Allocator>::rebind<std::pair<const _Key, _Val> > = __gnu_cxx::__alloc_traits<std::allocator<std::pair<const long long int, std::vector<long long int> > >, std::pair<const long long int, std::vector<long long int> > >::rebind<std::pair<const long long int, std::vector<long long int> > >; typename _Allocator::value_type = std::pair<const long long int, std::vector<long long int> >; value_type = std::pair<const long long int, std::vector<long long int> >]'
  841 |       insert(value_type&& __x)
      |       ^~~~~~
/usr/include/c++/14/bits/stl_map.h:841:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_map.h:879:7: note: candidate: 'void std::map<_Key, _Tp, _Compare, _All