제출 #824215

#제출 시각아이디문제언어결과실행 시간메모리
824215ForgottenDestinyTracks in the Snow (BOI13_tracks)C++17
2.19 / 100
69 ms32076 KiB
#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    int h,w;
    cin >> h >> w;
    vector<string> field (h);
    for (int i=0;i<h;i++) {
        string x;
        cin >> x;
        field[i]=x;  
    }
    bool f=false;
    bool r=false;
    int ret=0;
    for (int i=0;i<h;i++) {
        for (int j=0;j<w;j++) {
            if(field[i][j]=='F'&&!f){
                f=true;
                ret++;
            }
            if(field[i][j]=='R'&&!r) {
                r=true;
                ret++;
            }
        }
    }
    cout << ret << "\n";
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...