Hello , I have tried several ideas , times and ways to do this but all fail on the site's test , could any1 give me an idea or something
Problem
#include <iostream>
using namespace std;
long int q,n,i,point,casenr;
long int marbles[10000];
int main (){
while(1==1){
cin>>n>>q;casenr++;
if(n==0 && q==0)break;
if(casenr!=1)cout<<endl;
cout<<"CASE# "<<casenr<<":";
for(i=1;i<=n;i++){
cin>>point;
if(marbles[point]==0)
marbles[point]=i;
}
for(i=1;i<=q;i++){
cin>>point;
if(marbles[point]!=0)
cout<<endl<<point<<" found at "<<marbles[point]+1;
if(marbles[point]==0)
cout<<endl<<point<<" not found";
}
/////While Ended
}
///////End The Program
system("Pause");
}