From 41e4a123e8a63a0a33bc7c89569731c2daf65d95 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Sat, 25 Mar 2023 15:43:13 +0200 Subject: Solve some problems --- codeforces/Stripes/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'codeforces/Stripes/main.cpp') diff --git a/codeforces/Stripes/main.cpp b/codeforces/Stripes/main.cpp index d9454c7..ccd20bd 100755 --- a/codeforces/Stripes/main.cpp +++ b/codeforces/Stripes/main.cpp @@ -23,6 +23,18 @@ const int dx[4]{1, 0, -1, 0}; const int dy[4]{0, 1, 0, -1}; void solve() { + vector v(8); + bool lastRed = false; + for (auto s : v) { + cin >> s; + int reds = count(all(s), 'R'); + if (reds == 8) { + lastRed = true; + } + } + cout << (lastRed ? 'R' : 'B') << '\n'; + + } int main() { -- cgit v1.2.3