|
||||||||||
Super macrosTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 129 Accepted Submission(s): 7 Problem Description SuperHacker is a advanced Hacker. He often write GNU style macros to optimize the programs. One day pooorman gave him a batch of ugly style c code using nested ternary operator (? :), which makes the code difficult to comprehend. Now SuperHacker turn to you for help, he have write a program to collect all the ugly code into a file, he send such file to you. Please write a utility to convert such file into a GNU C marcos header file. Input Input contains multiple valid (nested) c ternary operator expression. Each will be ended with a semicolon. There will be no empty expressions. Output For each case, generate a GNU C style macro function named with SuperHacker_functionn, n is the case num, which is started from 0. There should be a blank line between each case. Each case should be output as the Sample Output below. Each line of the output should be indented well with tab(\t) as Sample output. The trailing line continuing symbol backslashs(\) macro end symbol '})' at the last line of a macro should be right aligned with tabs aligned. Each continuing symbol and macro end symbol '})' should be seperated with the code in such line with at least one tab indent. The tab symbol considered 8 word width. To make the macro file includable, you should add some code to prevent multiple including at the begin and end of the output file, Same as the sample output below. You should trim the redundancy parenthesis. Sample Input
Sample Output
Source | ||||||||||
|