https://codeforces.com/contest/195/problem/D I am so close to the solution but there is something that confuse me

the problem describe that $$$S(x)$$$ is sum of $$$n$$$ functions, the solution just use $$$F(x)$$$ for each line,

Should I consider $$$S(x)$$$ so I should sum all $$$k_i$$$ and $$$b_i$$$ ? https://codeforces.com/contest/195/submission/67170155 Anyone know why I am wrong?

Can anyone help me If he have explanation for the solution or explain the tutorial more because it is a bit unclear for me. :)