Competitive programming chapter 1.