思路

  • 所以最后一次合成必须是牛牛合成且那时候存在至少奇数。又因为牛妹最优是每次都会选择两张奇数牌来使得合成一张偶数,奇数的数量一定要大于n-2.
    需要特判n=1的情况

代码

// Problem: 加法和乘法
// Contest: NowCoder
// URL: https://ac.nowcoder.com/acm/contest/9983/J
// Memory Limit: 524288 MB
// Time Limit: 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp(aa,bb) make_pair(aa,bb)
#define _for(i,b) for(int i=(0);i<(b);i++)
#define rep(i,a,b) for(int i=(a);i<=(b);i++)
#define per(i,b,a) for(int i=(b);i>=(a);i--)
#define mst(abc,bca) memset(abc,bca,sizeof abc)
#define X first
#define Y second
#define lowbit(a) (a&(-a))
#define debug(a) cout<<#a<<":"<<a<<"\n"
typedef long long ll;
typedef pair<int,int> pii;
typedef unsigned long long ull;
typedef long double ld;
const int N=100010;
const int INF=0x3f3f3f3f;
const int mod=1e9+7;
const double eps=1e-6;
const double PI=acos(-1.0);

int ji,ou;

void solve(){
    int n;cin>>n;
    rep(i,1,n){
        int x;cin>>x;
        if(x&1) ji++;
        else ou++;
    }
    if(n==1&&ji){
        cout<<"NiuNiu\n";
        return;
    } 
    if(!ji){
        cout<<"NiuMei\n";
        return;
    }
    if(n&1){
        cout<<"NiuMei\n";
        return;
    }
    if(ou<=1){
        cout<<"NiuNiu\n";
    }
    else cout<<"NiuMei\n";
}


int main(){
    ios::sync_with_stdio(0);cin.tie(0);
//    int t;cin>>t;while(t--)
    solve();
    return 0;
}