147 - The 17th Zhejiang University Programming Contest Sponsored by TuSimple - E
Year 2017 is the year of chicken, so in this problem we introduce you an interesting programming language: the Chicken Language.
Chicken is an esoteric programming language by Torbjörn Söderstedt, in which "chicken" is the only valid symbol. It is inspired by the paper and the presentation presented at the AAAS humor session by Doug Zongke. We strongly recommend you to watch the presentation after the contest. It's super fun.
The paper and the presentation by Doug Zongke.
As the original chicken language is a bit complicated, we specially designed the Simplified Chicken Language (SCL) for this problem. An SCL program is consisted of only two kinds of tokens: "c" and new line. The number of "c" tokens in the same line corresponds to an opcode. As the program is executed, it will push/pop values to/from a stack (the stack is empty at the beginning). The opcodes and the descriptions for each instruction of SCL are listed below.
Please keep in mind that the stack of the SCL is 1-based. That is to say, the index of the bottom of the stack is considered to be 1. In the following table, we indicate the integer at the top of the stack as x, and the integer just below the top of the stack as y. We also indicate stack[n] as the integer in the stack whose index is n.
When the program stops, it will print out the integer at the top of the stack as the output.
What you need to do is to write an SCL program which can print out the n-th element of the fibonacci sequence. Recall that a fibonacci sequence is a sequence which satisfies f(1) = f(2) = 1 and f(n) = f(n - 1) + f(n - 2) when n ≥ 3.
As the online judge system of the contest does not support SCL, you're supposed to print out your SCL program using other languages like C or C++. A specially designed program will then judge the correctness of your output.
There is no input for your C/C++/etc. program.
For your SCL program, only one integer n (1 ≤ n ≤ 30) will be given in the standard input, indicating the index of the element in the fibonacci sequence.
Your C/C++/etc. program should output your SCL program.
Please output your SCL program in the correct format. If your program contains tokens other than "c" or new line (for example, space), or you print extra empty lines at the end of your output, you will get a "wrong answer" verdict.
Also, your SCL program should contain no more than 104 "c" tokens, and your SCL program can execute at most 103 lines of code for each SCL test case, or you will get a "wrong answer" verdict.
Note that if your SCL program crashes due to various reasons, you will still get a "wrong answer" verdict as this problem is special judged.
Your SCL program should print out only one integer f(n), which is the n-th element of the fibonacci sequence.
cccc ccccccc cccccccc ccccccccc ccccc ccccccccc ccc cccccccccccccccccccccc cccccc ccccccccc c
Please note that the sample output is only to show you the output format, and it is NOT A CORRECT ANSWER!
What the sample SCL program do is to read an integer from the standard input and check if the integer equals to 2. If it does, then print out the integer directly, otherwise add 2 to the integer and print it out. You can try to figure out how this SCL program works, as it may help you to understand the problem better.