Language: C++

//#define MYDEBUG
#include <bits/stdc++.h>

#ifdef MYDEBUG
#define dbp(x) cout<<#x<<": "<<x<<endl
#define dbp2(x,y) cout<<#x<<","<<#y<<": "<<x<<","<<y<<endl
#define dbp3(x,y,z) cout<<#x<<","<<#y<<","<<#z<<": "<<x<<","<<y<<","<<z<<endl
#define dbp4(w,x,y,z) cout<<#w<<","<<#x<<","<<#y<<","<<#z<<": "<<w<<","<<x<<","<<y<<","<<z<<endl
#define ifcin(x) std::ifstream cin(x)
#else
#define dbp(x)
#define dbp2(x,y)
#define dbp3(x,y,z)
#define dbp4(w,x,y,z)
#define ifcin(x)
#endif
#define ll long long
#define ull unsigned long long
#define all(x) x.begin(), x.end()
#define rep(i, from, to) for(int i=from; i<to; ++i)
#define REP(i, from, to) for(int i=from; i<=to; ++i)
#define EPS = 1e-14;
using std::vector;
using std::cout;
using std::cin;
using std::endl;
using std::max;
using std::min;
using std::swap;
using std::string;
using std::fill;
using std::pair;
using std::sort;
using std::reverse;
using std::pair;
using std::greater;
using std::priority_queue;
using std::ostream;

template<typename T>
ostream& operator<<(ostream& out, const vector<vector<T> >& v) {
  out << endl;
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i] << endl;
  }
  return out;
}

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  out << "[";
  size_t last = v.size() - 1;
  for (size_t i = 0; i < v.size(); ++i) {
    out << v[i];
    if (i != last) {
      out << ",";
    }
  }
  out << "]";
  return out;
}
template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& p) {
  out << "(" << p.first << ", " << p.second << ")";
  return out;
}
struct edge {
  int from, to, cost;
  edge(int from, int to, int cost) {
    this->from = from;
    this->to = to;
    this->cost = cost;
  }
  edge() {
    this->from = -1;
    this->to = -1;
    this->cost = -1;
  }
  bool operator<(const edge& e) const {
    return this->cost < e.cost;
  }
};

typedef struct edge edge;
vector<vector<int> > g;
int n;
vector<bool> used;
//複数始点の幅優先探索
//黒→白→の順にいけるところすべて塗りつぶす
//もし、新しくpushできなければ負け
const int BLACK = 0, WHITE = 1;
int next(int p) {
  if (p == BLACK) {
    return WHITE;
  } else {
    return BLACK;
  }
}
string bfs() {
  fill(all(used), false);
  int sb = 1, sw = n;
  used[sb] = used[sw] = true;
  std::queue<int> qb, qw;
  qb.push(sb);
  qw.push(sw);
  vector<std::queue<int> > q;
  q.push_back(qb);
  q.push_back(qw);
  int turn = BLACK;
  while (true) {
    if (q[turn].empty()&&!q[next(turn].empty()) {
      if (turn == BLACK) {
        return "Snuke";
      } else {
        return "Fennec";
      }
    }
    int now = q[turn].front();
    q[turn].pop();
    rep(i,0,(int)g[now].size())
    {
      int neigh = g[now][i];
      if (!used[neigh]) {
        q[turn].push(neigh);
        dbp3(turn, now, neigh);
        used[neigh] = true;
      }
    }
    turn = next(turn);
  }
  return "";
}
void solve() {
  cin >> n;
  used = vector<bool>(n + 10);
  g = vector<vector<int> >(n + 10, vector<int>());
  rep(i,0,n-1)
  {
    int a, b;
    cin >> a >> b;
    g[a].push_back(b);
    g[b].push_back(a);
  }dbp(g);
  cout << bfs() << endl;
}

int main() {
  solve();
}



Compiler output:
a.cc: In function 'std::string bfs()':
a.cc:111:38: error: expected ')' before ']' token
  111 |     if (q[turn].empty()&&!q[next(turn].empty()) {
      |                                 ~    ^
      |                                      )
a.cc:118:30: error: expected ')' before ';' token
  118 |     int now = q[turn].front();
      |                              ^
      |                              )
a.cc:111:8: note: to match this '('
  111 |     if (q[turn].empty()&&!q[next(turn].empty()) {
      |        ^
a.cc:120:20: error: 'now' was not declared in this scope; did you mean 'pow'?
  120 |     rep(i,0,(int)g[now].size())
      |                    ^~~
a.cc:20:44: note: in definition of macro 'rep'
   20 | #define rep(i, from, to) for(int i=from; i<to; ++i)
      |                                            ^~