Hi CF!
I was recently solving this problem : http://www.spoj.com/problems/KOPC12B/
The problem statement is just one line, so no need to rephrase it.
Knowing the solution to the problem without weights, and printing consecutive values, I guessed the answer to be n*C(2n,n)/2 after some trial and error and was surprised it passed.
I tried to arrive at a combinatronics proof by trying to pose the problem as counting binary strings with certain properties, but didn't get somewhere noticeable, I also tried changing (C(n,k)^2) to C(n,k) * C(n,n — k).
Any help proving this? Thanks.