criyle/codenet-compile-errors huggingface dataset:
Language: C

#include<stdio.h>
#define true 1
#define false -1

int A(int x,int y);

int a[2000],b[2000],c;

int main(){
    int d,e,i;
    char f[2][4]={"yes","no"};
    
    scanf("%d",&c);
    for(i=0;i<c;i++){
        scanf("%d",&a[i]);
    }
    
        scanf("%d",&d);
    for(i=0;i<d;i++){
        scanf("%d",&b[i]);
    if(A(0,b[i])==true){
        printf("%s\n",f[0]);
    }else{
        printf("%s\n",f[1]);
    }
    }
    return 0;
}

int A(int x,int y){
    int z;
    if(y==0){
        return true;
    }
    if(x>=c){
        return true;
    }
    if(A(x+1,y)==ture){
        z=true;
    }else if(A(x+1,y-a[x])==ture){
        z=true;
    }else{
        z=false;
    }
    return z;
}


Compiler output:
main.c: In function 'A':
main.c:38:18: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   38 |     if(A(x+1,y)==ture){
      |                  ^~~~
      |                  true
main.c:38:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int n, A[50];
int solve(int, int);

int main()
{
    int q, m, i;

    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%d", &A[i]);
    scanf("%d", &q);
    for (i = 0; i < q; i++)
    {
        scanf("%d", &m);
        if (solve(0, m))
            printf("yes\n");
        else
        {
            printf("no\n");
        }
        return 0;
    }
}


Compiler output:
/usr/bin/ld: /tmp/ccMQi7E7.o: in function `main':
main.c:(.text+0xbd): undefined reference to `solve'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>

int n, A[50];
int solve(int, int);

int main()
{
    int q, m, i;

    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%d", &A[i]);
    scanf("%d", &q);
    for (i = 0; i < q; i++)
    {
        scanf("%d", &m);
        if (solve(0, m))
            printf("yes\n");
        else
        {
            printf("no\n");
        }
        return 0;
    }
}
int solve(int a, int b)
{
    if (a == 0)
        return 1;
    if (b >= n)
        return 0;
    int res = solve(i + 1, m) || solve(i + 1, m - A[i]);
    return res;
}


Compiler output:
main.c: In function 'solve':
main.c:32:21: error: 'i' undeclared (first use in this function)
   32 |     int res = solve(i + 1, m) || solve(i + 1, m - A[i]);
      |                     ^
main.c:32:21: note: each undeclared identifier is reported only once for each function it appears in
main.c:32:28: error: 'm' undeclared (first use in this function)
   32 |     int res = solve(i + 1, m) || solve(i + 1, m - A[i]);
      |                            ^
Language: C

#include <stdio.h>

int n, A[50];
int solve(int, int);

int main()
{
    int q, m, i;

    scanf("%d", &n);
    for (i = 0; i < n; i++)
        scanf("%d", &A[i]);
    scanf("%d", &q);
    for (i = 0; i < q; i++)
    {
        scanf("%d", &m);
        if (solve(0, m))
            printf("yes\n");
        else
        {
            printf("no\n");
        }
        return 0;
    }
}
int solve(int a, int b)
{
    if (a == 0)
        return 1;
    if (b >= n)
        return 0;
    int res = solve(a + 1, b) || solve(a + 1, b - A[i]);
    return res;
}


Compiler output:
main.c: In function 'solve':
main.c:32:53: error: 'i' undeclared (first use in this function)
   32 |     int res = solve(a + 1, b) || solve(a + 1, b - A[i]);
      |                                                     ^
main.c:32:53: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define M 20
#define m 200

int solve(int,int);
int i,j,n;
int A[M],m[m]
int main()
{
  scanf("%d"&n);
  for(i=0;i<n;i++)
    {
      scanf("%d",A[i]);
    }
  scanf("%d",&q);
  for(i=0;i<q;i++)
    {
      sacanf("%d",m[i]);
    }
  for(i=0;i<q;i++)
    {
      if(solve(0,m[i]))
	{
	  printf("yes\n");
	}
      else
	{
	  printf("no\n");
	}
    }
  return 0;
}

int solve(int i,int j)
{
  int result;
  if(j==0)
    {
      return 1;
    }
  if(i>=n)
    {
      return 0;
    }
  result=solve(i+1,j)||solve(i+1,m-A[i]);
  return result;
}



Compiler output:
main.c:3:11: error: expected identifier or '(' before numeric constant
    3 | #define m 200
      |           ^~~
main.c:7:10: note: in expansion of macro 'm'
    7 | int A[M],m[m]
      |          ^
Language: C

#include<stdio.h>
#define M 1000

int solve(int,int);
int i,j,n,q;
int A[M],m[M]
int main()
{
  scanf("%d"&n);
  for(i=0;i<n;i++)
    {
      scanf("%d",A[i]);
    }
  scanf("%d",&q);
  for(i=0;i<q;i++)
    {
      sacanf("%d",m[i]);
    }
  for(i=0;i<q;i++)
    {
      if(solve(0,m[i]))
	{
	  printf("yes\n");
	}
      else
	{
	  printf("no\n");
	}
    }
  return 0;
}

int solve(int i,int k)
{
  int result;
  if(k==0)
    {
      return 1;
    }
  if(i>=n)
    {
      return 0;
    }
  result=solve(i+1,k)||solve(i+1,k-A[i]);
  return result;
}



Compiler output:
main.c:7:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    7 | int main()
      | ^~~
Language: C

#include<stdio.h>

int solve(int,int);

int n,A[50];

int main(){
  int q,M,i;

  scanf("%d",&n);
  for(i = 0;i <= n-1;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  for(i = 0;i <= q-1;i++){
    scanf("%d",&M);
    if(solve(0,M)){
      printf("yes\n");
    }
    else{
      printf("no\n");
    }
  }
    return 0;
}

int solve(int i,int m){
  if(m == 0){
    return 1;
  }
  if(i >= n){
    return 0;
  }
  res = solve(i + 1,m) || solve(i + 1,m - A[i]);
  return res;
}




Compiler output:
main.c: In function 'solve':
main.c:34:3: error: 'res' undeclared (first use in this function)
   34 |   res = solve(i + 1,m) || solve(i + 1,m - A[i]);
      |   ^~~
main.c:34:3: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
#define max 20
#define M 200

int a[max];
int n;

int solve(int i,int m)
{
  int res;
  if(m==0) return 1;
  if(i>=n) return 0;

  if(solve(i+1,m)==1 || solve(i+1,m-a[i])==1)
    {
     return 1;
    }
  return 0;
}
  

int main()
{
  int i,q,res;
  int b[M];

  scanf("%d",&n);
  for(i=0;i<n;i++)
    {
      scanf("%d",&a[i]);
    }

  scanf("%d",&q);
  for(i=0;i<q;i++)
    {
      scanf("%d",&b[i]);
    }

  for(i=0;i<q;i++)
    {
      res=solve(0,b[i]);
      if(res==1)
	{
	  prnitf("yes\n");
	}
      else if(res==0)
	{
	  printf("no\n");
	}
    }
  return 0;
}



  



Compiler output:
main.c: In function 'main':
main.c:44:11: error: implicit declaration of function 'prnitf'; did you mean 'printf'? [-Wimplicit-function-declaration]
   44 |           prnitf("yes\n");
      |           ^~~~~~
      |           printf
Language: C

#include<stdio.h>

int n, a[50];

int main() {
  int q, m, i;

  scanf("%d", &n);
  for(i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  scanf("%d", &q);

  for(i = 0; i < n; i++){
    scanf("%d", &m);
    if(search(0, m) == 1) printf("yes\n");
    else printf("no\n");
  }

  return 0;
}

int search(int i, int x){
  if(x == 0) return 1;
  if(i >= n) return 0;
  return search(i+1, m) || search(i+1, m - a[i]);
}



Compiler output:
main.c: In function 'main':
main.c:16:8: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   16 |     if(search(0, m) == 1) printf("yes\n");
      |        ^~~~~~
main.c: In function 'search':
main.c:26:22: error: 'm' undeclared (first use in this function)
   26 |   return search(i+1, m) || search(i+1, m - a[i]);
      |                      ^
main.c:26:22: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#define A 21

int Back(int, int);

int n,s,N[A];

int main(){
    
    int i, q, ans;
    
    scanf("%d", &n);
    
    for(i = 0; i < n; i++){
        scanf("%d", &N[i]);
    }
    
    scanf("%d", &q);
    
    for(i = 0; i < q; i++){
        
        scanf("%d", &s);
        
        ans = Back(0,0);
        
        if(ans == 1)
            printf("yes\n");
        else
            printf("no\n");
        
    }
    
    return 0;
    
}

int Comeback(int i, int sum){
    
    if(sum == s)
        return 1;
    
    if(i == n)
        return 0;
    
    if(Back((i + 1), N[i] + sum) == 1)
        return 1;
    
    if(Back((i + 1), sum) == 1)
        return 1;
    
    return 0;
    }



Compiler output:
/usr/bin/ld: /tmp/ccnRBT8v.o: in function `main':
main.c:(.text+0xb9): undefined reference to `Back'
/usr/bin/ld: /tmp/ccnRBT8v.o: in function `Comeback':
main.c:(.text+0x152): undefined reference to `Back'
/usr/bin/ld: main.c:(.text+0x170): undefined reference to `Back'
collect2: error: ld returned 1 exit status
Language: C

#include <stdio.h>

int n,A[2000];

int a(int,int);

int main()
{
  
  int q, i, m;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&m);
    if(a(0, m)){
      printf("yes\n");
    }
    else printf("no\n");
  }
  
  return 0;
  
}


int a(int x,int y)
{
  
  int res;
    
  if(y==0) return 1;
  if(x>=n) return 0;
  res = a(x+1,y) || a(x+1,y-A[i]);
  return res;
  
}



Compiler output:
main.c: In function 'a':
main.c:37:31: error: 'i' undeclared (first use in this function)
   37 |   res = a(x+1,y) || a(x+1,y-A[i]);
      |                               ^
main.c:37:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int n, A[2000];

int a(int,int);

int main()
{
  
  int q, i, m;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&m);
    if(a(0, m)==1){
      printf("yes\n");
    }
    else printf("no\n");
  }
  
  return 0;
  
}


int a(int x,int y)
{
  
  int res;
    
  if(y==0) return 1;
  if(x>=n) return 0;
  res = a(x+1,y) || a(x+1,y-A[i]);
  return res;
  
}



Compiler output:
main.c: In function 'a':
main.c:37:31: error: 'i' undeclared (first use in this function)
   37 |   res = a(x+1,y) || a(x+1,y-A[i]);
      |                               ^
main.c:37:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int n, A[2000];


int a(int x,int y)
{
  
  int res;
    
  if(y==0) return 1;
  if(x>=n) return 0;
  res = a(x+1,y) || a(x+1,y-A[i]);
  return res;
  
}


int main()
{
  
  int q, i, m;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&m);
    if(a(0, m)==1){
      printf("yes\n");
    }
    else printf("no\n");
  }
  
  return 0;
  
}





Compiler output:
main.c: In function 'a':
main.c:13:31: error: 'i' undeclared (first use in this function)
   13 |   res = a(x+1,y) || a(x+1,y-A[i]);
      |                               ^
main.c:13:31: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#define N 2000

int n,A[N],q,M[N];

int solve(int i, int m){
	if(i==n-1) return 0;
    if(A[i]==m) return m == 1;  
    if(solve(i+1, m) || solve(i+1, m - A[i])) return 1; 
    return 0;
}

int main(){
int i,j;

scanf("%d",&n);
for(i=0;I<n;i++){
	scanf("%d",&A[i]);
}
scanf("%d",&q);
for(i=0;i<q;i++){
	scanf("%d",&M[i]);
}

for(i=0;i<q;i++){
if(solve(i,M[i]) == 1) printf("yes\n");
else printf("no\n");
}

return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:9: error: 'I' undeclared (first use in this function)
   17 | for(i=0;I<n;i++){
      |         ^
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
void solve(int ,int);
int a[2014],n,m;


int main(){
int b[2014],i;

scanf("%d",&n);
for(i=0;i<n;i++)a[i];
scanf("%d",&m);
for(i=0;i<m;i++)b[i];
for(i=0;i<m;i++){
solve(0,b[i]);
}
return 0;
}

void solve(int x,int  y){
if(y==0){
printf("yes\n");
return;
}

if(x==n){
printf("no\n");
return;
}
solve(x+1,y);
if(y-a[x]>0)solve(x+1,y-a[x])
return;
}

Compiler output:
main.c: In function 'solve':
main.c:30:30: error: expected ';' before 'return'
   30 | if(y-a[x]>0)solve(x+1,y-a[x])
      |                              ^
      |                              ;
   31 | return;
      | ~~~~~~
Language: C

#include <stdio.h>
void solve(int ,int);
int a[2014],n,m,f;


int main(){
int b[2014],i;

scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d",&a[i]);
scanf("%d",&m);
for(i=0;i<m;i++)scanf("%d"&b[i]);
for(i=0;i<m;i++){
f=0;
solve(0,b[i]);
if(f==0)printf("no\n");
else printf("yes\n");
}
return 0;
}

void solve(int x,int  y){
if(y==0&&f==0){
f=1;
return;
}
if(x==n){
return;
}

solve(x+1,y);
if(y-a[x]>0)solve(x+1,y-a[x]);

}

Compiler output:
main.c: In function 'main':
main.c:12:27: error: invalid operands to binary & (have 'char *' and 'int')
   12 | for(i=0;i<m;i++)scanf("%d"&b[i]);
      |                       ~~~~^~~~~
      |                       |     |
      |                       |     int
      |                       char *
Language: C

#include<stdio.h>

int n,A[50];

int solve (int i,int m){
  if (m == 0) return 1;
  if (i >= n) return0;
  int res = solve(i + 1,m) || solve(i + 1, m- A[i]);
  return res;

}

int main(){
  int q,M,i;

  scanf("%d",&n);
  for(i = 0 ; i < n ; i++)
    scanf("%d",&A[i]);
  scanf("%d",&q);
  for(i = 0; i < q ; i++){
    scanf("%d",&M);
    if(solve(0,M))printf("yes\n");
    else printf("no\n");


}
  return 0;

}

Compiler output:
main.c: In function 'solve':
main.c:7:15: error: 'return0' undeclared (first use in this function)
    7 |   if (i >= n) return0;
      |               ^~~~~~~
main.c:7:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int sol(int,int);
#include <stdio.h>

int sol(int,int);

int A[2001],m[2001];

int n;

int main(){
  

  
  int i,j,q;

  scanf("%d", &n);
  for(i=0; i<n; i++) {
    scanf("%d", &A[i]);
  }
  scanf("%d",&q);
  for(i=0; i<q; i++) {
    scanf("%d", &m[i]);
  }

  for(i=0;i<q;i++){
    if(sol(0,m[i]))printf("yes\n");
    else printf("no\n");
  }
 
  return 0;
}

int sol(int x, int y){

  if(x+1  == n)return 0;
  
  if(A[x] == y)return 1;

  if(sol(x+1,y-A[x]) || sol(x+1,y))return 1;
  return 0;
 }

int A[2001],m[2001];

int n;

int main(){
  

  
  int i,j,q;

  scanf("%d", &n);
  for(i=0; i<n; i++) {
    scanf("%d", &A[i]);
  }
  scanf("%d",&q);
  for(i=0; i<q; i++) {
    scanf("%d", &m[i]);
  }

  for(i=0;i<q;i++){
    if(sol(0,m[i]))printf("yes\n");
    else printf("no\n");
  }
 
  return 0;
}

int sol(int x, int y){

  if(x+1  == n)return 0;
  
  if(A[x] == y)return 1;

  if(sol(x+1,y-A[x]) || sol(x+1,y))return 1;
  return 0;
 }

Compiler output:
main.c:49:5: error: redefinition of 'main'
   49 | int main(){
      |     ^~~~
main.c:12:5: note: previous definition of 'main' with type 'int()'
   12 | int main(){
      |     ^~~~
main.c:72:5: error: redefinition of 'sol'
   72 | int sol(int x, int y){
      |     ^~~
main.c:35:5: note: previous definition of 'sol' with type 'int(int,  int)'
   35 | int sol(int x, int y){
      |     ^~~
Language: C

#include <stdio.h>
#define N 2000
int sca(int ,int);
int A[N];
int n,q;
int main(){
  int i,t;
  int B[N];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);
  scanf("%d",&q);
  for(i=0;i<q;i++) scanf("%d",&B[i]);

  for(i=0;i<=q;i++){
    t=sca(i,B[i]);
    if(t==) printf("yes\n");
    if(t==) printf("no\n");

  }


  return 0;
}

int sca(int i,int m){
  int res;

  if(m==0) return ;
  if(i>=n) return ;

  res=sca(i+1,m)||sca(i+1,m-A[i]);
  return res;
}

Compiler output:
main.c: In function 'main':
main.c:16:11: error: expected expression before ')' token
   16 |     if(t==) printf("yes\n");
      |           ^
main.c:17:11: error: expected expression before ')' token
   17 |     if(t==) printf("no\n");
      |           ^
main.c: In function 'sca':
main.c:28:12: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   28 |   if(m==0) return ;
      |            ^~~~~~
main.c:25:5: note: declared here
   25 | int sca(int i,int m){
      |     ^~~
main.c:29:12: error: 'return' with no value, in function returning non-void [-Wreturn-mismatch]
   29 |   if(i>=n) return ;
      |            ^~~~~~
main.c:25:5: note: declared here
   25 | int sca(int i,int m){
      |     ^~~
Language: C

#include <stdio.h>
#define N 2000
int sca(int ,int);
int A[N];
int n,q;
int main(){
  int i,t;
  int B[N];
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);
  scanf("%d",&q);
  for(i=0;i<q;i++) scanf("%d",&B[i]);

  for(i=0;i<q;i++){
    t=sca(0,B[i]);
    if(t==1) printf("yes\n");
    else printf("no\n");

  }


  return 0;
}

int sca(int i,int m){
  int res;

Compiler output:
main.c: In function 'sca':
main.c:26:3: error: expected declaration or statement at end of input
   26 |   int res;
      |   ^~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#define N 20
#define MAX 2000

int n,X[MAX],Y[MAX];
 
int solve( int , int )

}
main(){
  
  int i,j,q;

  scanf("%d",&n);
  if( N < n )
    exit(1);
  
  for( i = 0 ; i < n ; i++ ){
    scanf("%d",&X[i]);
  }

  scanf("%d",&q);
  if( N < q )
    exit(2);
  
  for( i = 0 ; i < q ; i++ ){
    scanf("%d",&X[i]);
  }

  for(i=0;i<q;i++){
    if( sol( 0,Y[i] ) )
      printf("yes\n");
    else printf("no\n");
  }
  
  return 0;

}

nt solve(int a, int b){
 
  if(X[a] == b)return 1;
 
  if(a+1  == n)return 0;
 
  if(sol(a+1,b-X[a]) || sol(a+1,b))
    return 1;
  
  return 0;
 
}

Compiler output:
main.c: In function 'solve':
main.c:10:1: error: expected declaration specifiers before '}' token
   10 | }
      | ^
main.c:11:1: error: expected declaration specifiers before 'main'
   11 | main(){
      | ^~~~
main.c:41:1: error: unknown type name 'nt'; did you mean 'int'?
   41 | nt solve(int a, int b){
      | ^~
      | int
main.c:41:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   41 | nt solve(int a, int b){
      |                       ^
main.c:53: error: expected '{' at end of input
Language: C

#include <stdio.h>

int solve(int,int);

int n;
int A[2000];

int main(void){

  int M[200];
  int q,j;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }

  scanf("%d",&q);

  for(j=0;j<q;j++){
    scanf("%d",&M[j]);
  }

  for(i=0;i<q;i++){
    if(solve(0,M[i])){
      printf("yes\n");
    }
    else{
      printf("no\n");
    }
  }
  return 0;
}

int solve(int i,int m){

  int res;

  if(i == n && m == 0){
    return 1;
  }
  if(i == n && m != 0){
    return 0;
  }
  res = solve(i + 1,m) + solve(i + 1,m - A[i]);
  return res;
}

Compiler output:
main.c: In function 'main':
main.c:15:7: error: 'i' undeclared (first use in this function)
   15 |   for(i=0;i<n;i++){
      |       ^
main.c:15:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C


#include <stdio.h>

int solve(int,int);

int n;
int A[2000];

int main(void){

  int M[200];
  int q,j;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }

  scanf("%d",&q);

  for(j=0;j<q;j++){
    scanf("%d",&M[j]);
  }

  for(i=0;i<q;i++){
    if(solve(0,M[i])){
      printf("yes\n");
    }
    else{
      printf("no\n");
    }
  }
  return 0;
}

int solve(int i,int m){

  int res;

  if(i == n && m == 0){
    return 1;
  }
  if(i == n && m != 0){
    return 0;
  }
  res = solve(i + 1,m) + solve(i + 1,m - A[i]);
  return res;
}

Compiler output:
main.c: In function 'main':
main.c:16:7: error: 'i' undeclared (first use in this function)
   16 |   for(i=0;i<n;i++){
      |       ^
main.c:16:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C

{
      ans =  solve(0,Q[i]);

      if(ans == 0)
	{
	  printf("no\n");
	}

      else if(ans == 1)
	{
	  printf("yes\n");
	}
    }

Compiler output:
main.c:1:1: error: expected identifier or '(' before '{' token
    1 | {
      | ^
Language: C

#include <stdio.h>
 
int rec(int,int);
 
int a[2000],n;
 
main(){
  int i,j,p,q;
  int m[2000];
   
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  } 
   
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&m[i]);
  }
   
  for(i=0;i<q;i++){
    if(rec(0,m[i])==1)printf("yes\n");
    else printf("no\n");
     
  }
  return 0;
}
 
int rec(int i,int m){
  if(m == 0)return 1;
  if(i >= n)return 0;
  int response = solve(i + 1, m) || solve(i + 1, m - a[i]);
  return response;
}

Compiler output:
main.c:7:1: error: return type defaults to 'int' [-Wimplicit-int]
    7 | main(){
      | ^~~~
main.c: In function 'rec':
main.c:32:18: error: implicit declaration of function 'solve' [-Wimplicit-function-declaration]
   32 |   int response = solve(i + 1, m) || solve(i + 1, m - a[i]);
      |                  ^~~~~
Language: C

#include<stdio.h>
int AA(int,int);
 
int a[20],n,x=0;
 
int main(void){
  int q,m[200],i;
  scanf("%d",&n);
  scanf("%d",&q);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
}
 for(i=0;i<q;i++){
    scanf("%d",&m[i]);
  }
for(i=0;i<q;i++){
    AA(0,m[i]);
    if(x==1){
    printf("yes\n");
    }
    else if{
      printf("no\n");
    }
    x=0;
  }
 
  return 0;
}
 
int AA(int i,int x){
  if(x==0){
    x=1;
    return 1;
  }
  else if(i<n){
    AA(i+1,x-a[i]);
    AA(i+1,x);
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:12: error: expected '(' before '{' token
   21 |     else if{
      |            ^
      |            (
Language: C

#include<stdio.h>
 
int AA(int,int);
 
int A[20],n;
main(){
  int i,j,q,x,m[200];
   
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&m[i]);
  }
  for(i=0;i<q;i++){
    x= AA(0,m[i]);
   if(x==1){
     printf("yes\n");
     x=0;
   }
   else{
     printf("no\n");
   }
  }
  return 0;
}
 
int AA(int i,int m){
  int bb;
  if(m==0){
    return 1;
  }
  else if(i>n){
    return 0;
  }
  else{
    bb = AA(i+1,m)||solve(i+1,m-A[i]);
    return bb;
  }
}

Compiler output:
main.c:6:1: error: return type defaults to 'int' [-Wimplicit-int]
    6 | main(){
      | ^~~~
main.c: In function 'AA':
main.c:39:21: error: implicit declaration of function 'solve' [-Wimplicit-function-declaration]
   39 |     bb = AA(i+1,m)||solve(i+1,m-A[i]);
      |                     ^~~~~
Language: C

#include<stdio.h>

int A[20];

int solve(int n, int m, int i){
  if(m == 0) return 1;

  if(m > 0 && i < n){
    if(solve(a, n, m - A[i], i + 1) || solve(a, n, m, i + 1))
      return 1;
  }

  return 0;
}

int main(){
  int n, q, i, B[200];

  scanf("%d",&n);

  for(i = 0; i < n; i++) scanf("%d",&A[i]);

  scanf("%d",&q);

  for(i = 0; i < q; i++) scanf("%d",&B[i]);

  for(i = 0; i < q; i++){
    if(solve(n, B[i]), 0) printf("yes\n");
    else printf("no\n");
  }  

  return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:9:14: error: 'a' undeclared (first use in this function)
    9 |     if(solve(a, n, m - A[i], i + 1) || solve(a, n, m, i + 1))
      |              ^
main.c:9:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:8: error: too many arguments to function 'solve'
    9 |     if(solve(a, n, m - A[i], i + 1) || solve(a, n, m, i + 1))
      |        ^~~~~
main.c:5:5: note: declared here
    5 | int solve(int n, int m, int i){
      |     ^~~~~
main.c:9:40: error: too many arguments to function 'solve'
    9 |     if(solve(a, n, m - A[i], i + 1) || solve(a, n, m, i + 1))
      |                                        ^~~~~
main.c:5:5: note: declared here
    5 | int solve(int n, int m, int i){
      |     ^~~~~
main.c: In function 'main':
main.c:28:8: error: too few arguments to function 'solve'
   28 |     if(solve(n, B[i]), 0) printf("yes\n");
      |        ^~~~~
main.c:5:5: note: declared here
    5 | int solve(int n, int m, int i){
      |     ^~~~~
Language: C

#include<stdio.h>
  
#define AMAX 20
#define MMAX 2000
  
int n, q;
int A[AMAX+1];
int isExist[ MMAX+1 ] = {0};
 
void solve( int p, int t, int res )
{
	isExist[ t ] = 1;
    if( p <= n ) {
    	solve( p+1, t-A[p] );
    	solve( p+1, t  );
    }
    return ;
}
 
int main( void ) 
{
    int i;
    int num;
    int sum;
    
    scanf( "%d", &n );
    sum = 0;
    for( i=0; i<n; i++ ) {
        scanf( "%d", &A[i] );
        sum += A[i];
    }
    solve( 0, sum, 0 );
    
    scanf( "%d", &q );
    for( i=0; i<q; i++ ) {
        scanf( "%d", &num );
        if( isExist[ num ] ) {
            printf( "yes\n" );      
        } else {
            printf( "no\n" );
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:14:9: error: too few arguments to function 'solve'
   14 |         solve( p+1, t-A[p] );
      |         ^~~~~
main.c:10:6: note: declared here
   10 | void solve( int p, int t, int res )
      |      ^~~~~
main.c:15:9: error: too few arguments to function 'solve'
   15 |         solve( p+1, t  );
      |         ^~~~~
main.c:10:6: note: declared here
   10 | void solve( int p, int t, int res )
      |      ^~~~~
Language: C

#include <stdio.h>

#define N 2000
#define TRUE 1
#define FALSE 0
 
int solve(int, int);
int n;
int A[N];
 
int main(){
 
  int q,i;
  int m[N];
 
  scanf("%d", &n);

  for(i=0; i<n; i++){  
    scanf("%d", &A[i]);
  }
  
  scanf("%d", &q);
 
  for(i=0; i<q; i++){
    scanf("%d", &m[i]);    
    if(solve(0, m[i]) == TRUE)
      printf("yes\n");
    else 
      printf("no\n");
  }
   
  return 0;
}

int solve(int i, int m){

  if(m == 0)
    return TRUE;
  
  if(i >= n)
    return FALSE;
  
  return (solve(i + 1, m) || solve(i + 1, m - A[i]));

Compiler output:
main.c: In function 'solve':
main.c:43:3: error: expected declaration or statement at end of input
   43 |   return (solve(i + 1, m) || solve(i + 1, m - A[i]));
      |   ^~~~~~
Language: C

#include<stdio.h>
#define max 2000
int function(int int);
int n,q,m[max],s[max];
int main(){
  int A[max],i,j,jud;

  scanf("%d",&n);

  for(i = 0;i < n;i++){
    scanf("%d",&A[i]);
  }

  scanf("%d",&q);
  
  for(i = 0;i < q;i++){
    scanf("%d",&m[i]);
  }
  for(i = 0;i<q;i++){
    jud = function(0,m[i]);
    if(jud==0)printf("yes\n");
    else printf("no\n");
  }
 
    return 0;
}

int function(int i,int m){
  int res;
  
  if(m == 0)return 0;
  if(i >= n)return 1;

  res = function(i+1,m);
  if(res == 0)return 0;

  res= function(i+1,m - A[i]);

  return res;
}

Compiler output:
main.c:3:18: error: two or more data types in declaration specifiers
    3 | int function(int int);
      |                  ^~~
main.c: In function 'main':
main.c:20:11: error: too many arguments to function 'function'
   20 |     jud = function(0,m[i]);
      |           ^~~~~~~~
main.c:3:5: note: declared here
    3 | int function(int int);
      |     ^~~~~~~~
main.c: At top level:
main.c:28:5: error: conflicting types for 'function'; have 'int(int,  int)'
   28 | int function(int i,int m){
      |     ^~~~~~~~
main.c:3:5: note: previous declaration of 'function' with type 'int(int)'
    3 | int function(int int);
      |     ^~~~~~~~
main.c: In function 'function':
main.c:37:25: error: 'A' undeclared (first use in this function)
   37 |   res= function(i+1,m - A[i]);
      |                         ^
main.c:37:25: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
 
#define N 2000
int solve(int);
 
int A[N],n;
main(){
  int i,j,q,x,m[N];
   
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&m[i]);
  }
  for(i=0;i<q;i++){
    x= solve(m[i]);
   if(x==1){
     printf("yes\n");
     x=0;
   }
   else{
     printf("no\n");
   }
  }
  return 0;
}
 
int solve(int m){
  int res;
  if(m==0){
    return 1;
  }
  if(0>n){
    return 0;
  }
  else{
    res = solve(1,m)||solve(1,m-A[0]);
    return res;
  }
}

Compiler output:
main.c:7:1: error: return type defaults to 'int' [-Wimplicit-int]
    7 | main(){
      | ^~~~
main.c: In function 'solve':
main.c:40:11: error: too many arguments to function 'solve'
   40 |     res = solve(1,m)||solve(1,m-A[0]);
      |           ^~~~~
main.c:31:5: note: declared here
   31 | int solve(int m){
      |     ^~~~~
main.c:40:23: error: too many arguments to function 'solve'
   40 |     res = solve(1,m)||solve(1,m-A[0]);
      |                       ^~~~~
main.c:31:5: note: declared here
   31 | int solve(int m){
      |     ^~~~~
Language: C

#include <stdio.h>
#define N 2000
int solve(int , int);

int main()
{
  int i, j, n, q, m;
  int A[N], M[N];

  scanf("%d",&n);

  for(i = 0 ; i < n ; i++)
    {
      scanf("%d",&A[i]);
    }

  scanf("%d",&q);
  for(i = 0 ; i < q ; i++)
    {
      scanf("%d",&M[i]);
    }

  for(i = 0 ; i < q ; i++)
    {
      j = 0;
      if(solve(j, M[i])==1)
	{
	  printf("yes\n");
	}else if(solve(j, M[i])==0){
	printf("no\n");
    }
    }
 

  return 0;
}


int solve(int i, int m)
{
  int res;
  if(m==0) return 1;

  if(i>=n) return 0;
  res = solve(i + 1, m) || solve(i + 1, m - A[i]);

  
}

Compiler output:
main.c: In function 'solve':
main.c:44:9: error: 'n' undeclared (first use in this function)
   44 |   if(i>=n) return 0;
      |         ^
main.c:44:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:45:45: error: 'A' undeclared (first use in this function)
   45 |   res = solve(i + 1, m) || solve(i + 1, m - A[i]);
      |                                             ^
Language: C

#define N 2000
int solve(int , int);
int A[N], M[N];
int main()
{
  int i, j, n, q, m;

  scanf("%d",&n);

  for(i = 0 ; i < n ; i++)
    {
      scanf("%d",&A[i]);
    }

  scanf("%d",&q);
  for(i = 0 ; i < q ; i++)
    {
      scanf("%d",&M[i]);
    }

  for(i = 0 ; i < q ; i++)
    {
      j = 0;
      if(solve(j, M[i])==1)
	{
	  printf("yes\n");
	}else if(solve(j, M[i])==0){
	printf("no\n");
    }
    }
 

  return 0;
}


int solve(int i, int m)
{
  int res;
  if(m==0) return 1;

  if(i>=n) return 0;
  res = solve(i + 1, m) || solve(i + 1, m - A[i]);

  
}

Compiler output:
main.c: In function 'main':
main.c:8:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    8 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | #define N 2000
main.c:8:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    8 |   scanf("%d",&n);
      |   ^~~~~
main.c:8:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:26:11: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   26 |           printf("yes\n");
      |           ^~~~~~
main.c:26:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:11: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:26:11: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:28:9: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   28 |         printf("no\n");
      |         ^~~~~~
main.c:28:9: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c: In function 'solve':
main.c:42:9: error: 'n' undeclared (first use in this function)
   42 |   if(i>=n) return 0;
      |         ^
main.c:42:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int n,A[50];
int solve(int i,int m){
  if(m==0)return 1;
  if(i>=n)return 0;
  int res=solve(i+1,m)||solve(i+1,m-A[i]);
  return res;
}
int main(){
  int q,l,i;
  scanf("%d", &n);
  for(i=0;i<n;i++)scanf("%d",&A[i]);
  scanf("%d",&q);
  for(i=0;i<q;i++){
    sacnf("%d",&l);
    if(solve(0,l))printf("yes\n");
    else printf("no\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:15:5: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   15 |     sacnf("%d",&l);
      |     ^~~~~
      |     scanf
Language: C

#include<stdio.h>

#define TRUE 1
#define FALSE 0

int solve(int,int,int *);

int main(){
  int n,a[2000],m,q,i,re;

  scanf("%d",&n);
  for(i = 0;i < n;i++){
    scanf("%d",&a[i]);
  }
  scanf("%d",&q);
  for(i = 0;i < q;i++){
    scanf("%d",&m);
  }

  for(i = 0;i < q;i++){

    re = solve(i,m,&a[i]);

    if(re == TRUE){
      printf("yes\n");
    }
    else{
      printf("no\n");
    }
  }

  return 0;

}

int solve(int i,int m,int *a){
  int *b;
  b = a;

  if(m == 0){
    return TRUE;
  }
  if(i >= n){
    return FALSE;
  }
  if(solve(i+1,m,*b) == TRUE || solve(i+1,m-a[i],*b) == TRUE){
    return TRUE;
  }

}

Compiler output:
main.c: In function 'solve':
main.c:43:11: error: 'n' undeclared (first use in this function)
   43 |   if(i >= n){
      |           ^
main.c:43:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:46:18: error: passing argument 3 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   46 |   if(solve(i+1,m,*b) == TRUE || solve(i+1,m-a[i],*b) == TRUE){
      |                  ^~
      |                  |
      |                  int
main.c:36:28: note: expected 'int *' but argument is of type 'int'
   36 | int solve(int i,int m,int *a){
      |                       ~~~~~^
main.c:46:50: error: passing argument 3 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   46 |   if(solve(i+1,m,*b) == TRUE || solve(i+1,m-a[i],*b) == TRUE){
      |                                                  ^~
      |                                                  |
      |                                                  int
main.c:36:28: note: expected 'int *' but argument is of type 'int'
   36 | int solve(int i,int m,int *a){
      |                       ~~~~~^
Language: C

#include<stdio.h>
int rec(int,int);
int a[2000],n;

int rec(int s,int t){
  if(a[s]==t) return 1;
  if(s+1==n) return 0;
  if(rec(s+1,t-a[s]) || rec(s+1,t)) return 1;
  return 0;
}

int main(void){
  int b[2000],i,b;

  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  
  scanf("%d",&m);
  
  for(i=0;i<m;i++){
    scanf("%d",&b[i])
      }

  for(i=0;i<m;i++){
    if(rec(0,b[i])==1)
      printf("Yes\n");
    else printf("no\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:17: error: conflicting types for 'b'; have 'int'
   13 |   int b[2000],i,b;
      |                 ^
main.c:13:7: note: previous declaration of 'b' with type 'int[2000]'
   13 |   int b[2000],i,b;
      |       ^
main.c:21:15: error: 'm' undeclared (first use in this function)
   21 |   scanf("%d",&m);
      |               ^
main.c:21:15: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:22: error: expected ';' before '}' token
   24 |     scanf("%d",&b[i])
      |                      ^
      |                      ;
   25 |       }
      |       ~
Language: C

 #include<stdio.h>
#define N 2000
#define Q 2000
int i,n,q,key[N],a[N],m[Q];
void solve(int,int);
 
int main(){
  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&a[i]);
  scanf("%d",&q);
  for(i=0;i<q;i++)
    scanf("%d",&m[i]);
   
  for(i=0;i<q;i++){
    key[i]=0;
    solve(0,M[i]);
    if(key[i]==1)printf("yes\n");
    else printf("no\n");
  }
  return 0;
}
 
void solve(int c,int sum){
  if(sum==0) key[i]=1; 
  if(sum>0&&c<n){
    solve(c+1,sum-a[c]);
    solve(c+1,sum);
  }
}

Compiler output:
main.c: In function 'main':
main.c:17:13: error: 'M' undeclared (first use in this function)
   17 |     solve(0,M[i]);
      |             ^
main.c:17:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

w#include<stdio.h>

int solve(int, int);

int n, A[2000];

int main(){
  
  int q, Q[2000], i;
  
  scanf("%d", &n);
  for(i = 0; i < n; i++)
    scanf("%d", &A[i]);
  
  scanf("%d", &q);
  for(i = 0; i < q; i++)
    scanf("%d", &Q[i]);


  for(i = 0; i < q; i++){
    if(solve(0, Q[i]) == 1)   printf("yes\n");
    else                      printf("no\n");
  }

  return 0;
}

int solve(int i, int m){
  int res;

  if(m == 0)    return 1;
  if(i >= n)    return 0;
  
  res = solve(i + 1, m) || solve(i + 1, m - A[i]);
  //printf("i + 1 = %d, m = %d res = %d\n", i + 1, m, res);

  return res;
}

Compiler output:
main.c:1:2: error: stray '#' in program
    1 | w#include<stdio.h>
      |  ^
main.c:1:1: error: unknown type name 'w'
    1 | w#include<stdio.h>
      | ^
main.c:1:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | w#include<stdio.h>
      |          ^
main.c: In function 'main':
main.c:11:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   11 |   scanf("%d", &n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | w#include<stdio.h>
main.c:11:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   11 |   scanf("%d", &n);
      |   ^~~~~
main.c:11:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:21:8: error: implicit declaration of function 'solve' [-Wimplicit-function-declaration]
   21 |     if(solve(0, Q[i]) == 1)   printf("yes\n");
      |        ^~~~~
main.c:21:31: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   21 |     if(solve(0, Q[i]) == 1)   printf("yes\n");
      |                               ^~~~~~
main.c:21:31: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:21:31: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:21:31: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:22:31: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   22 |     else                      printf("no\n");
      |                               ^~~~~~
main.c:22:31: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include <stdio.h>

int solve(int,int);
int main(){
  
  int i,A[20],m[2000],n,q;

  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
  }


  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",m[i]);
  }

  for(i=0;i<)

    solve()





  return 0;
}


int solve(i,m){
  if(m==0) return 1;
  if(i>=n) return 0;
  res = solve(i+1,m) || solve(i+1,m-A[i]);
  return res;

}

Compiler output:
main.c: In function 'main':
main.c:19:13: error: expected expression before ')' token
   19 |   for(i=0;i<)
      |             ^
main.c:21:5: error: too few arguments to function 'solve'
   21 |     solve()
      |     ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int,int);
      |     ^~~~~
main.c:21:12: error: expected ';' before 'return'
   21 |     solve()
      |            ^
      |            ;
......
   27 |   return 0;
      |   ~~~~~~    
main.c: In function 'solve':
main.c:31:5: error: type of 'i' defaults to 'int' [-Wimplicit-int]
   31 | int solve(i,m){
      |     ^~~~~
main.c:31:5: error: type of 'm' defaults to 'int' [-Wimplicit-int]
main.c:33:9: error: 'n' undeclared (first use in this function)
   33 |   if(i>=n) return 0;
      |         ^
main.c:33:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:34:3: error: 'res' undeclared (first use in this function)
   34 |   res = solve(i+1,m) || solve(i+1,m-A[i]);
      |   ^~~
main.c:34:37: error: 'A' undeclared (first use in this function)
   34 |   res = solve(i+1,m) || solve(i+1,m-A[i]);
      |                                     ^
Language: C

#include<stdio.h>

int solve(int int);

int a[100];
int n;

int main(){
  int q,result;
  int m[100];
  int i,j;
  int c;

  scanf("%d",&n);
  for(i=0; i < n; i++){
    scanf("%d",&a[i]);
  }

  scanf("%d",&q);
  for(j=0; j< q; j++){
    scanf("%d",&m[j]);
  }

  for(j=0; j < q; j++){

    if(solve(0,m[j]==1){
      printf("yes\n");
    }
      else{
	printf("no\n");
      }
  }

  return 0;
}


int solve(int i, int m){

  int res;
  if(m==0) return 1;
  else if(i >= n) return 0;

  res=solve(i+1,m) || solve(i+1,m-a[i]);
  return res;
}

Compiler output:
main.c:3:15: error: two or more data types in declaration specifiers
    3 | int solve(int int);
      |               ^~~
main.c: In function 'main':
main.c:26:8: error: too many arguments to function 'solve'
   26 |     if(solve(0,m[j]==1){
      |        ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int int);
      |     ^~~~~
main.c:26:24: error: expected ')' before '{' token
   26 |     if(solve(0,m[j]==1){
      |       ~                ^
      |                        )
main.c:32:3: error: expected expression before '}' token
   32 |   }
      |   ^
main.c: At top level:
main.c:38:5: error: conflicting types for 'solve'; have 'int(int,  int)'
   38 | int solve(int i, int m){
      |     ^~~~~
main.c:3:5: note: previous declaration of 'solve' with type 'int(int)'
    3 | int solve(int int);
      |     ^~~~~
Language: C

include<stdio.h>


int A[2005];
int n;
int sum;

int search(int i,int m){
  if(sum < m)return 0;
  if(m == 0)return 1;
  if(i >= n)return 0;
  return search(i+1,m) || search(i+1,m-A[i]);
}


int main(){
  int q,m;
  int i;

  sum = 0;
  scanf("%d",&n);

  for(i=0;i<n;i++){
    scanf("%d",&A[i]);
    sum+=A[i];
  }
  scanf("%d",&q);

  for(i=0;i<q;i++){
    scanf("%d",&m);
    if (search(0,m)){
      printf("yes\n");
    }else{
      printf("no\n");
    }

  }
  return 0;
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'search':
main.c:12:40: error: 'A' undeclared (first use in this function)
   12 |   return search(i+1,m) || search(i+1,m-A[i]);
      |                                        ^
main.c:12:40: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:21:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   21 |   scanf("%d",&n);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | include<stdio.h>
main.c:21:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   21 |   scanf("%d",&n);
      |   ^~~~~
main.c:21:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:24:17: error: 'A' undeclared (first use in this function)
   24 |     scanf("%d",&A[i]);
      |                 ^
main.c:32:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   32 |       printf("yes\n");
      |       ^~~~~~
main.c:32:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:32:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:32:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:34:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   34 |       printf("no\n");
      |       ^~~~~~
main.c:34:7: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

#include<stdio.h>

int A[2000],M[2000],n,flag=0;

int solve(int,int);

int main(){
  int i,q;

  scanf("%d",&n);

  for(i=0 ; i<n ; i++){
    scanf("%d",&A[i]);
  }

  scanf("%d",&q);

  for(i=0 ; i<q ; i++){
    scanf("%d",&M[i]);
  }

  for(i=0 ; i<q ; i++){
    flag = 0;
   flag = solve(0,M[i]);
    if(flag==1){
      printf("yes\n");
    }
    else printf("no\n");
    
  }

  return 0;
}

int solve(int i,int m){
  int res;
  if(m==0) return 1;
  else if(i < n){
    return 0;
  }
   res =  solve(i+1,m-A[i]);
    res = solve(i+1,m);
    return res;
  }
}

Compiler output:
main.c:45:1: error: expected identifier or '(' before '}' token
   45 | }
      | ^
Language: C

#include<stdio.h>

intn flag,n,A[2000],M[2000];

void solve(int i,int m){
  if(m==0) flag=1;
  else if(i <= n){
    solve(i+1,m-A[i]);
    solve(i+1,m);
  }
}

int main(){
  int i,q;

  scanf("%d",&n);
  // if(n>20)printf("範囲外\n");

  for(i=0 ; i<n ; i++){
    scanf("%d",&A[i]);
  }

  scanf("%d",&q);
  // if(q>20)printf("範囲外\n");

  for(i=0 ; i<q ; i++){
    scanf("%d",&M[i]);
  }

  for(i=0 ; i<q ; i++){
    flag = 0;
    solve(0,M[i]);
    if(flag==1){
      printf("yes\n");
    }
    else printf("no\n");
    
  }

  return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'intn'; did you mean 'int'?
    3 | intn flag,n,A[2000],M[2000];
      | ^~~~
      | int
Language: C

#include<stdio.h>

in n, A[50];

int solve(int i,int m){
  if(m==0)return 1;
  if(i>=n) return 0;
  int res = solve(i+1,m) || solve(i+1,m-A[i]);
  return res;
}

int main(){

  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);
    scanf("%d",&q);
    for(i=0;i<q;i++){
  scanf("%d",&M);
  if(solve(0,M)) printf("yes\n");
  else printf("no\n");
}
return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'in'; did you mean 'int'?
    3 | in n, A[50];
      | ^~
      | int
main.c: In function 'main':
main.c:15:7: error: 'i' undeclared (first use in this function)
   15 |   for(i=0;i<n;i++) scanf("%d",&A[i]);
      |       ^
main.c:15:7: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:17: error: 'q' undeclared (first use in this function)
   16 |     scanf("%d",&q);
      |                 ^
main.c:18:15: error: 'M' undeclared (first use in this function)
   18 |   scanf("%d",&M);
      |               ^
Language: C

#include<stdio.h>

in n, A[50];

int solve(int i,int m){
  if(m==0)return 1;
  if(i>=n) return 0;
  int res = solve(i+1,m) || solve(i+1,m-A[i]);
  return res;
}

int main(){
  int q,M,i;
  scanf("%d",&n);
  for(i=0;i<n;i++) scanf("%d",&A[i]);
    scanf("%d",&q);
    for(i=0;i<q;i++){
  scanf("%d",&M);
  if(solve(0,M)) printf("yes\n");
  else printf("no\n");
}
return 0;
}

Compiler output:
main.c:3:1: error: unknown type name 'in'; did you mean 'int'?
    3 | in n, A[50];
      | ^~
      | int
Language: C

#include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <list>
#include <functional>
#include <algorithm>
#include <complex>
#include <map>
#include <cmath>
#include <string>
#include <cstdio>
#include <stdio.h>
#include <cstdlib>
#include <istream>
//-----------------------------------------------------define--------------------------------------------------------------------//
#define PB push_buck
#define MP make_pair
#define MAX 100000
//-------------------------------------------------------typedef----------------------------------------------------------------//
typedef long long ll;

using namespace std;

int n, q;
int a[50], m;
//------------------------------------------------------------------------------------------------------------------------------//
int solve(int i,int m) {
	if (m == 0) {
		return 1;
	}
	else if (i >= q) {
		return 0;
	}
	int ans = (solve(i + 1, m) || solve(i + 1, m - a[i]));
	return ans;
}

int main() {
	scanf("%d", &n);
		for (int j = 0; j < n; j++) {
		scanf("%d", &a[j]);
	}
		scanf("%d", &q);
	for (int i = 0; i < q; i++) {
		scanf("%d", &m);
		if (solve(0,m)) {
			printf("yes\n");
		}
		else {
			printf("no\n");
		}
	}
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>
//-----------------------------------------------------define--------------------------------------------------------------------//
#define PB push_buck
#define MP make_pair
#define MAX 100000
//-------------------------------------------------------typedef----------------------------------------------------------------//
typedef long long ll;

using namespace std;

int n, q;
int a[50], m;
//------------------------------------------------------------------------------------------------------------------------------//
int solve(int i,int m) {
	if (m == 0) {
		return 1;
	}
	else if (i >= q) {
		return 0;
	}
	int ans = (solve(i + 1, m) || solve(i + 1, m - a[i]));
	return ans;
}

int main() {
	scanf("%d", &n);
		for (int j = 0; j < n; j++) {
		scanf("%d", &a[j]);
	}
		scanf("%d", &q);
	for (int i = 0; i < q; i++) {
		scanf("%d", &m);
		if (solve(0,m)) {
			printf("yes\n");
		}
		else {
			printf("no\n");
		}
	}
}

Compiler output:
main.c:9:1: error: unknown type name 'using'
    9 | using namespace std;
      | ^~~~~
main.c:9:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
    9 | using namespace std;
      |                 ^~~