59632023-10-06 20:18:43horvathabelRadar (70 pont)cpp17Wrong answer 20/70118ms4920 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 << "1 " << enemy << endl;
            return 0;
        }
    }

    cout << "IGEN" << endl;

    return 0;
}
SubtaskSumTestVerdictTimeMemory
base20/70
1Wrong answer0/03ms1808 KiB
2Accepted0/03ms2060 KiB
3Accepted5/53ms2224 KiB
4Wrong answer0/52ms2300 KiB
5Wrong answer0/53ms2424 KiB
6Accepted5/53ms2640 KiB
7Wrong answer0/53ms2852 KiB
8Wrong answer0/53ms3100 KiB
9Wrong answer0/53ms3312 KiB
10Accepted5/539ms4888 KiB
11Accepted5/539ms4920 KiB
12Wrong answer0/556ms4276 KiB
13Wrong answer0/563ms4168 KiB
14Wrong answer0/5111ms4812 KiB
15Wrong answer0/5118ms4816 KiB
16Wrong answer0/5118ms4816 KiB