Wrong ans obtain

#include
using namespace std;
int rf(int *a,int n,int i,int k){
if(i==n){
return -1;
}
if(a[i]==k){
return i;
}
return rf(a-1,n,i-1,k);

}

int main() {
int n,k;cin>>n;int a[1000];
for(int i=0;i<n;i++) cin>>a[i];
cin>>k;
cout<<rf(a,n,n-1,k);

return 0;

}

hi @yashtripathi6969_0cd127807d833066 i can see u got 100 points still issue ping me