F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

I Wanna Become A 24-Point Master

Time 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
4
 

Sample Output
1 * 2 5 + 3 6 + 4
 

Author
XJZX
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-20 08:52:43, Gzip enabled