Submission #730910

#TimeUsernameProblemLanguageResultExecution timeMemory
730910sleepntsheepTracks in the Snow (BOI13_tracks)C++17
2.19 / 100
133 ms27024 KiB
#include <bits/stdc++.h> using namespace std; #define N 5005 char a[N][N]; int n, m, z; int main() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; i++) { scanf("%s", a[i] + 1); for (int j = 1; j <= m; j++) { if (a[i][j] == 'F') z |= 1; if (a[i][j] == 'R') z |= 2; } } printf("%d", __builtin_popcount(z)); return 0; }

Compilation message (stderr)

tracks.cpp: In function 'int main()':
tracks.cpp:9:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
    9 |     scanf("%d%d", &n, &m);
      |     ~~~~~^~~~~~~~~~~~~~~~
tracks.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%s", a[i] + 1);
      |         ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...