01 backpack algorithm C language code