# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
892023 | alexander707070 | Cookies (JOI23_cookies) | C++14 | 610 ms | 489040 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>
#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")
#define MAXN 3007
using namespace std;
int n,m,pt,total;
int a[MAXN],b[MAXN],ind[MAXN];
vector< pair<int,int> > v;
vector< vector<int> > w;
int maxs[MAXN],br;
vector<short> dp[MAXN][MAXN];
void calc_dp(){
for(int sum=total;sum>=0;sum--){
for(int box=1;box<=m;box++){
dp[sum][box].resize(sum/b[box]+2);
for(int pos=sum/b[box]+1;pos>=1;pos--){
if(sum==total){
dp[sum][box][pos]=0;
continue;
}
dp[sum][box][pos]=3005;
if(box>1)dp[sum][box][pos]=dp[sum][box-1][pos];
Compilation message (stderr)
# | 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... |