This has been discussed before. The gist of the discussion usually comes down to this being perfectly possible. Over a time period as short as most backpacks nutrition is not an issue so much as simply getting the calories your body needs. Getting some fiber can become an issue if you rely mostly on junk foods. No fiber or low fiber leads to constipation.

The main issue is whether you personally find a diet made up of nothing but uncooked, ready-to-eat food to be palatable. That is purely a matter of taste. The more you are the kind of person who considers food merely as fuel, rather than as a pleasure in itself and a central part of your day, the more easily you'll adapt to the no-cooking approach. But the only way to know is to try it and see how you like it.