  We show the existence of a constant $c > 0$ such that, for all positive
integers $n$, there exist integers $1 \leq a_1 < \ldots < a_k \leq n$ such that
there are at least $cn^2$ distinct integers of the form $\sum_{i=u}^{v}a_i$
with $1 \leq u \leq v \leq k$. This answers a question of Erd\H{o}s and Graham.
We also prove a non-trivial upper bound on the maximum number of distinct
integers of this form and address several open problems.
