Language: C++

/************************************
	Name: 荆国浩 
	E-mail: 1839714778@qq.com 
************************************/
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <string>
#include <string.h>
#include <fstream>
#define rep(N) for(int i=0;i<N;i++)
#define ll long long 
#define pii pair<int,int>
#define For(I,N) for(int I=0;I<N;I++)
using namespace std;
int n;
int dist[10005][10005];
vector <int> vec[10005];

void bfs(int x)
{
	bool visit[n]={0};
	queue <pair<int,int> >que;
	que.push(make_pair<int,int>(x,0));
	while(!que.empty())
	{
		int nx=que.front().first;
		int ns=que.front().second;
		que.pop();
		rep(vec[nx].size())
		{
			if(visit[vec[nx][i]]) continue;
			visit[vec[nx][i]]=true;
			dist[x][vec[nx][i]]=ns+1;
			que.push(make_pair<int,int>(vec[nx][i],ns+1));
		}
	}
} 

int main()
{
//	freopen("input.txt","r",stdin);
	cin>>n;
	int x,y;
	rep(n-1)
	{
		cin>>x>>y;
		vec[--x].push_back(--y);
		vec[y].push_back(x);
	}
	bfs(0);
	dist[0][0]=0;
	bfs(n-1);
	dist[n-1][n-1]=0;
	int fen=0,snu=0;
	rep(n)
	{
		if(dist[0][i]<=dist[n-1][i]) fen++;else snu++; 
	}
	cout<<(snu>fen?"Snuke":"Fennec")<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'void bfs(int)':
a.cc:26:37: error: cannot bind rvalue reference of type 'int&&' to lvalue of type 'int'
   26 |         que.push(make_pair<int,int>(x,0));
      |                                     ^
In file included from /usr/include/c++/14/bits/stl_algobase.h:64,
                 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:5:
/usr/include/c++/14/bits/stl_pair.h:1132:21: note:   initializing argument 1 of 'constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = int; _T2 = int; typename __strip_reference_wrapper<typename decay<_Tp>::type>::__type = int; typename decay<_Tp>::type = int; typename __strip_reference_wrapper<typename decay<_Tp2>::type>::__type = int; typename decay<_Tp2>::type = int]'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |               ~~~~~~^~~
a.cc:37:52: error: cannot bind rvalue reference of type 'int&&' to lvalue of type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   37 |                         que.push(make_pair<int,int>(vec[nx][i],ns+1));
      |                                  ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_pair.h:1132:21: note:   initializing argument 1 of 'constexpr std::pair<typename std::__strip_reference_wrapper<typename std::decay<_Tp>::type>::__type, typename std::__strip_reference_wrapper<typename std::decay<_Tp2>::type>::__type> std::make_pair(_T1&&, _T2&&) [with _T1 = int; _T2 = int; typename __strip_reference_wrapper<typename decay<_Tp>::type>::__type = int; typename decay<_Tp>::type = int; typename __strip_reference_wrapper<typename decay<_Tp2>::type>::__type = int; typename decay<_Tp2>::type = int]'
 1132 |     make_pair(_T1&& __x, _T2&& __y)
      |               ~~~~~~^~~