Company: samsung_29sep
Difficulty: medium
Maximum Coins in Airplane Game Problem Description This problem describes a game played on a grid-based map where an airplane collects coins and avoids enemies to maximize its score. Game Setup: The game map has a fixed width of 5 columns. Its height, N, varies per test case. A Game Zone , a 5x5 black rectangle, displays a portion of the larger game map. A Control Zone , a blue rectangle, is a single line at the bottom of the Game Zone where the airplane moves. The map contains Coins (marked 'C' or represented by '1' in input) and Enemies (marked 'R' or represented by '2' in input). Empty spaces are '0'. The airplane starts at the center column (column index 2) of the Control Zone. The initial number of gathered coins is 0. Gameplay Rules: Each turn consists of the following phases: Airplane Movement (Optional Bomb Usage): Before the airplane moves, a bomb can optionally be used. A bomb can be used only once during the entire gameplay. If used, it eliminates all enemies within the curr