criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <utility>
#include <cmath>
#include <vector>
#include <queue>
#include <set>
#include <map>
#define rep(i, n) for(int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
using Graph = vector<vector<ll>>;
const ll mod = 1000000007;

int main() {
    int n;
    cin >> n;

    Graph to(n), cost(n);
    rep(i, n-1) {
        ll a, b;
        cin >> a >> b;
        a--;  b--;
        to[a].push_back(b);
        to[b].push_back(a);
        cost[a].push_back(1LL);
        cost[b].push_back(1LL);
    }

    vector<ll> dist0(n, -1), distN(n, -1);
    queue<ll> Q0, QN;

    const int root0 = 0, 
    dist0[root0] = 0;
    Q0.push(root0);
    while(!Q0.empty()) {
        
        ll v = Q0.front();
        Q0.pop();

        rep(i, to[v].size()) {
            
            ll u = to[v][i];
            
            if(dist0[u] != -1) {
                continue;
            }
            
            dist0[u] = dist0[v] + cost[v][i];
            Q0.push(u);
        }
    }

    const int rootN = n-1;
    distN[rootN] = 0;
    QN.push(rootN);
    while(!QN.empty()) {
        
        ll v = QN.front();
        QN.pop();

        rep(i, to[v].size()) {
            
            ll u = to[v][i];
            
            if(distN[u] != -1) {
                continue;
            }
            
            distN[u] = distN[v] + cost[v][i];
            QN.push(u);
        }
    }
    
    int cnt0 = 0, cntN = 0;
    rep(i, n) { 
        if(dist0[i] <= distN[i]) {
            cnt0++;
        }
        else {
            cntN++;
        }
    }

    if(cnt0 > cntN) {
        cout << "Fennec";
    }
    else {
        cout << "Snuke";
    }
    
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:5: error: conflicting declaration 'const int dist0 [0]'
   36 |     dist0[root0] = 0;
      |     ^~~~~
a.cc:32:16: note: previous declaration as 'std::vector<long long int> dist0'
   32 |     vector<ll> dist0(n, -1), distN(n, -1);
      |                ^~~~~
Language: C++

//どうしてもフェネちゃん VS きすけくん にしたかった..........

/*  include  */
#include <cstdio>

/*  using namespace  */
using namespace std;

/*  local var  */
vector<int> グラフ[100005];

/*  define  */
#define loop(i,j) for(int i = 0; i < j; i++)

/*  typedef  */
typedef long long ll;

/*  function  */
void dfs(int マス,int 前回いた場所,int 距離差,int 距離配列[])
{
	/*  距離差の設定  */
	距離配列[マス]=距離差;
	loop(i,sizeof(グラフ[マス])){
		/*  前回いた場所でなければ行ってないので行く  */
		if(グラフ[マス][i] != 前回いた場所 ) dfs(グラフ[マス][i],マス,距離差+1,距離配列);
	}
}

/*  main program  */
int main()
{	
	int フェネック[100005];	
	int きすけ[100005];
	int マス数;
	int 連結A,連結B;
	int フェネちゃんが塗れるマス数=0;

	scanf("%d",&マス数);

	loop(i,マス数-1){
		scanf("%d %d",&連結A,&連結B);
		連結A--,連結B--;		 //連結A 連結Bの数を一つ減らし、0からマス数-1の数で表現
		グラフ[連結A].push_back(連結B);	 //グラフに辺を追加する この時点では「有向グラフ(AからBにしか行けない)」
		グラフ[連結B].push_back(連結A);	 //上記同様。「BからAへの辺を追加して無向グラフにする」
	}

	dfs(0,-1,0,フェネック);			 //フェネちゃんはマス0からスタート。スタートなので前回いたところは -1 とする。 距離差はもちろん0
	dfs(マス数-1,-1,0,きすけ);		 //上記同様。ただし きすけくんはマス数-1の数からのスタートなので マス数-1からスタートする。
	loop(i,マス数){
		 //フェネちゃんは先手だから「自分がiマス目に到着する手数が相手の手数"以下"であれば良い。」
		(フェネック[i]<=きすけ[i])?フェネちゃんが塗れるマス数++:フェネちゃんが塗れるマス数--;
	}
	/*後は塗った数が同数であった場合、フェネちゃんが塗れなくなるためきすけくんの勝利とすればよい。*/
	printf("%s\n",(フェネちゃんが塗れるマス数>0)?"Fennec":"Snuke");
	
}


Compiler output:
a.cc:10:1: error: 'vector' does not name a type
   10 | vector<int> グラフ[100005];
      | ^~~~~~
a.cc: In function 'void dfs(int, int, int, int*)':
a.cc:23:23: error: '\U000030b0\U000030e9\U000030d5' was not declared in this scope
   23 |         loop(i,sizeof(グラフ[マス])){
      |                       ^~~~~~
a.cc:13:38: note: in definition of macro 'loop'
   13 | #define loop(i,j) for(int i = 0; i < j; i++)
      |                                      ^
a.cc: In function 'int main()':
a.cc:43:17: error: '\U000030b0\U000030e9\U000030d5' was not declared in this scope
   43 |                 グラフ[連結A].push_back(連結B);  //グラフに辺を追加する この時点では「有向グラフ(AからBにしか行けない)」
      |                 ^~~~~~
Language: C++

//どうしてもフェネちゃん VS きすけくん にしたかった..........

/*  include  */
#include <cstdio>

/*  using namespace  */
using namespace std;

/*  local var  */
int グラフ[100][100];

/*  define  */
#define loop(i,j) for(int i = 0; i < j; i++)

/*  typedef  */
typedef long long ll;

/*  function  */
void dfs(int マス,int 前回いた場所,int 距離差,int 距離配列[])
{
	/*  距離差の設定  */
	距離配列[マス]=距離差;
	loop(i,sizeof(グラフ[マス])){
		/*  前回いた場所でなければ行ってないので行く  */
		if(グラフ[マス][i] != 前回いた場所 ) dfs(グラフ[マス][i],マス,距離差+1,距離配列);
	}
}

/*  main program  */
int main()
{	
	int フェネック[100005];	
	int きすけ[100005];
	int マス数;
	int 連結A,連結B;
	int フェネちゃんが塗れるマス数=0;

	scanf("%d",&マス数);

	loop(i,マス数-1){
		scanf("%d %d",&連結A,&連結B);
		連結A--,連結B--;		 //連結A 連結Bの数を一つ減らし、0からマス数-1の数で表現
		グラフ[連結A].push_back(連結B);	 //グラフに辺を追加する この時点では「有向グラフ(AからBにしか行けない)」
		グラフ[連結B].push_back(連結A);	 //上記同様。「BからAへの辺を追加して無向グラフにする」
	}

	dfs(0,-1,0,フェネック);			 //フェネちゃんはマス0からスタート。スタートなので前回いたところは -1 とする。 距離差はもちろん0
	dfs(マス数-1,-1,0,きすけ);		 //上記同様。ただし きすけくんはマス数-1の数からのスタートなので マス数-1からスタートする。
	loop(i,マス数){
		 //フェネちゃんは先手だから「自分がiマス目に到着する手数が相手の手数"以下"であれば良い。」
		(フェネック[i]<=きすけ[i])?フェネちゃんが塗れるマス数++:フェネちゃんが塗れるマス数--;
	}
	/*後は塗った数が同数であった場合、フェネちゃんが塗れなくなるためきすけくんの勝利とすればよい。*/
	printf("%s\n",(フェネちゃんが塗れるマス数>0)?"Fennec":"Snuke");
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:43:31: error: request for member 'push_back' in '\U000030b0\U000030e9\U000030d5[\U00009023\U00007d50A]', which is of non-class type 'int [100]'
   43 |                 グラフ[連結A].push_back(連結B);  //グラフに辺を追加する この時点では「有向グラフ(AからBにしか行けない)」
      |                               ^~~~~~~~~
a.cc:44:31: error: request for member 'push_back' in '\U000030b0\U000030e9\U000030d5[\U00009023\U00007d50B]', which is of non-class type 'int [100]'
   44 |                 グラフ[連結B].push_back(連結A);  //上記同様。「BからAへの辺を追加して無向グラフにする」
      |                               ^~~~~~~~~
Language: C++

//どうしてもフェネちゃん VS きすけくん にしたかった..........

/*  include  */
#include <cstdio>

/*  using namespace  */
using namespace std;

/*  local var  */
int グラフ[100][100];

/*  define  */
#define loop(i,j) for(int i = 0; i < j; i++)

/*  typedef  */
typedef long long ll;

/*  function  */
void dfs(int マス,int 前回いた場所,int 距離差,int 距離配列[])
{
	/*  距離差の設定  */
	距離配列[マス]=距離差;
	loop(i,sizeof(グラフ[マス])){
		/*  前回いた場所でなければ行ってないので行く  */
		if(グラフ[マス][i] != 前回いた場所 ) dfs(グラフ[マス][i],マス,距離差+1,距離配列);
	}
}
x
/*  main program  */
int main()
{	
	int フェネック[100005];	
	int きすけ[100005];
	int マス数;
	int 連結A,連結B;
	int フェネちゃんが塗れるマス数=0;

	scanf("%d",&マス数);

	loop(i,マス数-1){
		scanf("%d %d",&連結A,&連結B);
		連結A--,連結B--;		 //連結A 連結Bの数を一つ減らし、0からマス数-1の数で表現
		グラフ[連結A].push_back(連結B);	 //グラフに辺を追加する この時点では「有向グラフ(AからBにしか行けない)」
		グラフ[連結B].push_back(連結A);	 //上記同様。「BからAへの辺を追加して無向グラフにする」
	}

	dfs(0,-1,0,フェネック);			 //フェネちゃんはマス0からスタート。スタートなので前回いたところは -1 とする。 距離差はもちろん0
	dfs(マス数-1,-1,0,きすけ);		 //上記同様。ただし きすけくんはマス数-1の数からのスタートなので マス数-1からスタートする。
	loop(i,マス数){
		 //フェネちゃんは先手だから「自分がiマス目に到着する手数が相手の手数"以下"であれば良い。」
		(フェネック[i]<=きすけ[i])?フェネちゃんが塗れるマス数++:フェネちゃんが塗れるマス数--;
	}
	/*後は塗った数が同数であった場合、フェネちゃんが塗れなくなるためきすけくんの勝利とすればよい。*/
	printf("%s\n",(フェネちゃんが塗れるマス数>0)?"Fennec":"Snuke");
	
}

Compiler output:
a.cc:28:1: error: 'x' does not name a type
   28 | x
      | ^
Language: C++

#include <set>
#include "algorithm-lib.hpp"

using graph = map<i32, vector<i32>>;

void dfs(i32 depth, i32 curr, graph& g, vector<i32>& d)
{
	d[curr] = depth;
	for (const auto& next : g[curr]) {
		if (d[next] >= 0) continue;
		dfs(depth + 1, next, g, d);
	}
}

int main() {
  i32 N;
  graph g;
  cin >> N;
  REP(i, N-1) {
    i32 a, b;
    cin >> a >> b;
    g[a].emplace_back(b);
    g[b].emplace_back(a);
  }

  vector<i32> distance_fennec(N + 1, -1);
  dfs(0, 1, g, distance_fennec);

  vector<i32> distance_snuke(N + 1, -1);
  dfs(0, N, g, distance_snuke);

  i32 fennec_visited = 0;
  i32 snuke_visited = 0;
  for (i32 i = 1; i <= N; i++) {
	  if (distance_fennec[i] <= distance_snuke[i]) {
		  fennec_visited++;
	  } else {
		  snuke_visited++;
	  }
  }

  if (fennec_visited <= snuke_visited) {
	  puts("Snuke");
  } else {
	  puts("Fennec");
  }

  return 0;
}


Compiler output:
a.cc:2:10: fatal error: algorithm-lib.hpp: No such file or directory
    2 | #include "algorithm-lib.hpp"
      |          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include <vector>
#include <algorithm>

#define FOR(i, a, b) for(int (i) = (a); (i) < (b); ++(i))
#define REP(i, n) FOR(i, 0, n)

std::vector<std::vector<int>> Edge;
std::vector<int> Dist[2];
std::vector<bool> yet;

int main(void){
    int n; scanf("%d", &n);
    Edge.resize(n);
    FOR(_, 1, n){
        int a, b; scanf("%d%d", &a, &b); a--; b--;
        Edge[a].push_back(b);
        Edge[b].push_back(a);
    }
    yet.resize(n);
    REP(p, 2){
        std::fill(yet.begin(), yet.end(), true);
        Dist[p].resize(n);
        int s = (p == 0 ? 0 : n - 1);
        std::queue<int> Q;
        Q.push(s); Dist[p][s] = 0; yet[s] = false;
        while(not Q.empty()){
            int v = Q.front(); Q.pop();
            for(int nv : Edge[v]) if(yet[nv]){
                yet[nv] = false;
                Dist[p][nv] = Dist[p][v] + 1;
                Q.push(nv);
            }
        }
    }
    int a = 0, b = 0;
    REP(i, n){
        if(Dist[0][i] <= Dist[1][i]) a++;
        else b++;
    }
    puts(a > b ? "Fennec" : "Snuke");
  
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:14: error: 'queue' is not a member of 'std'
   25 |         std::queue<int> Q;
      |              ^~~~~
a.cc:4:1: note: 'std::queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
    3 | #include <algorithm>
  +++ |+#include <queue>
    4 | 
a.cc:25:20: error: expected primary-expression before 'int'
   25 |         std::queue<int> Q;
      |                    ^~~
a.cc:26:9: error: 'Q' was not declared in this scope
   26 |         Q.push(s); Dist[p][s] = 0; yet[s] = false;
      |         ^
Language: C++

//#include "pch.h"
#include "stdafx.h"
#include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include <math.h>
#include <string>
#include <cstring>

using namespace std;

/*-----------------------------------------------------------------------------
　定義
 -------------------------------------------------------------------------------*/
#define REP(i, n) for (int (i) = 0 ; (i) < (int)(n) ; ++(i))
#define REPN(i, m, n) for (int (i) = m ; (i) < (int)(n) ; ++(i))
#define REP_REV(i, n) for (int (i) = (int)(n) - 1 ; (i) >= 0 ; --(i))
#define REPN_REV(i, m, n) for (int (i) = (int)(n) - 1 ; (i) >= m ; --(i))
#define INF				2e9
#define MOD				(1000 * 1000 * 1000 + 7)
#define MIN(a, b)		((a) < (b) ? a : b)
#define MAX(a, b)		((a) > (b) ? a : b)
#define IsOdd(x)		(((x)&0x01UL) == 0x01UL)		/* 奇数 */
#define IsEven(x)		(!IsOdd((x)))					/* 偶数 */
#define ArrayLength(x)	(sizeof(x) / sizeof(x[0]))
#define DWORD_MAX		(0xFFFFFFFF)

typedef short SWORD;
typedef unsigned short WORD;
typedef long SDWORD;
typedef unsigned long DWORD;
typedef long long int QWORD;
#define N_MAX	(1000 * 100 + 1)
#define M_MAX	(1000 * 100 + 1)

/*-----------------------------------------------------------------------------
　処理
 -------------------------------------------------------------------------------*/
int N;
int dist[2][100000], id;
vector<int> g[100000];

void dfs(int nowTo, int nowFrom = -1)
{
	if (0 <= nowFrom) {
		dist[id][nowTo] = dist[id][nowFrom] + 1;
	}

	for (auto &nextTo : g[nowTo]) {
		// 来た道は省く
		if (nextTo != nowFrom) {
			dfs(nextTo, nowTo);
		}
	}
}

int main()
{
	cin >> N;

	for (int i = 0; i < N - 1; i++) {
		int a, b;
		cin >> a >> b;
		--a, --b;
		g[a].emplace_back(b);
		g[b].emplace_back(a);
	}

	id = 0;
	dfs(0);
	id = 1;
	dfs(N - 1);

	int ret = 0;
	for (int i = 0; i < N; i++) {
		if (dist[0][i] <= dist[1][i]) {
			++ret;
		}
	}
	
	if (ret >= (N + 2) / 2) {
		cout << "Fennec" << endl;
	} else {
		cout << "Snuke" << endl;
	}
}


Compiler output:
a.cc:2:10: fatal error: stdafx.h: No such file or directory
    2 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C++

#include <iostream>
#include <fstream>
#include <string>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <utility>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <unordered_map>
#include <limits.h>
#include <bitset>
#define int long long
using namespace std;
using P = pair<int, int>;
using ll = long long;
using prique = priority_queue<int>;
const int MOD = 1000000007;
const int INF = LLONG_MAX/3;
const int MAX = 510000;
vector<int> e[114514];
bool reached[114514];
int n;
int dfs(int s){
    int re=1;
    for(int i=0;i<e[s].size();i++){
        if(!reached[e[s][i]]&&e[s][i]!=0&&e[s][i]!=n-1){
            reached[e[s][i]]=true;
            re+=dfs(e[s][i]);
        }
    }
    return re;
}
signed main(){
    cin>>n;
    for(int i=0;i<n-1;i++){
        int a,b;
        cin>>a>>b;
        e[a-1].push_back(b-1);
        e[b-1].push_back(a-1);
    }
    for(int i=0;i<n;i++)reached[i]=false;
    int a=dfs(0);
    for(int i=0;i<n;i++)reached[i]=false;
    int b=dfs(n-1);
    cout<<(a=>b?"Fennec":"Snuke")<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:51:14: error: expected primary-expression before '>' token
   51 |     cout<<(a=>b?"Fennec":"Snuke")<<endl;
      |              ^
Language: C++

#include<iostream>
#include<queue>
#include<vector>

using namespace std;

const int MAXN=100000+10;
vector<int> edge[MAXN];
int n,cnt[3];
int tree[MAXN];

void bfs()
{
    queue<int> q;
    q.push(1),q.push(n);
    while(!q.empty())
    {
        int temp=q.front();
        q.pop();
        cnt[tree[temp]]++;
        for(int i=0;i<edge[temp].size();++i)
        {
            int v=edge[temp][i];
            if(tree[v])continue;
            else tree[v]=tree[temp];
            q.push(v);
        }
    }
}

int main()
{
    ios::sync_with_stdio(false);
    memset(tree,0,sizeof(tree));
    cin>>n;
    for(int i=1;i<n;++i)
    {
        int x,y;
        cin>>x>>y;
        edge[x].push_back(y);
        edge[y].push_back(x);
    }
    tree[1]=1,tree[n]=2;
    bfs();
    if(cnt[2]>=cnt[1])
        cout<<"Snuke"<<endl;
    else
        cout<<"Fennec"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:5: error: 'memset' was not declared in this scope
   34 |     memset(tree,0,sizeof(tree));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<queue>
  +++ |+#include <cstring>
    3 | #include<vector>
Language: C++

#include <iostream>
#include <vector>
#include <queue>
using namespace std;

const int INF = 1000000000;
int N;

vector<int> bfs(vector<int> G[N], int s) {
    queue<int> que;
    vector<int> dist(N, INF);
    que.push(s);
    dist[s] = 0;
    while (!que.empty()) {
        int u = que.front(); que.pop();
        for (int i = 0; i < G[u].size(); i++) {
            int v = G[u][i];
            if (dist[v] != INF) continue;
            dist[v] = dist[u] + 1;
            que.push(v);
        }
    }
    return dist;
}

int main() {
    cin >> N;
    vector<int> G[N];
    for (int i = 0; i < N - 1; i++) {
        int a, b;
        cin >> a >> b;
        a--; b--;
        G[a].push_back(b);
        G[b].push_back(a);
    }

    vector<int> dist1 = bfs(G, 0);
    vector<int> dist2 = bfs(G, N - 1);

    int cnt_f = 0, cnt_s = 0;
    for (int i = 0; i < N; i++) {
        if (dist1[i] <= dist2[i]) cnt_f++;
        else cnt_s++;
    }

    if (cnt_f > cnt_s) {
        cout << "Fennec" << endl;
    } else {
        cout << "Snuke" << endl;
    }
    return 0;
}

Compiler output:
a.cc:9:31: error: size of array 'G' is not an integral constant-expression
    9 | vector<int> bfs(vector<int> G[N], int s) {
      |                               ^
Language: C++

#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int 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:26: error: redefinition of 'const int maxn'
   40 | const int INF=0x3f3f3f3f,maxn=200010;
      |                          ^~~~
a.cc:5:11: note: 'const int maxn' previously defined here
    5 | const int 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];
      |         ^~~
Language: C++

#include <bits\stdc++.h>
#include <queue>
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();
		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);
	}
//	cout<<q1.empty();
	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:1:10: fatal error: bits\stdc++.h: No such file or directory
    1 | #include <bits\stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#pragma GCC optimize("Ofast",3,"inline")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const MAXN=1<<18;
int n;
vector<int> e[MAXN];
int cnt[MAXN];
vector<int> vct;
int first;
void dfs(int v,int pr){
	cnt[v]=1;
	vct.pushback(v);
	if(v==n-1){
		first=vct[((int) vct.size()+1)/2];
	}
	for(int to:e[v]){
		if(to==pr) continue;
		dfs(to,v);
		cnt[v]+=cnt[to];
	}
	vct.pop_back();
}

int main(){
	ios_base::sync_with_stdio(false);
	while(scanf("%d",&n)==1){
		for(int i=0;i<n;i++){
			e[i].clear();
		}
		for(int i=0;i<n-1;i++){
			int u,v;
			scanf("%d%d",&u,&v);
			u--;
			v--;
			e[u].push_back(v);
			e[v].push_back(u);
		}
	}
	first=-1;
	dfs(0,0);
	bool win=cnt[first]*2<n;
	//优秀判断 
	string ans=win?"Fennec":"Snuke";
	cout<<ans; 
	return 0;
}


Compiler output:
a.cc:5:7: error: 'MAXN' does not name a type
    5 | const MAXN=1<<18;
      |       ^~~~
a.cc:7:15: error: 'MAXN' was not declared in this scope
    7 | vector<int> e[MAXN];
      |               ^~~~
a.cc:8:9: error: 'MAXN' was not declared in this scope
    8 | int cnt[MAXN];
      |         ^~~~
a.cc: In function 'void dfs(int, int)':
a.cc:12:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   12 |         cnt[v]=1;
      |         ^~~
      |         int
a.cc:13:13: error: 'class std::vector<int>' has no member named 'pushback'; did you mean 'push_back'?
   13 |         vct.pushback(v);
      |             ^~~~~~~~
      |             push_back
a.cc:17:20: error: 'e' was not declared in this scope
   17 |         for(int to:e[v]){
      |                    ^
a.cc: In function 'int main()':
a.cc:29:25: error: 'e' was not declared in this scope
   29 |                         e[i].clear();
      |                         ^
a.cc:36:25: error: 'e' was not declared in this scope
   36 |                         e[u].push_back(v);
      |                         ^
a.cc:42:18: error: 'cnt' was not declared in this scope; did you mean 'int'?
   42 |         bool win=cnt[first]*2<n;
      |                  ^~~
      |                  int
Language: C

#include <cstdio>
#include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
#include <queue>
#include <cstring>
using namespace std;
const long long MOD = 1000000007;

typedef long long ll;

int
main(int argc, const char *argv[])
{
  vector<int> g[100010];
  int n;
  scanf("%d", &n);
  int a, b;
  for (int i = 0; i < n - 1; i++) {
    scanf("%d %d", &a, &b);
    a--; b--;
    g[a].push_back(b);
    g[b].push_back(a);
  }

  queue<int> p, q;

  p.push(0); p.push(-1);
  q.push(n); q.push(-1);
  int color[100010] = {}, x, y;
  color[0] = 1; color[n - 1] = 2;
  while (!p.empty() && !q.empty()) {
    if (!p.empty()) {
      while (1) {
	x = p.front(); p.pop();
	if (x == -1) break;
	for (int i = 0; i < g[x].size(); i++) {
	  if (color[g[x][i]] == 0) {
	      color[g[x][i]] = 1;
	      p.push(g[x][i]);
	  }
	}
      }
      if (!p.empty()) p.push(-1);
    }
    if (!q.empty()) {
      while (1) {
	y = q.front(); q.pop();
	if (y == -1) break;
	for (int i = 0; i < g[y].size(); i++) {
	  if (color[g[y][i]] == 0) {
	    color[g[y][i]] = 1;
	    q.push(g[y][i]);
	  }
	}
      }
      if (!q.empty()) q.push(-1);
    }
  }

  int f = 0, s = 0;
  for (int i = 0; i < n; i++) {
    if (color[i] == 1) f++;
    else s++;
  }

  if (f <= s) printf("Snuke\n");
  else printf("Fennec\n");

  return 0;
}
	   
	   

  


Compiler output:
main.c:1:10: fatal error: cstdio: No such file or directory
    1 | #include <cstdio>
      |          ^~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define REPP(i,n) for(int i=1;i<=n;i++)
const double PI = acos(-1);
const double EPS = 1e-15;
long long INF=(long long)1E17;
#define i_7 (long long)(1E9+7)
long mod(long a){
    long long c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
using namespace std;
bool prime_(int n){
  if(n==1){
    return false;
  }else if(n==2){
    return true;
  }else{
    for(int i=2;i<=sqrt(n);i++){
      if(n%i==0){
        return false;
      }
    }
    return true;
  }
}

long long gcd_(long long a, long long b){
  if(a<b){
    swap(a,b);
  }
  if(a%b==0){
    return b;
  }else{
    return gcd_(b,a%b);
  }
}
 
long long lcm_(long long x, long long y){
  return (x/gcd_(x,y))*y;
}
 
class UnionFind {
    public:
    //各頂点の親の番号を格納する。その頂点自身が親だった場合は-(その集合のサイズ)を入れる。
    vector<int> Parent;
    
    //クラスを作るときは、Parentの値を全て-1にする。
    //以下のようにすると全てバラバラの頂点として解釈できる。
    UnionFind(int N) {
        Parent = vector<int>(N, -1);
    }
    
    //Aがどのグループに属しているか調べる
    int root(int A) {
        if (Parent[A] < 0) return A;
        return Parent[A] = root(Parent[A]);
    }
    
    //自分のいるグループの頂点数を調べる
    int size(int A) {
        return -Parent[root(A)];//先祖をrootで取っておきたい。
    }
    
    //AとBをくっ付ける
    bool connect(int A, int B) {
        //AとBを直接つなぐのではなく、root(A)にroot(B)をくっつける
        A = root(A);
        B = root(B);
        if (A == B) {
            //すでにくっついてるからくっ付けない
            return false;
        }
        
        //大きい方(A)に小さいほう(B)をくっ付けたい
        //大小が逆だったらAとBをひっくり返す。
        if (size(A) < size(B)) swap(A, B);
        
        //Aのサイズを更新する
        Parent[A] += Parent[B];
        //Bの親をAに変更する
        Parent[B] = A;
        
        return true;
    }
};

vector<int> G[100010];
vector<int> dist1(100010,-1);//1からの距離を持つ配列
vector<int> distN(100010,-1);//nからの距離を持つ配列

void dfs1(int now){
  for(int i:G[now]){
    if(dist1[i]>0)continue;
    dist1[i] = dist1[now] + 1;
    dfs1(i);
  }
  return;
}

void dfsN(int now){
  for(int i:G[now]){
    if(distN[i]>0)continue;
    distN[i] = distN[now] + 1;
    dfsN(i);
  }
  return;
}

int main(){
  
  int n;
  cin>>n;
  int a,b;
  REP(i,n-1){
    cin>>a>>b;
    a--;b--;
    G[a].push_back(b);
    G[b].push_back(a);
  }
  
  dist1[0]=0;
  dfs1(0);
  distN[n-1]=0;
  dfsN(n-1);
  
  int cnt=0;
  REP(i,n){
    if(dist[i]<=distN[i]){
      cnt++;
    }
  }
  
  if(cnt>n-cnt){
    cout<<"Fennec"<<endl;
  }else{
    cout<<"Sunuke"<<endl;
  }
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:130:8: error: 'dist' was not declared in this scope; did you mean 'distN'?
  130 |     if(dist[i]<=distN[i]){
      |        ^~~~
      |        distN
Language: C++

#include<iostream>
#include<queue>
#include<vector>

using namespace std;

const int MAXN=100000+10;
vector<int> edge[MAXN];//用邻接表来实现树的存储
int n,cnt[3];//cnt用来记录颜色数量
int tree[MAXN];//tree数组储存每个节点的颜色，1是指black，2指white

void bfs()
{
    queue<int> q;
    q.push(1),q.push(n);//Fennec先，Snuke后，所以先后入队
    while(!q.empty())
    {
        int temp=q.front();
        q.pop();
        cnt[tree[temp]]++;//注意位置！！（咳咳）
        for(int i=0;i<edge[temp].size();++i)//枚举所有节点
        {
            int v=edge[temp][i];
            //cnt[tree[temp]]++;  不要在意细节（^_^）
            if(tree[v])continue;
            else tree[v]=tree[temp];//判断是否涂过色
            q.push(v);
        }
    }
}

int main()
{
    ios::sync_with_stdio(false);
    memset(tree,0,sizeof(tree));
    cin>>n;
    for(int i=1;i<n;++i)
    {
        int x,y;
        cin>>x>>y;
        edge[x].push_back(y);
        edge[y].push_back(x);//邻接表建树
    }
    tree[1]=1,tree[n]=2;
    bfs();
    if(cnt[2]>=cnt[1])//因为Fennec先手，所以如果最终结果相同，很明显是Snuke赢了
        cout<<"Snuke"<<endl;
    else
        cout<<"Fennec"<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:5: error: 'memset' was not declared in this scope
   35 |     memset(tree,0,sizeof(tree));
      |     ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<queue>
  +++ |+#include <cstring>
    3 | #include<vector>
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <numeric>
#include <iomanip>
#include <tuple>

using namespace std;
bool d[100005][100005];
bool used[100005];
int res=0;

int dfs(int s,int t,int n){
   for(int i=0;i<n;i++){
      if(d[s][i] && !used[i] && i!=t){
         used[i]=true;
         res++;
         dfs(i,t,n);
      }
   }
   return res;
}

int main(){
   int n;
   cin>>n;
   vector<int> a(n-1),b(n-1);
   for(int i=0;i<n-1;i++){
      cin>>a[i]>>b[i];
      a[i]--;b[i]--;
      d[a[i]][b[i]]=true;
      d[b[i]][a[i]]=true;
   }

   int p=dfs(0,n-1,n);
   for(int i=0;i<n;i++)used[i]=false;
   res=0;
   int q=dfs(n-1,0,n);

   if(p>=q)cout<<"Fennec"<<endl;
   else cout<<"Snuke"<<endl;


}

   


Compiler output:
/tmp/ccJcGYzI.o: in function `dfs(int, int, int)':
a.cc:(.text+0x48): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccJcGYzI.o
a.cc:(.text+0x67): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccJcGYzI.o
a.cc:(.text+0x71): relocation truncated to fit: R_X86_64_PC32 against symbol `res' defined in .bss section in /tmp/ccJcGYzI.o
a.cc:(.text+0x7a): relocation truncated to fit: R_X86_64_PC32 against symbol `res' defined in .bss section in /tmp/ccJcGYzI.o
a.cc:(.text+0xa2): relocation truncated to fit: R_X86_64_PC32 against symbol `res' defined in .bss section in /tmp/ccJcGYzI.o
/tmp/ccJcGYzI.o: in function `main':
a.cc:(.text+0x28d): relocation truncated to fit: R_X86_64_PC32 against symbol `used' defined in .bss section in /tmp/ccJcGYzI.o
a.cc:(.text+0x2a3): relocation truncated to fit: R_X86_64_PC32 against symbol `res' defined in .bss section in /tmp/ccJcGYzI.o
collect2: error: ld returned 1 exit status
Language: C++

#include<algorithm>
#include<complex>
#include<ctype.h>
#include<iomanip>
#include<iostream>
#include<map>
#include<math.h>
#include<numeric>
#include<queue>
#include<set>
#include<stack>
#include<stdio.h>
#include<string>
#include<string>
#include<vector>

using namespace std;
typedef long long ll;

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define pn(s) cout << (#s) << " " << (s) << endl
#define p_yes() p("Yes")
#define p_no() p("No")

const ll mod = 1e9 + 7;
const ll inf = 1e18;

const int N_MAX = 100010;
bool visited[N_MAX];

void reset_visited(){
    FOR(i, 0, N_MAX){
        visited[i] = false;
    }
}


int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    // input
    int N;
    cin >> N;

    vector<vector<int> > graph(N+1);
    FOR(i, 0, N){
        int a, b;
        cin >> a >> b;
        graph[a].push_back(b);
        graph[b].push_back(a);
    }

    // fennecからの距離
    reset_visited();
    int d[N+1];
    queue<int> que;
    d[1] = 0;
    que.push(1);
    while(!que.empty()){
        int front = que.front();
        que.pop();

        auto list = graph[front];
        FOR(i, 0, list.size()){
            int dest = list[i];
            if(!visited[dest]){
                visited[dest] = true;
                que.push(dest);
                d[dest] = d[front] + 1;
            }
        }
    }
    int d0[N+1];
    memcpy(d0, d, sizeof(d)); 

    // snukeからの距離
    reset_visited();
    d[N] = 0;
    que.push(N);
    while(!que.empty()){
        int front = que.front();
        que.pop();

        auto list = graph[front];
        FOR(i, 0, list.size()){
            int dest = list[i];
            if(!visited[dest]){
                visited[dest] = true;
                que.push(dest);
                d[dest] = d[front] + 1;
            }
        }
    }

    int d1[N+1];
    memcpy(d1, d, sizeof(d));

    int black = 0;
    int white = 0;
    FOR(i, 2, N-1){
        if(d0[i] <= d1[i]){
            black++;
        }else{
            white++;
        }
    } 

    if(black==white){
        p("Snuke");
    }
    else if(black > white){
        p("Fennec");
    }
    else{
        p("Snuke");
    }

    

    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:78:5: error: 'memcpy' was not declared in this scope
   78 |     memcpy(d0, d, sizeof(d));
      |     ^~~~~~
a.cc:12:1: note: 'memcpy' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include<stack>
  +++ |+#include <cstring>
   12 | #include<stdio.h>
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <functional>
#include <numeric>
#include <list>
#include <set>
#include <map>

#define v_exists(elem, v) find(v.begin(),v.end(),elem)!=v.end()
#define s_exists(elem, s) s.find(elem)!=s.end()

using namespace std;
const int MOD = 1000000007;

long gcd(long a, long b) {
    return b == 0 ? a : gcd(b, a % b);
}

long lcm( long m, long n ){
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;

	return ((m / gcd(m, n)) * n);
}


long kake(long x, long y){
	return x * y % MOD;
}

long fact_mod(long x){
	long ans = x;
	x-=1;
	while(x>1){
		ans = ans * x % MOD;
		x-=1;
	}
	return ans;
}

std::map<int, std::vector<int>> adj;
std::set<long> visited;
long l1 [100001];
long l2 [100001];

void dfs1(long s, long d){
	l1[s] = d;
	visited.insert(s);

	for(int i=0; i<adj[s].size(); i++){
		if(s_exists(adj[s][i], visited)==false){
			dfs(adj[s][i], d+1);
	}
	}
}

void dfs2(long s, long d){
	l2[s] = d;
	visited.insert(s);

	for(int i=0; i<adj[s].size(); i++){
		if(s_exists(adj[s][i], visited)==false){
			dfs(adj[s][i], d+1);
	}
	}
}

int main(){


	long N;
	scanf("%ld",&N);

	for(int i=0; i<N;i++){
		std::vector<int> v = {};
		adj[i]=v;
	}


	for(int i=0; i<N-1;i++){
		long a,b;
		scanf("%ld %ld",&a,&b);
		adj[a].push_back(b);
		adj[b].push_back(a);
	}

	dfs1(0, 0);
	visited.clear();
	dfs2(N-1, 0);


	long score = 0;

	for(int i=0; i<N; i++){
		if(l1[i] <= l2[i]){
			score+=1;
		} else{
			score-=1;
		}
	}

	if(score>=0){
		cout << "Fennec" << endl;
	} else{
		cout << "Snuke" << endl;
	}




}

Compiler output:
a.cc: In function 'void dfs1(long int, long int)':
a.cc:54:25: error: 'dfs' was not declared in this scope; did you mean 'dfs1'?
   54 |                         dfs(adj[s][i], d+1);
      |                         ^~~
      |                         dfs1
a.cc: In function 'void dfs2(long int, long int)':
a.cc:65:25: error: 'dfs' was not declared in this scope; did you mean 'dfs2'?
   65 |                         dfs(adj[s][i], d+1);
      |                         ^~~
      |                         dfs2
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <functional>
#include <numeric>
#include <list>
#include <set>
#include <map>

#define v_exists(elem, v) find(v.begin(),v.end(),elem)!=v.end()
#define s_exists(elem, s) s.find(elem)!=s.end()

using namespace std;
const int MOD = 1000000007;

long gcd(long a, long b) {
    return b == 0 ? a : gcd(b, a % b);
}

long lcm( long m, long n ){
	if ( ( 0 == m ) || ( 0 == n ) )
		return 0;

	return ((m / gcd(m, n)) * n);
}


long kake(long x, long y){
	return x * y % MOD;
}

long fact_mod(long x){
	long ans = x;
	x-=1;
	while(x>1){
		ans = ans * x % MOD;
		x-=1;
	}
	return ans;
}

std::map<int, std::vector<int>> adj;
std::set<long> visited;
long l1 [100001];
long l2 [100001];

void dfs1(long s, long d){
	l1[s] = d;
	visited.insert(s);

	for(int i=0; i<adj[s].size(); i++){
		if(s_exists(adj[s][i], visited)==false){
			dfs(adj[s][i], d+1, visited, d_list);
	}
	}
}

void dfs2(long s, long d){
	l2[s] = d;
	visited.insert(s);

	for(int i=0; i<adj[s].size(); i++){
		if(s_exists(adj[s][i], visited)==false){
			dfs(adj[s][i], d+1, visited, d_list);
	}
	}
}

int main(){


	long N;
	scanf("%ld",&N);

	for(int i=0; i<N;i++){
		std::vector<int> v = {};
		adj[i]=v;
	}


	for(int i=0; i<N-1;i++){
		long a,b;
		scanf("%ld %ld",&a,&b);
		adj[a].push_back(b);
		adj[b].push_back(a);
	}

	dfs1(0, 0);
	visited.clear();
	dfs2(N-1, 0);


	long score = 0;

	for(int i=0; i<N; i++){
		if(l1[i] <= l2[i]){
			score+=1;
		} else{
			score-=1;
		}
	}

	if(score>=0){
		cout << "Fennec" << endl;
	} else{
		cout << "Snuke" << endl;
	}




}

Compiler output:
a.cc: In function 'void dfs1(long int, long int)':
a.cc:54:54: error: 'd_list' was not declared in this scope; did you mean 'va_list'?
   54 |                         dfs(adj[s][i], d+1, visited, d_list);
      |                                                      ^~~~~~
      |                                                      va_list
a.cc:54:25: error: 'dfs' was not declared in this scope; did you mean 'dfs1'?
   54 |                         dfs(adj[s][i], d+1, visited, d_list);
      |                         ^~~
      |                         dfs1
a.cc: In function 'void dfs2(long int, long int)':
a.cc:65:54: error: 'd_list' was not declared in this scope; did you mean 'va_list'?
   65 |                         dfs(adj[s][i], d+1, visited, d_list);
      |                                                      ^~~~~~
      |                                                      va_list
a.cc:65:25: error: 'dfs' was not declared in this scope; did you mean 'dfs2'?
   65 |                         dfs(adj[s][i], d+1, visited, d_list);
      |                         ^~~
      |                         dfs2
Language: C++

#include <iostream>
using namespace std;
int main()
{
	int N;
	int i,j;
	int a[1000],b[1000];
	for(i=0;i<N;i++){
		for(j=0;j<2;j++){
			cin>>a[i][j]>>b[i][j];
		}
	}
	if(N%2){
		cout<<"Fennec"<<endl;
	}else{
		cout<<"Snuke"<<endl;
	}
}
	

Compiler output:
a.cc: In function 'int main()':
a.cc:10:34: error: invalid types 'int[int]' for array subscript
   10 |                         cin>>a[i][j]>>b[i][j];
      |                                  ^
a.cc:10:43: error: invalid types 'int[int]' for array subscript
   10 |                         cin>>a[i][j]>>b[i][j];
      |                                           ^
Language: C++


#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include <numeric>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define REVERSE(v,n) reverse(v,v+n);
#define VREVERSE(v) reverse(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
#define m0(x) memset(x,0,sizeof(x))

using namespace std;



int dy[4] = { 0,0,1,-1 };
int dx[4] = { 1,-1,0,0 };
int dxx[8] = { 0,0,1,1,1,-1,-1,-1 };
int dyy[8] = { 1,-1,0,1,-1,0,1,-1 };


ll m = 1000000007;

ll gcd(ll x, ll y) {
	ll m = max(x, y), n = min(x, y);
	if (m%n == 0)return n;
	else return gcd(m%n, n);
}
ll lcm(ll x, ll y) {
	return x / gcd(x, y)*y;
}

ll myPow(ll x, ll n, ll m) {
	if (n == 0)
		return 1;
	if (n % 2 == 0)
		return myPow(x * x % m, n / 2, m);
	else
		return x * myPow(x, n - 1, m) % m;
}


bool vis1[100010], visN[100010];
int dist1[100010], distN[100010];
vector<int> tree1[100010];

void dfs1(int pos) {
	for (auto i : tree1[pos]) {
		if (!vis1[i]) {
			vis1[i] = true;
			dist1[i] = dist1[pos] + 1;
			dfs1(i);
		}
	}
	return;
}
void dfsN(int pos) {
	for (auto i : tree1[pos]) {
		if (!visN[i]) {
			visN[i] = true;
			distN[i] = distN[pos] + 1;
			dfsN(i);
		}
	}
	return;
}

int main() {
	int N; cin >> N;
	memset(vis1, 0, sizeof(vis1)); memset(visN, 0, sizeof(visN));
	vis1[0] = true; visN[N - 1] = true;
	dist1[0] = 0;
	distN[N-1] = 0;
	REP(i, N-1) {
		int a, b;
		cin >> a >> b;
		a--, b--;
		tree1[a].push_back(b);
	}
	dfs1(0);
	dfsN(N - 1);
	int Fen=0, Snu=0;
	FOR(i,1, N-1) {
		if (dist1[i] <= distN[i]) {
			Fen++;
		}
		else {
			Snu++;
		}
	}
	if (Fen > Snu) {
		cout << "Fennec" << endl;
	}
	else {
		cout << "Snuke" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:83:9: error: 'memset' was not declared in this scope
   83 |         memset(vis1, 0, sizeof(vis1)); memset(visN, 0, sizeof(visN));
      |         ^~~~~~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include <numeric>
  +++ |+#include <cstring>
   12 | #define REP(i, n) for(int i = 0;i < n;i++)
Language: C++


#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include <numeric>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define REVERSE(v,n) reverse(v,v+n);
#define VREVERSE(v) reverse(v.begin(), v.end());
#define ll long long
#define pb(a) push_back(a)
#define INF 999999999
#define m0(x) memset(x,0,sizeof(x))

using namespace std;



int dy[4] = { 0,0,1,-1 };
int dx[4] = { 1,-1,0,0 };
int dxx[8] = { 0,0,1,1,1,-1,-1,-1 };
int dyy[8] = { 1,-1,0,1,-1,0,1,-1 };


ll m = 1000000007;

ll gcd(ll x, ll y) {
	ll m = max(x, y), n = min(x, y);
	if (m%n == 0)return n;
	else return gcd(m%n, n);
}
ll lcm(ll x, ll y) {
	return x / gcd(x, y)*y;
}

ll myPow(ll x, ll n, ll m) {
	if (n == 0)
		return 1;
	if (n % 2 == 0)
		return myPow(x * x % m, n / 2, m);
	else
		return x * myPow(x, n - 1, m) % m;
}
bool vis1[100010], visN[100010];
int dist1[100010], distN[100010];
vector<int> tree1[100010];

void dfs1(int pos) {
	for (auto i : tree1[pos]) {
		if (!vis1[i]) {
			vis1[i] = true;
			dist1[i] = dist1[pos] + 1;
			dfs1(i);
		}
	}
	return;
}
void dfsN(int pos) {
	for (auto i : tree1[pos]) {
		if (!visN[i]) {
			visN[i] = true;
			distN[i] = distN[pos] + 1;
			dfsN(i);
		}
	}
	return;
}
int main() {
	int N; cin >> N;
	m0(vis1); m0(visN);
	vis1[0] = true; visN[N - 1] = true;
	dist1[0] = 0;
	distN[N-1] = 0;
	REP(i, N-1) {
		int a, b;
		cin >> a >> b;
		a--, b--;
		tree1[a].push_back(b);
	}
	dfs1(0);
	dfsN(N - 1);
	int Fen=0, Snu=0;
	FOR(i,1, N-1) {
		if (dist1[i] <= distN[i]) {
			Fen++;
		}
		else {
			Snu++;
		}
	}
	if (Fen > Snu) {
		cout << "Fennec" << endl;
	}
	else {
		cout << "Snuke" << endl;
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:15: error: 'memset' was not declared in this scope
   23 | #define m0(x) memset(x,0,sizeof(x))
      |               ^~~~~~
a.cc:80:9: note: in expansion of macro 'm0'
   80 |         m0(vis1); m0(visN);
      |         ^~
a.cc:12:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   11 | #include <numeric>
  +++ |+#include <cstring>
   12 | #define REP(i, n) for(int i = 0;i < n;i++)
Language: Java

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

public class Main {

	static int n;
	static List<List<Integer>> list;

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		list = new ArrayList<>(n);
		for(int i = 0; i < n; i++) list.add(new ArrayList<>());
		for(int i = 0; i < n - 1; i++) {
			int a = sc.nextInt() - 1;
			int b = sc.nextInt() - 1;
			list.get(a).add(b);
			list.get(b).add(a);
		}
		int[] list1 = dfs(0, -1, new int[n]);
		int[] list2 = dfs(n - 1, -1, new int[n]);
		int a = 0, b = 0;
		for(int i = 0; i < n; i++) {
			if(list1[i] <= list2[i]) a++;
			else b++;
		}
		if(a > b) {
			System.out.println("Fennec");
		} else {
			System.out.println("Snuke");
		}
//		System.out.println(Arrays.toString(list1));
//		System.out.println(Arrays.toString(list2));
//	}

	static int[] dfs(int s, int p, int[] ret) {
		List<Integer> edge = list.get(s);
		for(int v : edge) {
			if(p != v) {
				ret[v] += ret[s] + 1;
				dfs(v, s, ret);
			}
		}
		return ret;
	}
}


Compiler output:
Main.java:38: error: illegal start of expression
	static int[] dfs(int s, int p, int[] ret) {
	^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;


int main(){
    int n;
    cin>>n;
    vector<int>edge[n];
    for(int i=0;i<n-1;i++){ 
    	int a,b; 
        cin>>a>>b;
        a--;
        b--;
    	edge[a].push_back(b);
        edge[b].push_back(a);
    }
    
    int black[n];
    memset(black,-1,sizeof black);
	queue<int>q; 
    q.push(0);
	while(!q.empty()){
        int now=q.front();
        q.pop();
        for(int i=0;i<edge[now].size();i++){
        	int nex=edge[now][i];
        	if(black[nex]==-1)continue;
        	black[nex]=black[now]+1;
        	q.push(nex);
		}
	}
	
    int white[n];
    memset(white,-1,sizeof white);
    q.push(n-1);
	while(!q.empty()){
        int now=q.front();
        q.pop();
        for(int i=0;i<edge[now].size();i++){
        	int nex=edge[now][i];
        	if(white[nex]==-1)continue;
        	white[nex]=white[now]+1;
        	q.push(nex);
		}
	}
	
	int a,b;
	a=0;
	b=0;
	for(int i=0;i<n;i++){
		if(black[i]>=white[i]){
			a++;
		}else{
			b++;
		}
	}
    if(b>=a)cout<<"Snuke";else cout<<"Fennec"<<endl;
    return 0;
}\

Compiler output:
a.cc:59:2: error: stray '\' in program
   59 | }\
      |  ^
Language: C++

#include <iostream>
#include <deque>

using namespace std;

int matrix[100001][100001] = {};
int n;
deque<int> path;
bool visited[100001] = {};
bool dfs(int current){
    //cout << current;
    path.push_back(current);
    visited[current]=true;
    if(current==n)return true;
    for(int j = 1; j <= n; j++){
        if(matrix[current][j]==0)continue;
        if(visited[j])continue;
        if(dfs(j))return true;
        visited[j]=false;
        path.pop_back();
    }
    return false;
}
int cnt = 1;
bool visited1[100001]={};
void dfs1(int current){
    visited1[current]=true;
    for(int j = 1; j <= n; j++){
        if(matrix[current][j]==0)continue;
        if(visited1[j])continue;
        cnt++;
        dfs1(j);
        visited1[j]=false;
        
    }
    return ;
}

int main(){
    
    cin >> n;
    for(int i = 0; i < n - 1; i++){
        int a,b;
        cin >> a >> b;
        matrix[a][b] = matrix[b][a] = 1;
    }
    dfs(1);
    int index = (path.size() + 1) / 2;
    matrix[path[index-1]][path[index]] = matrix[path[index]][path[index-1]] = 0;
    dfs1(1);
    cout << cnt;
    if(cnt > n - cnt)cout << "Fennec" << endl;
    else cout << "Snuke" << endl;
    return 0;
}

Compiler output:
/tmp/ccpCCIK1.o: in function `dfs(int)':
a.cc:(.text+0x15): relocation truncated to fit: R_X86_64_PC32 against symbol `path' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0x29): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0x36): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0x84): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0xad): relocation truncated to fit: R_X86_64_PC32 against symbol `visited' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0xb8): relocation truncated to fit: R_X86_64_PC32 against symbol `path' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0xd0): relocation truncated to fit: R_X86_64_PC32 against symbol `n' defined in .bss section in /tmp/ccpCCIK1.o
/tmp/ccpCCIK1.o: in function `dfs1(int)':
a.cc:(.text+0xf7): relocation truncated to fit: R_X86_64_PC32 against symbol `visited1' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0x13b): relocation truncated to fit: R_X86_64_PC32 against symbol `visited1' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0x168): relocation truncated to fit: R_X86_64_PC32 against symbol `visited1' defined in .bss section in /tmp/ccpCCIK1.o
a.cc:(.text+0x17c): additional relocation overflows omitted from the output
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#include <fstream>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int,int>
#define MA make_pair
#define LLI long long int
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
#define POS(i) cout<<(i?"POSSIBLE":"IMPOSSIBLE")<<endl
#define Pos(i) cout<<(i?"Possible":"Impossible")<<endl
#define co(i) cout<<i<<endl
using namespace std;
//
const int INF=1e9+7;
const int MOD=1e9+7;
//
const int vmax=100001;
vector<PA> g[vmax];
LLI dist[vmax]={};

void dfs(int s,int t,LLI k){
    dist[s]=k;
    for(auto &i:g[s]){
	    if(i.FI==t) continue;
	    dfs(i.FI,s,k+i.SE);
    }
}

void edge_in(int a,int b,LLI c){
    g[a].PB(PA(b,c));
}

{int main(){
    int n; cin>>n;
    FOR(i,0,n-1){
        int a,b; cin>>a>>b;
        edge_in(a-1,b-1,1);
        edge_in(b-1,a-1,1);
    }
    dfs(0,-1,0);
    
}


Compiler output:
a.cc:47:1: error: expected unqualified-id before '{' token
   47 | {int main(){
      | ^