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

Автор hellishere, история, 8 лет назад, По-английски

in question C round A of google code jam university round Jane's Flower Shop i saw peoples solution why have they assumed the irr function to be a decreasing function cant it be increasing function i am saying this because in most code of accepted solution i saw if(v < 0) hi = m; else lo = m; where v is the value of the function at m. link to question::https://code.google.com/codejam/contest/11274486/dashboard#s=p2

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

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

It should be a decreasing function. Check the value of the function at r=-1. It is positive. We know it has root when -1<r<1. So value of the function decreases as r increases.