How to Implement "Method of four — Russians for Multiplication for boolean matrices" properly ? [in c++]

Revision en3, by rsampaths16, 2016-09-16 21:58:43

About a month ago in Augest-Long-Challenge[2016] a question — "Funny — Genome" was asked in CodeChef. Although no Official Editorial was released for it , "wodahs_cc" suggested that we need to use "Four Russian Method" to solve for the problem in the forum. I've searched the Internet and also gone through the Video for it, but I could not find a proper implementation to it, So I've Implemented it with my own understanding of the algorithm but still got "Time-Limit-Exceeded" error for some test cases. I don't know what I did wrong. I request you people of Code-Forces community to kindly provide an Implementation for the Four-Russian-Method. I thank you all in advance.

P.S : A Link to my Implementation.

Tags binary matrix, fast multiplication, dp, implementation

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English rsampaths16 2016-09-16 21:58:43 0 (published)
en2 English rsampaths16 2016-09-16 21:54:11 9
en1 English rsampaths16 2016-09-16 21:52:56 1109 Initial revision (saved to drafts)