# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
872202 | TimAni | Tracks in the Snow (BOI13_tracks) | C++17 | 31 ms | 34084 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 <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <numeric>
#include <stack>
#include <queue>
#include <cmath>
#include <array>
using namespace std;
void setIO(string File_name) {
cin.tie(0)->sync_with_stdio(0);
if (File_name.size()) {
freopen((File_name + ".in").c_str(), "r", stdin);
freopen((File_name + ".out").c_str(), "w", stdout);
}
}
void sol() {
int w, h;
cin >> w >> h;
vector<string> g(w);
for(int i = 0; i < w; i++){
cin >> g[i];
}
if(g[0][0] == 'F'){
cout << '2';
}
else if(g[0][0] == 'R'){
for(int i = 0; i < w; i++){
if(g[i].find('F') != string::npos){
cout << '3';
return;
}
}
cout << '1';
}
}
int main() {
setIO("");
int T = 1;
//cin >> T;
while (T--) sol();
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |