제출 #28108

#제출 시각아이디문제언어결과실행 시간메모리
28108EyeOfSol (#71)The City and The Bitcoin (FXCUP2_city)C++11
1 / 1
16 ms2768 KiB
#include <bits/stdc++.h>

using namespace std;

int mat[310][310];
int dyn[310][310];

int main() {
    int n, m;

    scanf("%d%d",&n,&m);
    swap(n,m);
    int i, j;
    for (i=0;i<n;i++) for (j=0;j<m;j++) scanf("%d",&mat[i][j]);
    dyn[n-1][m-1] = 1;
    for (i=n-1;i>=0;i--) {
		for (j=m-1;j>=0;j--) {
			if (i==n-1&&j==m-1) continue;
			dyn[i][j] = (mat[i][j])&&(dyn[i+1][j]||dyn[i][j+1]);
		}
    }
    if (dyn[0][0]) printf("Yes\n");
    else printf("No\n");

    return 0;
}

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

city.cpp: In function 'int main()':
city.cpp:11:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&n,&m);
                        ^
city.cpp:14:63: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     for (i=0;i<n;i++) for (j=0;j<m;j++) scanf("%d",&mat[i][j]);
                                                               ^
#Verdict Execution timeMemoryGrader output
Fetching results...