Submission #1273432

#TimeUsernameProblemLanguageResultExecution timeMemory
1273432MODDIBank (IZhO14_bank)C11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
const int maxn = 20;
int n, m;
int a[maxn], b[maxn];
int dp[1001][21];

int main() {
    ios::sync_with_stdio(false);

    cin >> n >> m;
    for (int i = 0; i < n; i++) cin >> a[i];
    for (int i = 0; i < m; i++) cin >> b[i];

    dp[0][0] = 1;
    for (int j = 0; j < m; j++) {
        for (int i = 1; i < 1001; i++) {
            if (i >= b[j]) dp[i][j] = max(dp[i][j - 1], dp[i - b[j]][j - 1]);
            if (j > 0) dp[i][j] = max(dp[i][j], dp[i][j - 1]);
        }
    }
    if (dp[a[0]][m - 1]) {
        cout << "YES\n";
    } else {
        cout << "NO\n";
    }

    return 0;
}

Compilation message (stderr)

bank.c:1:10: fatal error: bits/stdc++.h: No such file or directory
    1 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.