Submission #441777

#TimeUsernameProblemLanguageResultExecution timeMemory
441777HaidaraTracks in the Snow (BOI13_tracks)C++17
2.19 / 100
998 ms3640 KiB
/* * * * * * * * * *\ * Author: Haidara * * LANG: C++17 * * PROB: * \* * * * * * * * * */ #include<bits/stdc++.h> #define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define int long long #define rep(i,x,n) for(int i=x;i<(n);i++) #define FOR(i,n) rep(i,0,n) #define per(i,x,n) for(int i=x;i>(n);i--) #define ROF(i,x) for(int i=x;i>=0;i--) #define v(i) vector< i > #define p(i,j) pair< i , j > #define pii pair<int,int> #define m(i,j) map< i , j > #define um(i,j) unordered_map< i , j > #define pq(i) priority_queue< i > #define ff first #define all(x) x.begin(),x.end() #define ss second #define pp push_back using namespace std; void SIO(string name="") { if(name!="") { freopen((name+".in").c_str(),"r",stdin); freopen((name+".out").c_str(),"w",stdout); } } const int inf=1LL<<60LL; const int mod=1e9+7; const int maxn=200100; signed main() { SIO(""); int n,m; cin>>n>>m; int f=0,r=0; FOR(i,n) FOR(j,m) { char c; cin>>c; if(c=='F') f=1; if(c=='R') r=1; } cout<<f+r; }

Compilation message (stderr)

tracks.cpp: In function 'void SIO(std::string)':
tracks.cpp:28:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   28 |         freopen((name+".in").c_str(),"r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tracks.cpp:29:16: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
   29 |         freopen((name+".out").c_str(),"w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...