이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "wombats.h"
#include <bits/stdc++.h>
using namespace std;
int A1[5009][209], A2[5009][209], H, W;
void init(int R, int C, int I[5000][200], int V[5000][200]) {
H = R; W = C;
for (int i = 0; i < H; i++) {
for(int j = 0; j < W - 1; j++) A1[i][j] = I[i][j];
}
for (int i = 0; i < H - 1; i++) {
for (int j = 0; j < W; j++) A2[i][j] = V[i][j];
}
}
void changeH(int P, int Q, int T) {
A1[P][Q] = T;
}
void changeV(int P, int Q, int T) {
A2[P][Q] = T;
}
int dp[5009];
int escape(int V1, int V2) {
for (int i = 0; i < W; i++) dp[i] = (1<<30);
dp[V1] = 0;
for (int t = 0; t < H; t++) {
for (int i = 0; i < W - 1; i++) dp[i + 1] = min(dp[i + 1], dp[i] + A1[t][i]);
for (int i = W - 2; i >= 0; i--) dp[i] = min(dp[i], dp[i + 1] + A1[t][i]);
for (int i = 0; i < W; i++) dp[i] += A2[t][i];
}
return dp[V2];
}
컴파일 시 표준 에러 (stderr) 메시지
grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
int res;
^~~
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |