|
||||||||||
I Wanna Become A 24-Point MasterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1837 Accepted Submission(s): 766 Special Judge Problem Description Recently Rikka falls in love with an old but interesting game -- 24 points. She wants to become a master of this game, so she asks Yuta to give her some problems to practice. Quickly, Rikka solved almost all of the problems but the remained one is really difficult: In this problem, you need to write a program which can get 24 points with $n$ numbers, which are all equal to $n$. Input There are no more then 100 testcases and there are no more then 5 testcases with $n \geq 100$. Each testcase contains only one integer $n\ (1 \leq n \leq 10^5)$ Output For each testcase: If there is not any way to get 24 points, print a single line with -1. Otherwise, let $A$ be an array with $2n-1$ numbers and at firsrt $A_i=n\ (1 \leq i \leq n)$. You need to print $n-1$ lines and the $i$th line contains one integer $a$, one char $b$ and then one integer c, where $1 \leq a,c <n+i$ and $b$ is "+","-","*" or "/". This line means that you let $A_a$ and $A_c$ do the operation $b$ and store the answer into $A_{n+i}$. If your answer satisfies the following rule, we think your answer is right: 1. $A_{2n-1}=24$ 2. Each position of the array $A$ is used at most one tine. 3. The absolute value of the numerator and denominator of each element in array $A$ is no more than $10^9$ Sample Input
Sample Output
Author XJZX Source | ||||||||||
|