56382023-08-31 16:39:53TomaSajtRadar (70 pont)cpp17Accepted 70/7093ms14244 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, m;
  cin >> n >> m;
  vector<int> a(n), b(m);
  for (int& ai : a) cin >> ai;
  for (int& bi : b) cin >> bi;

  auto it1 = min_element(a.begin(), a.end());
  auto it2 = max_element(b.begin(), b.end());
  if (*it1 > *it2) {
    cout << "IGEN";
    return 0;
  }

  cout << "NEM\n";
  cout << it1 - a.begin() + 1 << '\n';
  cout << it2 - b.begin() + 1;
}
SubtaskSumTestVerdictTimeMemory
base70/70
1Accepted0/03ms1960 KiB
2Accepted0/03ms2092 KiB
3Accepted5/53ms2484 KiB
4Accepted5/53ms2588 KiB
5Accepted5/53ms2800 KiB
6Accepted5/53ms2924 KiB
7Accepted5/53ms3148 KiB
8Accepted5/53ms3100 KiB
9Accepted5/53ms3204 KiB
10Accepted5/537ms5184 KiB
11Accepted5/537ms5656 KiB
12Accepted5/550ms6308 KiB
13Accepted5/550ms7492 KiB
14Accepted5/590ms10332 KiB
15Accepted5/593ms12332 KiB
16Accepted5/590ms14244 KiB