You are given an initial configuration of $$$N$$$ cells (from left to right), where each cell can have one of the 4 things: empty, tombstone, left arrow or right arrow.
Two players play a game on it, starting from Player A followed by Player B turn-by-turn.
Player A's objective is to maximize the number of arrows (which were not turned to tombstones) when the game ends and Player B's objective is to minimize the number of arrows when the game ends.
Find the number of arrows at the end of the game if both players play optimally.
For each test case, output the number of arrows at the end of game under optimal play.
4 4XXXXLTXRRTXLLRTR
2 3 2 3
4 4XXXXLTXRRTXLLRTR
2 3 2 3
| Name |
|---|


