Modified fibonacci problem

Revision en1, by beibarys.17, 2018-09-15 14:09:02

Please help on this problem:

We denote the function F by:

\begin{cases} F(x) = 1 & x\leq 2 \\ F(x) = F(x — 1) + F(x — 2) + x & x > 2 \end{cases}

Given q (1 ≤ q ≤ 105) queries. The queries are characterized by two numbers l, r (1 ≤ l ≤ r ≤ 109). Find:

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English beibarys.17 2018-09-15 14:09:02 356 Initial revision (published)