59652023-10-06 20:21:32horvathabelRadar (70 pont)cpp17Wrong answer 5/70103ms5024 KiB
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

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

    vector<int> ownRadar(n);
    vector<int> enemyRadar(m);

    for (int i = 0; i < n; i++) {
        cin >> ownRadar[i];
    }

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

    sort(ownRadar.begin(), ownRadar.end());

    int i = 0, j = 0;
    while (i < n && j < m) {
        if (ownRadar[i] >= enemyRadar[j]) {
            j++;
        } else {
            i++;
        }
    }

    if (j == m) {
        cout << "IGEN" << endl;
    } else {
        cout << "NEM" << endl;
        cout << i + 1 << " " << enemyRadar[j] << endl;
    }

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/70
1Wrong answer0/03ms1808 KiB
2Accepted0/03ms2060 KiB
3Wrong answer0/53ms2120 KiB
4Wrong answer0/53ms2312 KiB
5Wrong answer0/52ms2400 KiB
6Wrong answer0/53ms2640 KiB
7Wrong answer0/53ms2740 KiB
8Wrong answer0/53ms2988 KiB
9Wrong answer0/53ms3076 KiB
10Accepted5/539ms4516 KiB
11Wrong answer0/539ms4592 KiB
12Wrong answer0/554ms4204 KiB
13Wrong answer0/561ms4164 KiB
14Wrong answer0/5103ms4812 KiB
15Wrong answer0/5103ms4812 KiB
16Wrong answer0/5103ms5024 KiB