“You know, it’s all very sweet, stealing from the rich, selling to the poor...” Jose Molina, "Firefly." Your task is to graph the price of a stock over time. In one unit of time, the stock can either Rise, Fall or stay Constant. The stock’s price will be given to you as a string of R’s, F’s and C’s. You need to graph it using the characters ’/’ (slash), ’\’ (backslash) and ’_’ (underscore).
The first line of input gives the number of cases, N . N test cases follow. Each one contains a string of at least 1 and at most 50 upper case characters (R, F or C).
For each test case, output the line ‘Case #x:’, where x is the number of the test case. Then print the graph, as shown in the sample output, including the x- and y-axes. The x-axis should be one character longer than the graph, and there should be one space between the y-axis and the start of the graph. There should be no trailing spaces on any line. Do not print unnecessary lines. The x-axis should always appear directly below the graph. Finally, print an empty line after each test case.
範例輸入 1
1 RCRFCRFFCCRRC
範例輸出 1
Case #1: | _ | _/\_/\ / | / \__/ +---------------
Pro 專屬功能: 查看這題在歷屆 CPE 出現過幾次 — 升級以解鎖.