feat(codeforces/817): ak

This commit is contained in:
Barrett Ruth 2025-05-17 18:42:05 -05:00
parent c65a12a652
commit ee35513364
30 changed files with 1222 additions and 23 deletions

View file

@ -58,30 +58,16 @@ using vec = std::vector<T>;
// }}}
void solve() {
vector<string> grid(8);
for (auto& e : grid)
cin >> e;
string s;
for (u32 i = 0; i < 8; ++i) {
cin >> s;
if (s == "RRRRRRRR") {
cout << "R\n";
return;
}
}
for (u32 r = 0; r < 8; ++r) {
bool good = true;
for (u32 c = 0; c < 8; ++c) {
good &= grid[r][c] == grid[r][0];
}
if (good && grid[r][0] == 'R') {
cout << grid[r][0] << '\n';
return;
}
}
for (u32 c = 0; c < 8; ++c) {
bool good = true;
for (u32 r = 0; r < 8; ++r) {
good &= grid[r][c] == grid[0][c];
}
if (good && grid[0][c] == 'B') {
cout << grid[0][c] << '\n';
return;
}
}
cout << "B\n";
}
int main() { // {{{