제출 #371138

#제출 시각아이디문제언어결과실행 시간메모리
371138flamestormTracks in the Snow (BOI13_tracks)C++14
2.19 / 100
180 ms1260 KiB
#include <bits/stdc++.h> using namespace std; const int MAX = 200007; const int MOD = 1000000007; void solve() { int n, m; cin >> n >> m; char c; cin >> c; if (c == '.') {cout << 0; return;} else if (c == 'F') {c = 'R';} else {c = 'F';} for (int i = 2; i <= n * m; i++) { char d; cin >> d; if (d == c) {cout << 2; return;} } cout << 1; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); //freopen("in.in", "r", stdin); freopen("out.out", "w", stdout); //int tt; cin >> tt; for (int i = 1; i <= tt; i++) {solve();} solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...