paying up wrong answer

#include
#include<math.h>
using namespace std;
int main(){
int ans,size,test;
cin>>test;
for(int i=0;i<test;i++)
{
cin>>size;
cin>>ans;
int a[size];
for(int i=0;i<size;i++)
cin>>a[i];
int k=pow(2,size);
int flag=0;
for(int i=0;i<k;i++)
{
int sum=0;
for(int j=0;j<size;j++)
{
int k=(1<<j);
int m=(i&k);
if(m!=0)
{
sum=sum+a[size-1-j];
}
}
if(sum==ans)
{
flag=1;
}
}
if(flag==0)
cout<<“NO”<<"\n";
else
cout<<“YES”<<"\n";
}
}

I haven’t checked your code, but I see a simple mistake here. You are outputting “YES” & “NO” instead of “Yes” & “No”. There are two problems with the name paying up, so please give the link to the problem.

//