GokuSSJ7's blog

By GokuSSJ7, history, 5 years ago, In English

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 !

  • Vote: I like it
  • -9
  • Vote: I do not like it

| Write comment?