# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
74555 | xennygrimmato | Ice Hockey World Championship (CEOI15_bobek) | C++17 | 471 ms | 17100 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <algorithm>
#include <climits>
#define ll long long
using namespace std;
const ll N = 41;
ll n, k;
ll a[N];
ll f1[1<<20], f2[1<<20];
void compute_costs(int L, int R, ll* arr) {
// [L, R)
for(ll i = 1 ; i < (1 << (R - L)) ; i++) {
ll cost = 0;
for(ll j = 0 ; j < 20 ; ++j) {
if(i & (1 << j)) {
cost += a[L + j];
if(cost > k) {
cost = 4e18;
break;
}
}
}
arr[i] = cost;
}
sort(arr, arr + (1 << (R - L)));
// for(int i = 0 ; i < 1 << (R - L) ; i++) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |