Submission #448470

#TimeUsernameProblemLanguageResultExecution timeMemory
448470fuad27Ice Hockey World Championship (CEOI15_bobek)C++14
Compilation error
0 ms0 KiB
n, m = map(int, input().split())
arr = [int(i) for i in input().split()]
c = 0

for b in range(1<<n):
	s = 0
	for i in range(n):
		if b&(1<<i): s+=arr[i]
		if s > m: break
	if s <= m:c+=1
print(c)

Compilation message (stderr)

bobek.cpp:1:1: error: 'n' does not name a type
    1 | n, m = map(int, input().split())
      | ^