# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
544168 | sksusha8853 | Tracks in the Snow (BOI13_tracks) | C++17 | 73 ms | 35928 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define all(v) v.begin(),v.end()
#define umap unordered_map
void fileIO(string filename) {
freopen((filename + ".in").c_str(), "r", stdin);
freopen((filename + ".out").c_str(), "w", stdout);
}
ll mod=1e9+7;
void solve(){
int h,w;
cin>>h>>w;
vector<string>vs(h);
for(int i=0;i<h;i++){
cin>>vs[i];
}
vector<vector<bool>>vis(h,vector<bool>(w,false));
int ans=0;
int cnt1=0,cnt2=0;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
if(vs[i][j]=='R'){
cnt1=1;
}
if(vs[i][j]=='F'){
cnt2=1;
}
// if(vis[i][j])continue;
// if(vs[i][j]=='.'){
// vis[i][j]=true;
// continue;
// }
// queue<pair<int,int>>Q;
}
}
cout<<cnt1+cnt2;
}
int main()
{ios_base::sync_with_stdio(false);cin.tie(0);cin.tie(0);
//fileIO("");
int t=1;
//cin>>t;
while(t--)solve();
return 0;}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |