Language: C++

#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int INF=0x3f3f3f3f,maxn=200010;
vector<int>v[maxn];
queue<int> q1,q2;
int n,m,col[maxn],g[maxn];
void dfs(int x,int f,int t)
{
	if(x==n-1)
		return;
	col[x]=col[f];
	g[x]=t;
	for(int i=0;i<v[x].size();i++)
	{
		if(v[x][i]==f)continue;
		dfs(v[x][i],x,t+1);
	}
	return;
}
void dfs2(int x,int f,int t)
{
	if(t<g[x])
		col[x]=2;
	else
		return;
	for(int i=0;i<v[x].size();i++)
	{
		if(v[x][i]==f)continue;
		dfs(v[x][i],x,t+1);
	}
	return;
}
int main()
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int INF=0x3f3f3f3f,maxn=200010;
vector<int>v[maxn];
queue<int> q1,q2;
int n,m,col[maxn];
int bfs()
{
	int i;
	while(1)
	{
		int x=q1.front();q1.pop();
		col[x]=1;
		for(i=0;i<v[x].size();i++)
		{
			if(col[v[x][i]]==0)
				q1.push(v[x][i]);
		}
		if(q1.empty()==1)
			return 1;
		int y=q2.front();q2.pop();
		while(1)
		{
			if(col[y]!=0)
			{
				y=q2.front();q2.pop();
			}
			else
				break;
		}
		col[y]=2;
		for(i=0;i<v[y].size();i++)
			if(!col[v[y][i]]==0)
				q2.push(v[x][i]);
		if(q2.empty()==1)
			return 2;
	}
}
int main()
{
	int i,j,k,ans=0;
	cin>>n;
	for(i=0;i<n-1;i++)
	{
		int x,y;
		cin>>x>>y;
		x--;
		y--;
		v[x].push_back(y);
		v[y].push_back(x);
	}
	col[0]=1;
	col[n-1]=2;
	q1.push(0);
	q2.push(n-1);
	if(bfs()==1)
		cout<<"Snuke"<<endl;
	else
		cout<<"Fennec"<<endl;
	return 0;
}


Compiler output:
a.cc:39:1: error: expected initializer before 'using'
   39 | using namespace std;
      | ^~~~~
a.cc:40:11: error: redefinition of 'const int INF'
   40 | const int INF=0x3f3f3f3f,maxn=200010;
      |           ^~~
a.cc:5:11: note: 'const int INF' previously defined here
    5 | const int INF=0x3f3f3f3f,maxn=200010;
      |           ^~~
a.cc:40:26: error: redefinition of 'const int maxn'
   40 | const int INF=0x3f3f3f3f,maxn=200010;
      |                          ^~~~
a.cc:5:26: note: 'const int maxn' previously defined here
    5 | const int INF=0x3f3f3f3f,maxn=200010;
      |                          ^~~~
a.cc:41:12: error: redefinition of 'std::vector<int> v [200010]'
   41 | vector<int>v[maxn];
      |            ^
a.cc:6:12: note: 'std::vector<int> v [200010]' previously declared here
    6 | vector<int>v[maxn];
      |            ^
a.cc:42:12: error: redefinition of 'std::queue<int> q1'
   42 | queue<int> q1,q2;
      |            ^~
a.cc:7:12: note: 'std::queue<int> q1' previously declared here
    7 | queue<int> q1,q2;
      |            ^~
a.cc:42:15: error: redefinition of 'std::queue<int> q2'
   42 | queue<int> q1,q2;
      |               ^~
a.cc:7:15: note: 'std::queue<int> q2' previously declared here
    7 | queue<int> q1,q2;
      |               ^~
a.cc:43:5: error: redefinition of 'int n'
   43 | int n,m,col[maxn];
      |     ^
a.cc:8:5: note: 'int n' previously declared here
    8 | int n,m,col[maxn],g[maxn];
      |     ^
a.cc:43:7: error: redefinition of 'int m'
   43 | int n,m,col[maxn];
      |       ^
a.cc:8:7: note: 'int m' previously declared here
    8 | int n,m,col[maxn],g[maxn];
      |       ^
a.cc:43:9: error: redefinition of 'int col [200010]'
   43 | int n,m,col[maxn];
      |         ^~~
a.cc:8:9: note: 'int col [200010]' previously declared here
    8 | int n,m,col[maxn],g[maxn];
      |         ^~~