# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
653545 | atigun | Uplifting Excursion (BOI22_vault) | C++14 | 5061 ms | 6936 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;
const int maxn = 75;
int M;
ll L;
vector<int> pos(maxn+5), neg(maxn+5);
void solve(){
cin >> M >> L;
for(int i = 1; i <= M; i++)
cin >> neg[M-i+1];
ll ans;
cin >> ans;
for(int i = 1; i <= M; i++)
cin >> pos[i];
int maxn3 = maxn*maxn*maxn;
vector<ll> knapsack1(maxn3+5, -1e18);
knapsack1[0] = 0;
for(int i = 1; i <= M; i++){
for(int make = maxn3; make >= 0; make--){
for(int use = 1; use <= pos[i] && use*1ll*i <= maxn3; use++){
if(use*i <= make && knapsack1[make-use*i] != -1e18)
knapsack1[make] = max(knapsack1[make], knapsack1[make-use*i]+use);
}
}
# | 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... |