# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
386328 | ronnith | Nafta (COI15_nafta) | C++14 | 416 ms | 78932 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
const int di[4] = {1, -1, 0, 0};
const int dj[4] = {0, 0, 1, -1};
const int N = 2000;
int n, m, val[N + 1][N + 1], dp[N + 1][N + 1];
bool vis[N + 1][N + 1];
char a[N + 1][N + 1];
inline int sum(int x1, int y1, int x2, int y2) {
return val[x2][y2] - val[x1 - 1][y2] - val[x2][y1 - 1] + val[x1 - 1][y1 - 1];
}
inline int oil(int l, int r) {
if(r < l) return 0;
return sum(l, l, r, r);
}
int sm, mxj, mnj;
void ff(int i, int j) {
if(i <= 0 || i > n || j <= 0 || j > m) return;
if(a[i][j] == '.') return;
if(vis[i][j]) return;
vis[i][j] = true;
sm += (a[i][j] - '0');
mxj = max(mxj, j);
mnj = min(mnj, j);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |