## 4468: (2005广东省赛) 图灵机编程

[提交][状态][讨论版][命题人:]

## 输入

There’re several test cases. For each case there’s a single line containing two numbers, a and b. Input is terminated by EOF.

## 输出

For each case first output the case number “case 1:”,”case 2:”, etc. then output the program, i.e. several lines of quadruples of Q (at most 100 states), use number i to represent qi , output format should be the same as sample output. The solution may be not unique, just output any proper one.

## 样例输入

1 2<br/>1 0<br/>

## 样例输出

case 1:<br/>1 * L 7<br/>7 B L 8<br/>8 B * 3<br/>10 * L 5<br/>case 2:<br/>1 * B 2<br/>

## 提示

Hint for case 1: M is to compute f(x)=x+2 , now let M to compute f(3) , the initial configuration of M would be ↓(q1) ……B B B B * * * * B B B B …… and final configuration would be ↓(q3) ……B B * B * * * * B B B B …… since there’re 5 ‘*’s at last , so output of M is 5, which is equal to f(3)=3+2=5. “10 * L 5” is actually unnecessary.

[提交][状态]