# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
28093 | Shocking Hot (#71) | The City and The Bitcoin (FXCUP2_city) | C++14 | 13 ms | 2384 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;
const int N = 305;
int n, m, a[N][N];
void dfs (int X, int Y) {
if(!a[X][Y]) return;
a[X][Y] = 0;
dfs(X+1, Y); dfs(X, Y+1);
}
int main()
{
scanf("%d%d",&m,&n);
for(int i=1;i<=n;i++) {
for(int j=1;j<=m;j++) {
scanf("%d",&a[i][j]);
}
}
dfs(1, 1);
puts(a[n][m]?"No":"Yes");
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |