-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathC.cpp
More file actions
53 lines (47 loc) · 1.03 KB
/
C.cpp
File metadata and controls
53 lines (47 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# include <vector>
# include <algorithm>
# include <iostream>
# include <map>
# include <unordered_map>
# include <set>
# include <unordered_set>
# include <string>
# define vi vector<int>
# define vs vector<string>
# define vvi vector<vector<int>>
# define vvs vector<vector<string>>
# define ll long long
# define ull unsigned long long
# define lp(n) for (int i=0; i<n; i++)
# define lp1(s, e, st) for (int i=s; i<e; i+=st)
using namespace std;
void solve()
{
vs v(8);
for (int i=0; i<8; i++)
cin >> v[i];
for (int i=0; i<8; i++)
{
int count = 0;
for (int j=0; j<8; j++)
{
if (v[i][j] != 'R')
break ;
count++;
}
if (count == 8)
{
cout << "R" << endl;
return ;
}
}
cout << "B" << endl;
}
int main()
{
int cases = 1;
cin >> cases;
while (cases--)
solve();
return (0);
}