Greedy algorithm for even item distribution
It looks like a greedy algorithm cannot do it alone. 

Here is an approach based on binary search.

Suppose we have a subroutine to determine that if it is possible to have a chocolate supply of $s$ after the truck driver has hauled between the stores, given $s$. Note that if $s$ is possible, than $t$ is possible for any $t&lt;s$.

Let $m$ be the maximum among $c_i$. Let us check if $m/2$ is possible. If yes, let us try $(m/2 + m + 1)/2$. (+1 to ensure we will try $m$ just in case). If no, check $m/4$. I believe you can see the rest of binary search algorithm. Be careful with various boundary cases.

Now the problem is how to build that subroutine? We can think recursively. Let $s$ be given. If $c_1&gt;s$, we will use a truck to move $c_1-s$ chocolates to $p_2$. Whatever is left when the the truck has reached $p_2$ will be added to $c_2$. So we got $c_2'$. If $c_1=s$, $c_2'=c_2$. If $c_1&lt;s$, compute $d_2$, the least amount of the chocolate needed to be carried on a truck that starts from $p_2$ can reach $p_1$ to increase $c_1$ to $s$. Subtract that amount from $c_2$ and get $c_2'$, which might be negative. We can see that $s$ is possible initially if and only if $s$ is possible for $c_2', c_3, \cdots, c_n$ at $p_2,p_3,\cdots, p_n$ respectively.

There should be enough hint above. I will let you finish the rest of work.