Submission #74356

#TimeUsernameProblemLanguageResultExecution timeMemory
74356khsoo01The City and The Bitcoin (FXCUP2_city)C++11
1 / 1
17 ms2292 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"); }

Compilation message (stderr)

city.cpp: In function 'int main()':
city.cpp:15:7: 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:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d",&a[i][j]);
    ~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...