#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
const int MAXN = 10000;
int n,m;
int a[MAXN];
int times = 0;
int b,location;
int main()
{
while ((scanf("%d%d",&n,&m) != EOF),m+n)
{
printf("CASE# %d:\n",++times);
for (int i = 0; i < n; i += 1)
{
cin >> a[i];
}
sort(a,a+n);
while (m--)
{
cin >> b;
location = lower_bound(a,a+n,b) - a;
if (a[location] == b)
{
printf("%d found at %d\n",b,location+1);
}
else
{
printf("%d not found\n",b);
}
}
}
return 0;
}
从小白书上学到了东西