You are viewing a single comment's thread. Return to all comments →
It passed 100% using linear recurrence and matrix exponentiation in O(log(n)) Red: f(n) = f(n-1) + f(n-2) + 1 Green: f(n) = f(n-1) + f(n-3) + 1 Blue: f(n) = f(n-1) + f(n-4) + 1
to reduce the time %(10**+7) must be added inside the matrix exponentiation
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #116: Red, green or blue tiles
You are viewing a single comment's thread. Return to all comments →
It passed 100% using linear recurrence and matrix exponentiation in O(log(n)) Red: f(n) = f(n-1) + f(n-2) + 1 Green: f(n) = f(n-1) + f(n-3) + 1 Blue: f(n) = f(n-1) + f(n-4) + 1
to reduce the time %(10**+7) must be added inside the matrix exponentiation