Блог пользователя saptarshikuar2003

Автор saptarshikuar2003, история, 19 месяцев назад, По-английски

submission link:-- https://codeforces.me/contest/1991/submission/305969839 problem link:-- https://codeforces.me/contest/1991/problem/C

My idea is to come to a state of balance that's why I am taking x=(v[0]+v[1])/2.then to have a greater value of x I larger vales v[0] and v[1].

I also tried to take the average but still didn't work.....(v[0]+v[1]+v[2]+....+v[v.size()-1])/v.size().

but it is not working as may taking more oppertion than it should take....

then I come across the editorial and there they used the narrowing the range concept....

can someone help my what is mistake I am doing.......

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
19 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

Take 40 times (max(v) + min(v))/2 (as done in 273141051), it's almost same thing as in editorial.