Language: C++

#include<iostream>
#include<vector>
#include<string>
#include<bits/stdc++.h>

using namespace std;

#define ll long long int 
#define fon(n) for(ll i=0;i<n;i++)
const unsigned int M = 1000000007;	
map<pair<ll,ll>,bool>mmap;
// map<unsigned int,bool>mmap;
ll n,k,count1=0;
vector<ll>data;

void compute(ll h,ll sum,ll index){
	if(h>n+1)return;

	sum = sum + data[index];
	if(h>=k){
		// unsigned long long ttt = unsigned long long(h*(pow(10,100)) + sum);
		// unsigned int test = ttt%M;
		pair<ll,ll>temp (h,sum);
		// cout<<h<<" "<<sum<<endl;
		if(!mmap.count(temp)){
			mmap.insert(pair<pair<ll,ll>,bool>(temp,true));
			count1++;
		}
	}
	for(ll i=index+1;i<n+1;i++){
		compute(h+1,sum,i);
	}

}



int main(){

	ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    ll sum=0;

    cin>>n>>k;
    if(k<n){

	    fon(n+1){
	    	data.push_back(i);
	    }

	    fon(n+1){
	    	compute(1,0,i);
	    }
	    cout<<count1;
	}
	else{
		cout<<1;
	}
	return 0;
}

Compiler output:
a.cc: In function 'void compute(long long int, long long int, long long int)':
a.cc:19:21: error: reference to 'data' is ambiguous
   19 |         sum = sum + data[index];
      |                     ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:14:11: note:                 'std::vector<long long int> data'
   14 | vector<ll>data;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:49:17: error: reference to 'data' is ambiguous
   49 |                 data.push_back(i);
      |                 ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:14:11: note:                 'std::vector<long long int> data'
   14 | vector<ll>data;
      |           ^~~~