59642023-10-06 20:20:13horvathabelRadar (70 pont)cpp17Wrong answer 5/70115ms4980 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());

    for (int i = 0; i < m; i++) {
        int enemy = enemyRadar[i];
        auto it = upper_bound(ownRadar.begin(), ownRadar.end(), enemy);
        if (it == ownRadar.end()) {
            cout << "NEM" << endl;
            cout << enemy << endl;
            return 0;
        }
    }

    cout << "IGEN" << endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base5/70
1Wrong answer0/03ms1832 KiB
2Accepted0/03ms1980 KiB
3Wrong answer0/52ms2040 KiB
4Wrong answer0/52ms2044 KiB
5Wrong answer0/53ms2176 KiB
6Wrong answer0/52ms2388 KiB
7Wrong answer0/52ms2436 KiB
8Wrong answer0/53ms2684 KiB
9Wrong answer0/53ms2844 KiB
10Accepted5/539ms4212 KiB
11Wrong answer0/537ms4520 KiB
12Wrong answer0/554ms3728 KiB
13Wrong answer0/561ms3920 KiB
14Wrong answer0/5108ms4620 KiB
15Wrong answer0/5114ms4980 KiB
16Wrong answer0/5115ms4768 KiB