# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
53334 | TAMREF | Ice Hockey World Championship (CEOI15_bobek) | C++11 | 587 ms | 21272 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<ll> A, B;
int n;
ll m;
ll price_a[20], price_b[20];
int main(){
cin >> n >> m;
for(int i = 0; i < n/2; i++){
cin >> price_a[i];
}
for(int i = 0; i < (n+1)/2; i++){
cin >> price_b[i];
}
for(int b = 0; b < (1 << n/2); b++){
ll subset_sum = 0;
for(int i = 0; i < n/2; i++){
if(b >> i & 1){
subset_sum += price_a[i];
}
}
A.push_back(subset_sum);
}
for(int b = 0; b < (1 << (n+1)/2); b++){
ll subset_sum = 0;
for(int i = 0; i < (n+1)/2; 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... |