ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1457. Heating Main

explanation of given test
Posted by So Sui Ming 12 Dec 2023 12:09
f(x) = (x-7)^2 + (x-4)^2 + (x-5)^2
Find x such that f(x) (cost function) is a minimum.

df/dx = 2(x-7) + 2(x-4) + 2(x-5) = 0
3x = 7+4+5
x = (7+4+5)/3

The biggest hurdle is the problem statement itself!