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

import java.util.ArrayDeque;
import java.util.BitSet;
import java.util.Deque;
import java.util.Scanner;
import java.io.IOException;
import java.io.InputStream;
import java.util.NoSuchElementException;


public class _AE {
    public static void main(String[] args){
        Deque<Integer> deque = new ArrayDeque<Integer>();
        StringBuilder sb = new StringBuilder();
        FS fs = new FS();
        int n = fs.nextInt();
        BitSet bitSet = new BitSet(2000);
        for(int i=0;i<n;i++){
            Integer m = fs.nextInt();
            bitSet.set(m);
            Object[] mm = deque.toArray();
            for (int j=0;j<mm.length;j++){
                int i1 = ((Integer) mm[j]) + m;
                bitSet.set(i1);
                deque.add(i1);
            }
            deque.add(m);
        }
        int q = fs.nextInt();
        for (int i=0;i<q;i++){
           sb.append( bitSet.get(fs.nextInt())?"yes\n":"no\n");
        }
        System.out.print(sb.toString());
    }



static class FS {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        return hasNextByte() ? buffer[ptr++] : -1;
    }

    private boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    private void skipUnprintable() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
    }

    public boolean hasNext() {
        skipUnprintable();
        return hasNextByte();
    }

    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public int nextInt() {
        return (int) nextLong();
    }

    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
}
}


Compiler output:
Main.java:10: error: class _AE is public, should be declared in a file named _AE.java
public class _AE {
       ^
1 error
Language: Java

#include <stdio.h>
#define N 20
#define Q 200
#define T 1
#define F 0
int A[N],n;

int main()
{
  int q,i,judge;
  int M[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++){
    judge = solve(0,M[i]);
    if(judge == T){
      printf("yes\n");
    }
    if(judge == F){
      printf("no\n");
    }
  }

  return 0;
}


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



Compiler output:
Main.java:1: error: illegal character: '#'
#include <stdio.h>
^
Main.java:1: error: class, interface, enum, or record expected
#include <stdio.h>
         ^
Main.java:2: error: illegal character: '#'
#define N 20
^
Main.java:3: error: illegal character: '#'
#define Q 200
^
Main.java:4: error: illegal character: '#'
#define T 1
^
Main.java:5: error: illegal character: '#'
#define F 0
^
Main.java:11: error: not a statement
  int M[Q];
        ^
Main.java:8: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
Main.java:11: error: ';' expected
  int M[Q];
         ^
Main.java:13: error: illegal start of expression
  scanf("%d",&n);
             ^
Main.java:15: error: illegal start of expression
    scanf("%d",&A[i]);
               ^
Main.java:17: error: illegal start of expression
  scanf("%d",&q);
             ^
Main.java:19: error: illegal start of expression
    scanf("%d",&M[i]);
               ^
13 errors
Language: Java

import java.io.*;
import java.util.*;
class Main{
  static int input_n[];
  // static int input_q[];
  static int n;
  public static void main(String args[])throws Exception{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    n = Integer.parseInt(br.readLine());
    // ArrayList<Integer> input = new ArrayList<Integer>();

    input_n= new int[n];
    StringTokenizer token = new StringTokenizer(br.readLine());
    for(int i = 0; i<n; i++) {
      input_n[i] = Integer.parseInt(token.nextToken());
    }

    int q = Integer.parseInt(br.readLine());
    input_q = new int[q];
    token = new StringTokenizer(br.readLine());
    for(int i = 0; i<q; i++) {
      // input_q[i] = Integer.parseInt(token.nextToken());
      if(true==solve(0, Integer.parseInt(token.nextToken()))) System.out.println("yes");
      else System.out.println("no");
    }
  }
  static boolean solve(int i, int m){
    boolean res;
    if(m == 0)return true;
    if(i>=n)return false;
    res = solve(i+1 , m) || solve(i+1, m-input_n[i]);
    return res;
  }
}


Compiler output:
Main.java:19: error: cannot find symbol
    input_q = new int[q];
    ^
  symbol:   variable input_q
  location: class Main
1 error
Language: C

#include <stdio.h>

int main() {
    
    int i,j,k,A[20],B[200],N1,N2,C[4000],N3;
    
    scanf("%d",&N1);
    
    for(i=0;i<N1;i++){
        scanf("%d",&A[i]);
    }
    
    scanf("%d",&N2);
    
    for(i=0;i<N2;i++){
        scanf("%d",&B[i]);
    }
    N3=N1*N1;
    i=0;
    
    for(j=0;j<N1;j++){
        for(k=0;k<N1;k++){
            i++;
            if(j!=k){
                c[i]=A[j]+A[k];
            }
        }
    }
    
    for(i=0;i<N2;i++){
        k=0;
        for(j=0;j<N3;j++){
            
            if(A[j]==B[i]){
                printf("yes\n");
                break;
            }
            if(c[j]==B[i]){
                printf("yes\n");
                break;
            }
            k++;
        }
        if(k==N3){
            printf("no\n");
            }
        }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:25:17: error: 'c' undeclared (first use in this function)
   25 |                 c[i]=A[j]+A[k];
      |                 ^
main.c:25:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main() {
    
    int i,j,k,A[20],B[200],N1,N2,C[4000],N3;
    
    scanf("%d",&N1);
    
    for(i=0;i<N1;i++){
        scanf("%d",&A[i]);
    }
    
    scanf("%d",&N2);
    
    for(i=0;i<N2;i++){
        scanf("%d",&B[i]);
    }
    N3=N1*N1;
    i=0;
    
    for(j=0;j<N1;j++){
        for(k=0;k<N1;k++){
            if(j!=k){
                c[i]=A[j]+A[k];
            i++;
                
            }
        }
    }
    
    for(i=0;i<N2;i++){
        k=0;
        for(j=0;j<N3;j++){
            
            if(A[j]==B[i]){
                printf("yes\n");
                break;
            }
            if(c[j]==B[i]){
                printf("yes\n");
                break;
            }
            k++;
        }
        if(k==N3){
            printf("no\n");
            }
        }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:24:17: error: 'c' undeclared (first use in this function)
   24 |                 c[i]=A[j]+A[k];
      |                 ^
main.c:24:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int main() {
    
    int i,j,k,A[20],B[200],N1,N2,C[4000],N3;
    
    scanf("%d",&N1);
    
    for(i=0;i<N1;i++){
        scanf("%d",&A[i]);
    }
    
    scanf("%d",&N2);
    
    for(i=0;i<N2;i++){
        scanf("%d",&B[i]);
    }
    N3=N1*N1;
    i=0;
    
    for(j=0;j<N1;j++){
        for(k=0;k<N1;k++){
            if(j!=k){
                c[i]=A[j]+A[k];
            }
            i++;
                
            
        }
    }
    
    for(i=0;i<N2;i++){
        k=0;
        for(j=0;j<N3;j++){
            
            if(A[j]==B[i]){
                printf("yes\n");
                break;
            }
            if(c[j]==B[i]){
                printf("yes\n");
                break;
            }
            k++;
        }
        if(k==N3){
            printf("no\n");
            }
        }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:24:17: error: 'c' undeclared (first use in this function)
   24 |                 c[i]=A[j]+A[k];
      |                 ^
main.c:24:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#define MAX 2000
int N1,A[MAX];

int Solve(int x,int y);
    int r;
    if(y==0)return 1;
    if(x>=N1)return 0;
    
    r=Solve(x+1,y)||(x+1,y-A[x]);
    return r;
    }
    
    int main(){
        int i,B,N2;
        
        scanf("%d",&N1);
        
        for(i=0;i<N1;i++){
            scanf("%d",A[i]);
        }
    }
        scanf("%d",&N2);
        
        for(i=0;i<N2;i++){
            scanf("%d",&B);
            if(Solve(0,B)==1){
                printf("yes\n");
            }
            else printf("no\n");
            }
            return 0;
        
    }



Compiler output:
main.c:7:5: error: expected identifier or '(' before 'if'
    7 |     if(y==0)return 1;
      |     ^~
main.c:8:5: error: expected identifier or '(' before 'if'
    8 |     if(x>=N1)return 0;
      |     ^~
main.c:10:5: warning: data definition has no type or storage class
   10 |     r=Solve(x+1,y)||(x+1,y-A[x]);
      |     ^
main.c:10:5: error: type defaults to 'int' in declaration of 'r' [-Wimplicit-int]
main.c:10:13: error: 'x' undeclared here (not in a function)
   10 |     r=Solve(x+1,y)||(x+1,y-A[x]);
      |             ^
main.c:10:17: error: 'y' undeclared here (not in a function)
   10 |     r=Solve(x+1,y)||(x+1,y-A[x]);
      |                 ^
main.c:11:5: error: expected identifier or '(' before 'return'
   11 |     return r;
      |     ^~~~~~
main.c:12:5: error: expected identifier or '(' before '}' token
   12 |     }
      |     ^
main.c:23:15: error: expected declaration specifiers or '...' before string constant
   23 |         scanf("%d",&N2);
      |               ^~~~
main.c:23:20: error: expected declaration specifiers or '...' before '&' token
   23 |         scanf("%d",&N2);
      |                    ^
main.c:25:9: error: expected identifier or '(' before 'for'
   25 |         for(i=0;i<N2;i++){
      |         ^~~
main.c:25:18: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   25 |         for(i=0;i<N2;i++){
      |                  ^
main.c:25:23: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   25 |         for(i=0;i<N2;i++){
      |                       ^~
main.c:32:13: error: expected identifier or '(' before 'return'
   32 |             return 0;
      |             ^~~~~~
main.c:34:5: error: expected identifier or '(' before '}' token
   34 |     }
      |     ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int judge(int,int);

int n;
int A[50];

int main(){
  int i,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);
    if(judge(0,m)){
      printf("yes\n");
    }
    else{
      printf("no\n");
    }
  }

  return 0;
}

  int judge(int x,int y);

  if(y==0){
    return 1;
  }
  if(x>=n){
    return 0;
  }

  return judge(x+1,m) || judge(x+1,m-A[x]);

}



Compiler output:
main.c:37:3: error: expected identifier or '(' before 'if'
   37 |   if(y==0){
      |   ^~
main.c:40:3: error: expected identifier or '(' before 'if'
   40 |   if(x>=n){
      |   ^~
main.c:44:3: error: expected identifier or '(' before 'return'
   44 |   return judge(x+1,m) || judge(x+1,m-A[x]);
      |   ^~~~~~
main.c:46:1: error: expected identifier or '(' before '}' token
   46 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>

int judge(int,int);

int n;
int A[50];

int main(){
  int i,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);
    if(judge(0,m)){
      printf("yes\n");
    }
    else{
      printf("no\n");
    }
  }

  return 0;
}

int judge(int x,int y){

  if(y==0){
    return 1;
  }
  if(x>=n){
    return 0;
  }

  return judge(x+1,m) || judge(x+1,m-A[x]);

}



Compiler output:
main.c: In function 'judge':
main.c:44:20: error: 'm' undeclared (first use in this function)
   44 |   return judge(x+1,m) || judge(x+1,m-A[x]);
      |                    ^
main.c:44:20: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int n,e[50];

int main(){
  int M, i,j;
  scanf("%d", &n);
  for ( i=0; i<n; i++){
    scanf("%d",e[i]);
  }

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

int search(int x int y){
  if ( x>=n )
   return 0;
  if ( e[x]==y )
   return 1;
  if ( search(x+1, y) ) 
   return 1
  if ( search(x+1, y-e[x]) )
   return 1

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:15:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   15 |     if ( search(0,M) )
      |          ^~~~~~
main.c: At top level:
main.c:20:3: error: expected identifier or '(' before 'return'
   20 |   return 0;
      |   ^~~~~~
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
main.c:23:18: error: expected ';', ',' or ')' before 'int'
   23 | int search(int x int y){
      |                  ^~~
Language: C

#include<stdio.h>

int n,e[50];

int main(){
  int Exhaus, i,j;
  scanf("%d", &n);
  for ( i=0; i<n; i++){
    scanf("%d",e[i]);
  }

  scanf("%d", &j);
  for ( i = 0; i<j; i++ ){

    scanf("%d", &Exhaus);
    if ( search(0,Exhaus) )
     printf("yes\n");
    else 
     printf("no\n");

  }

  return 0;
}

int search(int x int y){
  if ( x>=n )
   return 0;
  if ( e[x]==y )
   return 1;
  if ( search(x+1, y) ) 
   return 1
  if ( search(x+1, y-e[x]) )
   return 1

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   16 |     if ( search(0,Exhaus) )
      |          ^~~~~~
main.c: At top level:
main.c:26:18: error: expected ';', ',' or ')' before 'int'
   26 | int search(int x int y){
      |                  ^~~
Language: C

#include<stdio.h>

int n,e[50];

int main(){
  int Exhaus, i,j;
  scanf("%d", &n);
  for ( i=0; i<n; i++){
    scanf("%d",e[i]);
  }

  scanf("%d", &j);
  for ( i = 0; i<j; i++ ){

    scanf("%d", &Exhaus);
    if ( search(0,Exhaus) )
     printf("yes\n");
    else 
     printf("no\n");

  }

  return 0;
}

int search(int x ,int y){
  if ( x>=n )
   return 0;
  if ( e[x]==y )
   return 1;
  if ( search(x+1, y) ) 
   return 1
  if ( search(x+1, y-e[x]) )
   return 1

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:16:10: error: implicit declaration of function 'search' [-Wimplicit-function-declaration]
   16 |     if ( search(0,Exhaus) )
      |          ^~~~~~
main.c: In function 'search':
main.c:32:12: error: expected ';' before 'if'
   32 |    return 1
      |            ^
      |            ;
   33 |   if ( search(x+1, y-e[x]) )
      |   ~~
Language: C

#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define N 500

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

int main(){
  int i,m,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);
    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;
    }
    return solve(i+1,m) || solve(i+1,m-A[i]);
  }
    



Compiler output:
main.c: In function 'main':
main.c:35:3: error: expected declaration or statement at end of input
   35 |   }
      |   ^
Language: C

#include<stdio.h>

int C[50];

int solve(int s,int y){
  if(y==0) return 1;
  if(s>=) return 0;
  int res=solve(s+1,,y) || solve(s+1,y-C[s]);
  return res;
}

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

  return 0;
}



Compiler output:
main.c: In function 'solve':
main.c:7:9: error: expected expression before ')' token
    7 |   if(s>=) return 0;
      |         ^
main.c:8:21: error: expected expression before ',' token
    8 |   int res=solve(s+1,,y) || solve(s+1,y-C[s]);
      |                     ^
main.c:8:11: error: too many arguments to function 'solve'
    8 |   int res=solve(s+1,,y) || solve(s+1,y-C[s]);
      |           ^~~~~
main.c:5:5: note: declared here
    5 | int solve(int s,int y){
      |     ^~~~~
Language: C

#include<stdio.h>

int n,C[50];

int solve(int s,int y){
  if(y==0) return 1;
  if(s>=n) return 0;
  int res=solve(s+1,y) || solve(s+1,y-C[s]);
  return res;
}

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

  return 0;
}
ss


Compiler output:
main.c:27:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   27 | ss
      | ^~
Language: C

#include<stdio.h>

#define MAX 500000
#define INFTY 2000000000

int L[(MAX/2)+2],R[(MAX/2)+2],count;

void merge(int A[],int n,int left,int mid,int right){

  int i,j,k,n1,n2;
  
  n1 = mid - left;
  n2 = right - mid;
 
  for (i = 0;i<n1;i++){
    L[i] = A[left + i];
      }
  for (i = 0;i<n2;i++){
    R[i] = A[mid + i];
      }
  L[n1] = INFTY;
  R[n2] = INFTY;
  i = 0;
  j = 0;
  for (k = left; k < right;k++){
    count++;
    if (L[i] <= R[j]){
      A[k] = L[i];
      i = i + 1;+
    }
    else{ 
      A[k] = R[j];
  
      j = j + 1;
    }

  }
}

void mergeSort(int A[],int n,int left,int right){
  int mid;
  
  if (left+1 < right){
    mid = (left + right)/2;
    mergeSort(A,n, left, mid);
    mergeSort(A,n, mid, right);
    merge(A,n, left, mid, right);
  }
}

int main(){

  int A[MAX], n, i;
 scanf("%d",&n);

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

  mergeSort(A,n,0,n);

  for(i=0;i<n;i++){
    if(i >= 1) printf(" ");
    printf("%d",A[i]);
  }
  printf("\n");

  printf("%d\n",count);

  return 0;
  
}



Compiler output:
main.c: In function 'merge':
main.c:30:5: error: expected expression before '}' token
   30 |     }
      |     ^
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, 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 ) ) puts("yes");
        else puts("no");
    }
 
    return 0;
}


Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
main.c: In function 'solve':
main.c:9:14: error: 'n' undeclared (first use in this function)
    9 |     if( i >= n ) return 0;
      |              ^
main.c:9:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:51: error: 'a' undeclared (first use in this function)
   10 |     int res = solve(i + 1, m) || solve(i + 1, m - a[i]);
      |                                                   ^
main.c: In function 'main':
main.c:18:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   18 |     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:18:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   18 |     scanf("%d", &n);
      |     ^~~~~
main.c:18:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:18:18: error: 'n' undeclared (first use in this function)
   18 |     scanf("%d", &n);
      |                  ^
main.c:19:43: error: 'a' undeclared (first use in this function)
   19 |     for( i = 0; i < n; i++ ) scanf("%d", &a[i]);
      |                                           ^
main.c:23:29: error: implicit declaration of function 'puts' [-Wimplicit-function-declaration]
   23 |         if( solve( 0, M ) ) puts("yes");
      |                             ^~~~
main.c:23:29: note: include '<stdio.h>' or provide a declaration of 'puts'
Language: C

#include <stdio.h>
 
int A[25], n;
 
int solve(int p, int t){
     
    if (p == n){
        if (t == 0){
            return (1);
        }
        else {
            return (0);
        }
    }
     
    if (solve(p + 1, t - A[p]) == 1){
        return (1);
    }
    if (solve(p + 1, t) == 1){
        return (1);
    }
    return (0);
}
 
int main(void)
{
     
    int M, q, 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) == 1){
            printf("yes\n");
        }
        else {
            printf("no\n");
        }
    }
    return (0);



Compiler output:
main.c: In function 'main':
main.c:49:5: error: expected declaration or statement at end of input
   49 |     return (0);
      |     ^~~~~~
Language: C

#include <stdio.h>
 
int A[25], n;
 
int solve(int p, int t){
     
    if (p == n){
        if (t == 0){
            return (1);
        }
        else {
            return (0);
        }
    }
     
    if (solve(p + 1, t - A[p]) == 1){
        return (1);
    }
    if (solve(p + 1, t) == 1){
        return (1);
    }
    return (0);
}
 
int main(void)
{
     
    int M, q, 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) == 1){
            puts("yes");
        }
        else {
            puts("no");
        }
    }
    return (0);



Compiler output:
main.c: In function 'main':
main.c:49:5: error: expected declaration or statement at end of input
   49 |     return (0);
      |     ^~~~~~
Language: C

define _CRT_SECURE_NO_WARNINGS
#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, 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:1:1: error: unknown type name 'define'
    1 | define _CRT_SECURE_NO_WARNINGS
      | ^~~~~~
main.c:1:31: error: expected ';' before 'typedef'
    1 | define _CRT_SECURE_NO_WARNINGS
      |                               ^
      |                               ;
Language: C

#include <stdio.h>

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

int main(void) {
  int i, a[100000], m[100000], n, l1, l2;
  char buf[2];
  scanf("%d", &l1);
  for (n = 0; n < l1 && (j = scanf("%d%1[\n]", a+n, buf)) == 1; n++) ;
  if (j == 2)
  n++;
  scanf("%d", &l2);
  for (n = 0; n < l2 && (j = scanf("%d%1[\n]", m+n, buf)) == 1; n++) ;
  if (j == 2)
  n++;

  for (i = 0; i < l2; i++) {
    if (solve(0, a, m[i]) == 1) {
      printf("Yes\n");
    } else {
      printf("No\n");
    }
  }
  return 0;
}



Compiler output:
main.c: In function 'main':
main.c:19:26: error: 'j' undeclared (first use in this function)
   19 |   for (n = 0; n < l1 && (j = scanf("%d%1[\n]", a+n, buf)) == 1; n++) ;
      |                          ^
main.c:19:26: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

 int n;

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

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


 int main(){
       int i,q,A[],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(solve(i,m))printf("yes\n");
                else printf("no\n");
                }
       return 0;
       }

                


Compiler output:
main.c: In function 'solve':
main.c:8:11: error: expected '(' before 'else'
    8 |        if else(i>n)return 0;
      |           ^~~~
      |           (
main.c:10:38: error: 'A' undeclared (first use in this function)
   10 |        res=solve(i+1,m)||solve(i+1,m-A[i]);
      |                                      ^
main.c:10:38: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:16:16: error: array size missing in 'A'
   16 |        int i,q,A[],m;
      |                ^
Language: C

#include<stdio.h>

 int n;
 int A[21];

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

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


 int main(){
       int i,q,A[],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(solve(i,m))printf("yes\n");
                else printf("no\n");
                }
       return 0;
       }

                


Compiler output:
main.c: In function 'solve':
main.c:9:11: error: expected '(' before 'else'
    9 |        if else(i>n)return 0;
      |           ^~~~
      |           (
main.c: In function 'main':
main.c:17:16: error: array size missing in 'A'
   17 |        int i,q,A[],m;
      |                ^
Language: C

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


Compiler output:
main.c: In function 'solve':
main.c:24:8: error: 'i' undeclared (first use in this function)
   24 |     if(i>=n)return 0;
      |        ^
main.c:24:8: 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 x, int y);
int main(){
    int i,a,b;
    scanf("%d",&n);
    for(i=0;i<n;i++){
          scanf("%d",&A[i]);
          scanf("%d",&a);
    }
    for(i=0;i<a;i++){
        scanf("%d",&b);
        if(solve(0,b)){
            printf("yes\n");
        }
        else printf("no\n");
    }
    return 0;
}
int solve(int x, int y)
{
    int c;
    if(y==0)return 1;
    if(m>=n)return 0;
    c=solve(x+1,y) || solve(x+1,y-A[i]);
    return c;
}


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

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


Compiler output:
main.c: In function 'solve':
main.c:23:8: error: 'm' undeclared (first use in this function)
   23 |     if(m>=n)return 0;
      |        ^
main.c:23:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int s[2000];

void rec(int i){
  if(i == n){
    printf("%d \n",s[i]);
    return;
  }
  
  rec(i + 1);
  s[i] = 1;
  rec(i + 1);
  s[i] = 0;
}


int main(){
  int n,q;
  int a[2000],m[2000],s[2000];
  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<n;i++){
    s[i] = 0;
    rec(0);
  }

  return 0;
}                                



Compiler output:
main.c: In function 'rec':
main.c:6:11: error: 'n' undeclared (first use in this function)
    6 |   if(i == n){
      |           ^
main.c:6:11: 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, 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 'main':
main.c:15:7: error: stray '\342' in program
   15 | scanf(<U+201C>%d<U+201D>, &n);
      |       ^~~~~~~~
main.c:15:8: error: expected expression before '%' token
   15 | scanf(“%d”, &n);
      |        ^
main.c:15:10: error: stray '\342' in program
   15 | scanf(<U+201C>%d<U+201D>, &n);
      |                 ^~~~~~~~
main.c:16:6: error: 'i' undeclared (first use in this function)
   16 | for (i=0; i<n; i++) scanf("%d", &A[i]);
      |      ^
main.c:16:6: 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, 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 'main':
main.c:15:7: error: stray '\342' in program
   15 | scanf(<U+201C>%d<U+201D>, &n);
      |       ^~~~~~~~
main.c:15:8: error: expected expression before '%' token
   15 | scanf(“%d”, &n);
      |        ^
main.c:15:10: error: stray '\342' in program
   15 | scanf(<U+201C>%d<U+201D>, &n);
      |                 ^~~~~~~~
main.c:16:6: error: 'i' undeclared (first use in this function)
   16 | for (i=0; i<n; i++) scanf("%d", &A[i]);
      |      ^
main.c:16:6: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(){
    int a,b,i;
    int c[2000];
    int d[2000];
    
    scanf("%d",&a);
    for(i-0;i<a;i++){
            scanf("%d",&c[i]);
    }
        scanf("%d",&b);
    for(i-0;i<b;i++){
            scanf("%d",&d[i]);
    }
    
    for(i=0;i<a;i++){
        e=a[i];
        f=a[i+1];
        g=e+f;
        for(j=0;j<b;j++){
            if(g==d[j]){
                printf("yes\n");
            }else{
                printf("no\n");
            }
            }
            
        }
        return 0;
    }
    
}


Compiler output:
main.c: In function 'main':
main.c:17:9: error: 'e' undeclared (first use in this function)
   17 |         e=a[i];
      |         ^
main.c:17:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:12: error: subscripted value is neither array nor pointer nor vector
   17 |         e=a[i];
      |            ^
main.c:18:9: error: 'f' undeclared (first use in this function)
   18 |         f=a[i+1];
      |         ^
main.c:18:12: error: subscripted value is neither array nor pointer nor vector
   18 |         f=a[i+1];
      |            ^
main.c:19:9: error: 'g' undeclared (first use in this function)
   19 |         g=e+f;
      |         ^
main.c:20:13: error: 'j' undeclared (first use in this function)
   20 |         for(j=0;j<b;j++){
      |             ^
main.c: At top level:
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include<stdio.h>
int main(){
    int a,b,i,e,f,g;
    int c[2000];
    int d[2000];
    
    scanf("%d",&a);
    for(i-0;i<a;i++){
            scanf("%d",&c[i]);
    }
        scanf("%d",&b);
    for(i-0;i<b;i++){
            scanf("%d",&d[i]);
    }
    
    for(i=0;i<a;i++){
        e=a[i];
        f=a[i+1];
        g=e+f;
        for(j=0;j<b;j++){
            if(g==d[j]){
                printf("yes\n");
            }else{
                printf("no\n");
            }
            }
            
        }
        return 0;
    }
    
}


Compiler output:
main.c: In function 'main':
main.c:17:12: error: subscripted value is neither array nor pointer nor vector
   17 |         e=a[i];
      |            ^
main.c:18:12: error: subscripted value is neither array nor pointer nor vector
   18 |         f=a[i+1];
      |            ^
main.c:20:13: error: 'j' undeclared (first use in this function)
   20 |         for(j=0;j<b;j++){
      |             ^
main.c:20:13: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include<stdio.h>
int main(){
    int a,b,i,e,f,g;
    int c[2000];
    int d[2000];
    
    scanf("%d",&a);
    for(i-0;i<a;i++){
            scanf("%d",&c[i]);
    }
        scanf("%d",&b);
    for(i-0;i<b;i++){
            scanf("%d",&d[i]);
    }
    
    for(i=0;i<a;i++){
        e=c[i];
        f=c[i+1];
        g=e+f;
        for(j=0;j<b;j++){
            if(g==d[j]){
                printf("yes\n");
            }else{
                printf("no\n");
            }
            }
            
        }
        return 0;
    }
    
}


Compiler output:
main.c: In function 'main':
main.c:20:13: error: 'j' undeclared (first use in this function)
   20 |         for(j=0;j<b;j++){
      |             ^
main.c:20:13: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
Language: C

#include<stdio.h>
int main(){
    int a,b,i,e,f,g,j;
    int c[2000];
    int d[2000];
    
    scanf("%d",&a);
    for(i-0;i<a;i++){
            scanf("%d",&c[i]);
    }
        scanf("%d",&b);
    for(i-0;i<b;i++){
            scanf("%d",&d[i]);
    }
    
    for(i=0;i<a;i++){
        e=c[i];
        f=c[i+1];
        g=e+f;
        for(j=0;j<b;j++){
            if(g==d[j]){
                printf("yes\n");
            }else{
                printf("no\n");
            }
            }
            
        }
        return 0;
    }
    
}


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

#include<stdio.h>
int main(){
    int a,b,i,e,f,g,j,h;
    int c[2000];
    int d[2000];
    
    scanf("%d",&a);
    for(i-0;i<a;i++){
            scanf("%d",&c[i]);
    }
        scanf("%d",&b);
    for(i-0;i<b;i++){
            scanf("%d",&d[i]);
    }
    
    for(i=0;i<a;i++){
        e=c[i];
        f=c[i+1];
        g=e+f;
        for(j=0;j<b;j++){
            if(g==d[j] || e==d[j] || f==d[j]){
                h=1;
            }else{
                h=0;
            }
            }
            if(h==1){
                printf("yes\n");
            }else{
                printf("no\n");
            }
            h=0;
            }
        }
        return 0;
    }
    


Compiler output:
main.c:35:9: error: expected identifier or '(' before 'return'
   35 |         return 0;
      |         ^~~~~~
main.c:36:5: error: expected identifier or '(' before '}' token
   36 |     }
      |     ^
Language: C

#include<stdio.h>
int main(){
    int a,b,i,e,f,g,j,h=0,k;
    int c[2000];
    int d[2000];
    
    scanf("%d",&a);
    for(i=0;i<a;i++){
      scanf("%d",&c[i]);
    }
        scanf("%d",&b);
    for(i=0;i<b;i++){
      scanf("%d",&d[i]);
    }
    
    for(i=0;i<b;i++){
        x=x+1;
        e=d[i];
        for(j=0;j<=a;j++){
            f=c[j];
            for(k=j+1;k<=a;k++){
                g=f+c[k];
                if(e==f || e==g){
                    h=1;
                    break;
                }
            }
            if(h==1){
                break;
            }
        }
        if(h==1){
            printf("yes\n");
        }else{
               printf("no\n");
        }
        h=0;
        
    }
    
        return 0;
    }



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

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

int A(int x,int y);

int a[2000],b[2000];

int main(){
    int c,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(o,b[i]))==ture){
        printf("%s\n",s[0]);
    }else{
        printf("%s\n",s[1]);
    }
    return 0;
}

int A(int )


Compiler output:
main.c: In function 'main':
main.c:21:10: error: 'o' undeclared (first use in this function)
   21 |     if(A(o,b[i]))==ture){
      |          ^
main.c:21:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:18: error: expected expression before '==' token
   21 |     if(A(o,b[i]))==ture){
      |                  ^~
main.c:21:24: error: expected statement before ')' token
   21 |     if(A(o,b[i]))==ture){
      |                        ^
main.c:22:23: error: 's' undeclared (first use in this function)
   22 |         printf("%s\n",s[0]);
      |                       ^
main.c:23:6: error: 'else' without a previous 'if'
   23 |     }else{
      |      ^~~~
main.c: In function 'A':
main.c:30: error: expected '{' at end of input
main.c: In function 'main':
main.c:29:1: error: expected declaration or statement at end of input
   29 | int A(int )
      | ^~~
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(o,b[i]))==ture){
        printf("%s\n",s[0]);
    }else{
        printf("%s\n",s[1]);
    }
    return 0;
}

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


Compiler output:
main.c: In function 'main':
main.c:21:10: error: 'o' undeclared (first use in this function)
   21 |     if(A(o,b[i]))==ture){
      |          ^
main.c:21:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:18: error: expected expression before '==' token
   21 |     if(A(o,b[i]))==ture){
      |                  ^~
main.c:21:24: error: expected statement before ')' token
   21 |     if(A(o,b[i]))==ture){
      |                        ^
main.c:22:23: error: 's' undeclared (first use in this function)
   22 |         printf("%s\n",s[0]);
      |                       ^
main.c:23:6: error: 'else' without a previous 'if'
   23 |     }else{
      |      ^~~~
main.c: In function 'A':
main.c:32:16: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   32 |         return ture;
      |                ^~~~
      |                true
main.c: In function 'main':
main.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^
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(o,b[i]))==ture){
        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 ture;
    }
    if(x>=c){
        return ture;
    }
    if(A(x+1,y)==ture){
        z=ture;
    }else if(A(x+1,y-a[x])==ture){
        z=ture;
    }else{
        z=false;
    }
    return z;
}


Compiler output:
main.c: In function 'main':
main.c:21:10: error: 'o' undeclared (first use in this function)
   21 |     if(A(o,b[i]))==ture){
      |          ^
main.c:21:10: note: each undeclared identifier is reported only once for each function it appears in
main.c:21:18: error: expected expression before '==' token
   21 |     if(A(o,b[i]))==ture){
      |                  ^~
main.c:21:24: error: expected statement before ')' token
   21 |     if(A(o,b[i]))==ture){
      |                        ^
main.c:23:6: error: 'else' without a previous 'if'
   23 |     }else{
      |      ^~~~
main.c: In function 'A':
main.c:32:16: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   32 |         return ture;
      |                ^~~~
      |                true
main.c: In function 'main':
main.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^
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]))==ture){
        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 ture;
    }
    if(x>=c){
        return ture;
    }
    if(A(x+1,y)==ture){
        z=ture;
    }else if(A(x+1,y-a[x])==ture){
        z=ture;
    }else{
        z=false;
    }
    return z;
}


Compiler output:
main.c: In function 'main':
main.c:21:18: error: expected expression before '==' token
   21 |     if(A(0,b[i]))==ture){
      |                  ^~
main.c:21:24: error: expected statement before ')' token
   21 |     if(A(0,b[i]))==ture){
      |                        ^
main.c:23:6: error: 'else' without a previous 'if'
   23 |     }else{
      |      ^~~~
main.c: In function 'A':
main.c:32:16: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   32 |         return ture;
      |                ^~~~
      |                true
main.c:32:16: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^
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]))==ture){
        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 ture;
    }
    if(x>=c){
        return ture;
    }
    if(A(x+1,y)==ture){
        z=ture;
    }else if(A(x+1,y-a[x])==ture){
        z=ture;
    }else{
        z=false;
    }
    return z;
}


Compiler output:
main.c: In function 'main':
main.c:21:18: error: expected expression before '==' token
   21 |     if(A(0,b[i]))==ture){
      |                  ^~
main.c:21:24: error: expected statement before ')' token
   21 |     if(A(0,b[i]))==ture){
      |                        ^
main.c:23:6: error: 'else' without a previous 'if'
   23 |     }else{
      |      ^~~~
main.c: In function 'A':
main.c:33:16: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   33 |         return ture;
      |                ^~~~
      |                true
main.c:33:16: note: each undeclared identifier is reported only once for each function it appears in
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])==ture){
        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 ture;
    }
    if(x>=c){
        return ture;
    }
    if(A(x+1,y)==ture){
        z=ture;
    }else if(A(x+1,y-a[x])==ture){
        z=ture;
    }else{
        z=false;
    }
    return z;
}


Compiler output:
main.c: In function 'main':
main.c:21:19: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   21 |     if(A(0,b[i])==ture){
      |                   ^~~~
      |                   true
main.c:21:19: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'A':
main.c:33:16: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   33 |         return ture;
      |                ^~~~
      |                true
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 ture;
    }
    if(x>=c){
        return ture;
    }
    if(A(x+1,y)==ture){
        z=ture;
    }else if(A(x+1,y-a[x])==ture){
        z=ture;
    }else{
        z=false;
    }
    return z;
}


Compiler output:
main.c: In function 'A':
main.c:33:16: error: 'ture' undeclared (first use in this function); did you mean 'true'?
   33 |         return ture;
      |                ^~~~
      |                true
main.c:33:16: note: each undeclared identifier is reported only once for each function it appears in