제출 #28093

#제출 시각아이디문제언어결과실행 시간메모리
28093Shocking Hot (#71)도시와 비트코인 (FXCUP2_city)C++14
1 / 1
13 ms2384 KiB
#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");
}

컴파일 시 표준 에러 (stderr) 메시지

city.cpp: In function 'int main()':
city.cpp:15:21: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d%d",&m,&n);
                     ^
city.cpp:18:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d",&a[i][j]);
                        ^
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…