We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #116: Red, green or blue tiles
Project Euler #116: Red, green or blue tiles
Sort by
recency
|
10 Discussions
|
Please Login in order to post a comment
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
I get runtimeError with all cases but case 0 and 0 points but ... my python code solves the original Euler problem test case.
Swift. [Segmentation Fault]
~Don't know what to do..
My java code passed the first case but "Termited due to Timeout" in other.
Can Anyone help me in optimizing the code ?
I think it take less time with compare to next (;一_一) but nope, it's take 8.33% more loop than 0-n
smallest in size (lines of code)?
but still TLE ಠ_ಥ