Răspuns :
#include <iostream>
#include <fstream>
#include <bitset>
using namespace std;
int n, v[201];
int max1, max2, cnt;
double ma;
bitset<200> f;
int main() {
ifstream fin("NUMERE.IN");
fin >> n;
for (int i = 1; i <= n; ++i) {
fin >> v[i];
f[v[i]] = 1;
ma += v[i];
}
ma /= n;
for (int i = 1; i < n; ++i) {
for (int j = i + 1; j <= n; ++j) {
if (v[i] < v[j])
swap(v[i], v[j]);
}
}
for (int i = 1; i <= n; ++i) {
if (v[i] != v[i + 1] && v[i - 1] != v[i] && v[i] % 2 == 1)
cout << v[i] << ' ';
}
bool ok = false;
for (int i = 99; i >= 1 && !ok; ++i) {
if (f[i] == 0)
max1 = i, ok = true;
}
if (ok == false) cnt = 0;
else
cnt = 1, ok = false;
for (int i = max1 - 1; i >= 1 && !ok; ++i) {
if (f[i] == 0)
max2 = i, ok = true;
}
cout << '\n' << ma << '\n';
if (cnt)
cout << max1 << ' ' << max2;
else
cout << "NU EXISTA";
return 0;
}