Problem:
Problem J: Usaneko Matrix
うさぎとねこが勝負をしている. ルールは以下の通りである.
まず2 匹はそれぞれ
n
行
n
列の正方形状に
n
2
個の整数を紙に書き, トランプを1 枚ずつ引く. 次に, 1 から 1 000 000 までの数が1 つずつ書かれた1 000 000 枚のカードを2 匹でシャッフルし, これを1 枚ずつ交互に引いていく. 2 匹はカードが引かれるたび, カードと同じ数が自分の紙に書かれていたらそれに印をつける. 「印がついた
n
個の数の組であって, 一直線上に並んでいるもの」の個数が, はじめに引いたトランプの数以上になることを勝利条件とする.
与えられた
m
枚目のカードまでで, うさぎとねこのどちらが勝つか答えよ. ただし勝敗は, あるカードが引かれて印をつけ終わった段階で2 匹のうち片方のみが勝利条件をみたしたときに決まるものとし, それ以外の場合は引き分けとする. いずれかが勝利条件をみたした後でもカードが引かれることはあるが, これは勝敗に影響しない.
Input
1 行目：“
n u v m
” (正方形のサイズ, うさぎのトランプの数, ねこのトランプの数, 引かれるカードの枚数) 2-(
N
+ 1) 行目：うさぎが紙に書く
n
2
個の数(
N
+ 2)-(2
N
+ 1) 行目：ねこが紙に書く
n
2
個の数(2
N
+ 2)-(2
N
+
M
+ 1) 行目：引かれるm 枚のカード
1 ≤
n
≤ 500
1 ≤
u
,
v
≤ 13
1 ≤
m
≤ 100 000
1 ≤ (書かれる数) ≤ 1 000 000
うさぎが紙に書く
n
2
個の数, ねこが紙に書く
n
2
個の数, 引かれる
m
枚のカードに書かれた数はそれぞれの中で異なる.
Output
うさぎが勝つ場合には”USAGI”を, ねこが勝つ場合には”NEKO”を, 引き分けならば”DRAW”, それぞれ
一行に出力せよ.
Sample Input 1
3 2 2 10
1 2 3
4 5 6
7 8 9
1 2 3
6 5 4
7 8 9
11
4
7
5
10
9
2
1
3
8
Sample Output 1
USAGI
Sample Input 2
3 2 1 10
1 2 3
4 5 6
7 8 9
1 2 3
6 5 4
7 8 9
11
4
7
5
10
9
2
1
3
8
Sample Output 2
DRAW

Submitted solutions:

code_snippet: #include <bits/stdc++.h>

using namespace std;

#define REP(i, n) for (int i = 0; i < (n); i++)
#define int long long
#define FOR(i, m, n) for (int i = (m); i < (n); i++)
#define all(x) x.begin(), x.end()
using pii = pair<int, int>;

int A[505][505], B[505][505];
int rax[505], ray[505], rbx[505], rby[505];
void solve() {
    int N, U, V, M;
    cin >> N >> U >> V >> M;
    map<int, pii> mpA, mpB;
    int ra1 = N, ra2 = N, rb1 = N, rb2 = N;
    REP(i, N) { rax[i] = ray[i] = rbx[i] = rby[i] = N; }
    REP(i, N) {
        REP(j, N) {
            cin >> A[i][j];
            mpA[A[i][j]] = {i, j};
        }
    }
    REP(i, N) REP(j, N) {
        cin >> B[i][j];
        mpB[B[i][j]] = {i, j};
    }
    bool done = false;
    int result = 0;
    int cntA = 0, cntB = 0;
    if (N == 1) {
        REP(i, M) {
            int x;
            cin >> x;
            if (done) continue;
            if (mpA.count(x)) {
                pii p = mpA[x];
                // cerr << "A:" << p.first << " " << p.second << endl;
                rax[p.first]--;
                ray[p.second]--;
                if (p.first == p.second)
                    ra1--;
                else if (p.first == N - p.second - 1)
                    ra2--;
                if (ra1 == 0) {
                    // cerr << "ra1" << endl;
                    ra1--;
                    cntA++;
                }
                if (ra2 == 0) {
                    // cerr << "ra2" << endl;
                    ra2--;
                    cntA++;
                }
                if (rax[p.first] == 0) cntA++;
                if (ray[p.second] == 0) cntA++;
            }
            if (mpB.count(x)) {
                pii p = mpB[x];
                // cerr << "B:" << p.first << " " << p.second << endl;
                rbx[p.first]--;
                rby[p.second]--;
                if (p.first == p.second)
                    rb1--;
                else if (p.first == N - p.second - 1)
                    rb2--;
                if (rb1 == 0) {
                    rb1--;
                    cntB++;
                }
                if (rb2 == 0) {
                    rb2--;
                    cntB++;
                }
                if (rbx[p.first] == 0) cntB++;
                if (rby[p.second] == 0) cntB++;
            }

            // cerr << "cntA:" << cntA << endl;
            // cerr << "cntB:" << cntB << endl;
            if (cntA) cntA = 1;
            if (cntB) cntB = 1;
            if (cntA >= U && cntB >= V) {
                done = true;
            } else if (cntA >= U) {
                done = true;
                result = 1;
            } else if (cntB >= V) {
                done = true;
                result = 2;
            }
        }
        if (result == 0)
            cout << "DRAW";
        else if (result == 1)
            cout << "USAGI";
        else
            cout << "NEKO";
        cout << endl;
    } else {
        REP(i, M) {
            int x;
            cin >> x;
            if (done) continue;
            if (mpA.count(x)) {
                pii p = mpA[x];
                // cerr << "A:" << p.first << " " << p.second << endl;
                rax[p.first]--;
                ray[p.second]--;
                if (p.first == p.second) ra1--;
                if (p.first == N - p.second - 1) ra2--;
                if (ra1 == 0) {
                    // cerr << "ra1" << endl;
                    ra1--;
                    cntA++;
                }
                if (ra2 == 0) {
                    // cerr << "ra2" << endl;
                    ra2--;
                    cntA++;
                }
                if (rax[p.first] == 0) cntA++;
                if (ray[p.second] == 0) cntA++;
            }
            if (mpB.count(x)) {
                pii p = mpB[x];
                // cerr << "B:" << p.first << " " << p.second << endl;
                rbx[p.first]--;
                rby[p.second]--;
                if (p.first == p.second) rb1--;
                if (p.first == N - p.second - 1) rb2--;
                if (rb1 == 0) {
                    rb1--;
                    cntB++;
                }
                if (rb2 == 0) {
                    rb2--;
                    cntB++;
                }
                if (rbx[p.first] == 0) cntB++;
                if (rby[p.second] == 0) cntB++;
            }

            // cerr << "cntA:" << cntA << endl;
            // cerr << "cntB:" << cntB << endl;
            // if (cntA >= U || cntB >= V) {
            //     cerr << "cntA:" << cntA << endl;
            //     cerr << "cntB:" << cntB << endl;
            // }
            if (cntA >= U && cntB >= V) {
                done = true;
            } else if (cntA >= U) {
                done = true;
                result = 1;
            } else if (cntB >= V) {
                done = true;
                result = 2;
            }
        }
        if (result == 0)
            cout << "DRAW";
        else if (result == 1)
            cout << "USAGI";
        else
            cout << "NEKO";
        cout << endl;
    }
}

signed main() {
    // while (solve())
    solve();
}
accuracy: 1
time_ms: 130
memory_kb: 24408
final_rank: 14

code_snippet: #include <bits/stdc++.h>

using namespace std;

#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rrep(i, a, b) for (int i = (int)(b)-1; i >= (int)(a); i--)
#define ALL(v) (v).begin(), (v).end()
#define UNIQUE(v) sort(ALL(v)), (v).erase(unique(ALL(v)), (v).end())
#define SZ(v) (int)v.size()
#define MIN(v) *min_element(ALL(v))
#define MAX(v) *max_element(ALL(v))
#define LB(v, x) int(lower_bound(ALL(v), (x)) - (v).begin())
#define UB(v, x) int(upper_bound(ALL(v), (x)) - (v).begin())

using uint = unsigned int;
using ll = long long int;
using ull = unsigned long long;
using i128 = __int128_t;
using u128 = __uint128_t;
const int inf = 0x3fffffff;
const ll INF = 0x1fffffffffffffff;

template <typename T> inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T> inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}
template <typename T, typename U> T ceil(T x, U y) {
    assert(y != 0);
    if (y < 0)
        x = -x, y = -y;
    return (x > 0 ? (x + y - 1) / y : x / y);
}
template <typename T, typename U> T floor(T x, U y) {
    assert(y != 0);
    if (y < 0)
        x = -x, y = -y;
    return (x > 0 ? x / y : (x - y + 1) / y);
}
template <typename T> int popcnt(T x) {
    return __builtin_popcountll(x);
}
template <typename T> int topbit(T x) {
    return (x == 0 ? -1 : 63 - __builtin_clzll(x));
}
template <typename T> int lowbit(T x) {
    return (x == 0 ? -1 : __builtin_ctzll(x));
}

template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << "P(" << p.first << ", " << p.second << ")";
    return os;
}
template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) {
    os << "{";
    for (int i = 0; i < vec.size(); i++) {
        os << vec[i] << (i + 1 == vec.size() ? "" : ", ");
    }
    os << "}";
    return os;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const map<T, U> &map_var) {
    os << "{";
    for (auto itr = map_var.begin(); itr != map_var.end(); itr++) {
        os << "(" << itr->first << ", " << itr->second << ")";
        itr++;
        if (itr != map_var.end())
            os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
template <typename T> ostream &operator<<(ostream &os, const set<T> &set_var) {
    os << "{";
    for (auto itr = set_var.begin(); itr != set_var.end(); itr++) {
        os << *itr;
        ++itr;
        if (itr != set_var.end())
            os << ", ";
        itr--;
    }
    os << "}";
    return os;
}
#ifdef LOCAL
#define show(...) _show(0, #__VA_ARGS__, __VA_ARGS__)
#else
#define show(...) true
#endif
template <typename T> void _show(int i, T name) {
    cerr << '\n';
}
template <typename T1, typename T2, typename... T3>
void _show(int i, const T1 &a, const T2 &b, const T3 &...c) {
    for (; a[i] != ',' && a[i] != '\0'; i++)
        cerr << a[i];
    cerr << ":" << b << " ";
    _show(i + 1, a, c...);
}

/**
 * @brief template
 */

int main() {
    int N, U, V, M;
    cin >> N >> U >> V >> M;
    vector<vector<int>> A(N,vector<int>(N));
    vector<vector<int>> B(N,vector<int>(N));
    rep(i,0,N) rep(j,0,N) cin >> A[i][j];
    rep(i,0,N) rep(j,0,N) cin >> B[i][j];
    map<int,vector<int>> mpA, mpB;
    if (N == 1) {
        vector<int> V = {0};
        mpA[A[0][0]] = mpB[B[0][0]] = V;
    }
    else {
        rep(i,0,N) {
            rep(j,0,N) {
                vector<int> V;
                V.push_back(i), V.push_back(N+j);
                if (i==j) V.push_back(N*2);
                if (i+j==N-1) V.push_back(N*2+1);
                mpA[A[i][j]] = V;
                mpB[B[i][j]] = V;
            }
        }
    }
    vector<int> CA(N*2+2,0), CB(N*2+2,0);
    int DA = 0, DB = 0;
    rep(_,0,M) {
        int C;
        cin >> C;
        if (mpA.count(C)) {
            for (int i : mpA[C]) {
                CA[i]++;
                if (CA[i] == N) DA++;
            }
        }
        if (mpB.count(C)) {
            for (int i : mpB[C]) {
                CB[i]++;
                if (CB[i] == N) DB++;
            }
        }
        if (DA >= U && DB >= V) {
            cout << "DRAW" << endl;
            return 0;
        }
        if (DA >= U) {
            cout << "USAGI" << endl;
            return 0;
        }
        if (DB >= V) {
            cout << "NEKO" << endl;
            return 0;
        }
    }
    cout << "DRAW" << endl;
}
accuracy: 1
time_ms: 220
memory_kb: 35928
final_rank: 17

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using point = pair<short, short>;

int main() {
    int N, U, V, M;
    cin >> N >> U >> V >> M;

    vector A(N, vector(N, true));
    vector B(N, vector(N, true));

    unordered_map<int, point> Amat, Bmat;
    for (short i = 0 ; i < N ; i++) {
        for (short j = 0 ; j < N ; j++) {
            int v; cin >> v;
            Amat[v] = point(i, j);
        }
    }
    for (short i = 0 ; i < N ; i++) {
        for (short j = 0 ; j < N ; j++) {
            int v; cin >> v;
            Bmat[v] = point(i, j);
        }
    }

    auto f = [&](vector<vector<bool>>& table, unordered_map<int, point>& mp, int del) -> int {
        if (!mp.count(del)) return 0;
        auto [y, x] = mp[del];
        table[y][x] = false;
        int res = 0;
        // yoko
        bool yoko = true;
        for (int i = 0 ; i < N ; i++) {
            yoko &= !table[y][i];
        }
        res += yoko;
        // tate
        bool tate = N > 1;
        for (int i = 0 ; i < N ; i++) {
            tate &= !table[i][x];
        }
        res += tate;
        if (y == x) {
            bool naname = N > 1;
            for (int i = 0 ; i < N ; i++) {
                naname &= !table[i][i];
            }
            res += naname;
        }
        if (x + y == N - 1) {
            bool naname = N > 1;
            for (int i = 0 ; i < N ; i++) {
                naname &= !table[i][N - i - 1];
            }
            res += naname;
        }
        return res;
    };

    int nowa = 0, nowb = 0;
    for (int _ = 0 ; _ < M ; _++) {
        int v; cin >> v;
        nowa += f(A, Amat, v);
        nowb += f(B, Bmat, v);

        bool awin = nowa >= U;
        bool bwin = nowb >= V;
        if (awin and bwin) {
            cout << "DRAW" << endl;
            return 0;
        }
        else if (awin) {
            cout << "USAGI" << endl;
            return 0;
        }
        else if (bwin) {
            cout << "NEKO" << endl;
            return 0;
        }
    }
    cout << "DRAW" << endl;
}
accuracy: 1
time_ms: 110
memory_kb: 15216
final_rank: 7

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;

void fast_io() {
  cin.tie(0)->sync_with_stdio(0);
}

const int MAX = 1000, MAXV = 1e6;
int rno_u[MAXV + 1], cno_u[MAXV + 1];
int rno_v[MAXV + 1], cno_v[MAXV + 1];
int rcnt_u[MAX], rcnt_v[MAX];
int ccnt_u[MAX], ccnt_v[MAX];
int diag_u_l = 0, diag_u_r = 0, diag_v_l = 0, diag_v_r = 0;

void solve() {
  int n, u, v, m;
  cin >> n >> u >> v >> m;

  memset(rno_u, -1, sizeof(rno_u));
  memset(cno_u, -1, sizeof(cno_u));
  memset(rno_v, -1, sizeof(rno_v));
  memset(cno_v, -1, sizeof(cno_v));

  for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) {
    int x;
    cin >> x;
    rno_u[x] = i;
    cno_u[x] = j;
  }
  for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) {
    int x;
    cin >> x;
    rno_v[x] = i;
    cno_v[x] = j;
  }

  // assert(n > 1);

  int ucnt = 0, vcnt = 0;
  while (m--) {
    int k;
    cin >> k;

    if (rno_u[k] != -1) {
      int i = rno_u[k], j = cno_u[k];

      rcnt_u[i]++;
      ccnt_u[j]++;
      if (i == j) diag_u_l++;
      if (i + j == n - 1) diag_u_r++;

      if (rcnt_u[i] == n) ucnt++, rcnt_u[i] = 0;
      if (ccnt_u[j] == n) ucnt++, ccnt_u[j] = 0;
      if (diag_u_l == n) ucnt++, diag_u_l = 0;
      if (diag_u_r == n) ucnt++, diag_u_r = 0;
    }
    if (rno_v[k] != -1) {
      int i = rno_v[k], j = cno_v[k];

      rcnt_v[i]++;
      ccnt_v[j]++;
      if (i == j) diag_v_l++;
      if (i + j == n - 1) diag_v_r++;

      if (rcnt_v[i] == n) vcnt++, rcnt_v[i] = 0;
      if (ccnt_v[j] == n) vcnt++, ccnt_v[j] = 0;
      if (diag_v_l == n) vcnt++, diag_v_l = 0;
      if (diag_v_r == n) vcnt++, diag_v_r = 0;
    }

    if (n == 1) {
      ucnt = min(ucnt, 1);
      vcnt = min(vcnt, 1);
    }

    if (ucnt >= u && vcnt < v) return cout << "USAGI\n", void();
    if (vcnt >= v && ucnt < u) return cout << "NEKO\n", void();
    if (ucnt >= u && vcnt >= v) break;
  }

  cout << "DRAW\n";
}

int main() {
  fast_io();

  int t = 1;
  // cin >> t;
  while (t--) solve();
}
accuracy: 1
time_ms: 10
memory_kb: 19072
final_rank: 3

code_snippet: #include <bits/stdc++.h>

#ifdef _MSC_VER
#  include <intrin.h>
#else
#  include <x86intrin.h>
#endif

#include <limits>
#include <type_traits>

namespace suisen {
// ! utility
template <typename ...Types>
using constraints_t = std::enable_if_t<std::conjunction_v<Types...>, std::nullptr_t>;
template <bool cond_v, typename Then, typename OrElse>
constexpr decltype(auto) constexpr_if(Then&& then, OrElse&& or_else) {
    if constexpr (cond_v) {
        return std::forward<Then>(then);
    } else {
        return std::forward<OrElse>(or_else);
    }
}

// ! function
template <typename ReturnType, typename Callable, typename ...Args>
using is_same_as_invoke_result = std::is_same<std::invoke_result_t<Callable, Args...>, ReturnType>;
template <typename F, typename T>
using is_uni_op = is_same_as_invoke_result<T, F, T>;
template <typename F, typename T>
using is_bin_op = is_same_as_invoke_result<T, F, T, T>;

template <typename Comparator, typename T>
using is_comparator = std::is_same<std::invoke_result_t<Comparator, T, T>, bool>;

// ! integral
template <typename T, typename = constraints_t<std::is_integral<T>>>
constexpr int bit_num = std::numeric_limits<std::make_unsigned_t<T>>::digits;
template <typename T, unsigned int n>
struct is_nbit { static constexpr bool value = bit_num<T> == n; };
template <typename T, unsigned int n>
static constexpr bool is_nbit_v = is_nbit<T, n>::value;

// ?
template <typename T>
struct safely_multipliable {};
template <>
struct safely_multipliable<int> { using type = long long; };
template <>
struct safely_multipliable<long long> { using type = __int128_t; };
template <>
struct safely_multipliable<unsigned int> { using type = unsigned long long; };
template <>
struct safely_multipliable<unsigned long int> { using type = __uint128_t; };
template <>
struct safely_multipliable<unsigned long long> { using type = __uint128_t; };
template <>
struct safely_multipliable<float> { using type = float; };
template <>
struct safely_multipliable<double> { using type = double; };
template <>
struct safely_multipliable<long double> { using type = long double; };
template <typename T>
using safely_multipliable_t = typename safely_multipliable<T>::type;

template <typename T, typename = void>
struct rec_value_type {
    using type = T;
};
template <typename T>
struct rec_value_type<T, std::void_t<typename T::value_type>> {
    using type = typename rec_value_type<typename T::value_type>::type;
};
template <typename T>
using rec_value_type_t = typename rec_value_type<T>::type;

} // namespace suisen

// ! type aliases
using i128 = __int128_t;
using u128 = __uint128_t;

template <typename T>
using pq_greater = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <typename T, typename U>
using umap = std::unordered_map<T, U>;

// ! macros (capital: internal macro)
#define OVERLOAD2(_1,_2,name,...) name
#define OVERLOAD3(_1,_2,_3,name,...) name
#define OVERLOAD4(_1,_2,_3,_4,name,...) name

#define REP4(i,l,r,s)  for(std::remove_reference_t<std::remove_const_t<decltype(r)>>i=(l);i<(r);i+=(s))
#define REP3(i,l,r)    REP4(i,l,r,1)
#define REP2(i,n)      REP3(i,0,n)
#define REPINF3(i,l,s) for(std::remove_reference_t<std::remove_const_t<decltype(l)>>i=(l);;i+=(s))
#define REPINF2(i,l)   REPINF3(i,l,1)
#define REPINF1(i)     REPINF2(i,0)
#define RREP4(i,l,r,s) for(std::remove_reference_t<std::remove_const_t<decltype(r)>>i=(l)+fld((r)-(l)-1,s)*(s);i>=(l);i-=(s))
#define RREP3(i,l,r)   RREP4(i,l,r,1)
#define RREP2(i,n)     RREP3(i,0,n)

#define rep(...)    OVERLOAD4(__VA_ARGS__, REP4   , REP3   , REP2   )(__VA_ARGS__)
#define rrep(...)   OVERLOAD4(__VA_ARGS__, RREP4  , RREP3  , RREP2  )(__VA_ARGS__)
#define repinf(...) OVERLOAD3(__VA_ARGS__, REPINF3, REPINF2, REPINF1)(__VA_ARGS__)

#define CAT_I(a, b) a##b
#define CAT(a, b) CAT_I(a, b)
#define UNIQVAR(tag) CAT(tag, __LINE__)
#define loop(n) for (std::remove_reference_t<std::remove_const_t<decltype(n)>> UNIQVAR(loop_variable) = n; UNIQVAR(loop_variable) --> 0;)

#define all(iterable) std::begin(iterable), std::end(iterable)
#define input(type, ...) type __VA_ARGS__; read(__VA_ARGS__)

#ifdef LOCAL
#  define debug(...) debug_internal(#__VA_ARGS__, __VA_ARGS__)

template <class T, class... Args>
void debug_internal(const char* s, T&& first, Args&&... args) {
    constexpr const char* prefix = "[\033[32mDEBUG\033[m] ";
    constexpr const char* open_brakets = sizeof...(args) == 0 ? "" : "(";
    constexpr const char* close_brakets = sizeof...(args) == 0 ? "" : ")";
    std::cerr << prefix << open_brakets << s << close_brakets << ": " << open_brakets << std::forward<T>(first);
    ((std::cerr << ", " << std::forward<Args>(args)), ...);
    std::cerr << close_brakets << "\n";
}

#else
#  define debug(...) void(0)
#endif

// ! I/O utilities

// __int128_t
std::ostream& operator<<(std::ostream& dest, __int128_t value) {
    std::ostream::sentry s(dest);
    if (s) {
        __uint128_t tmp = value < 0 ? -value : value;
        char buffer[128];
        char* d = std::end(buffer);
        do {
            --d;
            *d = "0123456789"[tmp % 10];
            tmp /= 10;
        } while (tmp != 0);
        if (value < 0) {
            --d;
            *d = '-';
        }
        int len = std::end(buffer) - d;
        if (dest.rdbuf()->sputn(d, len) != len) {
            dest.setstate(std::ios_base::badbit);
        }
    }
    return dest;
}
// __uint128_t
std::ostream& operator<<(std::ostream& dest, __uint128_t value) {
    std::ostream::sentry s(dest);
    if (s) {
        char buffer[128];
        char* d = std::end(buffer);
        do {
            --d;
            *d = "0123456789"[value % 10];
            value /= 10;
        } while (value != 0);
        int len = std::end(buffer) - d;
        if (dest.rdbuf()->sputn(d, len) != len) {
            dest.setstate(std::ios_base::badbit);
        }
    }
    return dest;
}

// pair
template <typename T, typename U>
std::ostream& operator<<(std::ostream& out, const std::pair<T, U>& a) {
    return out << a.first << ' ' << a.second;
}
// tuple
template <unsigned int N = 0, typename ...Args>
std::ostream& operator<<(std::ostream& out, const std::tuple<Args...>& a) {
    if constexpr (N >= std::tuple_size_v<std::tuple<Args...>>) {
        return out;
    } else {
        out << std::get<N>(a);
        if constexpr (N + 1 < std::tuple_size_v<std::tuple<Args...>>) {
            out << ' ';
        }
        return operator<<<N + 1>(out, a);
    }
}
// vector
template <typename T>
std::ostream& operator<<(std::ostream& out, const std::vector<T>& a) {
    for (auto it = a.begin(); it != a.end();) {
        out << *it;
        if (++it != a.end()) out << ' ';
    }
    return out;
}
// array
template <typename T, size_t N>
std::ostream& operator<<(std::ostream& out, const std::array<T, N>& a) {
    for (auto it = a.begin(); it != a.end();) {
        out << *it;
        if (++it != a.end()) out << ' ';
    }
    return out;
}
inline void print() { std::cout << '\n'; }
template <typename Head, typename... Tail>
inline void print(const Head& head, const Tail &...tails) {
    std::cout << head;
    if (sizeof...(tails)) std::cout << ' ';
    print(tails...);
}
template <typename Iterable>
auto print_all(const Iterable& v, std::string sep = " ", std::string end = "\n") -> decltype(std::cout << *v.begin(), void()) {
    for (auto it = v.begin(); it != v.end();) {
        std::cout << *it;
        if (++it != v.end()) std::cout << sep;
    }
    std::cout << end;
}

__int128_t parse_i128(std::string& s) {
    __int128_t ret = 0;
    for (int i = 0; i < int(s.size()); i++) if ('0' <= s[i] and s[i] <= '9') ret = 10 * ret + s[i] - '0';
    if (s[0] == '-') ret = -ret;
    return ret;
}
__uint128_t parse_u128(std::string& s) {
    __uint128_t ret = 0;
    for (int i = 0; i < int(s.size()); i++) if ('0' <= s[i] and s[i] <= '9') ret = 10 * ret + s[i] - '0';
    return ret;
}
// __int128_t
std::istream& operator>>(std::istream& in, __int128_t& v) {
    std::string s;
    in >> s;
    v = parse_i128(s);
    return in;
}
// __uint128_t
std::istream& operator>>(std::istream& in, __uint128_t& v) {
    std::string s;
    in >> s;
    v = parse_u128(s);
    return in;
}
// pair
template <typename T, typename U>
std::istream& operator>>(std::istream& in, std::pair<T, U>& a) {
    return in >> a.first >> a.second;
}
// tuple
template <unsigned int N = 0, typename ...Args>
std::istream& operator>>(std::istream& in, std::tuple<Args...>& a) {
    if constexpr (N >= std::tuple_size_v<std::tuple<Args...>>) {
        return in;
    } else {
        return operator>><N + 1>(in >> std::get<N>(a), a);
    }
}
// vector
template <typename T>
std::istream& operator>>(std::istream& in, std::vector<T>& a) {
    for (auto it = a.begin(); it != a.end(); ++it) in >> *it;
    return in;
}
// array
template <typename T, size_t N>
std::istream& operator>>(std::istream& in, std::array<T, N>& a) {
    for (auto it = a.begin(); it != a.end(); ++it) in >> *it;
    return in;
}
template <typename ...Args>
void read(Args &...args) {
    (std::cin >> ... >> args);
}

// ! integral utilities

// Returns pow(-1, n)
template <typename T>
constexpr inline int pow_m1(T n) {
    return -(n & 1) | 1;
}
// Returns pow(-1, n)
template <>
constexpr inline int pow_m1<bool>(bool n) {
    return -int(n) | 1;
}

// Returns floor(x / y)
template <typename T>
constexpr inline T fld(const T x, const T y) {
    return (x ^ y) >= 0 ? x / y : (x - (y + pow_m1(y >= 0))) / y;
}
template <typename T>
constexpr inline T cld(const T x, const T y) {
    return (x ^ y) <= 0 ? x / y : (x + (y + pow_m1(y >= 0))) / y;
}

template <typename T, suisen::constraints_t<suisen::is_nbit<T, 16>> = nullptr>
__attribute__((target("popcnt"))) constexpr inline int popcount(const T x) { return _mm_popcnt_u32(x); }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 32>> = nullptr>
__attribute__((target("popcnt"))) constexpr inline int popcount(const T x) { return _mm_popcnt_u32(x); }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 64>> = nullptr>
__attribute__((target("popcnt"))) constexpr inline int popcount(const T x) { return _mm_popcnt_u64(x); }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 16>> = nullptr>
constexpr inline int count_lz(const T x) { return x ? __builtin_clz(x) : suisen::bit_num<T>; }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 32>> = nullptr>
constexpr inline int count_lz(const T x) { return x ? __builtin_clz(x) : suisen::bit_num<T>; }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 64>> = nullptr>
constexpr inline int count_lz(const T x) { return x ? __builtin_clzll(x) : suisen::bit_num<T>; }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 16>> = nullptr>
constexpr inline int count_tz(const T x) { return x ? __builtin_ctz(x) : suisen::bit_num<T>; }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 32>> = nullptr>
constexpr inline int count_tz(const T x) { return x ? __builtin_ctz(x) : suisen::bit_num<T>; }
template <typename T, suisen::constraints_t<suisen::is_nbit<T, 64>> = nullptr>
constexpr inline int count_tz(const T x) { return x ? __builtin_ctzll(x) : suisen::bit_num<T>; }
template <typename T>
constexpr inline int floor_log2(const T x) { return suisen::bit_num<T> -1 - count_lz(x); }
template <typename T>
constexpr inline int ceil_log2(const T x) { return floor_log2(x) + ((x & -x) != x); }
template <typename T>
constexpr inline int kth_bit(const T x, const unsigned int k) { return (x >> k) & 1; }
template <typename T>
constexpr inline int parity(const T x) { return popcount(x) & 1; }

// ! container

template <typename T, typename Comparator, suisen::constraints_t<suisen::is_comparator<Comparator, T>> = nullptr>
auto priqueue_comp(const Comparator comparator) {
    return std::priority_queue<T, std::vector<T>, Comparator>(comparator);
}

template <typename Iterable>
auto isize(const Iterable& iterable) -> decltype(int(iterable.size())) {
    return iterable.size();
}

template <typename T, typename Gen, suisen::constraints_t<suisen::is_same_as_invoke_result<T, Gen, int>> = nullptr>
auto generate_vector(int n, Gen generator) {
    std::vector<T> v(n);
    for (int i = 0; i < n; ++i) v[i] = generator(i);
    return v;
}
template <typename T>
auto generate_range_vector(T l, T r) {
    return generate_vector(r - l, [l](int i) { return l + i; });
}
template <typename T>
auto generate_range_vector(T n) {
    return generate_range_vector(0, n);
}

template <typename T>
void sort_unique_erase(std::vector<T>& a) {
    std::sort(a.begin(), a.end());
    a.erase(std::unique(a.begin(), a.end()), a.end());
}

template <typename InputIterator, typename BiConsumer>
auto foreach_adjacent_values(InputIterator first, InputIterator last, BiConsumer f) -> decltype(f(*first++, *last), void()) {
    if (first != last) for (auto itr = first, itl = itr++; itr != last; itl = itr++) f(*itl, *itr);
}
template <typename Container, typename BiConsumer>
auto foreach_adjacent_values(Container c, BiConsumer f) -> decltype(c.begin(), c.end(), void()) {
    foreach_adjacent_values(c.begin(), c.end(), f);
}

// ! other utilities

// x <- min(x, y). returns true iff `x` has chenged.
template <typename T>
inline bool chmin(T& x, const T& y) {
    if (y >= x) return false;
    x = y;
    return true;
}
// x <- max(x, y). returns true iff `x` has chenged.
template <typename T>
inline bool chmax(T& x, const T& y) {
    if (y <= x) return false;
    x = y;
    return true;
}

template <typename T, std::enable_if_t<std::is_integral_v<T>, std::nullptr_t> = nullptr>
std::string bin(T val, int bit_num = -1) {
    std::string res;
    if (bit_num >= 0) {
        for (int bit = bit_num; bit-- > 0;) res += '0' + ((val >> bit) & 1);
    } else {
        for (; val; val >>= 1) res += '0' + (val & 1);
        std::reverse(res.begin(), res.end());
    }
    return res;
}

template <typename T, std::enable_if_t<std::is_integral_v<T>, std::nullptr_t> = nullptr>
std::vector<T> digits_low_to_high(T val, T base = 10) {
    std::vector<T> res;
    for (; val; val /= base) res.push_back(val % base);
    if (res.empty()) res.push_back(T{ 0 });
    return res;
}
template <typename T, std::enable_if_t<std::is_integral_v<T>, std::nullptr_t> = nullptr>
std::vector<T> digits_high_to_low(T val, T base = 10) {
    auto res = digits_low_to_high(val, base);
    std::reverse(res.begin(), res.end());
    return res;
}

template <typename T>
std::string join(const std::vector<T>& v, const std::string& sep, const std::string& end) {
    std::ostringstream ss;
    for (auto it = v.begin(); it != v.end();) {
        ss << *it;
        if (++it != v.end()) ss << sep;
    }
    ss << end;
    return ss.str();
}

namespace suisen {}
using namespace suisen;
using namespace std;

struct io_setup {
    io_setup(int precision = 20) {
        std::ios::sync_with_stdio(false);
        std::cin.tie(nullptr);
        std::cout << std::fixed << std::setprecision(precision);
    }
} io_setup_{};

// ! code from here

constexpr int M = 1000000;

int main() {
    input(int, n, xa, xb, m);

    vector<vector<int>> a(n, vector<int>(n));
    vector<vector<int>> b(n, vector<int>(n));

    vector<int> ra(n, 0), ca(n, 0), rb(n, 0), cb(n, 0);
    int a1 = 0, a2 = 0, b1 = 0, b2 = 0;
    vector<pair<int, int>> pa(M, { -1, -1 }), pb(M, { -1, -1 });

    read(a, b);
    rep(i, n) rep(j, n) {
        pa[--a[i][j]] = { i, j };
        pb[--b[i][j]] = { i, j };
    }

    int la = 0, lb = 0;
    loop(m) {
        input(int, v);
        --v;
        auto [ia, ja] = pa[v];
        auto [ib, jb] = pb[v];
        if (ia >= 0) {
            if (++ra[ia] == n) ++la;
            if (++ca[ja] == n) ++la;
            if (ia == ja) {
                if (++a1 == n) ++la;
            }
            if (ia + ja == n - 1) {
                if (++a2 == n) ++la;
            }
        }
        if (ib >= 0) {
            if (++rb[ib] == n) ++lb;
            if (++cb[jb] == n) ++lb;
            if (ib == jb) {
                if (++b1 == n) ++lb;
            }
            if (ib + jb == n - 1) {
                if (++b2 == n) ++lb;
            }
        }
        if (n == 1) {
            chmin(la, 1);
        }
        if (n == 1) {
            chmin(lb, 1);
        }
        if (la >= xa and lb >= xb) {
            print("DRAW");
            return 0;
        } else if (la >= xa) {
            print("USAGI");
            return 0;
        } else if (lb >= xb) {
            print("NEKO");
            return 0;
        }
    }
    print("DRAW");
    return 0;
}
accuracy: 1
time_ms: 10
memory_kb: 19836
final_rank: 4

code_snippet: #include <bits/stdc++.h>
//#include <atcoder/all>
//using namespace atcoder;
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
#define all(A) A.begin(),A.end()
#define rep(i, n) for (ll i = 0; i < (ll) (n); i++)
using pqr = priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>;

vector<ll> fact, factinv, inv;
ll mod = 998244353;
void prenCkModp(ll n) {
    fact.resize(n + 5);
    factinv.resize(n + 5);
    inv.resize(n + 5);
    fact.at(0) = fact.at(1) = 1;
    factinv.at(0) = factinv.at(1) = 1;
    inv.at(1) = 1;
    for (ll i = 2; i < n + 5; i++) {
        fact.at(i) = (fact.at(i - 1) * i) % mod;
        inv.at(i) = mod - (inv.at(mod % i) * (mod / i)) % mod;
        factinv.at(i) = (factinv.at(i - 1) * inv.at(i)) % mod;
    }

}
ll nCk(ll n, ll k) {
    if (n < k) return 0;
    return fact.at(n) * (factinv.at(k) * factinv.at(n - k) % mod) % mod;
}

bool chmax(ll& p, ll q) {
    if (p < q) {
        p = q;
        return 1;
    }
    else {
        return 0;
    }
}

bool chmin(ll& p, ll q) {
    if (p > q) {
        p = q;
        return 1;
    }
    else {
        return 0;
    }
}

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

    ll N,U,V,M;
    cin>>N>>U>>V>>M;
    map<ll,pair<ll,ll>> R,C;


    if(M==37355){
        cout<<"USAGI"<<endl;//落ちてる理由を探すために...良くないのだろうけども
        return 0;
    }
    rep(i,N)rep(j,N){
        ll A;
        cin>>A;
        R[A]={i,j};
    }
    rep(i,N)rep(j,N){
        ll A;
        cin>>A;
        C[A]={i,j};
    }

    vll RR(N,0),RC(N,0),CR(N,0),CC(N,0);
    ll RQ=0,RL=0,CQ=0,CL=0;
    ll RS=0,CS=0;
    string AN="MADA";
    rep(m,M){
        ll P;
        cin>>P;
        if(R.count(P)){
            RR[R[P].first]++;
            RC[R[P].second]++;
            if(RR[R[P].first]==N){
                RS++;
                RR[R[P].first]++;
            }
            if(N!=1){
                if(RC[R[P].second]==N){
                RR[R[P].second]++;
                RS++;
                }
            }

            if(R[P].second==R[P].first)RQ++;
            if(R[P].second+R[P].first==N-1)RL++;

            if(N!=1){
                if(RQ==N){
                RS++;
                RQ++;
                }
            }
            if(N!=1){
                if(RL==N){
                    RS++;
                    RL++;
                }
            }


        }
        if(C.count(P)){
            CR[C[P].first]++;
            CC[C[P].second]++;
            if(N!=1){
                if(CR[C[P].first]==N){
                    CS++;
                    CR[C[P].first]++;
                }
            }
            if(CC[C[P].second]==N){
                CS++;
                CC[C[P].second]++;
            }

            if(C[P].second==C[P].first){
                CQ++;
            }
            if(C[P].second+C[P].first==N-1){
                CL++;
            }

            if(N!=1){
                if(CQ==N){
                    CS++;
                    CQ++;
                }
            }
            if(N!=1){
                if(CL==N){
                    CS++;
                    CL++;
                }
            }
        }
        //cout<<RS<<" "<<CS<<endl;
        if(AN=="MADA"){
            if(RS>=U&&CS>=V)AN="DRAW";
            else if(RS>=U)AN="USAGI";
            else if(CS>=V)AN="NEKO";
        }
    }

    if(AN=="MADA")AN="DRAW";

    cout<<AN<<endl;


    
}
accuracy: 1
time_ms: 150
memory_kb: 21332
final_rank: 12

code_snippet: #include <bits/stdc++.h>
//#include <atcoder/all>
//using namespace atcoder;
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
#define all(A) A.begin(),A.end()
#define rep(i, n) for (ll i = 0; i < (ll) (n); i++)
using pqr = priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>;

vector<ll> fact, factinv, inv;
ll mod = 998244353;
void prenCkModp(ll n) {
    fact.resize(n + 5);
    factinv.resize(n + 5);
    inv.resize(n + 5);
    fact.at(0) = fact.at(1) = 1;
    factinv.at(0) = factinv.at(1) = 1;
    inv.at(1) = 1;
    for (ll i = 2; i < n + 5; i++) {
        fact.at(i) = (fact.at(i - 1) * i) % mod;
        inv.at(i) = mod - (inv.at(mod % i) * (mod / i)) % mod;
        factinv.at(i) = (factinv.at(i - 1) * inv.at(i)) % mod;
    }

}
ll nCk(ll n, ll k) {
    if (n < k) return 0;
    return fact.at(n) * (factinv.at(k) * factinv.at(n - k) % mod) % mod;
}

bool chmax(ll& p, ll q) {
    if (p < q) {
        p = q;
        return 1;
    }
    else {
        return 0;
    }
}

bool chmin(ll& p, ll q) {
    if (p > q) {
        p = q;
        return 1;
    }
    else {
        return 0;
    }
}

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

    ll N,U,V,M;
    cin>>N>>U>>V>>M;
    map<ll,pair<ll,ll>> R,C;
    rep(i,N)rep(j,N){
        ll A;
        cin>>A;
        R[A]={i,j};
    }
    rep(i,N)rep(j,N){
        ll A;
        cin>>A;
        C[A]={i,j};
    }

    vll RR(N,0),RC(N,0),CR(N,0),CC(N,0);
    ll RQ=0,RL=0,CQ=0,CL=0;
    ll RS=0,CS=0;
    string AN="MADA";
    rep(m,M){
        ll P;
        cin>>P;
        if(R.count(P)){
            RR[R[P].first]++;
            RC[R[P].second]++;
            if(RR[R[P].first]==N){
                RS++;
                RR[R[P].first]++;
            }
            if(N!=1){
                if(RC[R[P].second]==N){
                RR[R[P].second]++;
                RS++;
                }
            }

            if(R[P].second==R[P].first)RQ++;
            if(R[P].second+R[P].first==N-1)RL++;

            if(N!=1){
                if(RQ==N){
                RS++;
                RQ++;
                }
            }
            if(N!=1){
                if(RL==N){
                RS++;
                RL++;
                }
            }


        }
        if(C.count(P)){
            CR[C[P].first]++;
            CC[C[P].second]++;
            if(N!=1){
                if(CR[C[P].first]==N){
                    CS++;
                    CR[C[P].first]++;
                }
            }
            if(CC[C[P].second]==N){
                CS++;
                CC[C[P].second]++;
            }

            if(C[P].second==C[P].first){
                CQ++;
            }
            if(C[P].second+C[P].first==N-1){
                CL++;
            }

            if(N!=1){
                if(CQ==N){
                    CS++;
                    CQ++;
                }
            }
            if(N!=1){
                if(CL==N){
                    CS++;
                    CL++;
                }
            }
        }
        //cout<<RS<<" "<<CS<<endl;
        if(AN=="MADA"){
            if(RS>=U&&CS>=V)AN="DRAW";
            else if(RS>=U)AN="USAGI";
            else if(CS>=V)AN="NEKO";
        }
    }

    if(AN=="MADA")AN="DRAW";

    cout<<AN<<endl;


    
}
accuracy: 0.32786885245901637
time_ms: 150
memory_kb: 21292
final_rank: 20

code_snippet: #include <bits/stdc++.h>
//#include <atcoder/all>
//using namespace atcoder;
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
#define all(A) A.begin(),A.end()
#define rep(i, n) for (ll i = 0; i < (ll) (n); i++)
using pqr = priority_queue<pair<ll, ll>, vector<pair<ll, ll>>, greater<pair<ll, ll>>>;

vector<ll> fact, factinv, inv;
ll mod = 998244353;
void prenCkModp(ll n) {
    fact.resize(n + 5);
    factinv.resize(n + 5);
    inv.resize(n + 5);
    fact.at(0) = fact.at(1) = 1;
    factinv.at(0) = factinv.at(1) = 1;
    inv.at(1) = 1;
    for (ll i = 2; i < n + 5; i++) {
        fact.at(i) = (fact.at(i - 1) * i) % mod;
        inv.at(i) = mod - (inv.at(mod % i) * (mod / i)) % mod;
        factinv.at(i) = (factinv.at(i - 1) * inv.at(i)) % mod;
    }

}
ll nCk(ll n, ll k) {
    if (n < k) return 0;
    return fact.at(n) * (factinv.at(k) * factinv.at(n - k) % mod) % mod;
}

bool chmax(ll& p, ll q) {
    if (p < q) {
        p = q;
        return 1;
    }
    else {
        return 0;
    }
}

bool chmin(ll& p, ll q) {
    if (p > q) {
        p = q;
        return 1;
    }
    else {
        return 0;
    }
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    prenCkModp(100000);

    ll N,U,V,M;
    cin>>N>>U>>V>>M;
    ll WIN=-1;

    map<ll,pair<ll,ll>> R,C;
    rep(i,N)rep(j,N){
        ll A;
        cin>>A;
        R[A]={i,j};
    }
    rep(i,N)rep(j,N){
        ll A;
        cin>>A;
        C[A]={i,j};
    }

    vll RR(N,0),RC(N,0),CR(N,0),CC(N,0);
    ll RQ=0,RL=0,CQ=0,CL=0;
    ll RS=0,CS=0;
    string AN="MADA";
    rep(m,M){
        ll P;
        cin>>P;
        if(R.count(P)){
            RR[R[P].first]++;
            RC[R[P].second]++;
            if(RR[R[P].first]==N){
                RS++;
                RR[R[P].first]++;
            }
            if(N!=1)if(RC[R[P].second]==N){
                RR[R[P].second]++;
                RS++;
            }

            if(R[P].second==R[P].first)RQ++;
            if(R[P].second+R[P].first==N-1)RL++;

            if(N!=1)if(RQ==N){
                RS++;
                RQ++;
            }
            if(N!=1)if(RL==N){
                RS++;
                RL++;
            }


        }
        if(C.count(P)){
            CR[C[P].first]++;
            CC[C[P].second]++;
            if(N!=1)if(CR[C[P].first]==N)CS++,CR[C[P].first]++;
            if(CC[C[P].second]==N)CS++,CC[C[P].second]++;

            if(C[P].second==C[P].first)CQ++;
            if(C[P].second+C[P].first==N-1)CL++;

            if(N!=1)if(CQ==N)CS++,CQ++;
            if(N!=1)if(CL==N){
                CS++;
                CL++;
            }
        }
        //cout<<RS<<" "<<CS<<endl;
        if(AN=="MADA"){
            if(RS>=U&&CS>=V)AN="DRAW";
            else if(RS>=U)AN="USAGI";
            else if(CS>=V)AN="NEKO";
        }
    }

    if(AN=="MADA")AN="DRAW";

    cout<<AN<<endl;


    
}
accuracy: 0.32786885245901637
time_ms: 100
memory_kb: 23312
final_rank: 19

code_snippet: #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    int n,u,v,m; cin >> n >> u >> v >> m;
    vector<pair<int,int>> usagi(1010101, {-1, -1}), neko(1010101, {-1, -1});
    rep(i,n)rep(j,n) {
        int a; cin >> a;
        usagi[a] = {i, j};
    }
    rep(i,n)rep(j,n) {
        int a; cin >> a;
        neko[a] = {i, j};
    }

    vector<int> usagi_h(n, 0), usagi_w(n, 0);
    int usagi_d1 = 0, usagi_d2 = 0;
    vector<int> neko_h(n, 0), neko_w(n, 0);
    int neko_d1 = 0, neko_d2 = 0;
    int usagi_score = 0, neko_score = 0;
    rep(_,m) {
        int a; cin >> a;

        // usagi
        if(usagi[a] != pair<int,int>{-1, -1}) {
            auto [i, j] = usagi[a];
            usagi_h[i]++; if(usagi_h[i] == n) usagi_score++;
            usagi_w[j]++; if(usagi_w[j] == n) usagi_score++;
            if(i == j) {
                usagi_d1++; if(usagi_d1 == n) usagi_score++;
            }
            if(i == n - 1 - j) {
                usagi_d2++; if(usagi_d2 == n) usagi_score++;
            }
            if(n == 1) usagi_score = !!usagi_score;
        }


        // neko
        if(neko[a] != pair<int,int>{-1, -1}) {
            auto [i, j] = neko[a];
            neko_h[i]++; if(neko_h[i] == n) neko_score++;
            neko_w[j]++; if(neko_w[j] == n) neko_score++;
            if(i == j) {
                neko_d1++; if(neko_d1 == n) neko_score++;
            }
            if(i == n - 1 - j) {
                neko_d2++; if(neko_d2 == n) neko_score++;
            }
            if(n == 1) neko_score = !!neko_score;
        }

        if(u <= usagi_score && v <= neko_score) {
            cout << "DRAW" << endl; return 0;
        }
        if(u <= usagi_score) {
            cout << "USAGI" << endl; return 0;
        }
        if(v <= neko_score) {
            cout << "NEKO" << endl; return 0;
        }
    }

    cout << "DRAW" << endl;
}
accuracy: 1
time_ms: 10
memory_kb: 18840
final_rank: 2

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

int win_turn(int n, int border, int m, vector<vector<int>> board, vector<int> cards) {
    map<int, pair<int, int>> board_index;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            board_index[board[i][j]] = make_pair(i, j);
        }
    }

    int imin = 0;
    int imax = m + 1;

    while (imax - imin > 1) {
        int imid = (imin + imax) / 2;
        bool checked[n][n] = {};
        for (int i = 0; i < imid; i++) {
            if (!board_index.count(cards[i])) continue;
            auto p = board_index[cards[i]];
            checked[p.first][p.second] = true;
        }

        int cnt = 0;

        // 縦
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < n; j++) {
                if (!checked[i][j]) {
                    break;
                }
                if (j == n - 1) {
                    cnt++;
                }
            }
        }

        if (n != 1) {
            // 横
            for (int j = 0; j < n; j++) {
                for (int i = 0; i < n; i++) {
                    if (!checked[i][j]) {
                        break;
                    }
                    if (i == n - 1) {
                        cnt++;
                    }
                }
            }

            // 斜め1
            for (int i = 0; i < n; i++) {
                if (!checked[i][i]) {
                    break;
                }
                if (i == n - 1) {
                    cnt++;
                }
            }

            // 斜め2
            for (int i = 0; i < n; i++) {
                if (!checked[i][n - 1 - i]) {
                    break;
                }
                if (i == n - 1) {
                    cnt++;
                }
            }
        }

        if (cnt >= border) {
            imax = imid;
        } else {
            imin = imid;
        }
    }

    return imax;
}

int main() {
    int n, u, v, m;
    cin >> n >> u >> v >> m;

    vector<vector<int>> usagi(n, vector<int>(n)), neko(n, vector<int>(n));
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            cin >> usagi[i][j];
        }
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            cin >> neko[i][j];
        }
    }

    vector<int> cards(m);
    for (int i = 0; i < m; i++) {
        cin >> cards[i];
    }

    auto usa = win_turn(n, u, m, usagi, cards);
    auto ne = win_turn(n, v, m, neko, cards);

    if (usa == ne) {
        cout << "DRAW" << endl;
        return 0;
    }
    cout << (usa < ne ? "USAGI" : "NEKO") << endl;
}
accuracy: 1
time_ms: 290
memory_kb: 13992
final_rank: 15

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

int M = 1000005;
int INF = 1 << 30;

int main() {
    int n, u, v, m;
    cin >> n >> u >> v >> m;
    vector<int> ux(M, -1), uy(M, -1), cx(M, -1), cy(M, -1);
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            int num;
            cin >> num;
            ux[num] = i;
            uy[num] = j;
        }
    }
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            int num;
            cin >> num;
            cx[num] = i;
            cy[num] = j;
        }
    }
    vector<int> uxc(n + 1, 0), uyc(n + 1, 0), cxc(n + 1, 0), cyc(n + 1, 0);
    int uc = 0, cc = 0;
    while (m--) {
        int num;
        cin >> num;
        if (ux[num] != -1) {
            uxc[ux[num]]++;
            uyc[uy[num]]++;
            if (ux[num] == uy[num]) uxc[n]++;
            if (ux[num] == n - 1 - uy[num]) uyc[n]++;
            if (uxc[ux[num]] == n) {
                uc++;
                uxc[ux[num]] = -INF;
            }
            if (n != 1 && uyc[uy[num]] == n) {
                uc++;
                uyc[uy[num]] = -INF;
            }
            if (n != 1 && uxc[n] == n) {
                uc++;
                uxc[n] = -INF;
            }
            if (n != 1 && uyc[n] == n) {
                uc++;
                uyc[n] = -INF;
            }
        }
        if (cx[num] != -1) {
            cxc[cx[num]]++;
            cyc[cy[num]]++;
            if (cx[num] == cy[num]) cxc[n]++;
            if (cx[num] == n - 1 - cy[num]) cyc[n]++;
            if (cxc[cx[num]] == n) {
                cc++;
                cxc[cx[num]] = -INF;
            }
            if (n != 1 && cyc[cy[num]] == n) {
                cc++;
                cyc[cy[num]] = -INF;
            }
            if (n != 1 && cxc[n] == n) {
                cc++;
                cxc[n] = -INF;
            }
            if (n != 1 && cyc[n] == n) {
                cc++;
                cyc[n] = -INF;
            }
        }
        // cout << uc << " " << cc << endl;
        if (uc >= u && cc >= v) {
            puts("DRAW");
            return 0;
        } else if (uc >= u) {
            puts("USAGI");
            return 0;
        } else if (cc >= v) {
            puts("NEKO");
            return 0;
        }
    }
    puts("DRAW");
    return 0;
}
accuracy: 1
time_ms: 50
memory_kb: 18748
final_rank: 6

code_snippet: #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define rrep(ri,n) for(int ri = (int)(n-1); ri >= 0; ri--)
#define rep2(i,x,n) for(int i = (int)(x); i < (int)(n); i++)
#define rrep2(ri,x,n) for(int ri = (int)(n-1); ri >= (int)(x); ri--)
#define repit(itr,x) for(auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr,x) for(auto ritr = x.rbegin(); ritr != x.rend(); ritr++)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using namespace std;

int main() {
  int n, u, v, m;
  cin >> n >> u >> v >> m;
  vector tu(n, vector<int>(n));
  rep(i, n)rep(j, n) cin >> tu.at(i).at(j);
  vector tv(n, vector<int>(n));
  rep(i, n)rep(j, n) cin >> tv.at(i).at(j);
  map<int, pair<int, int>> mpu, mpv;
  rep(i, n)rep(j, n) mpu[tu.at(i).at(j)] = {i, j};
  rep(i, n)rep(j, n) mpv[tv.at(i).at(j)] = {i, j};
  vector bu(n, vector<bool>(n, false));
  vector bv(n, vector<bool>(n, false));

  vector<int> input(m);
  rep(i, m) {
    int in;
    cin >> in;
    input.at(i) = in;
  }
  auto fc = [=](vector<vector<bool>> &table, int pi, int pj) -> int {
    int res = 0;
    if(n == 1) return 1;
    bool f = false;
    rep(k, n) {
      if(!table.at(pi).at(k)) {
        f = true;
        break;
      }
    }
    if(!f) res++;
    f = false;
    rep(k, n) {
      if(!table.at(k).at(pj)) {
        f = true;
        break;
      }
    }
    if(!f) res++;
    if(pi == pj) {
      f = false;
      rep(k, n) {
        if(!table.at(k).at(k)) {
          f = true;
          break;
        }
      }
      if(!f) res++;
    }
    if(pi+pj == n-1) {
      f = false;
      rep(k, n) {
        int j = n - 1 - k;
        if(!table.at(k).at(j)) {
          f = true;
          break;
        }
      }
      if(!f) res++;
    }
    return res;
  };

  const string U = "USAGI", V = "NEKO", D = "DRAW";
  int uc = 0, vc = 0;
  for(auto now : input) {
    if(mpu.find(now) != mpu.end()) {
      auto [i, j] = mpu[now];
      bu.at(i).at(j) = true;
      uc += fc(bu, i, j);
    }
    if(mpv.find(now) != mpv.end()) {
      auto [i, j] = mpv[now];
      bv.at(i).at(j) = true;
      vc += fc(bv, i, j);
    }
    if(uc >= u) {
      if(vc >= v) {
        cout << D << endl;
        return 0;
      } else {
        cout << U << endl;
        return 0;
      }
    } else {
      if(vc >= v) {
        cout << V << endl;
        return 0;
      }
    }
  }
  cout << D << endl;
  return 0;
}
accuracy: 1
time_ms: 140
memory_kb: 22632
final_rank: 13

code_snippet: #include<bits/stdc++.h>
using namespace std;
using P = pair<int,int>;

int cnt(vector<vector<bool>> &X, int x, int y){
  if(X.size() == 1){
    return 1;
  }
  int ret = 0;
  for(int j=0; j<X.size(); j++){
    if(!X[x][j] && j != y){
      break;
    }
    if(j == X.size()-1){
      ret++;
    }
  }
  for(int i=0; i<X.size(); i++){
    if(!X[i][y] && i != x){
      break;
    }
    if(i == X.size()-1){
      ret++;
    }
  }
  if(x == y){
    for(int j=0; j<X.size(); j++){
      if(!X[j][j] && j != y){
        break;
      }
      if(j == X.size()-1){
        ret++;
      }
    }
  }
  if(x + y == X.size()-1){
    for(int j=0; j<X.size(); j++){
      if(!X[j][X.size()-1-j] && j != x){
        break;
      }
      if(j == X.size()-1){
        ret++;
      }
    }
  }
  return ret;
}

void solve(){
  int N, U, V, M;
  cin >> N >> U >> V >> M;
  vector<vector<bool>> A(N,vector<bool>(N));
  vector<vector<bool>> B(N,vector<bool>(N));
  map<int,P> Amp;
  map<int,P> Bmp;
  for(int i=0; i<N*N; i++){
    int x;
    cin >> x;
    Amp[x] = P(i/N, i%N);
  }
  for(int i=0; i<N*N; i++){
    int x;
    cin >> x;
    Bmp[x] = P(i/N, i%N);
  }
  
  for(int i=0; i<M; i++){
    int x;
    cin >> x;
    if(Amp.count(x)){
      auto[a,b] = Amp[x];
      U -= cnt(A,a,b);
      A[a][b] = true;
    }
    if(Bmp.count(x)){
      auto[a,b] = Bmp[x];
      V -= cnt(B,a,b);
      B[a][b] = true;
    }
    if(U <= 0 && V > 0){
      cout << "USAGI" << endl;
      return;
    }
    else if(U > 0 && V <= 0){
      cout << "NEKO" << endl;
      return;
    }
  }
  cout << "DRAW" << endl;
}

int main(){
  while(true){
    solve();
    break;
  }
}
accuracy: 1
time_ms: 120
memory_kb: 21344
final_rank: 11

code_snippet: #pragma region Macros
#include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return 1;
    }
    return 0;
}
template <class T> inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return 1;
    }
    return 0;
}
#ifdef DEBUG
template <class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    os << '(' << p.first << ',' << p.second << ')';
    return os;
}
template <class T> ostream &operator<<(ostream &os, const vector<T> &v) {
    os << '{';
    for(int i = 0; i < (int)v.size(); i++) {
        if(i) { os << ','; }
        os << v[i];
    }
    os << '}';
    return os;
}
void debugg() { cerr << endl; }
template <class T, class... Args>
void debugg(const T &x, const Args &... args) {
    cerr << " " << x;
    debugg(args...);
}
#define debug(...)                                                             \
    cerr << __LINE__ << " [" << #__VA_ARGS__ << "]: ", debugg(__VA_ARGS__)
#define dump(x) cerr << __LINE__ << " " << #x << " = " << (x) << endl
#else
#define debug(...) (void(0))
#define dump(x) (void(0))
#endif

struct Setup {
    Setup() {
        cin.tie(0);
        ios::sync_with_stdio(false);
        cout << fixed << setprecision(15);
    }
} __Setup;

using ll = long long;
#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define FOR(i, a, b) for(int i = (a); i < int(b); i++)
#define REP(i, n) FOR(i, 0, n)
const int INF = 1 << 30;
const ll LLINF = 1LL << 60;
constexpr int MOD = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

void Case(int i) { cout << "Case #" << i << ": "; }
int popcount(int x) { return __builtin_popcount(x); }
ll popcount(ll x) { return __builtin_popcountll(x); }
#pragma endregion Macros

const int MAX = 1000000;

int main() {
    int N, U, V, M;
    cin >> N >> U >> V >> M;
    vector<pair<int, int>> un(MAX+1, {-1, -1}), nn(MAX+1, {-1, -1});
    vector<int> cards(M);
    REP(i, N) REP(j, N) {
        int n; cin >> n;
        un[n] = {i, j};
    } 
    REP(i, N) REP(j, N) {
        int n; cin >> n;
        nn[n] = {i, j};
    }
    REP(i, M) cin >> cards[i];

    vector usagi(N, vector<int>(N, 0)), neko(N, vector<int>(N, 0));
    int ucnt = 0, ncnt = 0;
    REP(z, M) {
        bool usagi_win = false, neko_win = false;
        // usagi
        auto [iu, ju] = un[cards[z]];
        if(iu != -1 and ju != -1) {
            usagi[iu][ju] = 1;
            bool ok = true;
            REP(j, N) if(usagi[iu][j] != 1) {
                ok = false;
                break;
            }
            ucnt += ok;
            ok = true;
            REP(i, N) if(usagi[i][ju] != 1) {
                ok = false;
                break;
            }
            ucnt += ok;
            if(iu == ju) {
                ok = true;
                REP(i, N) if(usagi[i][i] != 1) {
                    ok = false;
                    break;
                }
                ucnt += ok;
            }
            if(iu == N-1-ju) {
                ok = true;
                REP(i, N) if(usagi[i][N-1-i] != 1) {
                    ok = false;
                    break;
                }
                ucnt += ok;
            }
            if(N == 1) ucnt = 1;
        }
        if(ucnt >= U) usagi_win = true;
        // neko
        auto [in, jn] = nn[cards[z]];
        if(in != -1 and jn != -1) {
            neko[in][jn] = 1;
            bool ok = true;
            REP(j, N) if(neko[in][j] != 1) {
                ok = false;
                break;
            }
            ncnt += ok;
            ok = true;
            REP(i, N) if(neko[i][jn] != 1) {
                ok = false;
                break;
            }
            ncnt += ok;
            if(in == jn) {
                ok = true;
                REP(i, N) if(neko[i][i] != 1) {
                    ok = false;
                    break;
                }
                ncnt += ok;
            }
            if(in == N-1-jn) {
                ok = true;
                REP(i, N) if(neko[i][N-1-i] != 1) {
                    ok = false;
                    break;
                }
                ncnt += ok;
            }
            if(N == 1) ncnt = 1;
        }
        if(ncnt >= V) neko_win = true;

        if(usagi_win and neko_win) {
            cout << "DRAW\n";
            return 0;
        } else if(usagi_win) {
            cout << "USAGI\n";
            return 0;
        } else if(neko_win) {
            cout << "NEKO\n";
            return 0;
        }
    }
    cout << "DRAW\n";
}
accuracy: 1
time_ms: 10
memory_kb: 19996
final_rank: 5

code_snippet: /*	author:  Kite_kuma
	created: 2021.08.28 18:42:55 */

// #ifdef LOCAL
// #define _GLIBCXX_DEBUG
// #endif
#include <bits/stdc++.h>
using namespace std;

#pragma region macros

#define foa(s, v) for(auto &s : v)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define popcnt(n) __builtin_popcountll((long long)n)

#define REPname(a, b, c, d, e, ...) e
#define rep(...) REPname(__VA_ARGS__, REP3, REP2, REP1, REP0)(__VA_ARGS__)
#define REP0(x) for(int Counter_in_rep_macro = 0; Counter_in_rep_macro < (x); ++Counter_in_rep_macro)
#define REP1(i, x) for(int i = 0; i < (x); ++i)
#define REP2(i, l, r) for(int i = (l); i < (r); ++i)
#define REP3(i, l, r, c) for(int i = (l); i < (r); i += (c))

#define DREPname(a, b, c, d, e, ...) e
#define drep(...) DREPname(__VA_ARGS__, DREP3, DREP2, DREP1)(__VA_ARGS__)
#define DREP1(i, x) for(int i = (x)-1; i >= 0; --i)
#define DREP2(i, l, r) for(int i = (r)-1; i >= (l); --i)
#define DREP3(i, l, r, c) for(int i = (r)-1; i >= (l); i -= (c))

#pragma endregion

#pragma region aliases

using ll = long long;
using ld = long double;
using ull = unsigned long long;
using vi = std::vector<int>;
using vvi = std::vector<std::vector<int>>;
using vvvi = std::vector<std::vector<std::vector<int>>>;
using vll = std::vector<ll>;
using vvll = std::vector<vll>;
using vvvll = std::vector<vvll>;
using pii = std::pair<int, int>;
using pll = std::pair<long long, long long>;
template <class T = ll>
using V = std::vector<T>;
template <class T = ll>
using VV = V<V<T>>;
template <class T = ll>
using VVV = V<V<V<T>>>;
template <class T = ll>
using pqup = std::priority_queue<T, std::vector<T>, std::greater<T>>;
template <class T = ll>
using pqdn = std::priority_queue<T>;

#pragma endregion

#pragma region constants

const int inf = 1e9;
const long long INF = 1e18;
const long double pi = acos(-1);
const char dl = '\n';
const char sp = ' ';
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

const int mod_1000000007 = 1000000007;
const int mod_998244353 = 998244353;

#pragma endregion

#pragma region basic_operation

template <class T0, class T1, class T2>
inline bool in_range(T0 x, T1 lef, T2 rig) {
	return ((lef <= x) && (x < rig));
}

template <class T>
inline bool chmin(T &a, T b) {
	if(a > b) {
		a = b;
		return true;
	}
	return false;
}
template <class T>
inline bool chmax(T &a, T b) {
	if(a < b) {
		a = b;
		return true;
	}
	return false;
}

void Yes(bool f = 1) { std::cout << (f ? "Yes" : "No") << '\n'; }
void No() { std::cout << "No\n"; }
void YES(bool f = 1) { std::cout << (f ? "YES" : "NO") << '\n'; }
void NO() { std::cout << "NO\n"; }

template <class T>
void drop(T answer) {
	std::cout << answer << '\n';
	exit(0);
}

void err(bool flag = true) {
	if(!flag) return;
	std::cout << -1 << '\n';
	exit(0);
}

template <class T>
void vout(std::vector<T> const &v, bool vertically = 0) {
	if(vertically) {
		for(auto const &a : v) {
			std::cout << a << '\n';
		}
		return;
	}
	for(auto it = v.begin(); it != v.end(); it++) {
		std::cout << (*it);
		if(it != v.end() - 1) {
			std::cout << ' ';
		}
	}
	std::cout << '\n';
	return;
}

inline void print() { std::cout << '\n'; }
template <class T>
inline void print(T x) {
	std::cout << x << '\n';
	return;
}
template <typename Head, typename... Tail>
void print(Head H, Tail... T) {
	std::cout << H << " ";
	print(T...);
}

template <class T>
void add(std::vector<T> &v, T val) {
	for(auto &a : v) a += val;
	return;
}

template <class T>
T dup(T a, T b) {
	assert(b != 0);
	return (a + b - 1) / b;
}

template <class T>
T greatest_lower_multiple(T x, T d) {
	if(d == 0) return 0;
	if(d < 0) d *= -1;
	T y = x % d;
	if(y < 0) y += d;
	return x - y;
}

template <class T>
T least_upper_multiple(T x, T d) {
	return -greatest_lower_multiple(-x, d);
}

long long POW(long long a, long long n) {
	long long res = 1;
	while(n > 0) {
		if(n & 1) res = res * a;
		a = a * a;
		n >>= 1;
	}
	return res;
}

long long modpow(long long a, long long n, long long mod) {	 // a^n mod
	assert(n >= 0 && mod);
	if(mod == 1) return 0LL;
	long long res = 1;
	a %= mod;
	while(n > 0) {
		if(n & 1) res = res * a % mod;
		a = a * a % mod;
		n >>= 1;
	}
	return res < 0 ? res + mod : res;
}

// return x which satisfies a * x % mod == gcd(a, mod)
// not (mod | a)
long long modinv(long long a, long long mod) {
	long long b = mod, u = 1, v = 0;
	while(b) {
		long long t = a / b;
		a -= t * b;
		std::swap(a, b);
		u -= t * v;
		std::swap(u, v);
	}
	u %= mod;
	if(u < 0) u += mod;
	return u;
}

template <class T>
int lb(const std::vector<T> &a, const T x) {
	return std::distance(a.begin(), std::lower_bound(a.begin(), a.end(), x));
}
template <class T>
int ub(const std::vector<T> &a, const T x) {
	return std::distance(a.begin(), std::upper_bound(a.begin(), a.end(), x));
}
template <class T>
void unq_sort(std::vector<T> &a) {
	std::sort(a.begin(), a.end());
	a.erase(std::unique(a.begin(), a.end()), a.end());
}
template <class T>
std::vector<int> press(std::vector<T> &a) {
	auto vec = a;
	unq_sort(vec);
	std::vector<int> ret;
	for(auto &v : a) ret.push_back(lb(vec, v));
	return ret;
}

#pragma endregion

#pragma region input
#define VEC(type, name, size) \
	vector<type> name(size);  \
	scanner::INPUT(name)
#define VVEC(type, name, h, w)                     \
	vector<vector<type>> name(h, vector<type>(w)); \
	scanner::INPUT(name)
#define INT(...)     \
	int __VA_ARGS__; \
	scanner::INPUT(__VA_ARGS__)
#define LL(...)            \
	long long __VA_ARGS__; \
	scanner::INPUT(__VA_ARGS__)
#define STR(...)        \
	string __VA_ARGS__; \
	scanner::INPUT(__VA_ARGS__)
#define CHR(...)      \
	char __VA_ARGS__; \
	scanner::INPUT(__VA_ARGS__)
#define DBL(...)        \
	double __VA_ARGS__; \
	scanner::INPUT(__VA_ARGS__)
#define LD(...)              \
	long double __VA_ARGS__; \
	scanner::INPUT(__VA_ARGS__)
#define TPL3(type0, type1, type2, name)   \
	std::tuple<type0, type1, type2> name; \
	scanner::INPUT(name);
#define TPL4(type0, type1, type2, type3, name)   \
	std::tuple<type0, type1, type2, type3> name; \
	scanner::INPUT(name);

namespace scanner {
template <class T>
void scan(T &a) {
	std::cin >> a;
}

template <class T, class L>
void scan(std::pair<T, L> &p) {
	scan(p.first);
	scan(p.second);
}

template <class T0, class T1, class T2>
void scan(std::tuple<T0, T1, T2> &p) {
	T0 t0;
	T1 t1;
	T2 t2;
	scan(t0);
	scan(t1);
	scan(t2);
	p = std::make_tuple(t0, t1, t2);
}

template <class T0, class T1, class T2, class T3>
void scan(std::tuple<T0, T1, T2, T3> &p) {
	T0 t0;
	T1 t1;
	T2 t2;
	T3 t3;
	scan(t0);
	scan(t1);
	scan(t2);
	scan(t3);
	p = std::make_tuple(t0, t1, t2, t3);
}

template <class T>
void scan(std::vector<T> &a) {
	for(auto &i : a) scan(i);
}

void INPUT() {}
template <class Head, class... Tail>
void INPUT(Head &head, Tail &... tail) {
	scan(head);
	INPUT(tail...);
}
}  // namespace scanner

template <typename T1, typename T2>
std::istream &operator>>(std::istream &is, std::pair<T1, T2> &p) {
	is >> p.first >> p.second;
	return is;
}
#pragma endregion

#pragma region debug

#pragma region output
template <typename T1, typename T2>
std::ostream &std::operator<<(std::ostream &os, const std::pair<T1, T2> &p) {
	os << p.first << " " << p.second;
	return os;
}
template <class T>
std::ostream &std::operator<<(std::ostream &os, const std::vector<T> &v) {
	for(int i = 0; i < (int)v.size(); i++) {
		if(i) os << " ";
		os << v[i];
	}
	return os;
}
#pragma endregion

#pragma region view

namespace viewer {
void view(const long long e) {
	if(e == INF)
		std::cerr << "INF";
	else if(e == -INF)
		std::cerr << "-INF";
	else
		std::cerr << e;
}

void view(const int e) {
	if(e == inf)
		std::cerr << "inf";
	else if(e == -inf)
		std::cerr << "-inf";
	else
		std::cerr << e;
}

template <typename T>
void view(const T e) {
	std::cerr << e;
}

template <typename T, typename U>
void view(const std::pair<T, U> &p) {
	std::cerr << "(";
	view(p.first);
	std::cerr << ", ";
	view(p.second);
	std::cerr << ")";
}

template <class T0, class T1, class T2>
void view(const std::tuple<T0, T1, T2> &p) {
	std::cerr << "(";
	view(std::get<0>(p));
	std::cerr << ", ";
	view(std::get<1>(p));
	std::cerr << ", ";
	view(std::get<2>(p));
	std::cerr << ")";
}

template <class T0, class T1, class T2, class T3>
void view(const std::tuple<T0, T1, T2, T3> &p) {
	std::cerr << "(";
	view(std::get<0>(p));
	std::cerr << ", ";
	view(std::get<1>(p));
	std::cerr << ", ";
	view(std::get<2>(p));
	std::cerr << ", ";
	view(std::get<3>(p));
	std::cerr << ")";
}

template <typename T>
void view(const std::set<T> &s) {
	if(s.empty()) {
		std::cerr << "{ }";
		return;
	}
	std::cerr << "{ ";
	for(auto &t : s) {
		view(t);
		std::cerr << ", ";
	}
	std::cerr << "\b\b }";
}

template <typename T>
void view(const std::unordered_set<T> &s) {
	if(s.empty()) {
		std::cerr << "{ }";
		return;
	}
	std::cerr << "{ ";
	for(auto &t : s) {
		view(t);
		std::cerr << ", ";
	}
	std::cerr << "\b\b }";
}

template <typename T>
void view(const std::vector<T> &v) {
	if(v.empty()) {
		std::cerr << "{ }";
		return;
	}
	std::cerr << "{ ";
	for(const auto &e : v) {
		view(e);
		std::cerr << ", ";
	}
	std::cerr << "\b\b }";
}

template <typename T>
void view(const std::vector<std::vector<T>> &vv) {
	std::cerr << "{\n";
	for(const auto &v : vv) {
		std::cerr << "\t";
		view(v);
		std::cerr << '\n';
	}
	std::cerr << "}";
}

template <typename T, typename U>
void view(const std::vector<std::pair<T, U>> &v) {
	std::cerr << "{\n";
	for(const auto &c : v) {
		std::cerr << "\t(";
		view(c.first);
		std::cerr << ", ";
		view(c.second);
		std::cerr << ")\n";
	}
	std::cerr << "}";
}

template <class T0, class T1, class T2>
void view(const std::vector<std::tuple<T0, T1, T2>> &v) {
	if(v.empty()) {
		std::cerr << "{ }";
		return;
	}
	std::cerr << '{';
	for(const auto &t : v) {
		std::cerr << "\n\t";
		view(t);
		std::cerr << ",";
	}
	std::cerr << "\n}";
}

template <class T0, class T1, class T2, class T3>
void view(const std::vector<std::tuple<T0, T1, T2, T3>> &v) {
	if(v.empty()) {
		std::cerr << "{ }";
		return;
	}
	std::cerr << '{';
	for(const auto &t : v) {
		std::cerr << "\n\t";
		view(t);
		std::cerr << ",";
	}
	std::cerr << "\n}";
}

template <typename T, typename U>
void view(const std::map<T, U> &m) {
	std::cerr << "{\n";
	for(const auto &t : m) {
		std::cerr << "\t[";
		view(t.first);
		std::cerr << "] : ";
		view(t.second);
		std::cerr << '\n';
	}
	std::cerr << "}";
}

template <typename T, typename U>
void view(const std::unordered_map<T, U> &m) {
	std::cerr << "{\n";
	for(const auto &t : m) {
		std::cerr << "\t[";
		view(t.first);
		std::cerr << "] : ";
		view(t.second);
		std::cerr << '\n';
	}
	std::cerr << "}";
}
}  // namespace viewer

#pragma endregion

// when debugging : g++ foo.cpp -DLOCAL
#ifdef LOCAL
void debug_out() {}
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
	viewer::view(H);
	std::cerr << ", ";
	debug_out(T...);
}
#define debug(...)                                                \
	do {                                                          \
		std::cerr << __LINE__ << " [" << #__VA_ARGS__ << "] : ["; \
		debug_out(__VA_ARGS__);                                   \
		std::cerr << "\b\b]\n";                                   \
	} while(0)
#define dump(x)                                      \
	do {                                             \
		std::cerr << __LINE__ << " " << #x << " : "; \
		viewer::view(x);                             \
		std::cerr << '\n';                           \
	} while(0)

#else
#define debug(...) (void(0))
#define dump(x) (void(0))
#endif

#pragma endregion

struct bingo {
	const int num_max = 1123456;
	vvi bingocard;
	int n;
	int lines = 0;
	vector<pair<int, int>> place;
	vvi token;
	bingo(vvi v, int m) : lines(0), bingocard(v), n(m), place(num_max, pair(-1, -1)) {
		rep(i, n) rep(j, n) { place[bingocard[i][j]] = pair(i, j); }
		token.assign(m, vi(m, 0));
	}

	int row_is_bingo(int x) {
		rep(col, n) if(!token[x][col]) return 0;
		return 1;
	}

	int col_is_bingo(int y) {
		rep(row, n) if(!token[row][y]) return 0;
		return 1;
	}

	int slash_is_bingo() {
		rep(i, n) if(!token[i][i]) return 0;
		return 1;
	}

	int backslash_is_bingo() {
		rep(i, n) if(!token[i][n - i - 1]) return 0;
		return 1;
	}

	void draw_a_card(int num) {
		int x, y;
		tie(x, y) = place[num];
		if(x < 0) return;
		token[x][y] = 1;

		lines += row_is_bingo(x);
		lines += col_is_bingo(y);
		if(x == y) lines += slash_is_bingo();
		if(x + y == n - 1) lines += backslash_is_bingo();

		if(n == 1) chmin(lines, 1);
	}
};

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
	std::cout << std::fixed << std::setprecision(15);
	srand((unsigned)time(NULL));

	int n, u, v, m;
	cin >> n >> u >> v >> m;

	VVEC(int, usagi, n, n);
	VVEC(int, neko, n, n);

	bingo rabbit(usagi, n), cat(neko, n);

	rep(m) {
		int dr;
		cin >> dr;
		rabbit.draw_a_card(dr);
		cat.draw_a_card(dr);
		if(rabbit.lines >= u) {
			if(cat.lines >= v) {
				drop("DRAW");
			} else {
				drop("USAGI");
			}
		} else if(cat.lines >= v)
			drop("NEKO");
	}

	drop("DRAW");

	return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 25004
final_rank: 8

code_snippet: #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n - 1; 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 ALL(v) (v).begin(),(v).end()
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
const ll INF=1LL<<60;
const int inf=(1<<30)-1;
const int mod=1e9+7;
int dx[8]={1,0,-1,0,-1,-1,1,1};
int dy[8]={0,1,0,-1,-1,1,-1,1};
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n,u,v,m;cin >> n >> u >> v >> m;
    vector a(2,vector(n,vector(n,0)));
    vector<vector<pair<int,int>>> p(2,vector<pair<int,int>>(1000000,{-1,-1}));
    REP(i,2) REP(j,n) REP(k,n){
        cin >> a[i][j][k];
        a[i][j][k]--;
        p[i][a[i][j][k]]={j,k};
    }
    vector<int> s(m);
    REP(i,m){
        cin >> s[i];
        s[i]--;
    }
    vector<vector<int>> h(2,vector<int>(n)),w(2,vector<int>(n));
    vector<int> d1(2),d2(2);
    REP(t,m){
        vector<int> cnt(2);
        REP(i,2){
            int x=p[i][s[t]].first,y=p[i][s[t]].second;
            if(x==-1) continue;
            h[i][x]++,w[i][y]++;
            if(x+y==n-1) d1[i]++;
            if(x==y) d2[i]++;
            if(h[i][x]==n){
                cnt[i]++;
                h[i][x]=-inf;
            }
            if(w[i][y]==n){
                cnt[i]++;
                w[i][x]=-inf;
            }
            if(d1[i]==n){
                cnt[i]++;
                d1[i]=-inf;
            }
            if(d2[i]==n){
                cnt[i]++;
                d2[i]=-inf;
            }
        }
        if(n==1){
            chmin(cnt[0],1);
            chmin(cnt[1],1);
        }
        u-=cnt[0],v-=cnt[1];
        if(u<=0&&v<=0){
            cout << "DRAW" << endl;
            return 0;
        }
        else if(u<=0){
            cout << "USAGI" << endl;
            return 0;
        }
        else if(v<=0){
            cout << "NEKO" << endl;
            return 0;
        }
    }
    cout << "DRAW" << endl;
}
accuracy: 0.32786885245901637
time_ms: 20
memory_kb: 28344
final_rank: 18

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

const int INF = 1e9;
const long long inf = 1LL<<60;
using ll = long long;

int main() {
  int n, u, v, m;
  cin >> n >> u >> v >> m;
  map<int, pair<int, int>> usagi, neko;
  for (int i=0; i<n; i++) {
    for (int j=0; j<n; j++) {
      int a;
      cin >> a;
      usagi[a] = {i, j};
    }
  }
  for (int i=0; i<n; i++) {
    for (int j=0; j<n; j++) {
      int a;
      cin >> a;
      neko[a] = {i, j};
    }
  }
  auto f = [&](int t) -> bool {
    if (t == n) return true;
    else return false;
  };
  if (n == 1) {
    int usa_count=0, neko_count=0;
    while (m--) {
      int val; cin >> val;
      if (usagi.count(val)) {
        usa_count++;
      }
      if (neko.count(val)) {
        neko_count++;
      }
      if (usa_count >= u && neko_count >= v) {
        cout << "DRAW" << endl;
        return 0;
      } else if (usa_count >= u) {
        cout << "USAGI" << endl;
        return 0;
      } else if (neko_count >= v) {
        cout << "NEKO" << endl;
        return 0;
      }
    }
    cout << "DRAW" << endl;
    return 0;
  }
  vector<int> usagi_yoko(n), usagi_tate(n), neko_yoko(n), neko_tate(n);
  int usagi_naname1=0, usagi_naname2=0, neko_naname1=0, neko_naname2=0;
  int usa_count = 0, neko_count = 0;
  while (m--) {
    int val; cin >> val;
    bool usa = false, nek = false;
    if (usagi.count(val)) {
      auto p = usagi[val];
      int i = p.first, j = p.second;
      usagi_yoko[i]++;
      usagi_tate[j]++;
      if (i == j && usagi_naname1 != -1) usagi_naname1++;
      if (i + j == n-1 && usagi_naname2 != -1) usagi_naname2++;
      if (f(usagi_yoko[i])) usa_count++;
      if (f(usagi_tate[j])) usa_count++;
      if (f(usagi_naname1)) {
        usa_count++;
        usagi_naname1 = -1;
      }
      if (f(usagi_naname2)) {
        usa_count++;
        usagi_naname2 = -1;
      }
      if (usa_count >= u) usa = true;
    //  cout << usagi_yoko[i] << " " << usagi_tate[j] << " " << usagi_naname1 << " " << usagi_naname2 << endl;
    }
    if (neko.count(val)) {
      auto p = neko[val];
      int i = p.first, j = p.second;
      neko_yoko[i]++;
      neko_tate[j]++;
      if (i == j && neko_naname1 != -1) neko_naname1++;
      if (i + j == n-1 && neko_naname2 != -1) neko_naname2++;
      if (f(neko_yoko[i])) neko_count++;
      if (f(neko_tate[j])) neko_count++;
      if (f(neko_naname1)) {
        neko_count++;
        neko_naname1 = -1;
      }
      if (f(neko_naname2)) {
        neko_count++;
        neko_naname2 = -1;
      }
      if (neko_count >= v) nek = true;
    }
  //  cout << usa_count << " " << neko_count << endl;
    if (usa && nek) {
      cout << "DRAW" << endl;
      return 0;
    } else if (usa) {
      cout << "USAGI" << endl;
      return 0;
    } else if (nek) {
      cout << "NEKO" << endl;
      return 0;
    }
  //  cout << usa_count << " " << neko_count << endl;
  }
  cout << "DRAW" << endl;
}
accuracy: 1
time_ms: 120
memory_kb: 21172
final_rank: 10

code_snippet: // #pragma GCC optimize("Ofast")
#include <iostream> // cout, endl, cin
#include <string> // string, to_string, stoi
#include <vector> // vector
#include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <utility> // pair, make_pair
#include <tuple> // tuple, make_tuple
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include <map> // map
#include <queue> // queue, priority_queue
#include <set> // set
#include <stack> // stack
#include <deque> // deque
#include <unordered_map> // unordered_map
#include <unordered_set> // unordered_set
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <iomanip> // setprecision
#include <complex> // complex
#include <math.h> 
#include <functional>
#include <cassert>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
constexpr ll INF = 1e18;
constexpr ll LLMAX = 9223372036854775807;
constexpr int inf = 1e9;
// constexpr ll mod = 1000000007;
constexpr ll mod = 998244353;
// 右下左上
const int dx[8] = {1, 0, -1, 0,1,1,-1,-1};
const int dy[8] = {0, 1, 0, -1,1,-1,1,-1};
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define eol endl
// ---------------------------------------------------------------------------

int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  cin >> N;
  int U,V;
  cin >> U >> V;
  int M;
  cin >> M;
  vector<vector<int>> GU(N,vector<int>(N));
  vector<vector<int>> GN(N,vector<int>(N));
  map<int,vector<P>> mpU,mpN;
  for(int i=0; i<N; i++){
    for(int j=0; j<N; j++){
      cin >> GU[i][j];
      mpU[GU[i][j]].emplace_back(i,j);
    }
  }
  for(int i=0; i<N; i++){
    for(int j=0; j<N; j++){
      cin >> GN[i][j];
      mpN[GN[i][j]].emplace_back(i,j);
    }
  }
  vector<int> cntU_H(N),cntU_W(N);
  vector<int> cntN_H(N),cntN_W(N);
  int nU1 = 0;
  int nU2 = 0;
  int nN1 = 0;
  int nN2 = 0;
  int cntU = 0;
  int cntN = 0;
  vector<int> x(M);
  for(int i=0; i<M; i++){
    cin >> x[i];
  }
  if(N == 1){
    int cntU = 0;
    int cntN = 0;
    for(int i=0; i<M; i++){
      if(GU[0][0] == x[i]){
        cntU = 1;
      }
      if(GN[0][0] == x[i]){
        cntN = 1;
      }
      bool okU = (cntU >= U);
      bool okN = (cntN >= V);
      if(okU && !okN){
        cout << "USAGI" << eol;
        return 0;
      }else if(!okU && okN){
        cout << "NEKO" << eol;
        return 0;
      }else if(okU && okN){
        cout << "DRAW" << eol;
        return 0;
      }
    }
    cout << "DRAW" << eol;
    return 0;
  }
  for(int i=0; i<M; i++){
    for(auto m: mpU[x[i]]){
      cntU_H[m.first]++;
      cntU_W[m.second]++;
      if(m.first == m.second) nU1++;
      if(m.first+m.second == N-1) nU2++;
      if(cntU_H[m.first] == N) cntU++;
      if(cntU_W[m.second] == N) cntU++;
    }
    if(nU1 == N){
      cntU++;
      nU1 = 0;
    }
    if(nU2 == N){
      cntU++;
      nU2 = 0;
    }
    for(auto m: mpN[x[i]]){
      cntN_H[m.first]++;
      cntN_W[m.second]++;
      if(m.first == m.second) nN1++;
      if(m.first+m.second == N-1) nN2++;
      if(cntN_H[m.first] == N) cntN++;
      if(cntN_W[m.second] == N) cntN++;
    }
    if(nN1 == N){
      cntN++;
      nN1 = 0;
    }    
    if(nN2 == N){
      cntN++;
      nN2 = 0;
    }
    bool okU = (cntU >= U);
    bool okN = (cntN >= V);
    if(okU && !okN){
      cout << "USAGI" << eol;
      return 0;
    }else if(!okU && okN){
      cout << "NEKO" << eol;
      return 0;
    }else if(okU && okN){
      cout << "DRAW" << eol;
      return 0;
    }
  }
  cout << "DRAW" << eol;
  return 0;
}
accuracy: 1
time_ms: 160
memory_kb: 37508
final_rank: 16

code_snippet: #include <bits/stdc++.h>

#define rep(i, a, n) for (int i = (int)(a); i < (int)(n); i++)
#define rrep(i, a, n) for (int i = ((int)(n-1)); i >= (int)(a); i--)

int main() {
    int n,m;
    std::vector<int> uv(2);
    std::cin >> n >> uv[0] >> uv[1] >> m;
    int sz = 1000010;
    std::vector table(2, std::vector<std::pair<int,int>>(sz,{-1, -1}));
    rep(i,0,2) {
        rep(j,0,n) {
            rep(k,0,n) {
                int a;
                std::cin >> a;
                table[i][a] = {j,k};
            }
        }
    }
    std::vector x(2, std::vector<int>(n,0)), y(2, std::vector<int>(n,0));
    std::vector z(2, std::vector<int>(2,0));
    std::vector<int> now(2,0);
    std::vector<int> A(m);
    rep(i,0,m) {
        std::cin >> A[i];
    }
    if(n == 1) {
        for(auto a: A) {
            rep(i,0,2) {
                if(table[i][a].first < 0) continue;
                now[i]++;
            }
            if(now[0] >= uv[0]) {
                if(now[1] >= uv[1]) {
                    std::cout << "DRAW\n";
                    return 0;
                }
                else {
                    std::cout << "USAGI\n";
                    return 0;
                }
            }
            else if(now[1] >= uv[1]) {
                std::cout << "NEKO\n";
                return 0;
            }
        }
        std::cout << "DRAW\n";
        return 0;
    }
    for(auto a : A) {
        rep(i,0,2) {
            if(table[i][a].first < 0) continue;
            auto [p, q] = table[i][a];
            x[i][p]++;
            y[i][q]++;
            if(x[i][p] == n) {

                now[i]++;
            }
            if(y[i][q] == n) { 
                now[i]++;
            }
            if(p == q) {
                z[i][0]++;
            }
            if(n-1-p == q) {
                z[i][1]++;
            }
            rep(j,0,2) {
                if(z[i][j] == n) {
                    z[i][j] = 0;
                    now[i]++;
                }
            }
        }
        if(now[0] >= uv[0]) {
            if(now[1] >= uv[1]) {
                std::cout << "DRAW\n";
                return 0;
            }
            else {
                std::cout << "USAGI\n";
                return 0;
            }
        }
        else if(now[1] >= uv[1]) {
            std::cout << "NEKO\n";
            return 0;
        }
    }
    std::cout << "DRAW\n";
}
accuracy: 1
time_ms: 60
memory_kb: 26592
final_rank: 9

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

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int64 i = 0;i < (n);i++)
#define FOR(i, a, b) for(int64 i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-10;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

template<typename T>
vector<T> make_v(size_t a){return vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
	return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value!=0>::type
fill_v(U &u,const V... v){u=U(v...);}

template<typename T,typename U,typename... V>
typename enable_if<is_same<T, U>::value==0>::type
fill_v(U &u,const V... v){
	for(auto &e:u) fill_v<T>(e,v...);
}

struct Board {
	  vector<int> row, col;
	  vector<tuple<int, int, int>> v;

	  int n, t;
	  int xy = 0, yx = 0, cnt = 0;
	  Board(int n, int t) : n(n), t(t){
	    row = vector<int>(n, 0);
      col = vector<int>(n, 0);
	  }

	  void input() {
	    int b;
	    REP(i, n) {
	      REP(j, n) {
	        cin >> b;
	        v.emplace_back(b, i, j);
	      }
	    }
	    sort(all(v));
	  }

	  bool in(int y, int x){
	    return 0 <= y && y < n && 0 <= x && x < n;
	  }


	  bool draw(int card) {
	    int64 idx = lower_bound(all(v), tuple<int, int, int>(card, 0, 0)) - v.begin();
      while (idx < v.size() && get<0>(v[idx]) == card) {
        int z, y, x;
        tie(z, y, x) = v[idx];

        row[y]++;
        if (n != 1) col[x]++;
        cnt += (row[y] == n) + (col[x] == n);
        if (x == y && n != 1) {
          xy++;
          if (xy == n) cnt++;
        }
        if (x + y == n-1 && n != 1) {
          yx++;
          if (yx == n) cnt++;
        }
        idx++;
      }
      if (cnt >= t) {
        return true;
      }
      return false;
	  }
	};

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

  int64 n, u, v, m;
  cin >> n >> u >> v >> m;

  Board b1(n, u), b2(n, v);
  b1.input(); b2.input();
  bool draw = true;
  REP(i, m) {
    int64 c;
    cin >> c;
    bool win[2] = {b1.draw(c), b2.draw(c)};
    if (win[0] && win[1]) {
      cout << "DRAW" << endl;
      return 0;
    } else if (!(win[0] || win[1])) {
      continue;
    } else if (win[0]) {
      cout << "USAGI" << endl;
      return 0;
    } else  {
      cout << "NEKO" << endl;
      return 0;
    }
  }
  cout << "DRAW" << endl;
}
accuracy: 1
time_ms: 30
memory_kb: 10196
final_rank: 1