Submission #1120343

#TimeUsernameProblemLanguageResultExecution timeMemory
1120343vjudge1Tracks in the Snow (BOI13_tracks)C++17
2.19 / 100
173 ms2376 KiB
#include <bits/stdc++.h> // #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define int long long #define ll long long #define pii pair<int, int> #define all(v) v.begin(), v.end() using namespace std; const int oo = 1e9 + 9; const int MAX = 4e5 + 5, LOGMAX = 20, B = 441, MOD = 998244353; void solve(){ int n, m; cin >> n >> m; bool r = 0, f = 0; for(int i = 1; i <= n; i++){ for(int j = 1; j <= m; j++){ char c; cin >> c; if(c == 'R') r = 1; if(c == 'F') f = 1; } } cout << r + f << '\n'; } signed main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; // cin >> t; while(t--) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...