Created
October 13, 2022 17:01
-
-
Save qjatn0120/d75b95f1011c81540bfb506caf9b2841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
using namespace std; | |
int t; | |
string s[8]; | |
int main(){ | |
cin.tie(nullptr), ios::sync_with_stdio(false); | |
cin >> t; | |
while(t--){ | |
for(int i = 0; i < 8; i++) cin >> s[i]; | |
bool ans = false; | |
for(int r = 0; r < 8; r++){ | |
bool flag = true; | |
for(int c = 0; c < 8; c++){ | |
if(s[r][c] != 'R') flag = false; | |
} | |
if(flag) ans = true; | |
} | |
cout << (ans ? "R\n" : "B\n"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment