The largest weight subsequence

Problem Name:
The largest weight subsequence
Site:Spoj
Links:
Tags:
Problem setters: