Problem

Source: Philippine MO 2023/8

Tags: geometry, functional equation, combinatorial geometry, PMO, function, nice



Let $\mathcal{S}$ be the set of all points in the plane. Find all functions $f : \mathcal{S} \rightarrow \mathbb{R}$ such that for all nondegenerate triangles $ABC$ with orthocenter $H$, if $f(A) \leq f(B) \leq f(C)$, then $$f(A) + f(C) = f(B) + f(H).$$