A TOM program includes a set of initial values for the registers and a sequence of operations. Given an integer N (0 £ N £ 255), generate a TOM program that prints the decreasing sequence of integers N, N-1, N-2, …, 0. The maximum number of consecutive S-operations should be as small as possible.
Input cases are numbered 1 through 16 and are available via the contest server.
The second line of output should contain nine space-separated values representing the desired initial values of the registers, in order (register 1, then register 2, etc.).
The rest of the output file should contain the ordered list of operations to be performed, one per line. Thus, the third line contains the first operation to perform, and so on. The last line of the file should be the one that prints 0. Each line should be a valid operation. The instructions should be formatted as in the example output.
입력 1 2 출력 0 2 1 0 0 0 0 0 0 P 2 P 3 P 1
출처:IOI 2003