Submission #448433

# Submission time Handle Problem Language Result Execution time Memory
448433 2021-07-30T07:26:46 Z fuad27 Ice Hockey World Championship (CEOI15_bobek) C++14
40 / 100
78 ms 296 KB
    #include<bits/stdc++.h>
    using namespace std;
    #define int long long
    int32_t main () {
    	int n, m, c = 0;
    	cin >> n >> m;
    	int v[n];
    	for(int i = 0;i<n;i++) {
    		cin >> v[i];
    	}
    	for (int b = 0; b < (1<<n); b++) {
    		int sum = 0;
    		for (int i = 0; i < n; i++) {
    			if (b&(1<<i)) sum+=v[i];
    			if(sum > m)break;
    		}
    		if(sum <= m)c++;
    	}
    	cout<<c<<"\n"<<endl;	
    }
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 0 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 9 ms 204 KB Output is correct
2 Correct 5 ms 204 KB Output is correct
3 Correct 9 ms 296 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 5 ms 204 KB Output is correct
6 Correct 77 ms 268 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 74 ms 204 KB Output is correct
2 Correct 18 ms 204 KB Output is correct
3 Correct 5 ms 204 KB Output is correct
4 Correct 4 ms 204 KB Output is correct
5 Correct 78 ms 204 KB Output is correct
6 Correct 10 ms 204 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -