# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
27192 | 2017-07-10T07:53:05 Z | 검수컵(#1129) | The City and The Bitcoin (FXCUP2_city) | C++ | 0 ms | 1980 KB |
#include<stdio.h> int N, M, ba[333][333], chk[333][333]; void dfs(int x, int y){ if(x >= M || y >= N) return; if(!ba[x][y] || chk[x][y]) return; chk[x][y] = 1; dfs(x+1, y); dfs(x, y+1); } int main(){ scanf("%d%d", &M, &N); for(int i=0; i<M; i++) for(int j=0; j<N; j++) scanf("%d", &ba[i][j]); dfs(0,0); puts(chk[M-1][N-1] ? "Yes" : "No"); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 1980 KB | Output is correct |
2 | Correct | 0 ms | 1980 KB | Output is correct |
3 | Correct | 0 ms | 1980 KB | Output is correct |
4 | Correct | 0 ms | 1980 KB | Output is correct |
5 | Correct | 0 ms | 1980 KB | Output is correct |
6 | Correct | 0 ms | 1980 KB | Output is correct |
7 | Correct | 0 ms | 1980 KB | Output is correct |
8 | Correct | 0 ms | 1980 KB | Output is correct |
9 | Correct | 0 ms | 1980 KB | Output is correct |
10 | Incorrect | 0 ms | 1980 KB | Output isn't correct |
11 | Halted | 0 ms | 0 KB | - |