# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
28176 | IE (#71) | The City and The Bitcoin (FXCUP2_city) | C++98 | 16 ms | 1204 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 <stdio.h>
int M,N; bool g[303][303];
int main()
{
scanf ("%d %d",&M,&N);
for (int i=0;i<N;i++){
for (int j=0;j<M;j++){
int x;
scanf ("%d",&x);
if (x){
bool v = false;
if (i && j) v = g[i-1][j] || g[i][j-1];
else if (i) v = g[i-1][j];
else if (j) v = g[i][j-1];
else v = true;
g[i][j] = v;
}
}
}
puts(g[N-1][M-1]?"Yes":"No");
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |