Implement solved_problems for User.
Add before_save callback to ContestResult to calculate total score.
Update after_save callback for Submission.
Update the leaderboard method from Contest.
Update the leaderboard template.