I'm not 100% if I understand your question, but I think you want to remove the /category/ base? Go to Settings > Permalinks > Choose Custom Structure and choose /%postname%/ (which is your /subsub/ example). Then to remove the base (your /sub/), add a . to the Category Base field near the bottom under Optional.