Y = mX+B This formula is the basics of the Cartesian coordinate system. And about 70% of the knowledge, needed to solve problem B in the 2. Division of CodeForces. The problem looks like this: There are n points on a coordinate…