Segment trees are the foundation upon which all of competitive programming is built.
(+
(EXPT 23 2.4)
(SIN (\* 44 0.23 22))
(COS (+ 12 0.43 19.0))
(TAN (/ 1.4 0.77 3/4))
)
or (+ (EXPT 23 2.4)
(SIN (\* 44 0.23 22))
(COS (+ 12 0.43 19.0))
(TAN (/ 1.4 0.77 3/4)))
The first option has both opening and closing brackets on their own lines, while the second has neither. Note that I consider the function name to be part of the opening bracket since it's distinct from the parameters. [1, 2, 3]
f(x, y, z)
[
1,
2,
3,
]
f(
x,
y,
z
)
instead of [1,
2,
3,
]
f(x,
y,
z,
)