제출 #118776

#제출 시각아이디문제언어결과실행 시간메모리
118776silxikysIce Hockey World Championship (CEOI15_bobek)C++14
컴파일 에러
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';
}

컴파일 시 표준 에러 (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++) {
                             ^~~~~