답안 #118776

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
118776 2019-06-19T17:40:12 Z silxikys Ice Hockey World Championship (CEOI15_bobek) C++14
컴파일 오류
0 ms 0 KB
#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

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++) {
                             ^~~~~