You are viewing a single comment's thread. Return to all comments →
I think I have a Java implementation of an algorithm, but it's getting hammered in matrix multiplies where the elements are "BigMod" objects representing integers modulo 998244353, with addition, multiplication, inverse,... I'm wondering if the problem is brain leakage -- I know my algorithm is O(nNodes ** 3), maybe there's a better algorithm. On the other hand, if this really is the bound, is it worthwhile to rewrite in C/C++ or Python? Another angle would be to use a proper matrix package and converting operation results by % 998244353. Is there some way to import external (git-accessible) libraries into a Hackerrank workspace?