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

#include<stdio.h>
 
int n;
int a[20];
int flg[2000];
 
void dfs(int x,int sum){

  
  if(x==n){
    flg[sum]=1;
    return;
  }


  
  dfs(x+1,sum);
  dfs(x+1,sum+a[x]);



}





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

  
  dfs(0,0);
  
  
  int q,key;
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&key);
    
    if( flg[key]==1 ){
      printf("yes\n");
    }else{
      printf("no\n");
    }

    
  }

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

#include <cstdio>

int n,a[50];

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

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

    }
    return 0;
}

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

#include<cstdio>
#include<vector>

using namespace std;

class ExhaustiveSearch
{
public:
	void solve(int n, int A[], int q, int M[])
	{
		for (int i = 0; i < q; i++)
		{
			if (search(n, A, 0, M[i]))
				printf("yes\n");
			else
				printf("no\n");
		}
	}

	bool search(int n, int A[], int i, int m)
	{
		if (m == 0)
			return true;
		else if (i >= n)
			return false;

		return (search(n, A, i + 1, m) || search(n, A, i + 1, m - A[i]));
	}
};

int main()
{
	int n, tmp;
	scanf("%d", &n);
	vector<int> A;
	for (int i = 0; i < n; i++)
	{
		scanf("%d", &tmp);
		A.push_back(tmp);
	}
	int q;
	scanf("%d", &q);
	vector<int> M;
	for (int i = 0; i < q; i++)
	{
		scanf("%d", &tmp);
		M.push_back(tmp);
	}

	auto es = ExhaustiveSearch();
	es.solve(n, A.data(), q, M.data());
}

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

#include<stdio.h>

int n, m, A[20];

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

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

Compiler output:
main.c: In function 'solve':
main.c:11:3: error: 'a' undeclared (first use in this function)
   11 |   a = solve(p+1, sum) || solve(p+1, sum - A[p]);
      |   ^
main.c:11:3: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:21:9: error: expected declaration specifiers or '...' before string constant
   21 |   scanf("%d", q);
      |         ^~~~
main.c:21:15: error: unknown type name 'q'
   21 |   scanf("%d", q);
      |               ^
main.c:22:3: error: expected identifier or '(' before 'for'
   22 |   for(i=0;i<q;i++){
      |   ^~~
main.c:22:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   22 |   for(i=0;i<q;i++){
      |            ^
main.c:22:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   22 |   for(i=0;i<q;i++){
      |                ^~
main.c:29:3: error: expected identifier or '(' before 'return'
   29 |   return 0;
      |   ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C

#include<stdio.h>

int n, m, A[20];

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

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

Compiler output:
main.c:21:9: error: expected declaration specifiers or '...' before string constant
   21 |   scanf("%d", &q);
      |         ^~~~
main.c:21:15: error: expected declaration specifiers or '...' before '&' token
   21 |   scanf("%d", &q);
      |               ^
main.c:22:3: error: expected identifier or '(' before 'for'
   22 |   for(i=0;i<q;i++){
      |   ^~~
main.c:22:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   22 |   for(i=0;i<q;i++){
      |            ^
main.c:22:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   22 |   for(i=0;i<q;i++){
      |                ^~
main.c:29:3: error: expected identifier or '(' before 'return'
   29 |   return 0;
      |   ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C

#include<stdio.h>

int n, m, A[20];

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

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

Compiler output:
main.c:21:9: error: expected declaration specifiers or '...' before string constant
   21 |   scanf("%d", &q);
      |         ^~~~
main.c:21:15: error: expected declaration specifiers or '...' before '&' token
   21 |   scanf("%d", &q);
      |               ^
main.c:22:3: error: expected identifier or '(' before 'for'
   22 |   for(i=0;i<q;i++){
      |   ^~~
main.c:22:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   22 |   for(i=0;i<q;i++){
      |            ^
main.c:22:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   22 |   for(i=0;i<q;i++){
      |                ^~
main.c:29:3: error: expected identifier or '(' before 'return'
   29 |   return 0;
      |   ^~~~~~
main.c:30:1: error: expected identifier or '(' before '}' token
   30 | }
      | ^
Language: C

#include<iostream>
#include<cstdio>

using namespace std;

int Search(int n, int A[], int k)
{
	if(k==0) return 0;
	if(A[k-1]==n) return 1;
	else if(A[k-1]<n) return Search(n-A[k-1], A, k-1);
	else return Search(n, A, k-1);
}

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

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

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

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

int main(void) {
	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:5:55: error: 'A' undeclared (first use in this function)
    5 |         int res = solve(i + 1, m) || solve(i + 1, m - A[i]);
      |                                                       ^
main.c:5:55: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:12:9: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
   12 |         scanf("%d", &n);
      |         ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int solve(int i, int m) {
main.c:12:9: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
   12 |         scanf("%d", &n);
      |         ^~~~~
main.c:12:9: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:12:22: error: 'n' undeclared (first use in this function)
   12 |         scanf("%d", &n);
      |                      ^
main.c:14:30: error: 'A' undeclared (first use in this function)
   14 |                 scanf("%d", &A[i]);
      |                              ^
main.c:20:25: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   20 |                         printf("yes\n");
      |                         ^~~~~~
main.c:20:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:20:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:20:25: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:23:25: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
   23 |                         printf("no\n");
      |                         ^~~~~~
main.c:23:25: note: include '<stdio.h>' or provide a declaration of 'printf'
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 ren = 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:10:16: error: 'res' undeclared (first use in this function); did you mean 'ren'?
   10 |         return res;
      |                ^~~
      |                ren
main.c:10:16: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int A[20],n;

int solve(int i,int m)
{
	if(m == 0) return 1;
	if(i >= m) 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 'solve':
main.c:10:9: error: expected ',' or ';' before 'return'
   10 |         return res;
      |         ^~~~~~
main.c: In function 'main':
main.c:18:19: error: invalid operands to binary & (have 'char *' and 'int')
   18 |         scanf("%d"&n);
      |               ~~~~^
      |               |
      |               char *
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) || solvea(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:8:38: error: implicit declaration of function 'solvea'; did you mean 'solve'? [-Wimplicit-function-declaration]
    8 |         int res = solve(i + 1, m) || solvea(i + 1, m- A[i]);
      |                                      ^~~~~~
      |                                      solve
Language: C

#include<stdio.h>
int mothernum, mother[20];

int sentaku(int i, int now, int aim){
 if ( now == aim ) {
   return 1;
 }
 if ( i > mothernum ) {
   return 0;
 }
 int back = sentaku(i++, now, aim) || sentaku(i++, now + mother[i], aim);
 return back;
}

int main()
{
 int kidsnum, kids[200], i, j, flag;
 
 scanf("%d", &mothernum);
 for (i = 0; i < mothernum; i++) {
   scanf("%d", &mother[i]);
 }
  
 scanf("%d", &kidsnum);
 for(i = 0; i < kidsnum; i++) {
   scanf("%d", &kids[i]);
 }

 for(i = 0; i< kidsnum; i++){
   flag = 0;
   flag = sentaku(0, 0, kids[i]);
   }
   if (flag == 1) {
      printf("yes\n");
   } else {
      printf("no\n");
   }
 }
 
 return 0;
}

Compiler output:
main.c:40:2: error: expected identifier or '(' before 'return'
   40 |  return 0;
      |  ^~~~~~
main.c:41:1: error: expected identifier or '(' before '}' token
   41 | }
      | ^
Language: C

#include<stdio.h>

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

int main()
{
   int i, n, q, m;
   int A[50];

   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: In function 'solve':
main.c:7:11: error: 'n' undeclared (first use in this function)
    7 |    if (i>=n)
      |           ^
main.c:7:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:44: error: 'A' undeclared (first use in this function)
    9 |    int res = solve(i+1, M) || solve(M+1, M-A[i]);
      |                                            ^
Language: C

#include <stdio.h>

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(void)  {
  int i, q, m, n, A[50];
  
  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:6:12: error: 'n' undeclared (first use in this function)
    6 |   if (i >= n)
      |            ^
main.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:49: error: 'A' undeclared (first use in this function)
    8 |   int res = solve(i + 1, m) || solve(i + 1, m - A[i])
      |                                                 ^
main.c:9:3: error: expected ',' or ';' before 'return'
    9 |   return res;
      |   ^~~~~~
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(void)  {
  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 (solve(0, m))
      printf("yes\n");
    else 
      printf("no\n");
  }  
  return 0;  
}  

Compiler output:
main.c: In function 'solve':
main.c:11:3: error: expected ',' or ';' before 'return'
   11 |   return res;
      |   ^~~~~~
Language: C

#include <stdio.h>

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

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

}

Compiler output:
main.c: In function 'solve':
main.c:5:6: error: 'm' undeclared (first use in this function)
    5 |   if(m==0){
      |      ^
main.c:5:6: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:9: error: 'n' undeclared (first use in this function)
    8 |   if(i>=n){
      |         ^
main.c:11:7: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,m)||solve(i+1,m-a[i]);
      |       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[]){
      |     ^~~~~
main.c:11:21: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,m)||solve(i+1,m-a[i]);
      |                     ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[]){
      |     ^~~~~
main.c: In function 'main':
main.c:25:8: error: too few arguments to function 'solve'
   25 |     if(solve(0,key)){
      |        ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[]){
      |     ^~~~~
main.c:28:12: error: expected '(' before '{' token
   28 |     else if{
      |            ^
      |            (
Language: C

#include <stdio.h>

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

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

}

Compiler output:
main.c: In function 'solve':
main.c:8:9: error: 'n' undeclared (first use in this function)
    8 |   if(i>=n){
      |         ^
main.c:8:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:7: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[]){
      |     ^~~~~
main.c:11:23: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |                       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[]){
      |     ^~~~~
main.c: In function 'main':
main.c:25:8: error: too few arguments to function 'solve'
   25 |     if(solve(0,key)){
      |        ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[]){
      |     ^~~~~
main.c:28:12: error: expected '(' before '{' token
   28 |     else if{
      |            ^
      |            (
Language: C

#include <stdio.h>

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

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

}

Compiler output:
main.c: In function 'solve':
main.c:11:7: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
main.c:11:23: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |                       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
main.c: In function 'main':
main.c:28:12: error: expected '(' before '{' token
   28 |     else if{
      |            ^
      |            (
Language: C

#include <stdio.h>

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

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

}

Compiler output:
main.c: In function 'solve':
main.c:11:7: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
main.c:11:23: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |                       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
Language: C

#include <stdio.h>

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

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

}

Compiler output:
main.c: In function 'solve':
main.c:11:7: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
main.c:11:23: error: too few arguments to function 'solve'
   11 |   res=solve(i+1,key)||solve(i+1,key-a[i]);
      |                       ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
Language: C

#include <stdio.h>

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

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

}

Compiler output:
main.c: In function 'solve':
main.c:10:11: error: too few arguments to function 'solve'
   10 |   int res=solve(i+1,key)||solve(i+1,key-a[i]);
      |           ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
main.c:10:27: error: too few arguments to function 'solve'
   10 |   int res=solve(i+1,key)||solve(i+1,key-a[i]);
      |                           ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int i,int key,int a[],int n){
      |     ^~~~~
Language: C

#include <stdio.h>

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

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

}

Compiler output:
main.c: In function 'solve':
main.c:7:9: error: 'n' undeclared (first use in this function)
    7 |   if(i>=n){
      |         ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:41: error: 'a' undeclared (first use in this function)
   10 |   int res=solve(i+1,key)||solve(i+1,key-a[i]);
      |                                         ^
main.c: In function 'main':
main.c:24:20: error: expected ')' before '{' token
   24 |     if(solve(0,key){
      |       ~            ^
      |                    )
main.c:30:3: error: expected expression before '}' token
   30 |   }
      |   ^
Language: C

#include <stdio.h>

int n,a[20]

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

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

}

Compiler output:
main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    5 | int solve(int i,int key){
      | ^~~
main.c: In function 'main':
main.c:21:17: error: 'a' undeclared (first use in this function)
   21 |     scanf("%d",&a[i]);
      |                 ^
main.c:21:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:8: error: implicit declaration of function 'solve' [-Wimplicit-function-declaration]
   26 |     if(solve(0,key){
      |        ^~~~~
main.c:26:20: error: expected ')' before '{' token
   26 |     if(solve(0,key){
      |       ~            ^
      |                    )
main.c:32:3: error: expected expression before '}' token
   32 |   }
      |   ^
Language: C

#include <stdio.h>

int n,a[20]

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

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

}

Compiler output:
main.c:5:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'
    5 | int solve(int i,int key){
      | ^~~
main.c: In function 'main':
main.c:21:17: error: 'a' undeclared (first use in this function)
   21 |     scanf("%d",&a[i]);
      |                 ^
main.c:21:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:8: error: implicit declaration of function 'solve' [-Wimplicit-function-declaration]
   26 |     if(solve(0,key)){
      |        ^~~~~
Language: C

#include<stdio.h>

int loop(int start, int end)
{
  int i;
  for(i = start; i < end; i++){
    if(i <= end){
      loop(i, end);
    }
  }
}

int make_num(int A[20],int n, int m) 
{
  int i, j, ans;
  for(i = 0; i < n; i++){
  
  
}
int main()
{
  int n, A[20], m[200], q, 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++){
    ans = make_num(A[20], n, m[i]);
    if(ans == 1){
      printf("yes\n");
    }else if (ans == 0){
      printf("no\n");
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:35:21: error: passing argument 1 of 'make_num' makes pointer from integer without a cast [-Wint-conversion]
   35 |     ans = make_num(A[20], n, m[i]);
      |                    ~^~~~
      |                     |
      |                     int
main.c:13:18: note: expected 'int *' but argument is of type 'int'
   13 | int make_num(int A[20],int n, int m)
      |              ~~~~^~~~~
main.c: In function 'make_num':
main.c:42:1: error: expected declaration or statement at end of input
   42 | }
      | ^
Language: C

#include<stdio.h>

int loop(int start, int end)
{
  int i;
  for(i = start; i < end; i++){
    if(i <= end){
      loop(i, end);
    }
  }
}

int make_num(int A[20],int n, int m) 
{
  int i, j, ans;
  for(i = 0; i < n; i++){
  }
  
}
int main()
{
  int n, A[20], m[200], q, 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++){
    ans = make_num(A[20], n, m[i]);
    if(ans == 1){
      printf("yes\n");
    }else if (ans == 0){
      printf("no\n");
    }
  }
}

Compiler output:
main.c: In function 'main':
main.c:35:5: error: 'ans' undeclared (first use in this function)
   35 |     ans = make_num(A[20], n, m[i]);
      |     ^~~
main.c:35:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:35:21: error: passing argument 1 of 'make_num' makes pointer from integer without a cast [-Wint-conversion]
   35 |     ans = make_num(A[20], n, m[i]);
      |                    ~^~~~
      |                     |
      |                     int
main.c:13:18: note: expected 'int *' but argument is of type 'int'
   13 | int make_num(int A[20],int n, int m)
      |              ~~~~^~~~~
Language: C

#include<stdio.h>

int n, a[2000];

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

  return res;
}

int main(){
  int 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 (make(0, m)==1) {
      printf("yes\n");
    else {
      printf("no\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:8: error: 'i' undeclared (first use in this function)
   20 |   for (i=0; i<n; i++)
      |        ^
main.c:20:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:28:5: error: expected '}' before 'else'
   28 |     else {
      |     ^~~~
Language: C

#include<stdio.h>
    
   int S[1000000],N,x;
int solve(int I,int m){
if(m==0){
return 1;
}
if(i>=N){
return 0;
}
 x =solve(i+1,m)||solve(i+1,m-S[i]);
return x;
}


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

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

Compiler output:
main.c: In function 'solve':
main.c:8:4: error: 'i' undeclared (first use in this function)
    8 | if(i>=N){
      |    ^
main.c:8:4: note: each undeclared identifier is reported only once for each function it appears in
main.c: In function 'main':
main.c:28:14: error: 'k' undeclared (first use in this function)
   28 | scanf("%d", &k);
      |              ^
main.c:31:8: error: expected expression before '?' token
   31 | printf(???yes\n???);
      |        ^
main.c:31:14: error: stray '\' in program
   31 | printf(???yes\n???);
      |              ^
main.c:31:11: error: 'yes' undeclared (first use in this function)
   31 | printf(???yes\n???);
      |           ^~~
main.c:31:17: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   31 | printf(???yes\n???);
main.c:32:1: error: expected '}' before 'else'
   32 | else printf(???no\n???);
      | ^~~~
main.c:32:13: error: expected expression before '?' token
   32 | else printf(???no\n???);
      |             ^
main.c:32:18: error: stray '\' in program
   32 | else printf(???no\n???);
      |                  ^
main.c:32:16: error: 'no' undeclared (first use in this function)
   32 | else printf(???no\n???);
      |                ^~
main.c:32:21: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   32 | else printf(???no\n???);
Language: C

#include<stdio.h>
    
   int S[1000000],N,x;
int solve(int i,int m){
if(m==0){
return 1;
}
if(i>=N){
return 0;
}
 x =solve(i+1,m)||solve(i+1,m-S[i]);
return x;
}


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

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

Compiler output:
main.c: In function 'main':
main.c:28:14: error: 'k' undeclared (first use in this function)
   28 | scanf("%d", &k);
      |              ^
main.c:28:14: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:8: error: expected expression before '?' token
   31 | printf(???yes\n???);
      |        ^
main.c:31:14: error: stray '\' in program
   31 | printf(???yes\n???);
      |              ^
main.c:31:11: error: 'yes' undeclared (first use in this function)
   31 | printf(???yes\n???);
      |           ^~~
main.c:31:17: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   31 | printf(???yes\n???);
main.c:32:1: error: expected '}' before 'else'
   32 | else printf(???no\n???);
      | ^~~~
main.c:32:13: error: expected expression before '?' token
   32 | else printf(???no\n???);
      |             ^
main.c:32:18: error: stray '\' in program
   32 | else printf(???no\n???);
      |                  ^
main.c:32:16: error: 'no' undeclared (first use in this function)
   32 | else printf(???no\n???);
      |                ^~
main.c:32:21: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   32 | else printf(???no\n???);
Language: C

#include<stdio.h>
    
   int S[1000000],N,x;
int solve(int i,int m){
if(m==0){
return 1;
}
if(i>=N){
return 0;
}
 x =solve(i+1,m)||solve(i+1,m-S[i]);
return x;
}


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

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

Compiler output:
main.c: In function 'main':
main.c:31:8: error: expected expression before '?' token
   31 | printf(???yes\n???);
      |        ^
main.c:31:14: error: stray '\' in program
   31 | printf(???yes\n???);
      |              ^
main.c:31:11: error: 'yes' undeclared (first use in this function)
   31 | printf(???yes\n???);
      |           ^~~
main.c:31:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:31:17: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   31 | printf(???yes\n???);
main.c:32:1: error: expected '}' before 'else'
   32 | else printf(???no\n???);
      | ^~~~
main.c:32:13: error: expected expression before '?' token
   32 | else printf(???no\n???);
      |             ^
main.c:32:18: error: stray '\' in program
   32 | else printf(???no\n???);
      |                  ^
main.c:32:16: error: 'no' undeclared (first use in this function)
   32 | else printf(???no\n???);
      |                ^~
main.c:32:21: warning: trigraph ??) ignored, use -trigraphs to enable [-Wtrigraphs]
   32 | else printf(???no\n???);
Language: C

#include<stdio.h>
    
   int S[1000000],N,x;
int solve(int i,int m){
if(m==0){
return 1;
}
if(i>=N){
return 0;
}
 x =solve(i+1,m)||solve(i+1,m-S[i]);
return x;
}


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

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

Compiler output:
main.c: In function 'main':
main.c:32:1: error: expected '}' before 'else'
   32 | else printf("no\n");
      | ^~~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:3:1: error: expected expression before '?' token
    3 | ????int n, q, temp, i, j;
      | ^
main.c:4:1: error: expected expression before '?' token
    4 | ????int a[2001] = {1};
      | ^
main.c:5:1: error: expected expression before '?' token
    5 | ????scanf("%d", &n);
      | ^
main.c:5:18: error: 'n' undeclared (first use in this function)
    5 | ????scanf("%d", &n);
      |                  ^
main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:1: error: expected expression before '?' token
    6 | ????for(i = 0; i < n; i++){
      | ^
main.c:14:1: error: expected expression before '?' token
   14 | ????for(i=0; i<q; i++){
      | ^
main.c: At top level:
main.c:21:1: error: expected identifier or '(' before '?' token
   21 | ????????????????
      | ^
Language: C

#include <cstdio>
#include <iostream>
??
using namespace std;
??
int memo[2000];
??
void makeMemo(int v, int i, int n, int A[]) {
??
????????memo[v] = 1;
??
????????if (i == n)
????????????????return;
??
????????makeMemo(v, i + 1, n, A);
????????makeMemo(v + A[i], i + 1, n, A);
}
int main() {
??
????????int n;
????????scanf("%d", &n);
????????int A[n];
????????for (int i = 0; i < n; ++i) {
????????????????scanf("%d", &A[i]);
????????}
??
????????int q;
????????scanf("%d", &q);
????????int m[q];
????????for (int i = 0; i < q; ++i) {
????????????????scanf("%d", &m[i]);
????????}
??
????????for (int i = 0; i < 2000; ++i)
????????????????memo[i] = 0;
??
????????makeMemo(0, 0, n, A);
??
????????for (int i = 0; i < q; ++i) {
????????????????if (memo[m[i]] == 1) {
????????????????????????cout << "yes" << endl;
????????????????} else {
????????????????????????cout << "no" << endl;
????????????????}
????????}
????????return 0;
}

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

#include<stdio.h>

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

int main(){
    int i, n, q, m;
    int A[500000];

    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(A,i,m)){
            putchar('yes');
        }else{
            putchar('no');
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:8:8: error: 'n' undeclared (first use in this function)
    8 |     if(n<=i){
      |        ^
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:18: error: passing argument 1 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |                 ~^~
      |                  |
      |                  int
main.c:3:15: note: expected 'int *' but argument is of type 'int'
    3 | int solve(int A[], int i, int m){
      |           ~~~~^~~
main.c:11:11: error: too few arguments to function 'solve'
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |           ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int A[], int i, int m){
      |     ^~~~~
main.c:11:34: error: passing argument 1 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |                                 ~^~
      |                                  |
      |                                  int
main.c:3:15: note: expected 'int *' but argument is of type 'int'
    3 | int solve(int A[], int i, int m){
      |           ~~~~^~~
main.c:11:27: error: too few arguments to function 'solve'
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |                           ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int A[], int i, int m){
      |     ^~~~~
main.c: In function 'main':
main.c:28:21: warning: multi-character character constant [-Wmultichar]
   28 |             putchar('yes');
      |                     ^~~~~
main.c:30:21: warning: multi-character character constant [-Wmultichar]
   30 |             putchar('no');
      |                     ^~~~
Language: C

#include<stdio.h>

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

int main(){
    int i, n, q, m;
    int A[500000];

    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(A,i,m,n)){
            putchar('yes');
        }else{
            putchar('no');
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:11:18: error: passing argument 1 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |                 ~^~
      |                  |
      |                  int
main.c:3:15: note: expected 'int *' but argument is of type 'int'
    3 | int solve(int A[], int i, int m, int n){
      |           ~~~~^~~
main.c:11:11: error: too few arguments to function 'solve'
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |           ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int A[], int i, int m, int n){
      |     ^~~~~
main.c:11:34: error: passing argument 1 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |                                 ~^~
      |                                  |
      |                                  int
main.c:3:15: note: expected 'int *' but argument is of type 'int'
    3 | int solve(int A[], int i, int m, int n){
      |           ~~~~^~~
main.c:11:27: error: too few arguments to function 'solve'
   11 |     res = solve(i+1,m) || solve(i+1,m-A[i]);
      |                           ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int A[], int i, int m, int n){
      |     ^~~~~
main.c: In function 'main':
main.c:28:21: warning: multi-character character constant [-Wmultichar]
   28 |             putchar('yes');
      |                     ^~~~~
main.c:30:21: warning: multi-character character constant [-Wmultichar]
   30 |             putchar('no');
      |                     ^~~~
Language: C

#include<stdio.h>

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

int main(){
    int i, n, q, m;
    int A[500000];

    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(A,i,m,n)){
            putchar('yes');
        }else{
            putchar('no');
        }
    }
    return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:11:18: error: passing argument 1 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   11 |     res = solve(i+1,m,n) || solve(i+1,m-A[i],n);
      |                 ~^~
      |                  |
      |                  int
main.c:3:15: note: expected 'int *' but argument is of type 'int'
    3 | int solve(int A[], int i, int m, int n){
      |           ~~~~^~~
main.c:11:11: error: too few arguments to function 'solve'
   11 |     res = solve(i+1,m,n) || solve(i+1,m-A[i],n);
      |           ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int A[], int i, int m, int n){
      |     ^~~~~
main.c:11:36: error: passing argument 1 of 'solve' makes pointer from integer without a cast [-Wint-conversion]
   11 |     res = solve(i+1,m,n) || solve(i+1,m-A[i],n);
      |                                   ~^~
      |                                    |
      |                                    int
main.c:3:15: note: expected 'int *' but argument is of type 'int'
    3 | int solve(int A[], int i, int m, int n){
      |           ~~~~^~~
main.c:11:29: error: too few arguments to function 'solve'
   11 |     res = solve(i+1,m,n) || solve(i+1,m-A[i],n);
      |                             ^~~~~
main.c:3:5: note: declared here
    3 | int solve(int A[], int i, int m, int n){
      |     ^~~~~
main.c: In function 'main':
main.c:28:21: warning: multi-character character constant [-Wmultichar]
   28 |             putchar('yes');
      |                     ^~~~~
main.c:30:21: warning: multi-character character constant [-Wmultichar]
   30 |             putchar('no');
      |                     ^~~~
Language: C

#include<stdio.h>

int n, A[20];


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:27:2: error: expected identifier or '(' before 'return'
   27 |  return 0;
      |  ^~~~~~
main.c:28:1: error: expected identifier or '(' before '}' token
   28 | }
      | ^
Language: C

#include<stdio.h>
#include<stdlib.h>
int exsearch(int*, int, int);
main()
{
????????????????int i, n, q, m, *a;
????????????????scanf("%d", &n);
????????????????a = (int*)malloc(sizeof(int) * n);
????????????????for(i = 0; i < n; i++){
????????????????scanf("%d%*c", &a[i]);
????????????????}
????????????????scanf("%d", &q);
????????????????for(i = 0; i < q; i++){
????????????????????????????????scanf("%d%*c", &m);
????????????????????????????????if(exsearch(a, m, n)){
????????????????????????????????????????????????printf("yes\n");
????????????????????????????????}else{
????????????????????????????????????????????????printf("no\n");
????????????????????????????????}
????????????????}
????????????????free(a);
}
int exsearch(int *a, int m, int n)
{
????????????????int result = 0;
????????????????if(!m){
????????????????????????????????result = 1;
????????????????return result;
????????????????}else if(!n || m < 0 ){
????????????????????????????????result = 0;
????????????????????????????????return result;
????????????????}else{
????????????????????????????????result += exsearch(a, m - a[n - 1], n - 1);
????????????????????????????????result += exsearch(a, m, n - 1);
????????????????}
????????????????return result;
}

Compiler output:
main.c:4:1: error: return type defaults to 'int' [-Wimplicit-int]
    4 | main()
      | ^~~~
main.c: In function 'main':
main.c:6:1: error: expected expression before '?' token
    6 | ????????????????int i, n, q, m, *a;
      | ^
main.c:7:1: error: expected expression before '?' token
    7 | ????????????????scanf("%d", &n);
      | ^
main.c:7:30: error: 'n' undeclared (first use in this function)
    7 | ????????????????scanf("%d", &n);
      |                              ^
main.c:7:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:1: error: expected expression before '?' token
    8 | ????????????????a = (int*)malloc(sizeof(int) * n);
      | ^
main.c:8:17: error: 'a' undeclared (first use in this function)
    8 | ????????????????a = (int*)malloc(sizeof(int) * n);
      |                 ^
main.c:8:50: error: expected ':' before ';' token
    8 | ????????????????a = (int*)malloc(sizeof(int) * n);
      |                                                  ^
      |                                                  :
main.c:9:1: error: expected expression before '?' token
    9 | ????????????????for(i = 0; i < n; i++){
      | ^
main.c:13:1: error: expected expression before '?' token
   13 | ????????????????for(i = 0; i < q; i++){
      | ^
main.c: In function 'exsearch':
main.c:25:1: error: expected expression before '?' token
   25 | ????????????????int result = 0;
      | ^
main.c:26:1: error: expected expression before '?' token
   26 | ????????????????if(!m){
      | ^
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:17:24: error: expected ';' before ')' token
   17 |         for(i=0,i<n;i++) scanf("%d",&A[i]);
      |                        ^
      |                        ;
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:21:24: error: expected ';' before ')' token
   21 |         for(i=0,i<n;i++){
      |                        ^
      |                        ;