# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
58993 | red1108 | 요리 강좌 (KOI17_cook) | C++17 | 995 ms | 271416 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 <vector>
#include <stdio.h>
#include <deque>
using namespace std;
const int inf=1500000000;
vector<vector<int>> input,sum;
vector<int> dp[3010];
struct DATA{
int value;
int before;
}mindp[6010][3];
deque<pair<int,int>> dq[3010];
int n, m, row, limit, change, cant[3010];
int getmin(int i, int j)
{
if(i<row) return (-1)*change;
if(mindp[i][0].before!=cant[j]&&mindp[i][0].before!=j) return mindp[i][0].value;
else if(mindp[i][1].before!=cant[j]&&mindp[i][1].before!=j) return mindp[i][1].value;
else if(mindp[i][2].before!=cant[j]&&mindp[i][2].before!=j) return mindp[i][2].value;
}
void gang(int i, int j,int bac)
{
if(j<1) return;
if(mindp[i][0].value>=j)
{
mindp[i][2]=mindp[i][1];
mindp[i][1]=mindp[i][0];
mindp[i][0].value=j;
mindp[i][0].before=bac;
}
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... |