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

c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp

Compiler output:
a.cc:1:3: error: stray '\' in program
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |   ^
a.cc:1:9: error: stray '\' in program
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |         ^
a.cc:1:20: error: stray '\' in program
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |                    ^
a.cc:1:24: error: stray '\' in program
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |                        ^
a.cc:1:33: error: stray '\' in program
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |                                 ^
a.cc:1:41: error: stray '\' in program
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |                                         ^
a.cc:1:48: error: stray '\' in program
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |                                                ^
a.cc:1:2: error: found ':' in nested-name-specifier, expected '::'
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      |  ^
      |  ::
a.cc:1:1: error: 'c' does not name a type
    1 | c:\Users\mgoncharov\etc\contests\atcoder\arc078\a.cpp
      | ^
Language: C++

#include <iostream>
using namespace std;
#define int long long

int n;
int a[200001];

int Abs(int x) { if (x > 0) return x; return -x; }

signed main() {
	int i;
	
	cin >> n;
	for (i = 0; i < n; i++) cin >> a[i + 1];
	for (i = 1; i <= n; i++) a[i] += a[i - 1];
	
	int ans = 1e+18;
	for (i = 1; i < n; i++) {
		ans = min(ans, Abs(a[i], a[n] - a[i]));
	}
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:35: error: too many arguments to function 'long long int Abs(long long int)'
   19 |                 ans = min(ans, Abs(a[i], a[n] - a[i]));
      |                                ~~~^~~~~~~~~~~~~~~~~~~
a.cc:8:5: note: declared here
    8 | int Abs(int x) { if (x > 0) return x; return -x; }
      |     ^~~
Language: C++

#include "bits/stdc++.h"
#define MOD 1000000007
#define INF 11234567890
#define in std::cin
#define out std::cout
#define rep(i,N) for(int i=0;i<N;++i)
typedef long long int LL;

LL N, a[112345];
LL ans;

int main()
{
	in >> N;
	rep(i, N) { in >> a[i]; }

	rep(i, N) { a[i + 1] += a[i]; }
	for (LL i = 0; i < N - 1; ++i)
	{
		if (i == 0) { ans = abs(a[i] - (a[N] - a[i])); }
		ans = std::min(ans, abs(a[i] - (a[N] - a[i])));
	}

	out << ans << std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:31: error: no matching function for call to 'min(LL&, int)'
   21 |                 ans = std::min(ans, abs(a[i] - (a[N] - a[i])));
      |                       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:233:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::min(const _Tp&, const _Tp&)'
  233 |     min(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:233:5: note:   template argument deduction/substitution failed:
a.cc:21:31: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   21 |                 ans = std::min(ans, abs(a[i] - (a[N] - a[i])));
      |                       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::min(const _Tp&, const _Tp&, _Compare)'
  281 |     min(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:281:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5686:5: note: candidate: 'template<class _Tp> constexpr _Tp std::min(initializer_list<_Tp>)'
 5686 |     min(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5686:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5696:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::min(initializer_list<_Tp>, _Compare)'
 5696 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5696:5: note:   template argument deduction/substitution failed:
a.cc:21:31: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   21 |                 ans = std::min(ans, abs(a[i] - (a[N] - a[i])));
      |                       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using ld=long double;
using ii=pair<ll, ll>;
using vi=vector<ll>;
using vb=vector<bool>;
using vvi=vector<vi>;
using vii=vector<ii>;
using vvii=vector<vii>;
void dfs(int u, vvi &E, vi &p,vi &sz)
{
    void sz[u]=1;
    for(int i=0; i<e[u].size(); j++)
    {
        if(p[u]!=e[u][j])
        {
            p[e[u][j]]=u;
            dfs(e[u][j],e,p,sz);
            sz[u]+=sz[e[u][j]];
        }
    }
}
int main()
{
    int n;
    cin>>n;
    vvi E(n, vi());
    for(int i=0; i+1<n; ++i)
    {
        int a,b;
        cin>>a>>b;
        a--,b--;
        E[a].push_back(b);
        E[b].push_back(a);
    }
    vi p(n-1),sz(n,0);
    dfs(0,E,p,sz);
    vi path;
    int c=n-1,psz=0;
    while(c>=0)
    {
        path.push_back(sz[c]-psz);
        psz=sz[c];
        c=p[c];
    }
    reverse(path.begin(),path.end());
    ll ls=0LL,RS=0LL;
    int i=0,j=(int)path.size()-1;
    while(i<=j)
    {
        ls+=path[i++];
        if(i<=j)
        {
            rs+=path[j--];
        }
    }
    cout<<(ls>rs?"Fennec":"Snuke")<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'void dfs(int, vvi&, vi&, vi&)':
a.cc:13:10: error: declaration of 'sz' as array of void
   13 |     void sz[u]=1;
      |          ^~
a.cc:14:20: error: 'e' was not declared in this scope
   14 |     for(int i=0; i<e[u].size(); j++)
      |                    ^
a.cc:14:33: error: 'j' was not declared in this scope
   14 |     for(int i=0; i<e[u].size(); j++)
      |                                 ^
a.cc: In function 'int main()':
a.cc:55:13: error: 'rs' was not declared in this scope; did you mean 'RS'?
   55 |             rs+=path[j--];
      |             ^~
      |             RS
a.cc:58:15: error: 'rs' was not declared in this scope; did you mean 'RS'?
   58 |     cout<<(ls>rs?"Fennec":"Snuke")<<endl;
      |               ^~
      |               RS
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n;
struct edge{
    int to,next;
}e[20010];
int head[10010],s[10010],path[10010],len,cnt;
void add(int u, int v)
{
    e[cnt++]=(edge){v,head[u]};
    head[u]=cnt;
}
bool dfs(int x,int fa)
{
    x==n;
    bool p=x;
    for(int i=head[x];i;i=e[i].next)
    {
        int v=e[i].to;
        if(v=fa) continue;
        p|=dfs(v,x);
    }
    s[fa]+=s[x]+1;
    if(p)
    {
        path[len++]=x;
        return true;
    }
}
int main()
{
    cin>>n;
    for(int i=1,u,v; i<n; i++)
    {
        cin>>u>>v;
        add(u,v);
        add(v,u);
    }
    dfs(1,0);
    for(int i=len; i>len/2; i--)
        ans+=s[path[i]]-s[path[i-1]];
    printf("%s\n", ans*2>n ? "Fennec" : "Snuke");
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   41 |         ans+=s[path[i]]-s[path[i-1]];
      |         ^~~
      |         abs
a.cc:42:20: error: 'ans' was not declared in this scope; did you mean 'abs'?
   42 |     printf("%s\n", ans*2>n ? "Fennec" : "Snuke");
      |                    ^~~
      |                    abs
a.cc: In function 'bool dfs(int, int)':
a.cc:29:1: warning: control reaches end of non-void function [-Wreturn-type]
   29 | }
      | ^
Language: C++

#include<bits/stdc++.h>
#define int long long
using namespace std;
typedef pair<int,int> P;

int N;
vector<int> color[100010]; //color[i] = 0は無色、1は黒、2は白
vector<int> graph[100010];
int fennec[100010];
int snuke[100010];

void bfsf(int s)  {
    priority_queue<int,vector<int>,greater<int>> que;
    que.push(s);
    fennec[s] = 0;
    while(true) {
        int p = que.top();
        que.pop();
        bool update = false;
        for(int i = 0;i < graph[p].size();i++) {
            if(fennec[p] + 1 < fennec[graph[p].at(i)]) {
                fennec[graph[p].at(i)] = fennec[p] + 1;
                que.push(graph[p].at(i));
                update = true;
            }
        }
        if(update == false) {
            break;
        }
    }
}

void bfss(int s)  {
    priority_queue<int,vector<int>,greater<int>> que;
    que.push(s);
    snuke[s] = 0;
    while(true) {
        int p = que.top();
        que.pop();
        bool update = false;
        for(int i = 0;i < graph[p].size();i++) {
            if(snuke[p] + 1 < snuke[graph[p].at(i)]) {
                snuke[graph[p].at(i)] = snuke[p] + 1;
                que.push(graph[p].at(i));
                update = true;
            }
        }
        if(update == false) {
            greak;
        }
    }
}

signed main() {
    cin >> N;
    for (int i = 0; i < N; i++) {
        int A,B;
        cin >> A >> B;
        graph[A - 1].push_back(B - 1);
        graph[B - 1].push_back(A - 1);
    }
    for(int i = 0;i < N;i++) {
        color(i) = 0;
    }
    bfsf(0);
    bfss(N - 1);
    int F = 0;
    int S = 0;
    for (int i = 0; i < N; i++) {
        if(fennec[i] > snuke[i]) {
            S++;
        }
        else {
            F++;
        }
    }
    if(S >= F) {
        cout << "snuke" << endl;
    }
    else {
        cout << "fennec" << endl;
    }
}

Compiler output:
a.cc: In function 'void bfss(long long int)':
a.cc:49:13: error: 'greak' was not declared in this scope
   49 |             greak;
      |             ^~~~~
a.cc: In function 'int main()':
a.cc:63:14: error: 'color' cannot be used as a function
   63 |         color(i) = 0;
      |         ~~~~~^~~
Language: C++

#include<bits/stdc++.h>
#define int long long
using namespace std;
typedef pair<int,int> P;

int N;
vector<int> color[100010]; //color[i] = 0は無色、1は黒、2は白
vector<bool> 
vector<int> graph[100010];
int fennec[100010];
int snuke[100010];

void bfsf(int s)  {
    priority_queue<int,vector<int>,greater<int>> que;
    que.push(s);
    fennec[s] = 0;
    while(true) {
        int p = que.top();
        que.pop();
        bool update = false;
        for(int i = 0;i < graph[p].size();i++) {
            if(fennec[p] + 1 < fennec[graph[p].at(i)]) {
                fennec[graph[p].at(i)] = fennec[p] + 1;
                que.push(graph[p].at(i));
                update = true;
            }
        }
        if(update == false) {
            greak;
        }
    }
}

void bfss(int s)  {
    priority_queue<int,vector<int>,greater<int>> que;
    que.push(s);
    snuke[s] = 0;
    while(true) {
        int p = que.top();
        que.pop();
        bool update = false;
        for(int i = 0;i < graph[p].size();i++) {
            if(snuke[p] + 1 < snuke[graph[p].at(i)]) {
                snuke[graph[p].at(i)] = snuke[p] + 1;
                que.push(graph[p].at(i));
                update = true;
            }
        }
        if(update == false) {
            greak;
        }
    }
}

signed main() {
    cin >> N;
    for (int i = 0; i < N; i++) {
        int A,B;
        cin >> A >> B;
        graph[A - 1].push_back(B - 1);
        graph[B - 1].push_back(A - 1);
    }
    for(int i = 0;i < N;i++) {
        color(i) = 0;
    }
    bfsf(0);
    bfss(N - 1);
    int F = 0;
    int S = 0;
    for (int i = 0; i < N; i++) {
        if(fennec[i] > snuke[i]) {
            S++;
        }
        else {
            F++;
        }
    }
    if(S >= F) {
        cout << "snuke" << endl;
    }
    else {
        cout << "fennec" << endl;
    }
}

Compiler output:
a.cc:9:13: error: invalid declarator before 'graph'
    9 | vector<int> graph[100010];
      |             ^~~~~
a.cc: In function 'void bfsf(long long int)':
a.cc:21:27: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   21 |         for(int i = 0;i < graph[p].size();i++) {
      |                           ^~~~~
      |                           isgraph
a.cc:29:13: error: 'greak' was not declared in this scope
   29 |             greak;
      |             ^~~~~
a.cc: In function 'void bfss(long long int)':
a.cc:42:27: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   42 |         for(int i = 0;i < graph[p].size();i++) {
      |                           ^~~~~
      |                           isgraph
a.cc:50:13: error: 'greak' was not declared in this scope
   50 |             greak;
      |             ^~~~~
a.cc: In function 'int main()':
a.cc:60:9: error: 'graph' was not declared in this scope; did you mean 'isgraph'?
   60 |         graph[A - 1].push_back(B - 1);
      |         ^~~~~
      |         isgraph
a.cc:64:14: error: 'color' cannot be used as a function
   64 |         color(i) = 0;
      |         ~~~~~^~~
Language: C++

#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
using datas=pair<ll,ll>;
using ddatas=pair<double,double>;
using tdata=pair<ll,datas>;
using vec=vector<ll>;
using mat=vector<vec>;
using pvec=vector<datas>;
using pmat=vector<pvec>;
#define For(i,a,b) for(i=a;i<b;i++)
#define bFor(i,a,b) for(i=a;i>=b;i--)
#define rep(i,N) For(i,0,N)
#define rep1(i,N) For(i,1,N)
#define brep(i,N) bFor(i,N-1,0)
#define all(v) (v).begin(),(v).end()
#define allr(v) (v).rbegin(),(v).rend()
#define vsort(v) sort(all(v))
#define vrsort(v) sort(allr(v))
#define endl "\n"
#define pb push_back
#define output(v) do{bool f=0;for(auto outi:v){cout<<(f?" ":"")<<outi;f=1;}cout<<endl;}while(0)
const ll mod=1000000007;
const ll inf=1LL<<60;
template<class T> inline bool chmax(T& a,T b){bool x=a<b;if(x)a=b;return x;} 
template<class T> inline bool chmin(T& a,T b){bool x=a>b;if(x)a=b;return x;} 

double distance(ddatas& x,ddatas& y){
  double a=x.first-y.first,b=x.second-y.second;
  return sqrt(a*a+b*b);
}

ll modinv(ll a) {
  ll b=mod,u=1,v=0,t;
  while(b){
    t=a/b;
    a-=t*b; swap(a,b);
    u-=t*v; swap(u,v);
  }
  return (u+mod)%mod;
}

ll moddevide(ll a,ll b){return (a*modinv(b))%mod;}

vec modncrlistp,modncrlistm;

ll modncr(ll n,ll r){
  ll i,size=modncrlistp.size();
  if(size<=n){
    modncrlistp.resize(n+1);
    modncrlistm.resize(n+1);
    if(!size){
      modncrlistp[0]=modncrlistm[0]=1;
      size++;
    }
    For(i,size,n+1){
      modncrlistp[i]=modncrlistp[i-1]*i%mod;
      modncrlistm[i]=modinv(modncrlistp[i]);
    }
  }
  return modncrlistp[n]*modncrlistm[r]%mod*modncrlistm[n-r]%mod;
}

ll modpow(ll a,ll n){
  ll res=1;
  while(n){
    if(n&1)res=res*a%mod;
    a=a*a%mod;
    n>>=1;
  }
  return res;
}

ll gcd(ll a,ll b){if(!b)return a;return (a%b==0)?b:gcd(b,a%b);}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

ll countdigits(ll n){
  ll ans=0;
  while(n){n/=10;ans++;}
  return ans;
}

ll sumdigits(ll n){
  ll ans=0;
  while(n){ans+=n%10;n/=10;}
  return ans;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll i,N,a,b;
  cin>>N;
  vec color(N,0);
  mat v(N);
  rep(i,N){
    cin>>a>>b;
    a--;b--;
    v[a].pb(b);
    v[b].pb(a);
  }
  color[0]=1;
  color[N-1]=-1;
  queue<ll> que;
  que.push(0);
  que.push(N-1);
  while(!que.empty()){
    auto x=que.front();que.pop();
    for(auto i:v[x]){
      if(!color[i]){
        color[i]=color[x];
        que.push(i);
      }
  }
  if(accumulate(all(color),0LL)>0){
    cout<<"Fennec"<<endl;
  }else{
    cout<<"Snuke"<<endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:122:2: error: expected '}' at end of input
  122 | }
      |  ^
a.cc:90:11: note: to match this '{'
   90 | int main(){
      |           ^
Language: Java

import java.util.*;

public class Main {
    static Scanner scanner = new Scanner(System.in);

    public static void main(String[]$) {
        int n = scanner.nextInt();
        List<Integer>[] edge = new ArrayList[n];
        for (int i = 0; i < n; i++) {
            edge[i] = new ArrayList<>();
        }
        for (int i = 1; i < n; i++) {
            int a = scanner.nextInt() - 1;
            int b = scanner.nextInt() - 1;
            edge[a].add(b);
            edge[b].add(a);
        }

        Deque<Integer> deque = new ArrayDeque<>();
        deque.add(0);
        int[] dist1 = new int[n];
        boolean[] visited1 = new boolean[n];
        while (!deque.isEmpty()) {
            int i = deque.poll();
            for (int j : edge[i]) {
                if (!visited1[j]) {
                    visited1[j] = true;
                    Utils.println(i, j, deque);
                    dist1[j] = dist1[i] + 1;
                    deque.add(j);
                }
            }
        }

        deque.add(n - 1);
        int[] dist2 = new int[n];
        boolean[] visited2 = new boolean[n];
        while (!deque.isEmpty()) {
            int i = deque.poll();
            for (int j : edge[i]) {
                if (!visited2[j]) {
                    visited2[j] = true;
                    dist2[j] = dist2[i] + 1;
                    deque.add(j);
                }
            }
        }

        int count1 = 0;
        int count2 = 0;
        for (int i = 0; i < n; i++) {
            if (dist1[i] <= dist2[i]) {
                count1++;
            } else {
                count2++;
            }
        }
        System.out.println(count1 >= count2 ? "Fennec" : "Snuke");
    }
}

Compiler output:
Main.java:28: error: cannot find symbol
                    Utils.println(i, j, deque);
                    ^
  symbol:   variable Utils
  location: class Main
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
Language: C++

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

int N, INF = 1000000000;
static int Dis1[100010] = {}, DisN[100010] = {};
vector<int> V[100010];

void BFS1() {
	for (int i = 1; i < N; i++) {
		Dis1[i] = INF;
	}
	queue<int> Q;
	Q.push(0);
	while (Q.size()) {
		int x = Q.front();
		Q.pop();
		for (int i : V[x]) {
			if (Dis1[i] == INF) {
				Q.push(i);
				Dis1[i] = Dis1[x] + 1;
			}
		}
	}
}

void BFSN() {
	for (int i = 0; i < N - 1; i++) {
		DisN[i] = INF;
	}
	queue<int> Q;
	Q.push(N - 1);
	while (Q.size()) {
		int x = Q.front();
		Q.pop();
		for (int i : V[x]) {
			if (DisN[i] == INF) {
				Q.push(i);
				DisN[i] = DisN[x] + 1;
			}
		}
	}
}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <vector>
#include <iomanip>
#define ALL(x) (x).begin(), (x).end()
#define rt return
#define dll(x) scanf("%I64d",&x)
#define xll(x) printf("%I64d\n",x)
#define sz(a) int(a.size())
#define all(a) a.begin(), a.end()
#define rep(i,x,n) for(int i=x;i<n;i++)
#define repd(i,x,n) for(int i=x;i<=n;i++)
#define pii pair<int,int>
#define pll pair<long long ,long long>
#define gbtb ios::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define MS0(X) memset((X), 0, sizeof((X)))
#define MSC0(X) memset((X), '\0', sizeof((X)))
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define eps 1e-6
#define gg(x) getInt(&x)
#define db(x) cout<<"== [ "<<x<<" ] =="<<endl;
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {return b ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}
ll powmod(ll a, ll b, ll MOD) {ll ans = 1; while (b) {if (b % 2)ans = ans * a % MOD; a = a * a % MOD; b /= 2;} return ans;}
inline void getInt(int* p);
const int maxn = 1000010;
const int inf = 0x3f3f3f3f;
/*** TEMPLATE CODE * * STARTS HERE ***/
std::vector<int> v[maxn];
int n;
int vis[maxn];
int main()
{
    //freopen("D:\\common_text\\code_stream\\in.txt","r",stdin);
    //freopen("D:\\common_text\\code_stream\\out.txt","w",stdout);
    gbtb;
    cin >> n;
    int a, b;
    repd(i, 2, n)
    {
        cin >> a >> b;
        v[a].push_back(b);
        v[b].push_back(a);
    }
    vis[1] = 1;
    vis[n] = 1;
    int cntf = 0;
    int cnts = 0;
    queue<pii> q;
    q.push(mp(1, 0));
    q.push(mp(n, 1));
    pii temp;
    int flag = 1;
    while (!q.empty())
    {
        temp = q.front();
        if (temp.se == flag)
        {
            q.pop();
        } else
        {
            flag = !flag;
            continue;
        }
        for (auto x : v[temp.fi])
        {
            if (!vis[x])
            {
                vis[x] = 1;
                q.push(mp(x, flag));
                if (!flag)
                {
                    cntf++;
                } else {
                    cnts++;
                }
            }
        }
    }
    if (cntf > cnts)
    {
        cout << "Fennec" << endL;
    } else 
    {
        cout << "Snuke" << endl;
    }
    // db(cntf);
    // db(cnts);
    return 0;
}

inline void getInt(int* p) {
    char ch;
    do {
        ch = getchar();
    } while (ch == ' ' || ch == '\n');
    if (ch == '-') {
        *p = -(getchar() - '0');
        while ((ch = getchar()) >= '0' && ch <= '9') {
            *p = *p * 10 - ch + '0';
        }
    }
    else {
        *p = ch - '0';
        while ((ch = getchar()) >= '0' && ch <= '9') {
            *p = *p * 10 + ch - '0';
        }
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:94:29: error: 'endL' was not declared in this scope
   94 |         cout << "Fennec" << endL;
      |                             ^~~~
Language: C++

#include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
#define max(a,b) a>b?a:b
#define N 105
int a[N][N],dis1[N],dis2[N];
int n,res;
vector<int>g[N];
void dfs(int cur, int pre, int len, int dist[])
{
	int now;
	dist[cur]=len;
	for(i=0;i<g[cur].size();++i)  
	{
		now=g[cur][i];
		if(now!=pre)
			dfs(now,cur,len+1,dist);
	}
}
int main()
{
	int i,x,y;
	scanf("%d",&n);
	for(i=0;i<n-1;++i)
	{
		scanf("%d%d",&x,&y);
		g[x].push_back(y);
		g[y].push_back(x);
	}
	dfs(1,-1,0,dis1);
	dfs(n,-1,0,dis2);
	int ans=0;
	for(i=2;i<n;++i)
	{
		if(dis1[i]<=dis2[i])
		ans++;
		else
		ans--;
	}
	if(ans>0)
	cout<<"Fennec";
	else
	cout<<"Snuke";
	return 0;
}

Compiler output:
a.cc: In function 'void dfs(int, int, int, int*)':
a.cc:14:13: error: 'i' was not declared in this scope
   14 |         for(i=0;i<g[cur].size();++i)
      |             ^
Language: C++

#include <iostream>
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <vector>
#include <sstream>
using namespace std;
 
typedef long long LL;
#define lowbit(x) ((x)&(-x))
#define INF 0x3f3f3f3f
#define memset(a,b) memset(a,b,sizeof(a))
#defineGE() printf(">----------\n")
#defineIN() freopen("in.txt","r",stdin)
#defineOUT() freopen("out.txt","w",stdout)
const int mod=1e9+7;
const LL inf=0x3f3f3f3f3f3f3f3f;
const double pi=acos(-1.0);
const double eps=1e-8;
const int maxn=100005;
 
int n, p;
vector<int> E[maxn];
int vis[maxn];
 
int dfs(int u, int step){
   vis[u]=1;
   if(u==n){
       int mid=step/2+1+step%2;
       if(step==mid)p=u;
       return mid;
   }
   for(int i=0;i<E[u].size();i++){
       int v=E[u][i];
       if(!vis[v]){
           int mid=dfs(v, step+1);
           if(mid&&step==mid&&!p)p=u;
           if(mid)return mid;
       }
   }
   return 0;
}
 
int dfs2(int u){
   vis[u]=1;
   if(u==p)return 0;
   int add=0;
   for(int i=0;i<E[u].size();i++){
       int v=E[u][i];
       if(!vis[v]){
           add+=dfs2(v);
       }
   }
   return add+1;
}
 
int main() {
   while(~scanf("%d", &n)){
       p=0;
       int u, v;
       for(int i=1;i<=n;i++)E[i].clear();
       for(int i=0;i<n-1;i++){
           scanf("%d%d", &u, &v);
           E[u].push_back(v);
           E[v].push_back(u);
       }
       memset(vis, 0);
       dfs(1, 1);
       memset(vis, 0);
       int sum=dfs2(1);
       printf("%s\n", sum>n-sum?"Fennec":"Snuke");
   }
   return 0;
}

Compiler output:
a.cc:20:2: error: invalid preprocessing directive #defineGE; did you mean #define?
   20 | #defineGE() printf(">----------\n")
      |  ^~~~~~~~
      |  define
a.cc:21:2: error: invalid preprocessing directive #defineIN; did you mean #define?
   21 | #defineIN() freopen("in.txt","r",stdin)
      |  ^~~~~~~~
      |  define
a.cc:22:2: error: invalid preprocessing directive #defineOUT; did you mean #define?
   22 | #defineOUT() freopen("out.txt","w",stdout)
      |  ^~~~~~~~~
      |  define
Language: C

#include<iostream>
#include<vector>
#include<mem.h>
using namespace std;
#define N 110
vector<int>g[N];
int dis1[N], parent[N];
int n, num;
//work out the distance between each point and first point with dfs
void dfs_dis(int cur, int par){
    int next;
    dis1[cur] = dis1[par] + 1;
    for(int i = 0; i < g[cur].size(); i++){
        next = g[cur][i];
        if(next == par) continue;
        parent[cur] = par;
        dfs_dis(next, cur);
    }
}
void dfs_child(int cur, int par){
    int next;
    num++;
    for(int i = 0;i <g[cur].size(); i++){
        next = g[cur][i];
        if(next == par) continue;
        dfs_child(next, cur);
    }
}
int main(int argc, char const *argv[])
{
    int to, from;
    while(cin>>n){
        //init
        num = 0;
        memset(dis1, 0, sizeof(dis1));
        memset(parent, 0, sizeof(parent));
        for(int i = 0; i < N; i++){
            g[i].clear();
        }
        //read g[N][i]
        for(int i = 0; i < n-1; i++){
            cin>>to>>from;
            g[to].push_back(from);
            g[from].push_back(to);
        }
        //work out dis1[i] dis1[0] = -1, dis1[1] = 0;
        dis1[0] = -1;
        dfs_dis(1, 0);
        //find the middle point between 1 and n
        //how to find a tree?
        int cur = n;
        int par = parent[cur];
        for(int i = 0; i < (dis1[n]-1)/2; i++){
            int t = cur;
            cur = par;
            par = parent[t];
        }
        dfs_child(cur, par);
        if(num > n-num)
            cout<<"Snuke"<<endl;
        else  
            cout<<"Fennec"<<endl;
    } 
    return 0;
}

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

#include<iostream>
#include<vector>
#include<mem.h>
using namespace std;
#define N 110
vector<int>g[N];
int dis1[N], parent[N];
int n, num;
//work out the distance between each point and first point with dfs
void dfs_dis(int cur, int par){
    int next;
    dis1[cur] = dis1[par] + 1;
    for(int i = 0; i < g[cur].size(); i++){
        next = g[cur][i];
        if(next == par) continue;
        parent[cur] = par;
        dfs_dis(next, cur);
    }
}
void dfs_child(int cur, int par){
    int next;
    num++;
    for(int i = 0;i <g[cur].size(); i++){
        next = g[cur][i];
        if(next == par) continue;
        dfs_child(next, cur);
    }
}
int main(int argc, char const *argv[])
{
    int to, from;
    while(cin>>n){
        //init
        num = 0;
        memset(dis1, 0, sizeof(dis1));
        memset(parent, 0, sizeof(parent));
        for(int i = 0; i < N; i++){
            g[i].clear();
        }
        //read g[N][i]
        for(int i = 0; i < n-1; i++){
            cin>>to>>from;
            g[to].push_back(from);
            g[from].push_back(to);
        }
        //work out dis1[i] dis1[0] = -1, dis1[1] = 0;
        dis1[0] = -1;
        dfs_dis(1, 0);
        //find the middle point between 1 and n
        //how to find a tree?
        int cur = n;
        int par = parent[cur];
        for(int i = 0; i < (dis1[n]-1)/2; i++){
            int t = cur;
            cur = par;
            par = parent[t];
        }
        dfs_child(cur, par);
        if(num > n-num)
            cout<<"Snuke"<<endl;
        else  
            cout<<"Fennec"<<endl;
    } 
    return 0;
}

Compiler output:
a.cc:3:9: fatal error: mem.h: No such file or directory
    3 | #include<mem.h>
      |         ^~~~~~~
compilation terminated.
Language: C

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
#include <map>
#include <set>
#include <iomanip>
#include <math.h>
#include <stdlib.h>
#include <list>
#include <utility>
#include <memory>
#include <cstring>
#include <fstream>
#include <numeric>
#include <assert.h>
#include <bits/stdc++.h>
using namespace std;
int a[100004],b[100004];
vector <int> g[100004];
bool vis[100004];
int main(){
	int n;
	cin>>n;
	for (int i=0;i<n-1;i++){
		int x,y;
		cin>>x>>y;
		g[x].push_back(y);
		g[y].push_back(x); 
	}
	queue <int> qa,qb;
	qa.push(1),qb.push(n);
	vis[1]=1,vis[n]=1;
	while (1){
		if (qa.empty()){
			cout<<"Snuke";
			return 0;
		}
		if (qb.empty()){
			cout<<"Fennec";
			return 0;
		}
		int m=qa.front(),p=qb.front();
		qa.pop(),qb.pop();
		for (int i=0;i<g[m].size();i++)
			if (!vis[g[m][i]]){
				qa.push(g[m][i]);
				vis[g[m][i]]=1;
			}
		for (int i=0;i<g[p].size();i++)
			if (!vis[g[p][i]]){
				qb.push(g[p][i]);
				vis[g[p][i]]=1;
			}
	}
}

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

#include <algorithm>
#include <cstdio>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <queue>
#include <sstream>
#include <stack>
#include <time.h>
#include <vector>
#include <complex>
#include <map>
#include <set>
#include <iomanip>
#include <math.h>
#include <stdlib.h>
#include <list>
#include <utility>
#include <memory>
#include <cstring>
#include <fstream>
#include <numeric>
#include <assert.h>
#include <bits/stdc++.h>
using namespace std;
int a[100004],b[100004];
vector <int> g[100004];
bool vis[100004];
int main(){
	int n;
	cin>>n;
	for (int i=0;i<n-1;i++){
		int x,y;
		cin>>x>>y;
		g[x].push_back(y);
		g[y].push_back(x); 
	}
	queue <int> qa,qb;
	qa.push(1),qb.push(n);
	vis[1]=1,vis[n]=1;
	while (!(qa.empty(),qb.empty())){
		if (qa.empty()){
			cout<<"Snuke";
			return 0;
		}
		if (qb.empty()){
			cout<<"Fennec";
			return 0;
		}
		int m=qa.front(),p=qb.front();
		qa.pop(),qb.pop();
		for (int i=0;i<g[m].size();i++)
			if (!vis[g[m][i]]){
				qa.push(g[m][i]);
				vis[g[m][i]]=1;
			}
		for (int i=0;i<g[p].size();i++)
			if (!vis[g[p][i]]){
				qb.push(g[p][i]);
				vis[g[p][i]]=1;
			}
	}
	cout<<"Fennec";
}

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

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<vector>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<queue>
#include<utility>
#include<cstdio>
#include<cstring>
#include<new>
#include<new.h>
#include<float.h>
#include<ctype.h>
#include<cfloat>
#include<cmath>
#include<cctype>
#include<errno.h>
#include<cerrno>
#include<memory>
#include<memory.h>
#include<assert.h>
#include<cassert>
#include<deque>
#define fo(i,w,n) for(int i=(int) w;i<(int) n;i++)
#define qui queue<int>
#define vit vector<int>
#define ll long long
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define prq priority_queue
#define pii pair<int,int>
#define mp make_pair
#define sz size()
#define em empty()
#define ct continue
#define ms multiset
#define all(a) (a).begin(),(a).end()
#define pf push_front
#define ppf pop_front()
using namespace std;
const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
int n,x,y,p=0,u=0,e[101010],g[101010],fe[101010],sn[101010];
vit v[101010];
void dfs(int r){
	fo(i,0,v[r].sz)if(e[v[r][i]]){
		fe[v[r][i]]+=fe[r];
		e[v[r][i]]=0;
		dfs(v[r][i]);
	}
}
void dfs2(int r){
	g[r]=0;
	fo(i,0,v[r].sz)if(g[v[r][i]]){
		sn[v[r][i]]+=fe[r];
		dfs(v[r][i]);
	}
}
int main()
{
	cin>>n;
	fo(i,1,n+1){
		e[i]=1;
		g[i]=1;
		if(i==1){
			fe[i]=0;
			sn[i]=1;
		}
		else if(i==n){
			fe[i]=1;
			sn[i]=0;
		}
		else{
			fe[i]=1;
			sn[i]=1;
		}
	}
	fo(i,1,n){
		cin>>x>>y;
		v[x].pb(y);
		v[y].pb(x);
	}
	dfs(1);
	dfs2(n);
	fo(i,1,n+1){
		if(fe[i]>sn[i])u++;
		else p++;
	}
	if(p>u)cout<<"Fennec"<<endl;
	else cout<<"Snuke"<<endl;
	return 0;
}


Compiler output:
a.cc:15:9: fatal error: new.h: No such file or directory
   15 | #include<new.h>
      |         ^~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#include<set>
#include<vector>
#include<string.h>
#include<math.h>
#include<stdio.h>
#include<queue>
#include<utility>
#include<cstdio>
#include<cstring>
#include<new>
#include<new.h>
#include<float.h>
#include<ctype.h>
#include<cfloat>
#include<cmath>
#include<cctype>
#include<errno.h>
#include<cerrno>
#include<memory>
#include<memory.h>
#include<assert.h>
#include<cassert>
#include<deque>
#define fo(i,w,n) for(int i=(int) w;i<(int) n;i++)
#define qui queue<int>
#define vit vector<int>
#define ll long long
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define prq priority_queue
#define pii pair<int,int>
#define mp make_pair
#define sz size()
#define em empty()
#define ct continue
#define ms multiset
#define all(a) (a).begin(),(a).end()
#define pf push_front
#define ppf pop_front()
using namespace std;
const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
int n,x,y,p=0,u=0,e[101010],g[101010];
vit v[101010],s[101010];
void dfs(int r){
	if(v[r].sz>1&&e[r]){
		p++;
		e[r]=0;
		fo(i,0,n)dfs(v[r][i]);
	}
}
void dfs2(int r){
	if(s[r].sz>1&&g[r]){
		u++;
		g[r]=0;
		fo(i,0,n)dfs(s[r][i]);
	}
}
int main()
{
	cin>>n;
	fo(i,1,n)e[i]=g[i]=1;
	fo(i,1,n){
		cin>>x>>y;
		if(y!=n)v[x].pb(y);
		if(x!=n)v[y].pb(x);
		if(x>1)s[y].pb(x);
		if(y>1)s[x].pb(y);
	}
	dfs(1);
	dfs(n);
	if(p>u)cout<<"Fennec"<<endl;
	else cout<<"Snuke"<<endl;
	return 0;
}

Compiler output:
a.cc:15:9: fatal error: new.h: No such file or directory
   15 | #include<new.h>
      |         ^~~~~~~
compilation terminated.
Language: C++

#include<iostream>
#include<vector>

using namespace std;

int d[100001][2],visit[100001]={};
vector<vector<int>> v(100001);

int dfs(int p,int a){
  visit[p]=1;
  for(int i=0;i<v[p].size();i++)
    if(visit[v[p][i]]==0){
      d[v[p][i]][a]=d[p][a]+1;
      dfs(v[p][i],a);
    }
}

int main(){
  int n,a,b,cnt=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin >> a >>b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs(1,0);
  d[1][0]=0;
  for(int i=1;i<=n;i++)
    visit[i]=0;
  d[n][1]=0;
  dfs(n,1);
  for(int i=1;i<=n;i++){
    if(d[i][0]>d[i][1])
      cnt++;
    else if(d[i][0]<d[i][1])
      cnt--;
  }
  if(cnt=>0)
    cout << "Snuke" <<endl;
  else
    cout << "Fennec" <<endl;
}

Compiler output:
a.cc: In function 'int dfs(int, int)':
a.cc:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^
a.cc: In function 'int main()':
a.cc:38:10: error: expected primary-expression before '>' token
   38 |   if(cnt=>0)
      |          ^
Language: C

#include<iostream>
#include<vector>

using namespace std;

int d[100001][2],visit[100001]={};
vector<vector<int>> v(100001);

int dfs(int p,int a){
  visit[p]=1;
  for(int i=0;i<v[p].size();i++)
    if(visit[v[p][i]]==0){
      d[v[p][i]][a]=d[p][a]+1;
      dfs(v[p][i],a);
    }
}

int main(){
  int n,a,b,cnt=0;
  cin>>n;
  for(int i=0;i<n;i++){
    cin >> a >>b;
    v[a].push_back(b);
    v[b].push_back(a);
  }
  dfs(1,0);
  d[1][0]=0;
  for(int i=1;i<=n;i++)
    visit[i]=0;
  d[n][1]=0;
  dfs(n,1);
  for(int i=1;i<=n;i++){
    if(d[i][0]>d[i][1])
      cnt++;
    else if(d[i][0]<d[i][1])
      cnt--;
  }
  if(cnt>0)
    cout << "Snuke" <<endl;
  else
    cout << "Fennec" <<endl;
}

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

#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define repl(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define rep(i,n) repl(i,0,n)
#define each(itr,v) for(auto itr:v)
#define pb(s) push_back(s)
#define maxch(x,y) x=max(x,y)
#define minch(x,y) x=min(x,y)
#define mp(a,b) make_pair(a,b)
#define all(x) (x).begin(),(x).end()
#define dbg(x) cout<<#x"="<<x<<endl
#define maxch(x,y) x=max(x,y)
#define minch(x,y) x=min(x,y)
#define uni(x) x.erase(unique(all(x)),x.end())
template<class T,class U>inline void chmin(T &t,U f){if(t>f)t=f;}
template<class T,class U>inline void chmax(T &t,U f){if(t<f)t=f;}
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#define MIN(a, b) ((a) > (b) ? (b) : (a))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<P, int> PPI;

#define INF INT_MAX/3
#define MAX_N 1000
vector<int> g[maxn];
int d1[maxn], d2[maxn];

void dfs(int p, int last, int d, int wd[]) {
   wd[p] = d;
   for (int x : g[p]) {
      if (x != last) {
         dfs(x, p, d+1, wd);
      }
   }
}

void solve(){
   cin.tie(0);
  ios::sync_with_stdio(false);
  cin>>n;

  rep(i,n) cin>>g[i].clear();

  rep(i,n-1){
    ll x,y;
    cin>>x>>y;
    g[x].pb(y);
    g[y].pb(x);
  }

  dfs(0,-1,0,d1);
  dfs(n-1,-1,0,d2);
  ll ret = 0;
  rep(i,n){
    if (d1[i] <= d2[i]) {
         ++ret;
      } else {
         --ret;
      }
  }

  puts(ret>0?"Fennec":"Snuke");
}
int main(){
  solve();
  return 0;
}


Compiler output:
a.cc:29:15: error: 'maxn' was not declared in this scope
   29 | vector<int> g[maxn];
      |               ^~~~
a.cc:30:8: error: 'maxn' was not declared in this scope
   30 | int d1[maxn], d2[maxn];
      |        ^~~~
a.cc:30:18: error: 'maxn' was not declared in this scope
   30 | int d1[maxn], d2[maxn];
      |                  ^~~~
a.cc: In function 'void dfs(int, int, int, int*)':
a.cc:34:17: error: 'g' was not declared in this scope
   34 |    for (int x : g[p]) {
      |                 ^
a.cc: In function 'void solve()':
a.cc:44:8: error: 'n' was not declared in this scope; did you mean 'yn'?
   44 |   cin>>n;
      |        ^
      |        yn
a.cc:46:17: error: 'g' was not declared in this scope
   46 |   rep(i,n) cin>>g[i].clear();
      |                 ^
a.cc:51:5: error: 'g' was not declared in this scope
   51 |     g[x].pb(y);
      |     ^
a.cc:55:14: error: 'd1' was not declared in this scope; did you mean 'y1'?
   55 |   dfs(0,-1,0,d1);
      |              ^~
      |              y1
a.cc:56:16: error: 'd2' was not declared in this scope
   56 |   dfs(n-1,-1,0,d2);
      |                ^~
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<stack>
#include<string.h>
#include<string>
using namespace std;
typedef long long LL;

#define _CRT_SECURE_NO_WARNINGS
int N; 
vector<int> l[100010];
template<class T>  class Node {
public:
	Node()
		:parent(0), child(0)
	{};
	Node* parent;
	vector child;
	T para;
};
Node<int> nodes[100010];
int mL;
void Set(int n,int m) {
	if (n==N) {
		mL = m;
	}
	for (int i = 0; i < l[n].size();i++) {
		if (nodes[n].parent!=&nodes[l[n][i]]) {
			nodes[n].child.push_back(&nodes[l[n][i]]);
			nodes[l[n][i]].parent = &nodes[n];
			Set(l[n][i], m + 1);
		}
	}
}
int c = 1;
void CountChilds(Node* n) {
	if (n->child.size()!=0) {
		for (int i = 0; i < n->child.size();i++) {
			c++;
			CountChilds(n->child[i]);
		}
	}
};
int main() {
	scanf("%d",&N);
	for (int i = 0; i < N-1; i++) {
		int a, b;
		scanf("%d %d",&a,&b);
		l[a].push_back(b);
		l[b].push_back(a);
	}
	Set(1, 0);
	Node<int>* a = &nodes[N];
	for (int i = 0; i < (mL-1) / 2;i++) {
		a = a->parent;
	}
	CountChilds(a);
	if (c>=N-c) {
		printf("Snuke\n");
	}
	else {
		printf("Fennec\n");
	}
	return 0;
}

Compiler output:
a.cc:21:9: error: invalid use of template-name 'std::vector' without an argument list
   21 |         vector child;
      |         ^~~~~~
a.cc: In function 'void Set(int, int)':
a.cc:32:34: error: 'class Node<int>' has no member named 'child'
   32 |                         nodes[n].child.push_back(&nodes[l[n][i]]);
      |                                  ^~~~~
a.cc: At global scope:
a.cc:39:18: error: missing template argument list after 'Node'; template placeholder not permitted in parameter
   39 | void CountChilds(Node* n) {
      |                  ^~~~
      |                      <>
a.cc:15:26: note: 'template<class T> class Node' declared here
   15 | template<class T>  class Node {
      |                          ^~~~
a.cc: In function 'void CountChilds(...)':
a.cc:40:13: error: 'n' was not declared in this scope
   40 |         if (n->child.size()!=0) {
      |             ^
a.cc: In instantiation of 'Node<T>::Node() [with T = int]':
a.cc:24:23:   required from here
   24 | Node<int> nodes[100010];
      |                       ^
a.cc:18:36: error: using invalid field 'Node<T>::child'
   18 |                 :parent(0), child(0)
      |                                    ^
Language: C++

#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<utility>
#include<queue>
#include<stack>
#include<string.h>
#include<string>
using namespace std;
typedef long long LL;

#define _CRT_SECURE_NO_WARNINGS
int N; 
vector l[100010];
template  class Node {
public:
	Node()
		:parent(0), child(0)
	{};
	Node* parent;
	vector child;
	T para;
};
Node nodes[100010];
int mL;
void Set(int n,int m) {
	if (n==N) {
		mL = m;
	}
	for (int i = 0; i < l[n].size();i++) {
		if (nodes[n].parent!=&nodes[l[n][i]]) {
			nodes[n].child.push_back(&nodes[l[n][i]]);
			nodes[l[n][i]].parent = &nodes[n];
			Set(l[n][i], m + 1);
		}
	}
}
int c = 1;
void CountChilds(Node* n) {
	if (n->child.size()!=0) {
		for (int i = 0; i < n->child.size();i++) {
			c++;
			CountChilds(n->child[i]);
		}
	}
};
int main() {
	scanf("%d",&N);
	for (int i = 0; i < N-1; i++) {
		int a, b;
		scanf("%d %d",&a,&b);
		l[a].push_back(b);
		l[b].push_back(a);
	}
	Set(1, 0);
	Node* a = &nodes[N];
	for (int i = 0; i < (mL-1) / 2;i++) {
		a = a->parent;
	}
	CountChilds(a);
	if (c>=N-c) {
		printf("Snuke\n");
	}
	else {
		printf("Fennec\n");
	}
	return 0;
}

Compiler output:
a.cc:14:1: error: missing template argument list after 'std::vector'; for deduction, template placeholder must be followed by a simple declarator-id
   14 | vector l[100010];
      | ^~~~~~
      |       <>
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/queue:63,
                 from a.cc:5:
/usr/include/c++/14/bits/stl_vector.h:428:11: note: 'template<class _Tp, class _Alloc> class std::vector' declared here
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
a.cc:17:14: error: definition provided for explicit instantiation
   17 |         Node()
      |              ^
a.cc:21:9: error: invalid use of template-name 'std::vector' without an argument list
   21 |         vector child;
      |         ^~~~~~
a.cc:22:9: error: 'T' does not name a type
   22 |         T para;
      |         ^
a.cc:23:2: error: explicit instantiation of non-template type 'Node'
   23 | };
      |  ^
a.cc: In function 'void Set(int, int)':
a.cc:30:29: error: 'l' was not declared in this scope
   30 |         for (int i = 0; i < l[n].size();i++) {
      |                             ^
a.cc: In function 'int main()':
a.cc:52:17: error: 'l' was not declared in this scope
   52 |                 l[a].push_back(b);
      |                 ^
Language: C++

/*بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم*/
 
#include <bits/stdc++.h>
using namespace std;
 
const int mx=1e5+5;
vector <int> tree[mx];
int cnt,level[mx],dist[mx];
bool vis[mx];
void bfs1 ()
{
    memset(vis,0,sizeof(vis));
    queue<int> myQ;
    myQ.push(1);
    level[1]=0;
    vis[1]=true;
    int m;
    while (!myQ.empty()) {
        int u=myQ.front();
        myQ.pop();
        m=tree[u].size();
        for (int i=0;i<m;i++) {
            int v=tree[u][i];
            if (vis[v]) continue;
            vis[v]=true;
            level[v]=1+level[u];
            myQ.push(v);
        }
    }
}
void bfs2(int n)
{
    memset(vis,0,sizeof(vis));
    queue<int> myQ;
    myQ.push(n);
    dist[n]=0;
    vis[n]=true;
    int m;
    while (!myQ.empty()) {
        int u=myQ.front();
        if (dist[u]<level[u]) cnt++;
        myQ.pop();
        m=tree[u].size();
        for (int i=0;i<m;i++) {
            int v=tree[u][i];
            if (vis[v]) continue;
            vis[v]=true;
            dist[v]=1+dist[u];
            myQ.push(v);
        }
    }
}
int main ()
{
    int i,n,a,b;
 
    scanf ("%d",&n);
    for (i=1;i<n;i++) {
        scanf ("%d %d",&a,&b);
        tree[a].push_back(b);
        tree[b].push_back(a);
    }
    bfs1();
    bfs2(n);
    int m=n-cnt;
    if (m>cnt) printf ("Fennec\n");
    else printf("Snuke\n");
 
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:69:14: error: expected '}' at end of input
   69 |     return 0;
      |              ^
a.cc:54:1: note: to match this '{'
   54 | {
      | ^
Language: C++


#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
#include<stack>
#include<queue>
#include<vector>
#include<algorithm>
#include<string>
#include<iostream>
using namespace std;

#define N 100005

int n;
int map[N][N];

vector<int>v;
void dps(){
    stack<int>s;
    int check[N];
    for(int i=1;i<=n;i++)check[i]=0;
    s.push(1);
    v.push_back(1);
    check[1]=1;
    while(s.top()!=n){
        int i=1;
        bool flag=true;
        while(i<=n&&flag==true){
            if(check[i]==0&&map[s.top()][i]==1){
                s.push(i);
                check[i]=1;
                v.push_back(i);
                flag=false;
            }
            i++;
        }
        if(flag==true){
            s.pop();
            v.pop_back();
        }
    }
}
int count(int t){
    int ans=0;
    stack <int>s;
    bool already[n];for(int i=1;i<=n;i++)already[i]=true;
    s.push(t);
    ans++;
    already[t]=false;
    while(!s.empty()){
        int top=s.top();
        bool flag=true;
        for(int i=1;i<=n;i++){
            if(already[i]==true && map[i][top]==1){
                s.push(i);
                already[i]=false;
                ans++;
                flag=false;
            }
        }
        if(flag==true)s.pop();
    }
    return ans;
}

int main() {
    cin>>n;
    for(int q=1;q<=n-1;q++){
        int a,b;cin>>a>>b;
        map[a][b]=map[b][a]=1;
    }
    dps();
    int pass=v.size();
    int flast=(pass-1)/2;
    map[v[flast]][v[flast+1]]=0;map[v[flast+1]][v[flast]]=0;
    
    if(count(1)>count(n))printf("Fennec");
    else printf("Snuke");
    return 0;
}


Compiler output:
/tmp/ccE075y1.o: in function `dps()':
a.cc:(.text+0x6b): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
a.cc:(.text+0x12c): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
a.cc:(.text+0x180): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
/tmp/ccE075y1.o: in function `main':
a.cc:(.text+0x4b5): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
a.cc:(.text+0x4e1): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
a.cc:(.text+0x4fd): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
a.cc:(.text+0x53e): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
a.cc:(.text+0x557): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
/tmp/ccE075y1.o: in function `__static_initialization_and_destruction_0()':
a.cc:(.text+0x5e8): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
a.cc:(.text+0x601): relocation truncated to fit: R_X86_64_PC32 against symbol `v' defined in .bss section in /tmp/ccE075y1.o
collect2: error: ld returned 1 exit status