Submission #28093

#TimeUsernameProblemLanguageResultExecution timeMemory
28093Shocking Hot (#71)The City and The Bitcoin (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"); }

Compilation message (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]);
                        ^
#Verdict Execution timeMemoryGrader output
Fetching results...