Codeforces Round 341 (Div. 2)
D
Rat Kwesh and Cheese
Codeforces
2400
原题
← CE →
翻译中…

Wet Shark asked Rat Kwesh to generate three positive real numbers $*x*$, $*y*$ and $*z*$, from $0.1$ to $200.0$, inclusive. Wet Krash wants to impress Wet Shark, so all generated numbers will have exactly one digit after the decimal point.

翻译中…

Wet Shark knows Rat Kwesh will want a lot of cheese. So he will give the Rat an opportunity to earn a lot of cheese. He will hand the three numbers $*x*$, $*y*$ and $*z*$ to Rat Kwesh, and Rat Kwesh will pick one of the these twelve options:

翻译中…
  1. $*a*_{1} = *x*^{*y*^{*z*}}$;
  2. $*a*_{2} = *x*^{*z*^{*y*}}$;
  3. $*a*_{3} = (*x*^{*y*})^{*z*}$;
  4. $*a*_{4} = (*x*^{*z*})^{*y*}$;
  5. $*a*_{5} = *y*^{*x*^{*z*}}$;
  6. $*a*_{6} = *y*^{*z*^{*x*}}$;
  7. $*a*_{7} = (*y*^{*x*})^{*z*}$;
  8. $*a*_{8} = (*y*^{*z*})^{*x*}$;
  9. $*a*_{9} = *z*^{*x*^{*y*}}$;
  10. $*a*_{10} = *z*^{*y*^{*x*}}$;
  11. $*a*_{11} = (*z*^{*x*})^{*y*}$;
  12. $*a*_{12} = (*z*^{*y*})^{*x*}$.
翻译中…

Let $*m*$ be the maximum of all the $*a*_{*i*}$, and $*c*$ be the smallest index (from $1$ to $12$) such that $*a*_{*c*} = *m*$. Rat's goal is to find that $*c*$, and he asks you to help him. Rat Kwesh wants to see how much cheese he gets, so he you will have to print the expression corresponding to that $*a*_{*c*}$.

翻译中…

Input

翻译中…

The only line of the input contains three space-separated real numbers $*x*$, $*y*$ and $*z*$ ($0.1 ≤ *x*, *y*, *z* ≤ 200.0$). Each of $*x*$, $*y*$ and $*z*$ is given with exactly one digit after the decimal point.

翻译中…

Output

翻译中…

Find the maximum value of expression among $*x*^{*y*^{*z*}}$, $*x*^{*z*^{*y*}}$, $(*x*^{*y*})^{*z*}$, $(*x*^{*z*})^{*y*}$, $*y*^{*x*^{*z*}}$, $*y*^{*z*^{*x*}}$, $(*y*^{*x*})^{*z*}$, $(*y*^{*z*})^{*x*}$, $*z*^{*x*^{*y*}}$, $*z*^{*y*^{*x*}}$, $(*z*^{*x*})^{*y*}$, $(*z*^{*y*})^{*x*}$ and print the corresponding expression. If there are many maximums, print the one that comes first in the list.

翻译中…

$*x*^{*y*^{*z*}}$ should be outputted as x^y^z (without brackets), and $(*x*^{*y*})^{*z*}$ should be outputted as (x^y)^z (quotes for clarity).

翻译中…

样例

Input #1
1.1 3.4 2.5
Output #1
z^y^x
InputCopy OutputCopy
Input #2
2.0 2.0 2.0
Output #2
x^y^z
InputCopy OutputCopy
Input #3
1.9 1.8 1.7
Output #3
(x^y)^z
InputCopy OutputCopy
题目信息
题号
621D
时间限制
2 s
内存限制
256 MB
标签
暴力
构造
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。