# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1092204 | quan606303 | Cloud Computing (CEOI18_clo) | C++14 | 382 ms | 2144 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>
#define int long long
#define ll long long
#define fi first
#define se second
#define memfull(a,b) memset(a,b,sizeof(a))
#define endl '\n'
using namespace std;
struct plinh
{
int sophong,yeucau,tien;
};
plinh hotel[2005],customer[2005];
int n,m;
const int maxw=2000*50;
int dp1[maxw+7],dp2[maxw+7];
void solve()
{
for (int i=1;i<=maxw;i++)dp1[i]=-1e18;
for (int i=1;i<=n;i++)
{
for (int j=maxw;j>=1;j--)
{
if (j-hotel[i].sophong>=0&&dp1[j-hotel[i].sophong]!=-1e18)dp1[j]=max(dp1[j],dp1[j-hotel[i].sophong]-hotel[i].tien);
}
}
for (int i=1;i<=m;i++)
{
for (int j=maxw;j>=1;j--)
# | 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... |