# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
766881 | tamyte | Tracks in the Snow (BOI13_tracks) | C++14 | 168 ms | 31752 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;
void setIO(string name = "")
{
cin.tie(0)->sync_with_stdio(0); // see /general/fast-io
if (name.size())
{
freopen((name + ".in").c_str(), "r", stdin); // see /general/input-output
freopen((name + ".out").c_str(), "w", stdout);
}
}
void solve() {
int n, m;
cin >> n >> m;
vector<vector<char>> arr(n, vector<char>(m));
bool fox = false, rabbit = false;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cin >> arr[i][j];
fox |= (arr[i][j] == 'F');
rabbit |= (arr[i][j] == 'R');
}
}
cout << fox + rabbit << "\n";
}
int main () {
setIO();
int t = 1;
// cin >> t;
while (t--) {
solve();
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |