# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
753456 | IvanJ | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++17 | 88 ms | 162972 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 x first
#define y second
#define pb push_back
#define all(a) (a).begin(), (a).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
const int maxn = 405, inf = 1e9;
int n;
char s[maxn];
int c[maxn];
int dp[maxn][maxn][maxn][3];
int num[maxn][3];
vector<int> p[3];
int cost(int x, int y, int z, int C) {
int pos;
if(C == 0) pos = p[C][x];
if(C == 1) pos = p[C][y];
if(C == 2) pos = p[C][z];
int ret = min(x, num[pos][0]) + min(y, num[pos][1]) + min(z, num[pos][2]);
ret = pos - ret;
return ret;
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... |