Language: C++

#include<bits/stdc++.h>
#include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<cstdlib>
#include<ctime>
#include<set>
#include<map>
#include<utility>
#include<queue>
#include<vector>
#include<stack>
#include<sstream>
#include<algorithm>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pii;
typedef vector<pii> vii;
typedef vector<ll> vi;
typedef queue<ll> qi;
typedef queue<char> qc;
typedef queue<string> qs;
typedef vector<char> vc;
typedef vector<string> vs;
typedef map<char,ll> mpci;
typedef map<ll,ll> mpii;
typedef map<string,ll> mpsi;
typedef set<ll> sei;
typedef set<char> sec;
typedef set<string> ses;
typedef stack<ll> si;
typedef stack<char> sc;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
typedef vector<pll> vpll;
typedef vector<pdd> vdd;
typedef unsigned int uint;
typedef long double ld;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef vector<vi> vvi;
typedef vector<vvi> vvvi;
typedef vector<vii> vvii;
/*=====================================================================*/
#define mp make_pair
#define pb push_back
#define rep(i,n) for(int i=0;i<(int)(n);i++)
//#define sz(a) (int)(a.size())
#define len(a) (int)(a.length())
#define all(s) (s).begin(),(s).end()
#define fi first
#define se second
#define be begin
#define en end
#define repd(i,n) for(int i=n-1;i>=0;i--)
#define forn(i,p,n) for(int i=p;i<n;i++)
#define ford(i,p,n) for(int i=n-1;i>=p;i--)
#define foreach(i,c) for(__typeof(c.begin())i=(c.begin());i!=(c).end();++i)
#define zero(a) memset(a,0,sizeof(a))
#define number(a,num) memeset(a,num,sizeof(a))

/*=====================================================================*/

inline void read(int &x)
{
	short negative=1;
    x=0;
    char c=getchar();
    while(c<'0' || c>'9')
    {
		if(c=='-')
			negative=-1;
		c=getchar();
	}
    while(c>='0' && c<='9')
        x=(x<<3)+(x<<1)+(c^48),c=getchar();
    x*=negative;
}
inline void write(long long x) {
  static long long sta[35];
  long long top = 0;
  do {
    sta[top++] = x % 10, x /= 10;
  } while (x);
  while (top) putchar(sta[--top] + 48);
  puts("");
}
/*======================================================================*/
bool prime(int n)
{
	if(n==0||n==1)
	  return false;
	for(int i=2;i*i<=n;i++)
	  if(n%i==0)
	    return false;
	return true;
}
/*======================================================================*/
const int dx[]={-1,0,1,0};
const int dy[]={0,-1,0,1};
int color[100010],bef[100010];
vi v[100010];
int g[2]={0};
/*======================================================================*/
void dfs(int u,int p)
{
	bef[u]=p;
	rep(i,v[u].size())
	{
		if(v[u][i]!=p)
		  dfs(v[u][i],u);
	}
}
void dfs2(int n,int p,int c)
{
	g[c]++;
	rep(i,v[n].size())
	{
		if(v[n][i]==p)
		  continue;
		if(color[v[n][i]]==1-c)
		  continue;
		dfs2(v[n][i],n,c);
	}
}
int main()
{
  /*
	ios_base::sync_with_stdio(0);
	cin(tie);
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
  */
  /*====================================================================*/
  int n;
  read(n);
  vvi e(n,vi());
  rep(i,n-1)
  {
  	int a,b;
  	read(a);
  	read(b);
  	a--,b--;
  	v[a].pb(b);
  	v[b].pb(a);
  }
  vi p(n,-1),sz(n,0);
  memset(bef,-1,sizeof(bef))
  dfs(0,-1);
  int c=n-1;
  vi path;
  while(c>=0)
  {
  	c=bef[c];
  	if(c==0)
  	  break;
  	path.pb(bef[c]);
  }
  reverse(path.begin(),path.end());
  memset(color,-1,sizeof(color));
  color[0]=0;
  color[n-1]=1;
  rep(i,path.size())
    color[path[i]]=1;
  rep(i,(path.size()+1)/2)
    color[path[i]]=0;
  dfs2(0,-1,0);
  dfs2(n-1,-1,1);
  //cout<<g[0]<<" "<<g[1]<<endl;
  if(g[0]>g[1])
    cout<<"Fennec"<<endl;
  else
    cout<<"Snuke"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:156:29: error: expected ';' before 'dfs'
  156 |   memset(bef,-1,sizeof(bef))
      |                             ^
      |                             ;
  157 |   dfs(0,-1);
      |   ~~~