# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1120568 | vjudge1 | Tracks in the Snow (BOI13_tracks) | C++17 | 246 ms | 16460 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 ld double
const int INF = 1e18;
const int mod = 12345;
const int sz = 4e3 + 5;
char a[sz][sz];
int main()
{
ios_base::sync_with_stdio(0);cin.tie(0);
int n , m;
cin >> n >> m;
int cnt1 = 0 , cnt2 = 0;
for(int i = 1;i <= n;i++){
for(int j = 1;j <= m;j++){
cin >> a[i][j];
if(a[i][j] == 'R') cnt1++;
if(a[i][j] == 'F') cnt2++;
}
}
if(cnt1 == 0 && cnt2)
{
cout << 1 << endl;
}
else if(cnt1 && cnt2 == 0)
{
cout << 1 << endl;
}
else if(cnt1 == 0 && cnt2 == 0)
{
cout << 0 << endl;
}
else{
cout << 2 << endl;
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |