matrix chain multiplication algorithm

join shbcf.ru