×

# KESHOW CHALLENGES AMIT - BIG(O)

 0 Can any one help me with this problem ? I cannot understand the algorithm . asked 03 Apr '15, 08:27 11●2 accept rate: 0%

 0 this problem is directly solved using matrix exponentiation first we need to write the recurrence in matrix form |a b c 1| x |t(n-1)| |1 0 0 0| |t(n-2)| |0 1 0 0| |t(n-3)| |0 0 0 1| |d | then find pow(n-3) binary exponentiation if u cant understand this see this link:http://zobayer.blogspot.in/2010/11/matrix-exponentiation.html link to my solution:http://www.codechef.com/viewsolution/6610526  answered 03 Apr '15, 12:57 4★pallesai 176●8●30 accept rate: 17%
 0 @shakil_ruet The editorial will be posted by tonight answered 03 Apr '15, 17:19 893●2●11●35 accept rate: 10% @shakil_ruet the editorial has been posted (03 Apr '15, 19:52)
 0 Thanks for the help :) @dragonemperor and @pallesai answered 03 Apr '15, 23:47 11●2 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×105

question asked: 03 Apr '15, 08:27

question was seen: 817 times

last updated: 03 Apr '15, 23:47