제출 #68423

#제출 시각아이디문제언어결과실행 시간메모리
68423zetapi선물상자 (IOI15_boxes)C++14
컴파일 에러
0 ms0 KiB
#include#incl "boxes.h" #include "bits/stdc++.h" using namespace std; #define pb push_back #define mp make_pair #define ll long long #define itr ::iterator const int MAX=4e7; ll N,K,L,cost[MAX],rev[MAX]; long long delivery(int N_,int K_, int L_,int P[]) { N=N_; K=K_; L=L_; for(int A=0;A<N;A++) cost[A]=min(L,2*1ll*P[A])+(A-K<0?0:cost[A-K]); for(int A=N-1;A>=0;A--) rev[A]=min(L,2*1ll*(L-P[A]))+rev[A+K]; ll res=rev[0]; for(int A=0;A<N;A++) res=min(res,cost[A]+rev[A+1]); return res; }

컴파일 시 표준 에러 (stderr) 메시지

boxes.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
 #include#incl  "boxes.h"
         ^
boxes.cpp: In function 'long long int delivery(int, int, int, int*)':
boxes.cpp:22:16: warning: conversion to 'int' from 'long long int' may alter its value [-Wconversion]
     for(int A=N-1;A>=0;A--)
               ~^~
boxes.cpp:25:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int A=0;A<N;A++)
     ^~~
boxes.cpp:27:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
     return res;
     ^~~~~~