Got a sigemt error for the code whereas the code works on other compliler

//headers
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include
using namespace __gnu_pbds;
#include
using namespace std;
//typedefenum name
typedef long long int ll;
//define
#define ll long long int
#define rtest ll t;cin>>t;while(t–)
#define rin ll n;cin>>n;
#define r2in ll n,o;cin>>n>>o;
#define r3in ll n,o,p;cin>>n>>o>>p;
#define jloop(m,n) for(ll j=m;j<n;j++)
#define kloop(m,n) for(ll k=m;k<n;k++)
int printSubsequences(int arr[], int n,int o)
{
int sum=0;
/* Number of subsequences is (2**n -1)*/
unsigned int opsize = pow(2, n);

/* Run from counter 000..1 to 111..1*/
for (int counter = 1; counter < opsize; counter++)
{

sum=0;
for (int j = 0; j < n; j++)
{

        /* Check if jth bit in the counter is set
            If set then print jth element from arr[] */
        if (counter & (1<<j))
            //cout << arr[j] << " ";
        sum=sum+arr[j];
            //cout<<" sum "<<sum <<endl;
             if(sum==o)
             {
                return 1;
             }
    }
    //cout << endl;
}
return 0;

}
int main()
{
//file handling
#ifndef ONLINE_JUDGE
freopen(“i.txt”, “r”, stdin);
freopen(“o.txt”, “w”, stdout);
#endif
rtest
{
r2in
int a[n];
jloop(0,n)
{
cin>>a[j];
}
sort(a,a+n);
int max;
jloop(0,n)
{
if(a[j]<=o)
{
max=j;
}
}

  int res= printSubsequences(a,max+1,o);
if(res==0)
    cout<<"No"<<endl;
else
    cout<<"Yes"<<endl;

}

return 0;

}

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Also - what Problem are you trying to solve? :slight_smile:

Are you trying to “Run” without Providing “Custom Input”?