Submission #1142450

#TimeUsernameProblemLanguageResultExecution timeMemory
1142450poltanosTracks in the Snow (BOI13_tracks)C++20
2.19 / 100
49 ms480 KiB
#include <bits/stdc++.h> using namespace std; #define int long long void solve(){ int n, m; cin >> n >> m; int f = 0, r = 0; for(int i = 0; i < n; i++){ string s; cin >> s; for(int j = 0; j < m; j++){ if(s[j] == 'F') f = 1; if(s[j] == 'R') r = 1; } } cout << f + r << endl; } signed main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int t = 1; while(t--) solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...