Răspuns :
#include<iostream>
#include<algorithm>
using namespace std;
int n, ind;
double v[1001], a, b, rez[1001];
int main()
{
cin >> n >> a >> b;
for(int i = 1; i <= n; ++i)
cin >> v[i];
if(a > b)
swap(a, b);
for(int i = 1; i <= n; ++i){
if(v[i] < b && v[i] >= a)
rez[++ind] = v[i];
}
cout << ind << endl;
sort(rez + 1, rez + ind + 1, greater<double>());
for(int i = 1; i <= ind; ++i)
cout << rez[i] << ' ';
return 0;
}
Daca ai nelamuriri, ma poti intreba in comentarii!