# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
151748 | arnold518 | 요리 강좌 (KOI17_cook) | C++14 | 819 ms | 66396 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 3000;
int N, M, S, E, T, A[MAXN+10][MAXN+10], B[MAXN+10];
int dp[MAXN+10][MAXN+10], ans=2147483647;
deque<pii> DQ[MAXN+10];
int main()
{
int i, j;
scanf("%d%d%d%d%d", &N, &M, &S, &E, &T);
for(i=1; i<=N; i++) for(j=1; j<=M; j++) scanf("%d", &A[i][j]);
for(i=1; i<=N; i++) for(j=M; j>=0; j--) A[i][j]+=A[i][j+1];
for(i=1; i<=N; i++) scanf("%d", &B[i]);
for(i=2; i<=S; i++) for(j=1; j<=N; j++) dp[j][i]=11e7;
for(i=S+1; i<=M+1; i++)
{
vector<pii> V;
for(j=1; j<=N; j++)
{
while(!DQ[j].empty() && DQ[j].front().second<i-E) DQ[j].pop_front();
while(!DQ[j].empty() && DQ[j].back().first>=A[j][i-S]+dp[j][i-S]) DQ[j].pop_back();
컴파일 시 표준 에러 (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... |