My issue
plz help in debugging
My code
#include <bits/stdc++.h>
using namespace std;
const int m=202;
bool prim[m];
void solve(){
prim[0]=false;
prim[1]=false;
for(int i=2;i<202;i++){
prim[i]=true;
for(int j=i*i;j<202;j+=i){
prim[j]=false;
}
}
}
int main() {
// your code goes here
solve();
int t;
cin>>t;
while(t--){
int n;
cin>>n;
vector<int>arr(n);
for(int i=0;i<n;i++){
int x;
cin>>x;
arr.push_back(x);
}
int x=-1,y=-1;
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(prim[arr[i]+arr[j]]==false){
x=i;
y=j;
break;
}
}
}
if(x!=-1 )cout<<x<<" "<<y<<endl;
else cout<<-1<<endl;
}
}
Problem Link: Non-Primes 101 Practice Coding Problem