Submission #28176

#TimeUsernameProblemLanguageResultExecution timeMemory
28176IE (#71)The City and The Bitcoin (FXCUP2_city)C++98
1 / 1
16 ms1204 KiB
#include <stdio.h> int M,N; bool g[303][303]; int main() { scanf ("%d %d",&M,&N); for (int i=0;i<N;i++){ for (int j=0;j<M;j++){ int x; scanf ("%d",&x); if (x){ bool v = false; if (i && j) v = g[i-1][j] || g[i][j-1]; else if (i) v = g[i-1][j]; else if (j) v = g[i][j-1]; else v = true; g[i][j] = v; } } } puts(g[N-1][M-1]?"Yes":"No"); return 0; }

Compilation message (stderr)

city.cpp: In function 'int main()':
city.cpp:7:23: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf ("%d %d",&M,&N);
                       ^
city.cpp:11:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf ("%d",&x);
                   ^
#Verdict Execution timeMemoryGrader output
Fetching results...