Submission #124966

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1249662019-07-04 08:23:58ansol4328요리 강좌 (KOI17_cook)C++11
0 / 100
5 ms3064 KiB
#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);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

cook.cpp: In function 'int get_mval(int, int)':
cook.cpp:44:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
cook.cpp: In function 'int main()':
cook.cpp:48:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d %d %d %d %d",&n,&m,&s,&e,&t);
     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cook.cpp:53:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
             scanf("%d",&xy[i][j]);
             ~~~~~^~~~~~~~~~~~~~~~
cook.cpp:58:36: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for(int i=1 ; i<=n ; i++) scanf("%d",&lst[i]);
                               ~~~~~^~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...