# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97784 | Bodo171 | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++14 | 158 ms | 4348 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 <iostream>
#include <fstream>
using namespace std;
const int nmax=405;
int dp[2][nmax][nmax][3];
int ap[3],nr[3];
int p[3][nmax][3],a[3][nmax];
int n,i,j,k,use,oth,ch,nxt,ans;
string s;
int norm(char c)
{
if(c=='R') return 0;
if(c=='G') return 1;
return 2;
}
int actual_pos(int wh)
{
int ret=a[wh][ap[wh]];
for(int oth=0;oth<3;oth++)
if(oth!=wh)
ret+=max(0,ap[oth]-p[wh][ap[wh]][oth]);
return ret;
}
void prp(int &a,int b)
{
a=min(a,b);
}
int main()
{
//freopen("data.in","r",stdin);
# | 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... |