The answer is C=5150. The lower bound is obtained if we have 51 coins of value 511 and 49 coins of value 1. We now present two (similar) proofs that this C=5150 suffices.
First proof (original) Let a1≤⋯≤a100 denote the values of the coins in ascending order. Since the 51 coins a50,…,a100 are worth at least 51a50, it follows that a50≤5150; likewise a51≥511.
We claim that choosing the stacks with coin values
a1,a3,…,a49,a52,a54,…,a100
and
a2,a4,…,a50,a51,a53,…,a99
works. Let D denote the (possibly negative) difference between the two total values. Then
D=(a1−a2)+⋯+(a49−a50)−a51+(a52−a53)+⋯+(a98−a99)+a100≤25⋅0−511+24⋅0+1=5150.
Similarly, we have
D=a1+(a3−a2)+⋯+(a49−a48)−a50+(a52−a51)+⋯+(a100−a99)≥0+24⋅0−5150+25⋅0=−5150.
It follows that ∣D∣≤5150, as required.
Second proof (Evan Chen) Again we sort the coins in increasing order 0<a1≤a2≤⋯≤a100≤1. A large gap is an index i≥2 such that ai>ai−1+5150; obviously there is at most one such large gap.
Claim — If there is a large gap, it must be a51>a50+5150.
Proof. If i<50 then we get a50,…,a100>5150 and the sum ∑1100ai>50 is too large. Conversely if i>50 then we get a1,…,ai−1<511 and the sum ∑1100ai<1/51⋅51+49 is too small. □
Now imagine starting with the coins a1,a3,…,a99, which have total value S≤25. We replace a1 by a2, then a3 by a4, and so on, until we replace a99 by a100. At the end of the process we have S≥25. Moreover, since we did not cross a large gap at any point, the quantity S changed by at most C=5150 at each step. So at some point in the process we need to have 25−C/2≤S≤25+C/2, which proves C works.