Language: C++

#include<bits/stdc++.h>

#define int long long int
#define rep(a,b,c) for(int a=b;a<c;a++)
#define repm(a,b,c) for(int a=(b-1);a>=c;a--)
#define pb push_back
#define str string
#define sf(a) scanfs("%d",&a)
#define pb push_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) (v).begin(), (v).end()
#define clean(used) memset(used,false,sizeof(used))
using namespace std;

const int INF = 1e18 + 9;
const int Mod = 1e9 + 7;
inline int replac(str s){double ans=0;rep(i,0,s.length()){ans+=(s[i]-'0')*pow(10,s.length()-i-1);}return (int)ans;}
inline string numstr(int m){str s="";while(m>0){char c;int a=m/10;if(a>0)a=m%(a*10);else a=m;c=(char)('0'+a);s+=c;m/=10;}str st="";for(int i=s.size()-1;i>=0;i--){st+=s[i];}return st;}
typedef vector<int> vi;
typedef pair<int,int> pii;
typedef vector<pii> vii;
vi edge[100005];
int u[100005] = {0};
int N;
const str tmp = "atcoder";
signed main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a,b;
    cin >> N;

    rep(i,0,N){
        cin >> a >> b;
        edge[a].pb(b);
        edge[b].pb(a);
    }

    bool even = true;
    queue<int> que[2],que_[2];

    u[0] = 1;
    u[N-1] = 2;

    que[even].push(0);
    que[even].push(N-1);

    while(!que[even].empty() || !que_[even].empty()){
        if(!que[even].empty()){
            for(int i : que[even]){
                for(int j : edge[i]){
                    if(!u[j]){
                        u[j] = 1;
                        que[!even].push(j);
                    }
                }
            }
        }

        if(!que_[even].empty()){
            for(int i : que_[even]){
                for(int j : edge[i]){
                    if(!u[j]){
                        u[j] = 2;
                        que[!even].push(j);
                    }
                }
            }
        }
        even = !even;
    }

    int f = 0,s = 0;

    rep(i,0,n){
        if(u[i] == 1)f++;
        if(u[i] == 2)s++;
    }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:52:33: error: no matching function for call to 'begin(std::queue<long long int>&)'
   52 |             for(int i : que[even]){
      |                                 ^
In file included from /usr/include/c++/14/bits/algorithmfwd.h:39,
                 from /usr/include/c++/14/bits/stl_algo.h:59,
                 from /usr/include/c++/14/algorithm:61,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/initializer_list:88:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)'
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/14/initializer_list:88:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   'std::queue<long long int>' is not derived from 'std::initializer_list<_Tp>'
   52 |             for(int i : que[even]){
      |                                 ^
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:52:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::queue<long long int>]':
a.cc:52:33:   required from here
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/bits/range_access.h:52:50: error: 'class std::queue<long long int>' has no member named 'begin'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |                                           ~~~~~~~^~~~~
/usr/include/c++/14/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:63:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::queue<long long int>]':
a.cc:52:33:   required from here
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/bits/range_access.h:63:56: error: 'const class std::queue<long long int>' has no member named 'begin'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |                                                 ~~~~~~~^~~~~
/usr/include/c++/14/bits/range_access.h:95:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])'
   95 |     begin(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:95:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   mismatched types '_Tp [_Nm]' and 'std::queue<long long int>'
   52 |             for(int i : que[even]){
      |                                 ^
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166:
/usr/include/c++/14/valarray:1227:5: note: candidate: 'template<class _Tp> _Tp* std::begin(valarray<_Tp>&)'
 1227 |     begin(valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1227:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   'std::queue<long long int>' is not derived from 'std::valarray<_Tp>'
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/valarray:1238:5: note: candidate: 'template<class _Tp> const _Tp* std::begin(const valarray<_Tp>&)'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
/usr/include/c++/14/valarray:1238:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   'std::queue<long long int>' is not derived from 'const std::valarray<_Tp>'
   52 |             for(int i : que[even]){
      |                                 ^
a.cc:52:33: error: no matching function for call to 'end(std::queue<long long int>&)'
/usr/include/c++/14/initializer_list:99:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::end(initializer_list<_Tp>)'
   99 |     end(initializer_list<_Tp> __ils) noexcept
      |     ^~~
/usr/include/c++/14/initializer_list:99:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   'std::queue<long long int>' is not derived from 'std::initializer_list<_Tp>'
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/bits/range_access.h:74:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&)'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:74:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.end()) std::end(_Container&) [with _Container = std::queue<long long int>]':
a.cc:52:33:   required from here
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/bits/range_access.h:74:48: error: 'class std::queue<long long int>' has no member named 'end'
   74 |     end(_Container& __cont) -> decltype(__cont.end())
      |                                         ~~~~~~~^~~
/usr/include/c++/14/bits/range_access.h:85:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&)'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |     ^~~
/usr/include/c++/14/bits/range_access.h:85:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.end()) std::end(const _Container&) [with _Container = std::queue<long long int>]':
a.cc:52:33:   required from here
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/bits/range_access.h:85:54: error: 'const class std::queue<long long int>' has no member named 'end'
   85 |     end(const _Container& __cont) -> decltype(__cont.end())
      |                                               ~~~~~~~^~~
/usr/include/c++/14/bits/range_access.h:106:5: note: candidate: 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])'
  106 |     end(_Tp (&__arr)[_Nm]) noexcept
      |     ^~~
/usr/include/c++/14/bits/range_access.h:106:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   mismatched types '_Tp [_Nm]' and 'std::queue<long long int>'
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/valarray:1249:5: note: candidate: 'template<class _Tp> _Tp* std::end(valarray<_Tp>&)'
 1249 |     end(valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1249:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   'std::queue<long long int>' is not derived from 'std::valarray<_Tp>'
   52 |             for(int i : que[even]){
      |                                 ^
/usr/include/c++/14/valarray:1265:5: note: candidate: 'template<class _Tp> const _Tp* std::end(const valarray<_Tp>&)'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/valarray:1265:5: note:   template argument deduction/substitution failed:
a.cc:52:33: note:   'std::queue<long long int>' is not derived from 'const std::valarray<_Tp>'
   52 |             for(int i : que[even]){
      |                                 ^
a.cc:63:34: error: no matching function for call to 'begin(std::queue<long long int>&)'
   63 |             for(int i : que_[even]){
      |                                  ^
/usr/include/c++/14/initializer_list:88:5: note: candidate: 'template<class _Tp> constexpr const _Tp* std::begin(initializer_list<_Tp>)'
   88 |     begin(initializer_list<_Tp> __ils) noexcept
      |     ^~~~~
/usr/include/c++/14/initializer_list:88:5: note:   template argument deduction/substitution failed:
a.cc:63:34: note:   'std::queue<long long int>' is not derived from 'std::initializer_list<_Tp>'
   63 |             for(int i : que_[even]){
      |                                  ^
/usr/include/c++/14/bits/range_access.h:52:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&)'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:52:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::queue<long long int>]':
a.cc:63:34:   required from here
   63 |             for(int i : que_[even]){
      |                                  ^
/usr/include/c++/14/bits/range_access.h:52:50: error: 'class std::queue<long long int>' has no member named 'begin'
   52 |     begin(_Container& __cont) -> decltype(__cont.begin())
      |                                           ~~~~~~~^~~~~
/usr/include/c++/14/bits/range_access.h:63:5: note: candidate: 'template<class _Container> constexpr decltype (__cont.begin()) std::begin(const _Container&)'
   63 |     begin(const _Container& __cont) -> decltype(__cont.begin())
      |     ^~~~~
/usr/include/c++/14/bits/range_access.h:63:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/range_access.h: In substitution of 'template<class _Container> constexpr declt