# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
27192 | 2017-07-10T07:53:05 Z | 검수컵(#1129) | 도시와 비트코인 (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
# | 결과 | 실행 시간 | 메모리 | 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 | - |