https://www.codechef.com/problems/COPAR
can anyone tell me where i am doing wrong
code in cpp:
#include<bits/stdc++.h>
#define int long long
#define rep(i,a,b) for(int i=a;i<b;i++)
using namespace std;
int32_t main(){
#ifndef ONLINE_JUDGE
freopen(“input.txt”,“r”,stdin);
freopen(“output.txt”,“w”,stdout);
#endif
int t;
cin>>t;
while(t--){
int n;
cin>>n;
vector<int>a(n);
rep(i,0,n){
cin>>a[i];
}
#main logic
rep(i,0,n-1){
bool f=true;
for(int j=0;j<i+1;j++){
for(int k=i+1;k<n;k++){
#i am finding gcd of every kth element withevery jth element that it is 1 or not
if(__gcd(a[j],a[k])>=2){
f=false;
break;
}
}
if(f){
cout<<i+1<<’\n’;
break;
}
}
if(f)
break;
}
}
}