71062023-12-30 12:57:45IgnácRadar (70 pont)cpp17Accepted 70/7089ms3796 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n, m;
	cin >> n >> m;
	int mini = INT_MAX, I = 0, maxi = 0, J = 0;
	for (int i = 1; i <= n; i++) {
		int a;
		cin >> a;
		if (a < mini) {
			mini = a;
			I = i;
		}
	}

	for (int i = 1; i <= m; i++) {
		int a;
		cin >> a;
		if (a > maxi) {
			maxi = a;
			J = i;
		}
	}

	if (mini > maxi) cout << "IGEN";
	else cout << "NEM" << '\n' << I << '\n' << J;
}
SubtaskSumTestVerdictTimeMemory
base70/70
1Accepted0/03ms1872 KiB
2Accepted0/03ms2072 KiB
3Accepted5/53ms2276 KiB
4Accepted5/53ms2532 KiB
5Accepted5/53ms2740 KiB
6Accepted5/53ms2952 KiB
7Accepted5/53ms3164 KiB
8Accepted5/53ms3212 KiB
9Accepted5/53ms3212 KiB
10Accepted5/535ms3328 KiB
11Accepted5/535ms3328 KiB
12Accepted5/550ms3456 KiB
13Accepted5/550ms3540 KiB
14Accepted5/589ms3424 KiB
15Accepted5/589ms3796 KiB
16Accepted5/589ms3748 KiB