Backpack(LintCode 92):

Problem