Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            int n,m;
            int[] c = new int[20];
            int[,] dp = new int[50001,20];

            string[] nm = Console.ReadLine().Split(' ');
            n = int.Parse(nm[0]);
            m = int.Parse(nm[1]);

            string[] C = Console.ReadLine().Split(' ');

            for (int a = 0; a < m;a++)
            {
                c[a] = int.Parse(C[a]);
            }

            Array.Sort(c);

            

            for(int a = 0;a<n+1;a++)
            {
                dp[a,20-m] = a;
            }

            for(int a = 0;a<m;a++)
            {
                dp[0,20-m+a] = 0;
            }

            for (int a = 21-m; a < 20;a++ )
            {
                for (int b = 1; b < n+1;b++)
                {
                    if (c[a] > b)
                    {
                        dp[b, a] = dp[b, a-1];
                    }
                    else
                    {
                        dp[b, a] = Math.Min(dp[b, a-1], Math.Min(dp[b-c[a],a],dp[b-1,a])+1);
                    }
                }
            }

            Console.WriteLine(dp[n, 19]);
        }
    }
}

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.Collections.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:26: error: 'string' has not been declared
   11 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:11:35: error: expected ',' or '...' before 'args'
   11 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:59:6: error: expected ';' after class definition
   59 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void ConsoleApplication1::Program::Main(int*)':
a.cc:14:16: error: structured binding declaration cannot have type 'int'
   14 |             int[] c = new int[20];
      |                ^~
a.cc:14:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:14:16: error: empty structured binding declaration
a.cc:14:19: error: expected initializer before 'c'
   14 |             int[] c = new int[20];
      |                   ^
a.cc:15:17: error: expected identifier before ',' token
   15 |             int[,] dp = new int[50001,20];
      |                 ^
a.cc:15:17: error: expected ']' before ',' token
a.cc:15:16: error: structured binding declaration cannot have type 'int'
   15 |             int[,] dp = new int[50001,20];
      |                ^
a.cc:15:16: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:15:16: error: empty structured binding declaration
a.cc:15:20: error: expected initializer before 'dp'
   15 |             int[,] dp = new int[50001,20];
      |                    ^~
a.cc:17:13: error: 'string' was not declared in this scope
   17 |             string[] nm = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:17:20: error: expected primary-expression before ']' token
   17 |             string[] nm = Console.ReadLine().Split(' ');
      |                    ^
a.cc:18:17: error: expected primary-expression before 'int'
   18 |             n = int.Parse(nm[0]);
      |                 ^~~
a.cc:19:17: error: expected primary-expression before 'int'
   19 |             m = int.Parse(nm[1]);
      |                 ^~~
a.cc:21:20: error: expected primary-expression before ']' token
   21 |             string[] C = Console.ReadLine().Split(' ');
      |                    ^
a.cc:25:17: error: 'c' was not declared in this scope
   25 |                 c[a] = int.Parse(C[a]);
      |                 ^
a.cc:25:24: error: expected primary-expression before 'int'
   25 |                 c[a] = int.Parse(C[a]);
      |                        ^~~
a.cc:28:13: error: 'Array' was not declared in this scope
   28 |             Array.Sort(c);
      |             ^~~~~
a.cc:28:24: error: 'c' was not declared in this scope
   28 |             Array.Sort(c);
      |                        ^
a.cc:34:17: error: 'dp' was not declared in this scope
   34 |                 dp[a,20-m] = a;
      |                 ^~
a.cc:39:17: error: 'dp' was not declared in this scope
   39 |                 dp[0,20-m+a] = 0;
      |                 ^~
a.cc:48:25: error: 'dp' was not declared in this scope
   48 |                         dp[b, a] = dp[b, a-1];
      |                         ^~
a.cc:52:25: error: 'dp' was not declared in this scope
   52 |                         dp[b, a] = Math.Min(dp[b, a-1], Math.Min(dp[b-c[a],a],dp[b-1,a])+1);
      |                         ^~
a.cc:52:36: error: 'Math' was not declared in this scope
   52 |                         dp[b, a] = Math.Min(dp[b, a-1], Math.Min(dp[b-c[a],a],dp[b-1,a])+1);
      |                                    ^~~~
a.cc:57:13: error: 'Console' was not declared in this scope
   57 |             Console.WriteLine(dp[n, 19]);
      |             ^~~~~~~
a.cc:57:31: error: 'dp' was not declared in this scope
   57 |             Console.WriteLine(dp[n, 19]);
      |                               ^~