Explicație:
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("date.in");
ofstream fout("date.out");
int main()
{
int n,b,a[100],ok;
fin>>n;
fin>>b;
ok=0;
for(int i=0;i<n;i++)
fin>>a[i];
for(int i=0;i<n;i++)
if(b==a[i])
{
ok++;
fout<<i<<" ";
}
if(ok==0)
fout<<"NU";
return 0;
}