第1行:整数N.
第2行到第N+1行:第i+l行表示牛j的朝向,F表示朝前,B表示朝后.
一行两个数,分别是K和M,中间用空格隔开
7
B
B
F
B
F
B
B
INPUT DETAILS:
There are seven cows and they are facing backward, backward, forward,
backward, forward, backward, and backward, respectively.
3 3
OUTPUT DETAILS:
For K = 3, the machine must be operated three times: turn cows (1,2,3),
(3,4,5), and finally (5,6,7):
B > F F F
B > F F F
F > B > F F
B B > F F
F F > B > F
B B B > F
B B B > F
当K=3时神奇的机器旋转3次:(1,2,3),(3,4,5),和(5,6,7)