# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
163520 | nvmdava | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++17 | 874 ms | 163092 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
#define N 405
#define INF 0x3f3f3f3f
#define MOD 1000000007LL
char c[N];
int dp[N][N][N][3];
int a[N];
vector<int> app[3];
int i[3];
int cost(int k, int r){
i[k]--;
int res = dp[i[0]][i[1]][i[2]][r];
int v = app[k][i[k]];
i[k]++;
int w = v;
for(int j = 0; j < 3; j++){
int a = upper_bound(app[j].begin(), app[j].begin() + i[j], v) - app[j].begin();
w += max(0, i[j] - a);
}
return res + abs(i[0] + i[1] + i[2] - w);
# | 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... |