Language: C++

#incldue <bits/stdc++.h>
using namespace std;

const int N = 20007;

int main() {
    int dp[N];
    memset(dp, -1, sizeof(dp));
    int h, n;
    cin >> h >> n;   
    vector<int> a(n), b(n);
    for(int i=0; i<n; i++)
        cin >> a[i] >> b[i];

    dp[0] = 0;
    for(int i=0; i<n; i++) {
        for(int j = a[i]; j<N; j++) {
            if(dp[j-a[i]] == -1)
                continue;
            if(dp[j] == -1)
                dp[j] = dp[j-a[i]] + b[i];
            else
                dp[j] = min(dp[j], dp[j-a[i]] + b[i]);
        }
    }
    int ans = INT_MAX;
    for(int i=h; i<N; i++) {
        if(dp[i] != -1) {
            ans = min(ans, dp[i]);
        }
    }
    cout << ans << "\n";
    return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incldue; did you mean #include?
    1 | #incldue <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:8:5: error: 'memset' was not declared in this scope
    8 |     memset(dp, -1, sizeof(dp));
      |     ^~~~~~
a.cc:1:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
  +++ |+#include <cstring>
    1 | #incldue <bits/stdc++.h>
a.cc:10:5: error: 'cin' was not declared in this scope
   10 |     cin >> h >> n;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #incldue <bits/stdc++.h>
a.cc:11:5: error: 'vector' was not declared in this scope
   11 |     vector<int> a(n), b(n);
      |     ^~~~~~
a.cc:1:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
  +++ |+#include <vector>
    1 | #incldue <bits/stdc++.h>
a.cc:11:12: error: expected primary-expression before 'int'
   11 |     vector<int> a(n), b(n);
      |            ^~~
a.cc:13:16: error: 'a' was not declared in this scope
   13 |         cin >> a[i] >> b[i];
      |                ^
a.cc:13:24: error: 'b' was not declared in this scope
   13 |         cin >> a[i] >> b[i];
      |                        ^
a.cc:17:21: error: 'a' was not declared in this scope
   17 |         for(int j = a[i]; j<N; j++) {
      |                     ^
a.cc:21:38: error: 'b' was not declared in this scope
   21 |                 dp[j] = dp[j-a[i]] + b[i];
      |                                      ^
a.cc:23:49: error: 'b' was not declared in this scope
   23 |                 dp[j] = min(dp[j], dp[j-a[i]] + b[i]);
      |                                                 ^
a.cc:23:25: error: 'min' was not declared in this scope; did you mean 'main'?
   23 |                 dp[j] = min(dp[j], dp[j-a[i]] + b[i]);
      |                         ^~~
      |                         main
a.cc:26:15: error: 'INT_MAX' was not declared in this scope
   26 |     int ans = INT_MAX;
      |               ^~~~~~~
a.cc:1:1: note: 'INT_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
  +++ |+#include <climits>
    1 | #incldue <bits/stdc++.h>
a.cc:29:19: error: 'min' was not declared in this scope; did you mean 'main'?
   29 |             ans = min(ans, dp[i]);
      |                   ^~~
      |                   main
a.cc:32:5: error: 'cout' was not declared in this scope
   32 |     cout << ans << "\n";
      |     ^~~~
a.cc:32:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'