Pushing DIV2 Code to Github during contest

What if I am in DIV 1 and I decided to solve the DIV 2 problems that are NOT part of the contest. I submit it on code chef and then push it to github.

I know it is a bad idea and I have not intentions of doing this or anything similiar, but I just wanted a clarification as to what CodeChef is going to do if someone else in DIV 2 copy pastes that code. Will I still get a ban/negative rating ? Will it affect my DIV 1 rating ?

you will be banned from codechef.

Why on earth would anyone like to do that? Unless his true intention is to help people cheat. You can obviously participate in div2 for practice, and later push your codes to GitHub. But should not be during a live contest.

  1. Pushing it to github isnt earning you money or fame. Why do it?
  2. Contests involve money. Pushing code on github intentionally is seen as an intentional attempt to violate contest. Codechef reserves to suspend your account on slightest suspicion, and/or take further actions after that.