Submission #445196

#TimeUsernameProblemLanguageResultExecution timeMemory
445196AnYandEveryTracks in the Snow (BOI13_tracks)C++14
0 / 100
13 ms296 KiB
#include <bits/stdc++.h>
using namespace std;
int main(){
  freopen("tracks.in", "r", stdin);
  freopen("tracks.out", "w", stdout);
  int H, W; cin >> H >> W;
  bool rabbit = false, fox = false;
  for(int r = 0; r < H; r++){
    for(int j = 0; j < W; j++){
      char c; cin >> c;
      if(c=='R')rabbit = true;
      if(c=='F')fox = true;
    }
  }
  int ret = 0;
  if(rabbit)ret++;
  if(fox)ret++;
  cout << ret << endl;
}

Compilation message (stderr)

tracks.cpp: In function 'int main()':
tracks.cpp:4:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    4 |   freopen("tracks.in", "r", stdin);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
tracks.cpp:5:10: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
    5 |   freopen("tracks.out", "w", stdout);
      |   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...