Submission #118776

#TimeUsernameProblemLanguageResultExecution timeMemory
118776silxikysIce Hockey World Championship (CEOI15_bobek)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> const int maxn = 45; int N, M; ll A[maxn], B[maxn]; int main() { cin >> N >> M; for (int i = 0; i < N; i++) { cin >> A[i]; } ll ans = 0; for (int i = 0; i < (1<<N); i++) { ll total = 0; for (int j = 0; j < split; j++) { if (i & (1<<j)) total += A[j]; } if (total <= M) ans++; } cout << ans << '\n'; }

Compilation message (stderr)

bobek.cpp: In function 'int main()':
bobek.cpp:21:29: error: 'split' was not declared in this scope
         for (int j = 0; j < split; j++) {
                             ^~~~~