I need help with a problem ...

Revision en2, by GokuSSJ7, 2019-09-24 06:23:05

Hello Codeforces; I need help with the following problem : For the sequence a[1], a[2], a[3], ..., a [n] increase gradually. Prove that when x=a[n/2+1], the function f(x)=abs(a[1]-x) + abs (a[2]-x) + ... + abs(a[n]-x) has the smallest value. Thanks you !

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English GokuSSJ7 2019-09-24 06:23:05 3 Tiny change: 'ng problem\nFor the ' -> 'ng problem : \nFor the '
en1 English GokuSSJ7 2019-09-24 06:22:28 285 Initial revision (published)