POJ-3735 Training little cats
我们看到这个题,很容易想到矩阵快速幂的做法。因为题目中两个条件实在太显眼:
All the cats perform a sequence of these moves and must repeat it mmm times!
m≤1010m\leq 10^{10}m≤1010
一个相同的操作,做 101010^{10}1010 次,肯定是矩阵快速幂,问题就是我们如何把三个操作转化为 (n+1)×(n+1)(n+1)\times (n+1)(n+1)×(n+1) 的矩阵 optoptopt,opt
原创
2020-08-24 17:06:42 ·
113 阅读 ·
0 评论