# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
28100 | tlwpdus 팬클럽 회장 (#71) | The City and The Bitcoin (FXCUP2_city) | C++14 | 13 ms | 2728 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;
int n, m, a[301][301], can[301][301];
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);
}
}
can[1][1] = 1;
for(int i = 1; i <= n; i++){
for(int j = 1 + (i == 1); j <= m; j++){
if(a[i][j]) can[i][j] = can[i][j - 1] || can[i - 1][j];
}
}
puts(can[n][m] ? "Yes" : "No");
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |