Submission #371139

#TimeUsernameProblemLanguageResultExecution timeMemory
371139flamestormTracks in the Snow (BOI13_tracks)C++14
Compilation error
0 ms0 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;
	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();
}

Compilation message (stderr)

tracks.cpp: In function 'void solve()':
tracks.cpp:13:2: error: 'else' without a previous 'if'
   13 |  else if (c == 'F') {c = 'R';}
      |  ^~~~