criyle/codenet-compile-errors huggingface dataset:
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:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
Language: C

#include<stdio.h>

int n,A[50];

int solve(int i,int m){
	if(m==0)
		return 0;
	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]);
	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:9: 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>

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]);
	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:9: 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>

int main() {
	int addNumber[20];
	int ansNumber[200];
	int needAddN, needAnsN;
	int YorN;
	int i, j;

	scanf_s("%d", &needAddN);
	for (i = 0; i < needAddN; i++) {
		scanf_s("%d", &addNumber[i]);
	}
	scanf_s("%d", &needAnsN);
	for (i = 0; i < needAnsN; i++) {
		scanf_s("%d", &ansNumber[i]);
	}

	for (i = 0; i < needAnsN; i++) {
		int addBox;
		int down; //??°????????°????????????????????????
		down = 0;
		for (j = needAddN - 1; j >= 0; j--) {
			down++;
			addBox = addNumber[j];
			if (addBox == ansNumber[i]) {
				YorN = 1;
				break;
			}
			YorN = calc(ansNumber[i], addNumber, needAddN - down, addBox);
			if (YorN == 1) {
				break;
			}
		}
		if (YorN == 1) {
			printf_s("yes\n");
		}
		else {
			printf_s("no\n");
		}
	}

	return 0;
}

int calc (int answer, int* addNumber, int count, int addBox) {
	int trueA;
	if (addBox > answer || count < 0) {
		return -1;
	}

	do {
		count--;
		if (count < 0) {
			return -1;
		}
		addBox += addNumber[count];
		if (addBox == answer) {
			trueA = 1;
		}
		else {
			trueA = calc(answer, addNumber, count, addBox);
			addBox -= addNumber[count];
		}
	} while (trueA == -1);

	return 1;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   10 |         scanf_s("%d", &needAddN);
      |         ^~~~~~~
      |         scanf
main.c:30:32: error: implicit declaration of function 'calc' [-Wimplicit-function-declaration]
   30 |                         YorN = calc(ansNumber[i], addNumber, needAddN - down, addBox);
      |                                ^~~~
main.c:36:25: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
   36 |                         printf_s("yes\n");
      |                         ^~~~~~~~
      |                         printf
Language: C

#include <stdio.h>

int main() {
	int addNumber[20];
	int ansNumber[200];
	int needAddN, needAnsN;
	int YorN;
	int i, j;

	scanf("%d", &needAddN);
	for (i = 0; i < needAddN; i++) {
		scanf("%d", &addNumber[i]);
	}
	scanf("%d", &needAnsN);
	for (i = 0; i < needAnsN; i++) {
		scanf("%d", &ansNumber[i]);
	}

	for (i = 0; i < needAnsN; i++) {
		int addBox;
		int down; //??°????????°????????????????????????
		down = -1;
		for (j = needAddN - 1; j >= 0; j--) {
			down++;
			addBox = 0;// addNumber[j];
/*			if (addBox == ansNumber[i]) {
				YorN = 1;
				break;
				}
*/
			YorN = calc(ansNumber[i], addNumber, needAddN - down, addBox);
			if (YorN == 1) {
				break;
			}
		}
		if (YorN == 1) {
			printf_s("yes\n");
		}
		else {
			printf_s("no\n");
		}
	}

	return 0;
}

int calc (int answer, int* addNumber, int count, int addBox) {
	int trueA;
	if (addBox > answer || count < 0) {
		return -1;
	}

	do {
		count--;
		if (count < 0) {
			return -1;
		}
		addBox += addNumber[count];
		if (addBox == answer) {
			trueA = 1;
		}
		else {
			trueA = calc(answer, addNumber, count, addBox);
			addBox -= addNumber[count];
		}
	} while (trueA == -1);

	return 1;
}

Compiler output:
main.c: In function 'main':
main.c:31:32: error: implicit declaration of function 'calc' [-Wimplicit-function-declaration]
   31 |                         YorN = calc(ansNumber[i], addNumber, needAddN - down, addBox);
      |                                ^~~~
main.c:37:25: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
   37 |                         printf_s("yes\n");
      |                         ^~~~~~~~
      |                         printf
Language: C

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

int main() {
	int n, q, A[N] = { 0 }, M[N] = { 0 }, i;
	bool flg = 0;
	char str[2][4] = { "no","yes" };
	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++) printf("%s\n", str[solve(0, M[i], n, A)]);
	return 0;
}

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

Compiler output:
main.c: In function 'main':
main.c:9:9: error: unknown type name 'bool'
    9 |         bool flg = 0;
      |         ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    4 | #define N 2000
main.c: In function 'solve':
main.c:20:9: error: unknown type name 'bool'
   20 |         bool res;
      |         ^~~~
main.c:20:9: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:21:28: error: 'true' undeclared (first use in this function)
   21 |         if (m == 0) return true;
      |                            ^~~~
main.c:21:28: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:21:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:28: error: 'false' undeclared (first use in this function)
   22 |         if (i >= n) return false;
      |                            ^~~~~
main.c:22:28: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

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

int main() {
	int n, q, A[N] = { 0 }, M[N] = { 0 }, i;
	bool flg = 0;
	char str[2][4] = { "no","yes" };
	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++) printf("%s\n", str[solve(0, M[i], n, A)]);
	return 0;
}

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

Compiler output:
main.c: In function 'main':
main.c:9:9: error: unknown type name 'bool'
    9 |         bool flg = 0;
      |         ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    4 | #define N 2000
main.c: In function 'solve':
main.c:21:28: error: 'true' undeclared (first use in this function)
   21 |         if (m == 0) return true;
      |                            ^~~~
main.c:21:28: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:21:28: note: each undeclared identifier is reported only once for each function it appears in
main.c:22:28: error: 'false' undeclared (first use in this function)
   22 |         if (i >= n) return false;
      |                            ^~~~~
main.c:22:28: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
Language: C

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

int main() {
	int n, q, A[N] = { 0 }, M[N] = { 0 }, i;
	bool flg = 0;
	char str[2][4] = { "no","yes" };
	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++) printf("%s\n", str[solve(0, M[i], n, A)]);
	return 0;
}

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

Compiler output:
main.c: In function 'main':
main.c:9:9: error: unknown type name 'bool'
    9 |         bool flg = 0;
      |         ^~~~
main.c:4:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    3 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    4 | #define N 2000
Language: C

#include <stdio.h>
int main () {

   int a[20], m[200], s[400];
   int n, q, i, j;

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

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

   for (i = 0; i < n-1; i++) {
     for (j = i+1; j < n; j++) {
       s[] = a[i] + a[j];
     }
   }

   for (i = 0; i < q; i++) {
     for (j = 0; j < 400; j++) {
       if (m[i] == s[j])
         printf("yes"\n);
       else
         printf("no"\n);
     }
   }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:19:10: error: expected expression before ']' token
   19 |        s[] = a[i] + a[j];
      |          ^
main.c:26:22: error: stray '\' in program
   26 |          printf("yes"\n);
      |                      ^
main.c:26:22: error: expected ')' before 'n'
   26 |          printf("yes"\n);
      |                ~     ^~
      |                      )
main.c:28:21: error: stray '\' in program
   28 |          printf("no"\n);
      |                     ^
main.c:28:21: error: expected ')' before 'n'
   28 |          printf("no"\n);
      |                ~    ^~
      |                     )
Language: C

#include <stdio.h>

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

   if ( m == 0 ){
      return 1; 
   }
   if ( i >= n ) {
      return 0;
   } else {
      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", &M);
      if ( solve(0, M) ) {
         printf("yes\n");
      } else {
         printf("no\n");
      }

   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:17: error: 'n' undeclared (first use in this function)
   20 |    scanf("%d", &n);
      |                 ^
main.c:20:17: note: each undeclared identifier is reported only once for each function it appears in
main.c:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include <stdio.h>

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

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

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

   scanf("%d", &n);
   for ( i <= 0; i < n; 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:30:1: error: expected declaration or statement at end of input
   30 | }
      | ^
Language: C

#include <stdio.h>

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

   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, 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:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C

#include <stdio.h>

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

   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, 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:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C

//?????????????????£????????§????????¨??????????§??????????????????????

#include <stdio.h>

int n,A[50];

int solve(int i, int m;){
  if ( m == 0 ){
    return 1;
  }
  if ( m == 0 ){
    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:8:8: error: 'm' undeclared (first use in this function)
    8 |   if ( m == 0 ){
      |        ^
main.c:8:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:19: error: 'i' undeclared (first use in this function)
   14 |   int res = solve(i + 1, m) || solve(i + 1, m - A[i]);
      |                   ^
main.c: In function 'main':
main.c:25:18: error: expected ';' before '{' token
   25 |   scanf("%d", &q){
      |                  ^
      |                  ;
main.c:35:1: error: expected declaration or statement at end of input
   35 | }
      | ^
Language: C

#include <stdio.h>

int n,A[50];

int solve(int i, int m;){
  if ( m == 0 ){
    return 1;
  }
  if ( m == 0 ){
    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:6:8: error: 'm' undeclared (first use in this function)
    6 |   if ( m == 0 ){
      |        ^
main.c:6:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:19: error: 'i' undeclared (first use in this function)
   12 |   int res = solve(i + 1, m) || solve(i + 1, m - A[i]);
      |                   ^
main.c: In function 'main':
main.c:23:18: error: expected ';' before '{' token
   23 |   scanf("%d", &q){
      |                  ^
      |                  ;
main.c:33:1: error: expected declaration or statement at end of input
   33 | }
      | ^
Language: C

#include<stdio.h>

int main()
{
    int n, q, ncount, qcount;
    int a[20], m[200];


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

    scanf("%d", &q);
    for (qcount = 0; qcount < n; qcount++)
      scanf("%d", &m[qcount]);

Compiler output:
main.c: In function 'main':
main.c:15:7: error: expected declaration or statement at end of input
   15 |       scanf("%d", &m[qcount]);
      |       ^~~~~
Language: C

#include<stdio.h>

int main()
{
    int n, q, ncount, qcount;
    int a[20], m[200];


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

    scanf("%d", &q);
    for (qcount = 0; qcount < n; qcount++)
      scanf("%d", &m[qcount]);

    retuen 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:5: error: 'retuen' undeclared (first use in this function)
   17 |     retuen 0;
      |     ^~~~~~
main.c:17:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:11: error: expected ';' before numeric constant
   17 |     retuen 0;
      |           ^~
      |           ;
Language: C

#include<stdio.h>

int n, A[50];

int solveint i, int m){
   if(m==0)return1;

   if(i>=n)return0;

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

int main()[
   int q, k, 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", &k);
      if(solve(0, k))
        printf("yes \n");
      else printf("no \n");
   }

  return 0;
}

Compiler output:
main.c:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'i'
    5 | int solveint i, int m){
      |              ^
main.c:15:4: error: expected expression before 'int'
   15 |    int q, k, i;
      |    ^~~
Language: C

#include<stdio.h>

int n, A[50];

int solve(int i, int m){
   if(m==0)return1;

   if(i>=n)return0;

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

int main()[
   int q, k, 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", &k);
      if(solve(0, k))
        printf("yes \n");
      else printf("no \n");
   }

  return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:6:12: error: 'return1' undeclared (first use in this function)
    6 |    if(m==0)return1;
      |            ^~~~~~~
main.c:6:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:12: error: 'return0' undeclared (first use in this function)
    8 |    if(i>=n)return0;
      |            ^~~~~~~
main.c: At top level:
main.c:15:4: error: expected expression before 'int'
   15 |    int q, k, i;
      |    ^~~
Language: C

#include<stdio.h>
??
int n, A[50];
??
int solve (int i, int m){
??????if(m==0) return1;
??
??????if(i>=n) return0;
??
??????int R = solve(i+1, m) || solve(i+1,m-A[i]);
??????return R;
}
??
int main(){
??????int q, k, 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", &k);
????????????if(solve(0, k))
????????????????printf("yes\n");
????????????else printf("no\n");
??????}
??
????return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c:13:1: error: expected identifier or '(' before '?' token
   13 | ??
      | ^
Language: C

#include<stdio.h>
??
int n, A[50];
??
int solve (int i, int m){
??????if(m==0) return1;
??
??????if(i>=n) return0;
??
??????int R = solve(i+1, m) || solve(i+1,m-A[i]);
??????return R;
}
??
int main(){
??????int q, k, 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", &k);
????????????if(solve(0, k))
????????????????printf("yes\n");
????????????else
        printf("no\n");
??????}
??
????return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c:13:1: error: expected identifier or '(' before '?' token
   13 | ??
      | ^
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 R = solve(i+1, m) || solve(i+1,m-A[i]);
??????return R;
}
??
int main()[
??????int q, k, 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", &k);
????????????if(solve(0, k))
????????????????printf("yes \n");
????????????else printf("no \n");
??????}
??
????return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c:13:1: error: expected identifier or '(' before '?' token
   13 | ??
      | ^
main.c:16:1: error: expected identifier or '(' before '?' token
   16 | ??
      | ^
main.c:18:1: error: expected identifier or '(' before '?' token
   18 | ??
      | ^
main.c:19:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   19 | ??????for(i=0;i<n;i++)
      |                ^
main.c:19:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   19 | ??????for(i=0;i<n;i++)
      |                    ^~
main.c:21:1: error: expected identifier or '(' before '?' token
   21 | ??
      | ^
main.c:23:1: error: expected identifier or '(' before '?' token
   23 | ??
      | ^
main.c:24:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   24 | ??????for(i=0;i<q;i++){
      |                ^
main.c:24:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   24 | ??????for(i=0;i<q;i++){
      |                    ^~
main.c:30:1: error: expected identifier or '(' before '?' token
   30 | ??
      | ^
main.c:32:1: error: expected identifier or '(' before '}' token
   32 | }
      | ^
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 R = solve(i+1, m) || solve(i+1,m-A[i]);
return R;
}
int main()[
int q, k, 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", &k);
if(solve(0, k))
printf("yes \n");
else printf("no \n");
}
return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c:12:1: error: expected expression before 'int'
   12 | int q, k, 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 R = solve(i+1, m) || solve(i+1,m-A[i]);
return R;
}
int main()[
int q, k, 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", &k);
if(solve(0, k))
printf("yes \n");
else printf("no \n");
}
return 0;
}

Compiler output:
main.c:10:1: error: expected expression before 'int'
   10 | int q, k, i;
      | ^~~
Language: C

#include <stdio.h>
 
#define n 2000
#define m 200
 
int solve(int,int);
 
int A[n], n;
 
int main(){
 
  int q, i, mi[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",&mi[i]);
  }
 

Compiler output:
main.c:3:11: error: expected identifier or '(' before numeric constant
    3 | #define n 2000
      |           ^~~~
main.c:8:11: note: in expansion of macro 'n'
    8 | int A[n], n;
      |           ^
main.c: In function 'main':
main.c:14:14: error: lvalue required as unary '&' operand
   14 |   scanf("%d",&n);
      |              ^
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()
{
  int n, q;
  int a[2000], m[2000];

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

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

  return 0;
}

Compiler output:
main.c: In function 'solve':
main.c:9:12: error: 'n' undeclared (first use in this function)
    9 |   if (i >= n) {
      |            ^
main.c:9:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:51: error: 'a' undeclared (first use in this function)
   12 |   int res = solve (i + 1, m) || solve (i + 1, m - a[i]);
      |                                                   ^
main.c: In function 'main':
main.c:22:8: error: 'i' undeclared (first use in this function)
   22 |   for (i = 0; i < n; i++) {
      |        ^
main.c:29:8: error: 'j' undeclared (first use in this function)
   29 |   for (j = 0; j < q; j++) {
      |        ^
main.c:34:23: error: expected ')' before '{' token
   34 |     if(solve (0, m[j]) {
      |       ~               ^~
      |                       )
main.c:39:3: error: expected expression before '}' token
   39 |   }
      |   ^
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:4: error: expected declaration specifiers before 'scanf'
   17 |    scanf("%d", &n);
      |    ^~~~~
main.c:18:4: error: expected declaration specifiers before 'for'
   18 |    for (i = 0; i < n; i++) scanf("%d", A[i]);
      |    ^~~
main.c:18:16: error: expected declaration specifiers before 'i'
   18 |    for (i = 0; i < n; i++) scanf("%d", A[i]);
      |                ^
main.c:18:23: error: expected declaration specifiers before 'i'
   18 |    for (i = 0; i < n; i++) scanf("%d", A[i]);
      |                       ^
main.c:19:4: error: expected declaration specifiers before 'scanf'
   19 |    scanf("%d", &q);
      |    ^~~~~
main.c:20:4: error: expected declaration specifiers before 'for'
   20 |    for (i = 0; i < q; i++) {
      |    ^~~
main.c:20:16: error: expected declaration specifiers before 'i'
   20 |    for (i = 0; i < q; i++) {
      |                ^
main.c:20:23: error: expected declaration specifiers before 'i'
   20 |    for (i = 0; i < q; i++) {
      |                       ^
main.c:27:3: error: expected declaration specifiers before 'return'
   27 |   return 0;
      |   ^~~~~~
main.c:28:1: error: expected declaration specifiers before '}' token
   28 | }
      | ^
main.c:14:14: error: declaration for parameter 'i' but no such parameter
   14 |    int q, M, i;
      |              ^
main.c:14:11: error: declaration for parameter 'M' but no such parameter
   14 |    int q, M, i;
      |           ^
main.c:14:8: error: declaration for parameter 'q' but no such parameter
   14 |    int q, M, i;
      |        ^
main.c:29: error: expected '{' at end of input
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:21: error: expected ';' before 'if'
   21 |      scanf("%d", &M)
      |                     ^
      |                     ;
   22 |      if (solve(0, M)) printf("yes\n");
      |      ~~              
main.c:23:6: error: 'else' without a previous 'if'
   23 |      else printf("no\n");
      |      ^~~~
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:21: error: expected ';' before 'if'
   21 |      scanf("%d", &M)
      |                     ^
      |                     ;
   22 |      if (solve(0, M)) printf("yes\n");
      |      ~~              
main.c:23:6: error: 'else' without a previous 'if'
   23 |      else printf("no\n");
      |      ^~~~
Language: C

#include<stdio.h>

int n, A[100];

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

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

   return x;
}

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

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

   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:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
Language: C

#include<stdio.h>

int n, A[50];

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

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

   return x;
}

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

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

   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:32:1: error: expected declaration or statement at end of input
   32 | }
      | ^
Language: C

#include<stdio.h>

int n, A[50];

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

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

   return x;
}

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:31:1: error: expected declaration or statement at end of input
   31 | }
      | ^
Language: C

#include <stdio.h>

int n, A[50];

int ExSearch(int m, int i) {
  for ( i = 0; i < n; i++ ) {
    if ( m == 0 ) return 1;
    if ( i >= n ) return 0;
    int res = ExSearch(m, i + 1) || ExSearch(m - A[i], i + 1);
    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 (ExSearch(m, i) ); printf ("yes\n");
    else printf ("no\n");

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:5: error: 'else' without a previous 'if'
   24 |     else printf ("no\n");
      |     ^~~~
main.c:27:1: error: expected declaration or statement at end of input
   27 | }
      | ^
main.c: In function 'ExSearch':
main.c:27:1: error: expected declaration or statement at end of input
Language: C

#include <stdio.h>

int n, A[50];

int ExSearch(int m, int i) {
  for ( i = 0; i < n; i++ ) {
    if ( m == 0 ) return 1;
    if ( i >= n ) return 0;
    int res = ExSearch(m, i + 1) || ExSearch(m - A[i], i + 1);
    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 (ExSearch(m, i) ); printf ("yes\n");
    else printf ("no\n");
  }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:24:5: error: 'else' without a previous 'if'
   24 |     else printf ("no\n");
      |     ^~~~
main.c: In function 'ExSearch':
main.c:28:1: error: expected declaration or statement at end of input
   28 | }
      | ^
Language: C

#include <stdio.h>

int n, A[50];

int ExSearch(int m, int i) {
  for ( i = 0; i < n; i++ ) {
    if ( m == 0 ) return 1;
    if ( i >= n ) return 0;
    int res = ExSearch(m, i + 1) || ExSearch(m - A[i], i + 1);
    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 (ExSearch(m, i) ) printf ("yes\n");
    else printf ("no\n");
  }

  return 0;
}

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

#include <stdio.h>

int main () {
	
	int n, a[20],m[200], i, j, q;
	int count = 0 ;

	
	scanf ("%d",&n) ;
	for ( i = 0 ; i < n ; i ++ ) {
		scanf("%d", &s[i] ) ;
	}
	scanf ("%d",&q) ;
	for ( i = 0 ; i < q ; i ++ ) {
		scanf("%d", &t[i] ) ;
	}
	
	
	for ( j = 0 ; j < q ; j++) {
		ans = func(j , m[i]) ; 
		if ( ans == 1 ) {
			printf("yes\n");
		}
		else { 
			printf("nod\n");
		}
	}
	
return 0;
}


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

 

Compiler output:
main.c: In function 'main':
main.c:11:30: error: 's' undeclared (first use in this function)
   11 |                 scanf("%d", &s[i] ) ;
      |                              ^
main.c:11:30: note: each undeclared identifier is reported only once for each function it appears in
main.c:15:30: error: 't' undeclared (first use in this function)
   15 |                 scanf("%d", &t[i] ) ;
      |                              ^
main.c:20:17: error: 'ans' undeclared (first use in this function)
   20 |                 ans = func(j , m[i]) ;
      |                 ^~~
main.c:20:23: error: implicit declaration of function 'func' [-Wimplicit-function-declaration]
   20 |                 ans = func(j , m[i]) ;
      |                       ^~~~
main.c: In function 'func':
main.c:38:19: error: 'n' undeclared (first use in this function)
   38 |         if ( j >= n ) {
      |                   ^
main.c:42:54: error: 'a' undeclared (first use in this function)
   42 |         if ( func( j + 1 , m ) == 1 || func(j + 1, m-a[j]) == 1 ) {
      |                                                      ^
Language: C

#include <stdio.h>

int solve( int ,int ) ;
int m, a[20], ans = 0 ;
int main () {
	
	int m[200], i, j, q, n;
	int count = 0 ;

	
	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 ( j = 0 ; j < q ; j++) {
		ans = 0 ;
		solve ( 0 , m[j] );
		if ( ans == 1 ) {
			printf("yes\n");
		}
		else { 
			printf("nod\n");
		}
	}
	
return 0 ;
}


int solve( int j ,int m ) {
	if (m == 0 ) {
		ans =  1;
		return 1 ; 
	}
	
	if ( j < n ) {
		solve( j + 1 , m) ;
		solve( j + 1 , m - a[j]) ;
	}
}



 

Compiler output:
main.c: In function 'solve':
main.c:42:18: error: 'n' undeclared (first use in this function)
   42 |         if ( j < n ) {
      |                  ^
main.c:42:18: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int a[20]={};

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

int main(){
	int i,n,q;
	int 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:5:1: error: unknown type name 'bool'
    5 | bool solve(int i, int x){
      | ^~~~
main.c:2:1: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include<stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c: In function 'solve':
main.c:6:9: error: unknown type name 'bool'
    6 |         bool res;
      |         ^~~~
main.c:6:9: note: 'bool' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:25: error: 'true' undeclared (first use in this function)
    7 |         if(x==0) return true;
      |                         ^~~~
main.c:7:25: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:7:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:15: error: 'n' undeclared (first use in this function)
    8 |         if(i>=n) return false;
      |               ^
main.c:8:25: error: 'false' undeclared (first use in this function)
    8 |         if(i>=n) return false;
      |                         ^~~~~
main.c:8:25: note: 'false' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
main.c:9:25: error: 'm' undeclared (first use in this function)
    9 |         res = solve(i+1,m) || solve(i+1,m-a[i]);
      |                         ^
Language: C

#include <stdio.h>
#define N 20

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

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

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

#include <stdio.h>
#define N 20

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

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

Compiler output:
main.c: In function 'judge':
main.c:27:48: error: 'i' undeclared (first use in this function)
   27 |   return judge(factor+1,m)||judge(factor+1,m-A[i]);
      |                                                ^
main.c:27:48: 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) ||solvei+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:6:26: error: 'solvei' undeclared (first use in this function); did you mean 'solve'?
    6 |   int res=solve(i+1,m) ||solvei+1,m-A[i]);
      |                          ^~~~~~
      |                          solve
main.c:6:26: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:36: error: expected '=', ',', ';', 'asm' or '__attribute__' before '-' token
    6 |   int res=solve(i+1,m) ||solvei+1,m-A[i]);
      |                                    ^
Language: C

#include<stdio.h>

int n, A[50];

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

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

Compiler output:
main.c: In function 'main':
main.c:12:8: error: implicit declaration of function 'Exhaustive' [-Wimplicit-function-declaration]
   12 |     if(Exhaustive(0,m)) printf("yes\n");
      |        ^~~~~~~~~~
main.c: In function 'Exhaustive':
main.c:21:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Exhaustive'
   21 |   int res Exhaustive(i+1, m) || Exhaustive(i+1, m-A[i]);
      |           ^~~~~~~~~~
main.c:22:12: error: 'res' undeclared (first use in this function)
   22 |     return res;
      |            ^~~
main.c:22:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>

int n, A[50];

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

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

Compiler output:
main.c: In function 'main':
main.c:12:8: error: implicit declaration of function 'Exhaustive' [-Wimplicit-function-declaration]
   12 |     if(Exhaustive(0, m)) printf("yes\n");
      |        ^~~~~~~~~~
main.c: In function 'Exhaustive':
main.c:21:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Exhaustive'
   21 |   int res Exhaustive(i+1, m) || Exhaustive(i+1, m-A[i]);
      |           ^~~~~~~~~~
main.c:22:12: error: 'res' undeclared (first use in this function)
   22 |     return res;
      |            ^~~
main.c:22:12: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>

int n, A[20];

int solve(int, int);



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

  scanf("%d",&n);1 5 7 10 21

  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)
{
  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;
}

Compiler output:
main.c: In function 'main':
main.c:13:19: error: expected ';' before numeric constant
   13 |   scanf("%d",&n);1 5 7 10 21
      |                   ^~
      |                   ;
Language: C

#include <stdio.h>

int n, A[20];

int solve(int, int);

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

  scanf("%d",&n);1 5 7 10 21

  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)
{
  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;
}

Compiler output:
main.c: In function 'main':
main.c:11:19: error: expected ';' before numeric constant
   11 |   scanf("%d",&n);1 5 7 10 21
      |                   ^~
      |                   ;
Language: C

#include<stdio.h>
??
int n,q,a[2001],m;
??
int rec(int i,int sum){
????if(sum==m)return 1;
????if(i>=n)return 0;
????return rec(i+1,sum) || rec(i+1,sum+a[i]);
}
??
int main(void){
??
????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);
????????if(rec(0,0))printf("yes\n");
????????else printf("no\n");
????}
????return 0;
}

Compiler output:
main.c:2:1: error: expected identifier or '(' before '?' token
    2 | ??
      | ^
main.c:4:1: error: expected identifier or '(' before '?' token
    4 | ??
      | ^
main.c:10:1: error: expected identifier or '(' before '?' token
   10 | ??
      | ^
Language: C

#include<stdio.h>
#define NUM 2000

int n,A[NUM];

int solve(int, int);

int main(){
  int q,m[NUM],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[i]);
    if(solve(0,m[i]))
      printf("yes\n");

    else
      printf("no\n");
  }

  return 0;

}

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

  if(m == 0)
    return 1;

  if(i >= n)
    return 0;

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

Compiler output:
main.c: In function 'solve':
main.c:40:44: error: expected ';' before 'return'
   40 |   res = solve(i+1, m) || solve(i+1, m-A[i])
      |                                            ^
      |                                            ;
   41 |     return res;
      |     ~~~~~~
Language: C

#include<stdio.h>
 
int n;
int a[20];
int flg[10000000];
 
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

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

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

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

  return res;
}

int main(){
  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)) printf("yes\n");
    else printf("no\n");
  }

  return 0;
}

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

#include<stdio.h>
 
int n;
int a[20];
int flg[10000];
 
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 |   }
      |   ^