ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1133. Fibonacci Sequence

Connector Hint! and WA10 [1] // Problem 1133. Fibonacci Sequence 1 Jun 2010 16:38
For not to use long arithmetic, notice that if you get a value < −2·10^9 or > 2·10^9 by calculating fib[i] in the the range [min(i, j, n); max(i, j, n)] then you can assign fib[i] = -2*10^9-1 or 2*10^9+1 respectively.
Eric Romanenghi Re: Hint! and WA10 // Problem 1133. Fibonacci Sequence 19 Jul 2013 21:22
Why?