Language: C++

#include <iostream>
#include<stdio.h>
#define MAXSIZE 10001
#include<set>
using namespace std;
void DFS(int pre, int i);
int n, min, max;
set<int>s;
int main()
{

	
	scanf("%d%d%d", &n,&min, &max);
	DFS(0, 0);
		printf("%d",s.size());
		return 0;

}
void DFS(int pre,int i)
{
	if (i > n - 2)return;
	if (i == n - 2)
	{
		s.insert(pre);
	}
	else {
		for (int j = min; j <= max; j++)
		{
			DFS(pre + j, i + 1);
		}
	}

}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:29: error: reference to 'min' is ambiguous
   13 |         scanf("%d%d%d", &n,&min, &max);
      |                             ^~~
In file included from /usr/include/c++/14/string:51,
                 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/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:                 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:8: note:                 'int min'
    7 | int n, min, max;
      |        ^~~
a.cc:13:35: error: reference to 'max' is ambiguous
   13 |         scanf("%d%d%d", &n,&min, &max);
      |                                   ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:13: note:                 'int max'
    7 | int n, min, max;
      |             ^~~
a.cc: In function 'void DFS(int, int)':
a.cc:27:30: error: reference to 'min' is ambiguous
   27 |                 for (int j = min; j <= max; j++)
      |                              ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:                 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:8: note:                 'int min'
    7 | int n, min, max;
      |        ^~~
a.cc:27:40: error: reference to 'max' is ambiguous
   27 |                 for (int j = min; j <= max; j++)
      |                                        ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:                 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
a.cc:7:13: note:                 'int max'
    7 | int n, min, max;
      |             ^~~