This is the question
and this is the code
#include
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl “\n”
#define input for(int i=0;i<n;i++)cin>>arr[i];
typedef long long int ll;
using namespace std;
int main() {
IOS;
// your code goes here
ll t;
cin>>t;
while(t–>0)
{
ll n,k;
cin>>k>>n;
ll arr[n+1];
for(int i=1;i<n;i++)cin>>arr[i];
ll start, end;
for(int i = 1; i<=n;i++)
{
if(arr[i]==k){
start = i;
}
}
for (int i = n; i >= 1; i--)
{
if(arr[i]==k){
end = i;
}
}
if(start == end)
{
cout<<"-1"<<endl;
}
else
{
cout<<start<<" "<<end<<endl;
}
}
return 0;
}
help anyone dont know whats going wrong here