70722023-12-29 17:45:29MagyarKendeSZLGRadar (70 pont)cpp17Accepted 70/7032ms4948 KiB
#include <bits/stdc++.h>

#define speed cin.tie(0); ios::sync_with_stdio(0)
#define cinv(v) for (auto& e : v) cin >> e;
#define all(v) v.begin(), v.end()

using namespace std;
int main() {
    speed;

    int N, M;
    cin >> N >> M;
    vector<int> A(N), B(M);
    cinv(A);
    cinv(B);

    auto it_a = min_element(all(A)), it_b = max_element(all(B));

    if (*it_b < *it_a) {
        cout << "IGEN";
    } else {
        cout << "NEM\n" << it_a - A.begin() + 1 << '\n' << it_b - B.begin() + 1;
    }
}
SubtaskSumTestVerdictTimeMemory
base70/70
1Accepted0/03ms1832 KiB
2Accepted0/03ms2052 KiB
3Accepted5/53ms2356 KiB
4Accepted5/53ms2456 KiB
5Accepted5/53ms2684 KiB
6Accepted5/53ms2896 KiB
7Accepted5/53ms3236 KiB
8Accepted5/53ms3504 KiB
9Accepted5/53ms3556 KiB
10Accepted5/517ms4768 KiB
11Accepted5/517ms4768 KiB
12Accepted5/518ms4360 KiB
13Accepted5/518ms4300 KiB
14Accepted5/532ms4948 KiB
15Accepted5/532ms4948 KiB
16Accepted5/532ms4944 KiB