59592023-10-06 19:10:27mmatedRadar (70 pont)cpp17Accepted 70/7032ms5292 KiB
#include <bits/stdc++.h>
using namespace std;
#define f(i,k,n) for(int i=k; i<n; i++)
#define ll long long
const int inf = INT_MAX;

void solve()
{
    int n,m;
    cin>>n>>m;
    int a[n];
    int b[m];
    f(i,0,n)    cin>>a[i];
    f(i,0,m)    cin>>b[i];

    if(*min_element(a,a+n)>*max_element(b,b+m)) cout<<"IGEN\n";
    else
    {
        cout<<"NEM\n";
        cout<<distance(a,min_element(a,a+n))+1<<"\n"<<distance(b,max_element(b,b+m))+1<<"\n";
    }
}

int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;
    //cin>>t;
    while(t--)  solve();
    return 0;
}
SubtaskSumTestVerdictTimeMemory
base70/70
1Accepted0/03ms1888 KiB
2Accepted0/03ms2096 KiB
3Accepted5/53ms2308 KiB
4Accepted5/52ms2524 KiB
5Accepted5/52ms2636 KiB
6Accepted5/52ms2728 KiB
7Accepted5/52ms2828 KiB
8Accepted5/53ms2920 KiB
9Accepted5/53ms2916 KiB
10Accepted5/517ms4592 KiB
11Accepted5/517ms4672 KiB
12Accepted5/518ms3940 KiB
13Accepted5/518ms3940 KiB
14Accepted5/532ms4856 KiB
15Accepted5/532ms5080 KiB
16Accepted5/532ms5292 KiB