You retain all rights to a game you've made, unless you sign a publishing contact or similar. Taking part in a jam doesn't change that.