1072: Happy Robot
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:0
Description
不允许普通用户打印题目,请教师登录后使用。如有疑问请联系管理员!
Input
There will be at most 1000 test cases. Each case contains a command sequence with no more than 1000 characters.
Output
For each test case, print the case number, followed by minimal/maximal possible x (in this order), then the minimal/maximal possible y.
Sample Input Copy
F?F
L??
LFFFRF
Sample Output Copy
Case 1: 1 3 -1 1
Case 2: -1 1 0 2
Case 3: 1 1 3 3