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 1225. Flags

solution is here
Posted by Temirbay Miras 24 Dec 2014 14:38
f[] is an array of fibonacci numbers
cout << f[n] + f[n-1] + f[n-2];
except 1 and 2,
if (n == 1 || n == 2) cout << 2;
Re: solution is here
Posted by thugwaffle 14 Sep 2015 00:58
Can you explain why this works? I can't seem to draw a relationship with the fibonacci sequence from the problem statement.