Mostly code from contests and algorithmic challenges