# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
153527 | onjo0127 | Dangerous Skating (JOI16_skating) | C++11 | 887 ms | 23664 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
using tiii = tuple<int, int, int>;
const int dx[4] = {0, 0, -1, 1};
const int dy[4] = {-1, 1, 0, 0};
char A[1009][1009];
int L[1009][1009], RR[1009][1009], U[1009][1009], D[1009][1009], S[1009][1009];
int main() {
int R, C; scanf("%d%d",&R,&C);
for(int i=1; i<=R; i++) {
for(int j=1; j<=C; j++) {
scanf(" %c", &A[i][j]);
S[i][j] = 1e9;
}
}
int xs, ys, xe, ye; scanf("%d%d%d%d",&xs,&ys,&xe,&ye);
for(int i=1; i<=R; i++) {
int ls = -1;
for(int j=1; j<=C; j++) {
if(A[i][j] == '#') ls = j+1;
L[i][j] = ls;
}
for(int j=C; j>=1; j--) {
if(A[i][j] == '#') ls = j-1;
RR[i][j] = ls;
}
}
Compilation message (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... |