Language: C++

using System;
using System.Linq;
class Program {
	static int n, x;
	static int[] a;
	public static bool solve(int depth, int sum) {
		// depth = ??±???, sum = ???????????§???????¨?
		if(depth == n) return (sum == x);
		if(sum > x) return false;
		bool ret = false;
		if(solve(depth + 1, sum + a[depth]) == true) ret = true; // a[depth] ????????¶??´???
		if(solve(depth + 1, sum) == true) ret = true; // a[depth] ????????°????????´???
		return ret;
	}
	public static void Main() {
		n = int.Parse(Console.ReadLine());
		//int[] b = Console.ReadLine().Split().Select(int.Parse).ToArray();
		//n = b[0]; x = b[1];
		a = Console.ReadLine().Split().Select(int.Parse).ToArray();
		int q = int.Parse(Console.ReadLine());
		int[] b = Console.ReadLine().Split().Select(int.Parse).ToArray();
		for(int i = 0; i < q; i++) {
			x = b[i];
			bool ret = solve(0, 0);
			Console.WriteLine(ret ? "yes" : "no");
		}
	}
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.Linq;
      |       ^~~~~~
a.cc:5:19: error: expected unqualified-id before '[' token
    5 |         static int[] a;
      |                   ^
a.cc:6:15: error: expected ':' before 'static'
    6 |         public static bool solve(int depth, int sum) {
      |               ^~~~~~~
      |               :
a.cc:15:15: error: expected ':' before 'static'
   15 |         public static void Main() {
      |               ^~~~~~~
      |               :
a.cc:28:2: error: expected ';' after class definition
   28 | }
      |  ^
      |  ;
a.cc: In static member function 'static bool Program::solve(int, int)':
a.cc:11:43: error: 'a' was not declared in this scope
   11 |                 if(solve(depth + 1, sum + a[depth]) == true) ret = true; // a[depth] ????????¶??´???
      |                                           ^
a.cc: In static member function 'static void Program::Main()':
a.cc:16:21: error: expected primary-expression before 'int'
   16 |                 n = int.Parse(Console.ReadLine());
      |                     ^~~
a.cc:19:17: error: 'a' was not declared in this scope
   19 |                 a = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                 ^
a.cc:19:21: error: 'Console' was not declared in this scope
   19 |                 a = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                     ^~~~~~~
a.cc:19:55: error: expected primary-expression before 'int'
   19 |                 a = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                                                       ^~~
a.cc:20:25: error: expected primary-expression before 'int'
   20 |                 int q = int.Parse(Console.ReadLine());
      |                         ^~~
a.cc:21:20: error: structured binding declaration cannot have type 'int'
   21 |                 int[] b = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                    ^~
a.cc:21:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:21:20: error: empty structured binding declaration
a.cc:21:23: error: expected initializer before 'b'
   21 |                 int[] b = Console.ReadLine().Split().Select(int.Parse).ToArray();
      |                       ^
a.cc:23:29: error: 'b' was not declared in this scope
   23 |                         x = b[i];
      |                             ^