# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
124966 | ansol4328 | 요리 강좌 (KOI17_cook) | C++11 | 5 ms | 3064 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<stdio.h>
#include<deque>
#include<utility>
#include<algorithm>
using namespace std;
typedef pair<int,int> P;
int n, m, s, e, t;
int xy[3005][3005], lst[3005];
int dp[3005][3005], sum[3005][3005];
deque<P> dq[3005];
P mval[3005][3];
const int INF=1e9;
void set_mval(int idx)
{
mval[idx][0]=mval[idx][1]=mval[idx][2]=P(INF,INF);
for(int i=1 ; i<=n ; i++)
{
if(mval[idx][0].first>dp[i][idx])
{
mval[idx][2]=mval[idx][1];
mval[idx][1]=mval[idx][0];
mval[idx][0]=P(dp[i][idx],i);
}
else if(mval[idx][1].first>dp[i][idx])
{
mval[idx][2]=mval[idx][1];
mval[idx][1]=P(dp[i][idx],i);
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... |