Language: C++

#include <bits/stdc++.h>
#define inc(i,a,b) for(register int i=a;i<=b;i++)
using namespace std;
int head[10010],cnt;
class littlestar{
	public:
	int to,nxt;
	void add(int u,int v){
		to=v; nxt=head[u];
		head[u]=cnt;
	}
}star[200010];
const int p=1e9+7;
long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
void dp(int u,int fa){
	size[u]=1; f[u][1]=1;
	for(int i=head[u];i;i=star[i].nxt){
		int v=star[i].to;
		if(v==fa) continue;
		dp(v,u);
		inc(j,1,size[u]+size[v]) tmp[j]=0;
		inc(j,1,size[u]){
			inc(k,0,size[v]){
				tmp[j+k]=(tmp[j+k]+f[u][j]*f[v][k]%p)%p;
			}
		}
		size[u]+=size[v];
		inc(j,1,size[u]) f[u][j]=tmp[j];
	}
	for(int i=2;i<=size[u];i+=2){
		f[u][0]=(f[u][0]-f[u][i]*g[i]%p%p+p)%p;
	}
}
int main(){
	cin>>n;
	inc(i,1,n-1){
		int x,y;
		scanf("%d%d",&x,&y);
		star[++cnt].add(x,y);
		star[++cnt].add(y,x);
	}
	g[0]=1;
	for(long long i=2;i<=n;i+=2) g[i]=g[i-2]*(i-1)%p;
	dp(1,0);
	cout<<p-f[1][0];
}

Compiler output:
a.cc: In function 'void dp(int, int)':
a.cc:16:9: error: reference to 'size' is ambiguous
   16 |         size[u]=1; f[u][1]=1;
      |         ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:21:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   21 |                 inc(j,1,size[u]+size[v]) tmp[j]=0;
      |                     ^
a.cc:2:37: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                     ^
a.cc:21:25: error: reference to 'size' is ambiguous
   21 |                 inc(j,1,size[u]+size[v]) tmp[j]=0;
      |                         ^~~~
a.cc:2:44: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                            ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:21:33: error: reference to 'size' is ambiguous
   21 |                 inc(j,1,size[u]+size[v]) tmp[j]=0;
      |                                 ^~~~
a.cc:2:44: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                            ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:22:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   22 |                 inc(j,1,size[u]){
      |                     ^
a.cc:2:37: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                     ^
a.cc:22:25: error: reference to 'size' is ambiguous
   22 |                 inc(j,1,size[u]){
      |                         ^~~~
a.cc:2:44: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                            ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:23:29: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   23 |                         inc(k,0,size[v]){
      |                             ^
a.cc:2:37: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                     ^
a.cc:23:33: error: reference to 'size' is ambiguous
   23 |                         inc(k,0,size[v]){
      |                                 ^~~~
a.cc:2:44: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                            ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:27:17: error: reference to 'size' is ambiguous
   27 |                 size[u]+=size[v];
      |                 ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:27:26: error: reference to 'size' is ambiguous
   27 |                 size[u]+=size[v];
      |                          ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:28:21: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   28 |                 inc(j,1,size[u]) f[u][j]=tmp[j];
      |                     ^
a.cc:2:37: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                     ^
a.cc:28:25: error: reference to 'size' is ambiguous
   28 |                 inc(j,1,size[u]) f[u][j]=tmp[j];
      |                         ^~~~
a.cc:2:44: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                            ^
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc:30:24: error: reference to 'size' is ambiguous
   30 |         for(int i=2;i<=size[u];i+=2){
      |                        ^~~~
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:14:13: note:                 'long long int size [20010]'
   14 | long long n,size[20010],f[5010][5010],g[5010],tmp[10010];
      |             ^~~~
a.cc: In function 'int main()':
a.cc:36:13: warning: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
   36 |         inc(i,1,n-1){
      |             ^
a.cc:2:37: note: in definition of macro 'inc'
    2 | #define inc(i,a,b) for(register int i=a;i<=b;i++)
      |                                     ^