| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 256 MB | 3 | 1 | 1 | 33.333% |
Taaaamara is big fan of the Serbian quiz "Slagalica". Her favourite game in the quiz is "My Number". In this game you get a set of integers $S$ and one target number $T$. You can use use each element from $S$ at most once and some mathematical operations to build a valid mathematical expression equal to $T$. For example, if you have $S$ = {2,ドル 5, 2, 15, 10$} and $T = 38,ドル one valid expression can be: 2ドル \times (15 + 5)-2$.
Today, Taaaamara is playing one modification of this game:
+' (addition), '-' (substraction),'*' (multiplication), Divison is not allowed. She can use brackets too.Can you help her?
First line of input contains number $n$ $(1 \leq n \leq 124)$. Second line of input contains $n$ integers, array $A$ $(1\leq A_i \leq 10^8)$.
In the first line of output print number $k \leq 12,ドル the length of array $B$. In the second line of output print $k$ integers, elements of array $B$. Each of next $n$ lines contains one valid mathematical expression, in the $i$-th line, the value of the expression should be equal to $A_i$. Expressions should be in the following format:
+' (ascii value 43ドル$).-' (ascii value 45ドル$).*' (ascii value 42ドル$).(' (ascii value 40ドル$) and ')' (ascii value 41ドル$).+' and '-' as unary operators. For example expressions $-5 + 3$ and 5ドル - -3$ are not valid.' ' (ascii value 32ドル$). Special formatting of the output is not needed (see example).6 30 13 15 5 3 21
3 2 5 3 2*5*3 5*3- 2 5 *3 (5) 5 -2 3* (5+2 )